fix: prevent user-site package leakage

Set environment variables for user profile and cache directories before running the Python script.
This commit is contained in:
tom-m 2026-05-18 03:16:50 +09:00 committed by GitHub
parent 601a7eb213
commit acb16b9fa4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,2 +1,14 @@
set "BASE=%~dp0"
set PYTHONNOUSERSITE=1
set PYTHONPATH=
set PYTHONHOME=
set "USERPROFILE=%BASE%user_profile_cache"
set "HOME=%BASE%user_profile_cache"
set "HF_HOME=%BASE%user_profile_cache\huggingface"
set "TORCH_HOME=%BASE%user_profile_cache\torch"
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build
pause