Skip custom node logic completely if disabled and no whitelisted nodes. (#8719)

This commit is contained in:
comfyanonymous 2025-06-28 12:53:40 -07:00 committed by GitHub
parent ba9548f756
commit a3cf272522
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -55,6 +55,9 @@ def apply_custom_paths():
def execute_prestartup_script():
if args.disable_all_custom_nodes and len(args.whitelist_custom_nodes) == 0:
return
def execute_script(script_path):
module_name = os.path.splitext(script_path)[0]
try:
@ -277,7 +280,7 @@ def start_comfyui(asyncio_loop=None):
hook_breaker_ac10a0.save_functions()
nodes.init_extra_nodes(
init_custom_nodes=True,
init_custom_nodes=(not args.disable_all_custom_nodes) or len(args.whitelist_custom_nodes) > 0,
init_api_nodes=not args.disable_api_nodes
)
hook_breaker_ac10a0.restore_functions()