Replace the prior release tree with the current plugin, frontend, tests, and documentation. Document retired node IDs and the public Gitea update source.
25 lines
674 B
Python
25 lines
674 B
Python
"""Disable ComfyUI Partner/API nodes when the launch command did not do so."""
|
|
|
|
import sys
|
|
|
|
|
|
DISABLE_API_NODES_FLAG = "--disable-api-nodes"
|
|
|
|
|
|
def _has_disable_api_nodes_flag(argv):
|
|
return any(
|
|
argument == DISABLE_API_NODES_FLAG
|
|
or argument.startswith(f"{DISABLE_API_NODES_FLAG}=")
|
|
for argument in argv[1:]
|
|
)
|
|
|
|
|
|
if _has_disable_api_nodes_flag(sys.argv):
|
|
print("[comfyui_o1key] --disable-api-nodes already set; prestartup override skipped")
|
|
else:
|
|
from comfy.cli_args import args
|
|
|
|
args.disable_api_nodes = True
|
|
sys.argv.append(DISABLE_API_NODES_FLAG)
|
|
print("[comfyui_o1key] Partner/API Nodes disabled by prestartup override")
|