fix(manager): improve install guidance when comfyui-manager is not installed (#12810)

This commit is contained in:
Dr.Lt.Data
2026-03-10 11:49:31 +09:00
committed by GitHub
parent 814dab9f46
commit 740d998c9c
2 changed files with 11 additions and 4 deletions

13
main.py
View File

@@ -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

View File

@@ -1 +1 @@
comfyui_manager==4.1b1
comfyui_manager==4.1b2