mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-08-02 15:04:50 +08:00
Add --no-custom-node
cmd flag (#3903)
* Add --no-custom-node cmd flag * nit
This commit is contained in:
13
main.py
13
main.py
@@ -5,6 +5,8 @@ import os
|
||||
import importlib.util
|
||||
import folder_paths
|
||||
import time
|
||||
from comfy.cli_args import args
|
||||
|
||||
|
||||
def execute_prestartup_script():
|
||||
def execute_script(script_path):
|
||||
@@ -18,6 +20,9 @@ def execute_prestartup_script():
|
||||
print(f"Failed to execute startup-script: {script_path} / {e}")
|
||||
return False
|
||||
|
||||
if args.disable_all_custom_nodes:
|
||||
return
|
||||
|
||||
node_paths = folder_paths.get_folder_paths("custom_nodes")
|
||||
for custom_node_path in node_paths:
|
||||
possible_modules = os.listdir(custom_node_path)
|
||||
@@ -76,7 +81,7 @@ import yaml
|
||||
import execution
|
||||
import server
|
||||
from server import BinaryEventTypes
|
||||
from nodes import init_custom_nodes
|
||||
from nodes import init_builtin_extra_nodes, init_external_custom_nodes
|
||||
import comfy.model_management
|
||||
|
||||
def cuda_malloc_warning():
|
||||
@@ -214,7 +219,11 @@ if __name__ == "__main__":
|
||||
for config_path in itertools.chain(*args.extra_model_paths_config):
|
||||
load_extra_path_config(config_path)
|
||||
|
||||
init_custom_nodes()
|
||||
init_builtin_extra_nodes()
|
||||
if not args.disable_all_custom_nodes:
|
||||
init_external_custom_nodes()
|
||||
else:
|
||||
logging.info("Skipping loading of custom nodes")
|
||||
|
||||
cuda_malloc_warning()
|
||||
|
||||
|
Reference in New Issue
Block a user