fixed the processor issue for MAC

pull/1133/head
Tamim Dostyar 2025-04-29 14:14:18 -05:00
parent c67afc1033
commit a4980474eb
2 changed files with 8 additions and 11 deletions

View File

@ -15,7 +15,7 @@ simple_map = {}
source_path = None
target_path = None
output_path = None
frame_processors: List[str] = []
frame_processors: List[str] = ["face_swapper"]
keep_fps = True
keep_audio = True
keep_frames = False

View File

@ -42,16 +42,13 @@ def get_frame_processors_modules(frame_processors: List[str]) -> List[ModuleType
def set_frame_processors_modules_from_ui(frame_processors: List[str]) -> None:
global FRAME_PROCESSORS_MODULES
for frame_processor, state in modules.globals.fp_ui.items():
if state == True and frame_processor not in frame_processors:
frame_processor_module = load_frame_processor_module(frame_processor)
FRAME_PROCESSORS_MODULES.append(frame_processor_module)
modules.globals.frame_processors.append(frame_processor)
if state == False:
# Clear existing modules
FRAME_PROCESSORS_MODULES = []
# Only load modules that are explicitly requested
for frame_processor in frame_processors:
try:
frame_processor_module = load_frame_processor_module(frame_processor)
FRAME_PROCESSORS_MODULES.remove(frame_processor_module)
modules.globals.frame_processors.remove(frame_processor)
FRAME_PROCESSORS_MODULES.append(frame_processor_module)
except:
pass