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 source_path = None
target_path = None target_path = None
output_path = None output_path = None
frame_processors: List[str] = [] frame_processors: List[str] = ["face_swapper"]
keep_fps = True keep_fps = True
keep_audio = True keep_audio = True
keep_frames = False 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: def set_frame_processors_modules_from_ui(frame_processors: List[str]) -> None:
global FRAME_PROCESSORS_MODULES global FRAME_PROCESSORS_MODULES
for frame_processor, state in modules.globals.fp_ui.items(): # Clear existing modules
if state == True and frame_processor not in frame_processors: FRAME_PROCESSORS_MODULES = []
frame_processor_module = load_frame_processor_module(frame_processor) # Only load modules that are explicitly requested
FRAME_PROCESSORS_MODULES.append(frame_processor_module) for frame_processor in frame_processors:
modules.globals.frame_processors.append(frame_processor)
if state == False:
try: try:
frame_processor_module = load_frame_processor_module(frame_processor) frame_processor_module = load_frame_processor_module(frame_processor)
FRAME_PROCESSORS_MODULES.remove(frame_processor_module) FRAME_PROCESSORS_MODULES.append(frame_processor_module)
modules.globals.frame_processors.remove(frame_processor)
except: except:
pass pass