This commit is contained in:
Jedrzej Kosinski 2025-12-14 11:02:46 +01:00 committed by GitHub
commit e9a50af8d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 56 additions and 7 deletions

View File

@ -0,0 +1,4 @@
@echo off
..\python_embeded\python.exe .\install_manager.py ..\ComfyUI\
echo Installed manager through pip package, if not already installed.
pause

View File

@ -0,0 +1,24 @@
import sys
import os
repo_path = str(sys.argv[1])
repo_manager_req_path = os.path.join(repo_path, "manager_requirements.txt")
if os.path.exists(repo_manager_req_path):
import subprocess
# if not installed, we get 'WARNING: Package(s) not found: comfyui_manager'
# if installed, there will be a line like 'Version: 0.1.0' = False
try:
output = subprocess.check_output([sys.executable, '-s', '-m', 'pip', 'show', 'comfyui_manager'])
if 'Version:' in output.decode('utf-8'):
print("comfyui_manager is already installed, will attempt to update to matching version of ComfyUI.") # noqa: T201
else:
print("comfyui_manager is not installed, will install it now.") # noqa: T201
except:
pass
try:
subprocess.check_call([sys.executable, '-s', '-m', 'pip', 'install', '-r', repo_manager_req_path])
print("comfyui_manager installed successfully.") # noqa: T201
except:
print("Failed to install comfyui_manager, please install it manually.") # noqa: T201

View File

@ -126,6 +126,8 @@ cur_path = os.path.dirname(update_py_path)
req_path = os.path.join(cur_path, "current_requirements.txt") req_path = os.path.join(cur_path, "current_requirements.txt")
repo_req_path = os.path.join(repo_path, "requirements.txt") repo_req_path = os.path.join(repo_path, "requirements.txt")
manager_req_path = os.path.join(cur_path, "current_manager_requirements.txt")
repo_manager_req_path = os.path.join(repo_path, "manager_requirements.txt")
def files_equal(file1, file2): def files_equal(file1, file2):
try: try:
@ -152,6 +154,25 @@ if not os.path.exists(req_path) or not files_equal(repo_req_path, req_path):
except: except:
pass pass
if os.path.exists(repo_manager_req_path) and (not os.path.exists(manager_req_path) or not files_equal(repo_manager_req_path, manager_req_path)):
import subprocess
# first, confirm that comfyui_manager package is installed; only update it if it is
# if not installed, we get 'WARNING: Package(s) not found: comfyui_manager'
# if installed, there will be a line like 'Version: 0.1.0'
update_manager = False
try:
output = subprocess.check_output([sys.executable, '-s', '-m', 'pip', 'show', 'comfyui_manager'])
if 'Version:' in output.decode('utf-8'):
update_manager = True
except:
pass
if update_manager:
try:
subprocess.check_call([sys.executable, '-s', '-m', 'pip', 'install', '-r', repo_manager_req_path])
shutil.copy(repo_manager_req_path, manager_req_path)
except:
pass
stable_update_script = os.path.join(repo_path, ".ci/update_windows/update_comfyui_stable.bat") 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") stable_update_script_to = os.path.join(cur_path, "update_comfyui_stable.bat")

View File

@ -1,2 +1,2 @@
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build .\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --enable-manager
pause pause

View File

@ -1,2 +1,2 @@
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --disable-smart-memory .\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --enable-manager --disable-smart-memory
pause pause

View File

@ -1,2 +1,2 @@
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --fast .\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --enable-manager --fast
pause pause

View File

@ -1,3 +1,3 @@
..\python_embeded\python.exe -s ..\ComfyUI\main.py --windows-standalone-build --disable-api-nodes ..\python_embeded\python.exe -s ..\ComfyUI\main.py --windows-standalone-build --enable-manager --disable-api-nodes
echo If you see this and ComfyUI did not start try updating your Nvidia Drivers to the latest. echo If you see this and ComfyUI did not start try updating your Nvidia Drivers to the latest.
pause pause

View File

@ -1,2 +1,2 @@
.\python_embeded\python.exe -s ComfyUI\main.py --cpu --windows-standalone-build .\python_embeded\python.exe -s ComfyUI\main.py --cpu --windows-standalone-build --enable-manager
pause pause

View File

@ -1,3 +1,3 @@
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build .\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --enable-manager
echo If you see this and ComfyUI did not start try updating your Nvidia Drivers to the latest. echo If you see this and ComfyUI did not start try updating your Nvidia Drivers to the latest.
pause pause

View File

@ -1,3 +1,3 @@
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --fast fp16_accumulation .\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --enable-manager --fast fp16_accumulation
echo If you see this and ComfyUI did not start try updating your Nvidia Drivers to the latest. echo If you see this and ComfyUI did not start try updating your Nvidia Drivers to the latest.
pause pause