mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-16 18:02:58 +08:00
improve: individual installation for requirements.txt
This commit is contained in:
parent
d75be97121
commit
ae8e0c992c
13
__init__.py
13
__init__.py
@ -33,7 +33,7 @@ sys.path.append('../..')
|
|||||||
from torchvision.datasets.utils import download_url
|
from torchvision.datasets.utils import download_url
|
||||||
|
|
||||||
# ensure .js
|
# ensure .js
|
||||||
print("### Loading: ComfyUI-Manager (V0.19.1)")
|
print("### Loading: ComfyUI-Manager (V0.20)")
|
||||||
|
|
||||||
comfy_ui_required_revision = 1240
|
comfy_ui_required_revision = 1240
|
||||||
comfy_ui_revision = "Unknown"
|
comfy_ui_revision = "Unknown"
|
||||||
@ -617,9 +617,14 @@ def execute_install_script(url, repo_path):
|
|||||||
requirements_path = os.path.join(repo_path, "requirements.txt")
|
requirements_path = os.path.join(repo_path, "requirements.txt")
|
||||||
|
|
||||||
if os.path.exists(requirements_path):
|
if os.path.exists(requirements_path):
|
||||||
print(f"Install: pip packages")
|
print("Install: pip packages")
|
||||||
install_cmd = [sys.executable, "-m", "pip", "install", "-r", "requirements.txt"]
|
with open(requirements_path, "r") as requirements_file:
|
||||||
try_install_script(url, repo_path, install_cmd)
|
for line in requirements_file:
|
||||||
|
package_name = line.strip()
|
||||||
|
if package_name:
|
||||||
|
install_cmd = [sys.executable, "-m", "pip", "install", package_name]
|
||||||
|
if package_name.strip() != "":
|
||||||
|
try_install_script(url, repo_path, install_cmd)
|
||||||
|
|
||||||
if os.path.exists(install_script_path):
|
if os.path.exists(install_script_path):
|
||||||
print(f"Install: install script")
|
print(f"Install: install script")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user