Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
3039b08e
Commit
3039b08e
authored
Sep 13, 2023
by
comfyanonymous
Browse files
Only parse command line args when main.py is called.
parent
30de95e4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
comfy/cli_args.py
comfy/cli_args.py
+5
-2
comfy/options.py
comfy/options.py
+6
-0
main.py
main.py
+3
-0
No files found.
comfy/cli_args.py
View file @
3039b08e
import
argparse
import
argparse
import
enum
import
enum
import
comfy.options
class
EnumAction
(
argparse
.
Action
):
class
EnumAction
(
argparse
.
Action
):
"""
"""
...
@@ -94,7 +94,10 @@ parser.add_argument("--windows-standalone-build", action="store_true", help="Win
...
@@ -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."
)
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
:
if
args
.
windows_standalone_build
:
args
.
auto_launch
=
True
args
.
auto_launch
=
True
...
...
comfy/options.py
0 → 100644
View file @
3039b08e
args_parsing
=
False
def
enable_args_parsing
(
enable
=
True
):
global
args_parsing
args_parsing
=
enable
main.py
View file @
3039b08e
import
comfy.options
comfy
.
options
.
enable_args_parsing
()
import
os
import
os
import
importlib.util
import
importlib.util
import
folder_paths
import
folder_paths
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment