mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-12 07:10:52 +08:00
Warn about no sandbox on non-windows
This commit is contained in:
parent
ea53b74755
commit
fcd53c4184
15
main.py
15
main.py
@ -116,12 +116,15 @@ def execute_prestartup_script():
|
||||
|
||||
apply_custom_paths()
|
||||
|
||||
if os.name == "nt" and args.enable_sandbox:
|
||||
# We do not have pywin32 on non-windows platforms, so this import needs to
|
||||
# be guarded.
|
||||
from sandbox import windows_sandbox
|
||||
# Must run before executing custom node prestartup scripts.
|
||||
try_enable_sandbox()
|
||||
if args.enable_sandbox:
|
||||
if os.name == "nt":
|
||||
# windows_sandbox imports the pywin32 module, which is not available on
|
||||
# non-windows platforms, so this import needs to be guarded.
|
||||
from sandbox import windows_sandbox
|
||||
try_enable_sandbox()
|
||||
else:
|
||||
logging.warning("Sandbox mode is not supported on non-windows platforms."
|
||||
"ComfyUI will run without sandbox.")
|
||||
|
||||
execute_prestartup_script()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user