Commit 3039b08e authored by comfyanonymous's avatar comfyanonymous
Browse files

Only parse command line args when main.py is called.

parent 30de95e4
import argparse
import enum
import comfy.options
class EnumAction(argparse.Action):
"""
......@@ -94,7 +94,10 @@ parser.add_argument("--windows-standalone-build", action="store_true", help="Win
parser.add_argument("--disable-metadata", action="store_true", help="Disable saving prompt metadata in files.")
args = parser.parse_args()
if comfy.options.args_parsing:
args = parser.parse_args()
else:
args = parser.parse_args([])
if args.windows_standalone_build:
args.auto_launch = True
......
args_parsing = False
def enable_args_parsing(enable=True):
global args_parsing
args_parsing = enable
import comfy.options
comfy.options.enable_args_parsing()
import os
import importlib.util
import folder_paths
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment