mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-16 18:02:58 +08:00
improve installer
This commit is contained in:
parent
f19e0676b4
commit
007093caa4
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
|||||||
__pycache__/
|
__pycache__/
|
||||||
|
.idea/
|
||||||
|
.vscode/
|
||||||
.tmp
|
.tmp
|
||||||
20
__init__.py
20
__init__.py
@ -8,15 +8,31 @@ try:
|
|||||||
except:
|
except:
|
||||||
my_path = os.path.dirname(__file__)
|
my_path = os.path.dirname(__file__)
|
||||||
requirements_path = os.path.join(my_path, "requirements.txt")
|
requirements_path = os.path.join(my_path, "requirements.txt")
|
||||||
subprocess.check_call([sys.executable, '-m', 'pip', 'install', '-r', requirements_path])
|
|
||||||
|
print(f"## ComfyUI-Manager: installing dependencies")
|
||||||
|
|
||||||
|
subprocess.check_call([sys.executable, '-s', '-m', 'pip', 'install', '-r', requirements_path])
|
||||||
|
|
||||||
|
try:
|
||||||
import git
|
import git
|
||||||
|
except:
|
||||||
|
print(f"## [ERROR] ComfyUI-Manager: Attempting to reinstall dependencies using an alternative method.")
|
||||||
|
subprocess.check_call([sys.executable, '-s', '-m', 'pip', 'install', '--user', '-r', requirements_path])
|
||||||
|
|
||||||
|
try:
|
||||||
|
import git
|
||||||
|
except:
|
||||||
|
print(f"## [ERROR] ComfyUI-Manager: Failed to install the GitPython package in the correct Python environment. Please install it manually in the appropriate environment. (You can seek help at https://app.element.io/#/room/%23comfyui_space%3Amatrix.org)")
|
||||||
|
|
||||||
|
print(f"## ComfyUI-Manager: installing dependencies done.")
|
||||||
|
|
||||||
|
|
||||||
sys.path.append('../..')
|
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.12)")
|
print("### Loading: ComfyUI-Manager (V0.12.1)")
|
||||||
|
|
||||||
comfy_ui_revision = "Unknown"
|
comfy_ui_revision = "Unknown"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user