mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-10 15:50:02 +00:00
fix(manager): improve install guidance when comfyui-manager is not installed (#12810)
This commit is contained in:
13
main.py
13
main.py
@@ -3,6 +3,7 @@ comfy.options.enable_args_parsing()
|
||||
|
||||
import os
|
||||
import importlib.util
|
||||
import shutil
|
||||
import importlib.metadata
|
||||
import folder_paths
|
||||
import time
|
||||
@@ -64,8 +65,15 @@ if __name__ == "__main__":
|
||||
|
||||
|
||||
def handle_comfyui_manager_unavailable():
|
||||
if not args.windows_standalone_build:
|
||||
logging.warning(f"\n\nYou appear to be running comfyui-manager from source, this is not recommended. Please install comfyui-manager using the following command:\ncommand:\n\t{sys.executable} -m pip install --pre comfyui_manager\n")
|
||||
manager_req_path = os.path.join(os.path.dirname(os.path.abspath(folder_paths.__file__)), "manager_requirements.txt")
|
||||
uv_available = shutil.which("uv") is not None
|
||||
|
||||
pip_cmd = f"{sys.executable} -m pip install -r {manager_req_path}"
|
||||
msg = f"\n\nTo use the `--enable-manager` feature, the `comfyui-manager` package must be installed first.\ncommand:\n\t{pip_cmd}"
|
||||
if uv_available:
|
||||
msg += f"\nor using uv:\n\tuv pip install -r {manager_req_path}"
|
||||
msg += "\n"
|
||||
logging.warning(msg)
|
||||
args.enable_manager = False
|
||||
|
||||
|
||||
@@ -173,7 +181,6 @@ execute_prestartup_script()
|
||||
|
||||
# Main code
|
||||
import asyncio
|
||||
import shutil
|
||||
import threading
|
||||
import gc
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
comfyui_manager==4.1b1
|
||||
comfyui_manager==4.1b2
|
||||
Reference in New Issue
Block a user