mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-01-11 22:50:48 +08:00
18 lines
537 B
Python
18 lines
537 B
Python
import git
|
|
from aiohttp import web
|
|
from server import PromptServer
|
|
|
|
manager_core_path = None
|
|
manager_core_url = "https://github.com/Comfy-Org/manager-core"
|
|
|
|
@PromptServer.instance.routes.get("/manager/install_manager_core")
|
|
def install_manager_core(request):
|
|
if manager_core_path is not None:
|
|
repo = git.Repo.clone_from(manager_core_url, manager_core_path)
|
|
repo.git.clear_cache()
|
|
repo.close()
|
|
else:
|
|
print(f"[ComfyUI Manager] Failed to install `manager-core`")
|
|
|
|
return web.Response(status=200)
|