diff --git a/hordelib/comfy_horde.py b/hordelib/comfy_horde.py index b9926f71..19a84fdb 100644 --- a/hordelib/comfy_horde.py +++ b/hordelib/comfy_horde.py @@ -97,7 +97,11 @@ # isort: off -def do_comfy_import(force_normal_vram_mode: bool = False, extra_comfyui_args: list[str] | None = None) -> None: +def do_comfy_import( + force_normal_vram_mode: bool = False, + extra_comfyui_args: list[str] | None = None, + disable_smart_memory: bool = False, +) -> None: global _comfy_current_loaded_models global _comfy_load_models_gpu global _comfy_nodes, _comfy_PromptExecutor, _comfy_validate_prompt @@ -111,7 +115,8 @@ def do_comfy_import(force_normal_vram_mode: bool = False, extra_comfyui_args: li logger.info("Disabling smart memory") - sys.argv.append("--disable-smart-memory") + if disable_smart_memory: + sys.argv.append("--disable-smart-memory") if force_normal_vram_mode: logger.info("Forcing normal vram mode")