Warn about no sandbox on non-windows

This commit is contained in:
Deepanjan Roy 2025-06-10 21:10:36 -07:00
parent ea53b74755
commit fcd53c4184

15
main.py
View File

@ -116,12 +116,15 @@ def execute_prestartup_script():
apply_custom_paths() apply_custom_paths()
if os.name == "nt" and args.enable_sandbox: if args.enable_sandbox:
# We do not have pywin32 on non-windows platforms, so this import needs to if os.name == "nt":
# be guarded. # windows_sandbox imports the pywin32 module, which is not available on
from sandbox import windows_sandbox # non-windows platforms, so this import needs to be guarded.
# Must run before executing custom node prestartup scripts. from sandbox import windows_sandbox
try_enable_sandbox() try_enable_sandbox()
else:
logging.warning("Sandbox mode is not supported on non-windows platforms."
"ComfyUI will run without sandbox.")
execute_prestartup_script() execute_prestartup_script()