mirror of
https://github.com/s0md3v/roop.git
synced 2025-12-07 18:38:28 +00:00
Introduce Frame processor xxx crashed
This commit is contained in:
parent
5d9360d8ef
commit
6169955deb
@ -1,5 +1,4 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import importlib
|
import importlib
|
||||||
import psutil
|
import psutil
|
||||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||||
@ -27,9 +26,9 @@ def load_frame_processor_module(frame_processor: str) -> Any:
|
|||||||
frame_processor_module = importlib.import_module(f'roop.processors.frame.{frame_processor}')
|
frame_processor_module = importlib.import_module(f'roop.processors.frame.{frame_processor}')
|
||||||
for method_name in FRAME_PROCESSORS_INTERFACE:
|
for method_name in FRAME_PROCESSORS_INTERFACE:
|
||||||
if not hasattr(frame_processor_module, method_name):
|
if not hasattr(frame_processor_module, method_name):
|
||||||
sys.exit()
|
raise NotImplementedError
|
||||||
except ImportError:
|
except (ImportError, NotImplementedError):
|
||||||
sys.exit()
|
quit(f'Frame processor {frame_processor} crashed.')
|
||||||
return frame_processor_module
|
return frame_processor_module
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user