diff --git a/comfy/cli_args.py b/comfy/cli_args.py index 79ecbd682..771fc1655 100644 --- a/comfy/cli_args.py +++ b/comfy/cli_args.py @@ -49,6 +49,7 @@ parser.add_argument("--temp-directory", type=str, default=None, help="Set the Co parser.add_argument("--input-directory", type=str, default=None, help="Set the ComfyUI input directory. Overrides --base-directory.") parser.add_argument("--auto-launch", action="store_true", help="Automatically launch ComfyUI in the default browser.") parser.add_argument("--disable-auto-launch", action="store_true", help="Disable auto launching the browser.") +parser.add_argument("--disable-manager", action="store_true", help="Disable ComfyUI-Manager feature.") parser.add_argument("--cuda-device", type=int, default=None, metavar="DEVICE_ID", help="Set the id of the cuda device this instance will use.") cm_group = parser.add_mutually_exclusive_group() cm_group.add_argument("--cuda-malloc", action="store_true", help="Enable cudaMallocAsync (enabled by default for torch 2.0 and up).") diff --git a/main.py b/main.py index 4780a9c69..7ca04f4b1 100644 --- a/main.py +++ b/main.py @@ -10,6 +10,7 @@ from app.logger import setup_logger import itertools import utils.extra_config import logging +import comfyui_manager if __name__ == "__main__": #NOTE: These do not do anything on core ComfyUI which should already have no communication with the internet, they are for custom nodes. @@ -69,6 +70,8 @@ def execute_prestartup_script(): if args.disable_all_custom_nodes: return + comfyui_manager.prestartup() + node_paths = folder_paths.get_folder_paths("custom_nodes") for custom_node_path in node_paths: possible_modules = os.listdir(custom_node_path) @@ -267,6 +270,9 @@ def start_comfyui(asyncio_loop=None): prompt_server = server.PromptServer(asyncio_loop) q = execution.PromptQueue(prompt_server) + if not args.disable_manager: + comfyui_manager.start() + nodes.init_extra_nodes(init_custom_nodes=not args.disable_all_custom_nodes) cuda_malloc_warning() diff --git a/requirements.txt b/requirements.txt index 851db23bd..310ab57ba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ comfyui-frontend-package==1.15.13 +comfyui_manager torch torchsde torchvision