mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-13 21:27:41 +08:00
fix(manager): improve install guidance when comfyui-manager is not installed (#12810)
This commit is contained in:
parent
814dab9f46
commit
740d998c9c
13
main.py
13
main.py
@ -3,6 +3,7 @@ comfy.options.enable_args_parsing()
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import importlib.util
|
import importlib.util
|
||||||
|
import shutil
|
||||||
import importlib.metadata
|
import importlib.metadata
|
||||||
import folder_paths
|
import folder_paths
|
||||||
import time
|
import time
|
||||||
@ -64,8 +65,15 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
|
|
||||||
def handle_comfyui_manager_unavailable():
|
def handle_comfyui_manager_unavailable():
|
||||||
if not args.windows_standalone_build:
|
manager_req_path = os.path.join(os.path.dirname(os.path.abspath(folder_paths.__file__)), "manager_requirements.txt")
|
||||||
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")
|
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
|
args.enable_manager = False
|
||||||
|
|
||||||
|
|
||||||
@ -173,7 +181,6 @@ execute_prestartup_script()
|
|||||||
|
|
||||||
# Main code
|
# Main code
|
||||||
import asyncio
|
import asyncio
|
||||||
import shutil
|
|
||||||
import threading
|
import threading
|
||||||
import gc
|
import gc
|
||||||
|
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
comfyui_manager==4.1b1
|
comfyui_manager==4.1b2
|
||||||
Loading…
Reference in New Issue
Block a user