mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 23:00:51 +08:00
Move windows only requirements out to separate file
This commit is contained in:
parent
d5121f1294
commit
8207d0027e
@ -113,7 +113,8 @@ cur_path = os.path.dirname(update_py_path)
|
||||
|
||||
req_path = os.path.join(cur_path, "current_requirements.txt")
|
||||
repo_req_path = os.path.join(repo_path, "requirements.txt")
|
||||
|
||||
win_only_req_path = os.path.join(cur_path, "current_win_only_requirements.txt")
|
||||
win_only_repo_req_path = os.path.join(repo_path, "win_only_requirements.txt")
|
||||
|
||||
def files_equal(file1, file2):
|
||||
try:
|
||||
@ -140,6 +141,14 @@ if not os.path.exists(req_path) or not files_equal(repo_req_path, req_path):
|
||||
except:
|
||||
pass
|
||||
|
||||
# TODO: Delete this once ComfyUI manager fully supports '; sys_platform == "win32"' syntax
|
||||
if not os.path.exists(win_only_req_path) or not files_equal(win_only_repo_req_path, win_only_req_path):
|
||||
import subprocess
|
||||
try:
|
||||
subprocess.check_call([sys.executable, '-s', '-m', 'pip', 'install', '-r', win_only_repo_req_path])
|
||||
shutil.copy(win_only_repo_req_path, win_only_req_path)
|
||||
except:
|
||||
pass
|
||||
|
||||
stable_update_script = os.path.join(repo_path, ".ci/update_windows/update_comfyui_stable.bat")
|
||||
stable_update_script_to = os.path.join(cur_path, "update_comfyui_stable.bat")
|
||||
|
||||
3
.ci/windows_base_files/run_nvidia_gpu_sandboxed.bat
Normal file
3
.ci/windows_base_files/run_nvidia_gpu_sandboxed.bat
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --enable-sandbox
|
||||
pause
|
||||
@ -28,6 +28,3 @@ soundfile
|
||||
av>=14.2.0
|
||||
pydantic~=2.0
|
||||
pydantic-settings~=2.0
|
||||
|
||||
# Windows only dependencies:
|
||||
pywin32 ; sys_platform == "win32"
|
||||
|
||||
2
win_only_requirements.txt
Normal file
2
win_only_requirements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
# Needed to implement the windows sandbox
|
||||
pywin32 ; sys_platform == "win32"
|
||||
Loading…
Reference in New Issue
Block a user