mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-16 01:57:04 +08:00
In response to the patch that separates manager_requirements.txt from requirements.txt, this update additionally refreshes manager_requirements.txt when it is present.
79fb96488a
This commit is contained in:
parent
69b6f1a66b
commit
85ebcd9897
@ -1901,6 +1901,27 @@ def execute_install_script(url, repo_path, lazy_mode=False, instant_execution=Fa
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def install_manager_requirements(repo_path):
|
||||||
|
"""
|
||||||
|
Install packages from manager_requirements.txt if it exists.
|
||||||
|
This is specifically for ComfyUI's manager_requirements.txt.
|
||||||
|
"""
|
||||||
|
manager_requirements_path = os.path.join(repo_path, "manager_requirements.txt")
|
||||||
|
if not os.path.exists(manager_requirements_path):
|
||||||
|
return
|
||||||
|
|
||||||
|
logging.info("[ComfyUI-Manager] Installing manager_requirements.txt")
|
||||||
|
with open(manager_requirements_path, "r") as f:
|
||||||
|
for line in f:
|
||||||
|
line = line.strip()
|
||||||
|
if line and not line.startswith('#'):
|
||||||
|
if '#' in line:
|
||||||
|
line = line.split('#')[0].strip()
|
||||||
|
if line:
|
||||||
|
install_cmd = manager_util.make_pip_cmd(["install", line])
|
||||||
|
subprocess.run(install_cmd)
|
||||||
|
|
||||||
|
|
||||||
def git_repo_update_check_with(path, do_fetch=False, do_update=False, no_deps=False):
|
def git_repo_update_check_with(path, do_fetch=False, do_update=False, no_deps=False):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -2434,6 +2455,7 @@ def update_to_stable_comfyui(repo_path):
|
|||||||
else:
|
else:
|
||||||
logging.info(f"[ComfyUI-Manager] Updating ComfyUI: {current_tag} -> {latest_tag}")
|
logging.info(f"[ComfyUI-Manager] Updating ComfyUI: {current_tag} -> {latest_tag}")
|
||||||
repo.git.checkout(latest_tag)
|
repo.git.checkout(latest_tag)
|
||||||
|
execute_install_script("ComfyUI", repo_path, instant_execution=False, no_deps=False)
|
||||||
return 'updated', latest_tag
|
return 'updated', latest_tag
|
||||||
except Exception:
|
except Exception:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
|||||||
@ -968,6 +968,8 @@ async def task_worker():
|
|||||||
logging.error("ComfyUI update failed")
|
logging.error("ComfyUI update failed")
|
||||||
return "fail"
|
return "fail"
|
||||||
elif res == "updated":
|
elif res == "updated":
|
||||||
|
core.install_manager_requirements(repo_path)
|
||||||
|
|
||||||
if is_stable:
|
if is_stable:
|
||||||
logging.info("ComfyUI is updated to latest stable version.")
|
logging.info("ComfyUI is updated to latest stable version.")
|
||||||
return "success-stable-" + latest_tag
|
return "success-stable-" + latest_tag
|
||||||
|
|||||||
@ -1913,6 +1913,27 @@ def execute_install_script(url, repo_path, lazy_mode=False, instant_execution=Fa
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def install_manager_requirements(repo_path):
|
||||||
|
"""
|
||||||
|
Install packages from manager_requirements.txt if it exists.
|
||||||
|
This is specifically for ComfyUI's manager_requirements.txt.
|
||||||
|
"""
|
||||||
|
manager_requirements_path = os.path.join(repo_path, "manager_requirements.txt")
|
||||||
|
if not os.path.exists(manager_requirements_path):
|
||||||
|
return
|
||||||
|
|
||||||
|
logging.info("[ComfyUI-Manager] Installing manager_requirements.txt")
|
||||||
|
with open(manager_requirements_path, "r") as f:
|
||||||
|
for line in f:
|
||||||
|
line = line.strip()
|
||||||
|
if line and not line.startswith('#'):
|
||||||
|
if '#' in line:
|
||||||
|
line = line.split('#')[0].strip()
|
||||||
|
if line:
|
||||||
|
install_cmd = manager_util.make_pip_cmd(["install", line])
|
||||||
|
subprocess.run(install_cmd)
|
||||||
|
|
||||||
|
|
||||||
def git_repo_update_check_with(path, do_fetch=False, do_update=False, no_deps=False):
|
def git_repo_update_check_with(path, do_fetch=False, do_update=False, no_deps=False):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@ -561,6 +561,8 @@ async def task_worker():
|
|||||||
logging.error("ComfyUI update failed")
|
logging.error("ComfyUI update failed")
|
||||||
return "fail"
|
return "fail"
|
||||||
elif res == "updated":
|
elif res == "updated":
|
||||||
|
core.install_manager_requirements(repo_path)
|
||||||
|
|
||||||
if is_stable:
|
if is_stable:
|
||||||
logging.info("ComfyUI is updated to latest stable version.")
|
logging.info("ComfyUI is updated to latest stable version.")
|
||||||
return "success-stable-"+latest_tag
|
return "success-stable-"+latest_tag
|
||||||
|
|||||||
@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
[project]
|
[project]
|
||||||
name = "comfyui-manager"
|
name = "comfyui-manager"
|
||||||
license = { text = "GPL-3.0-only" }
|
license = { text = "GPL-3.0-only" }
|
||||||
version = "4.0.3b2"
|
version = "4.0.3b3"
|
||||||
requires-python = ">= 3.9"
|
requires-python = ">= 3.9"
|
||||||
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
|
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user