terminal feature is removed.

Now ComfyUI provides built-in terminal feature.

https://github.com/comfyanonymous/ComfyUI/pull/5413
This commit is contained in:
Dr.Lt.Data
2024-10-30 03:46:59 +09:00
parent 0a9a8e418b
commit 294244b99f
6 changed files with 3 additions and 145 deletions

View File

@@ -1070,32 +1070,6 @@ async def install_model(request):
return web.Response(status=400)
class ManagerTerminalHook:
def write_stderr(self, msg):
PromptServer.instance.send_sync("manager-terminal-feedback", {"data": msg})
def write_stdout(self, msg):
PromptServer.instance.send_sync("manager-terminal-feedback", {"data": msg})
manager_terminal_hook = ManagerTerminalHook()
@PromptServer.instance.routes.get("/manager/terminal")
async def terminal_mode(request):
if not is_allowed_security_level('high'):
print(SECURITY_MESSAGE_NORMAL_MINUS)
return web.Response(status=403)
if "mode" in request.rel_url.query:
if request.rel_url.query['mode'] == 'true':
sys.__comfyui_manager_terminal_hook.add_hook('cm', manager_terminal_hook)
else:
sys.__comfyui_manager_terminal_hook.remove_hook('cm')
return web.Response(status=200)
@PromptServer.instance.routes.get("/manager/preview_method")
async def preview_method(request):
if "value" in request.rel_url.query:
@@ -1372,6 +1346,6 @@ if not os.path.exists(core.config_path):
cm_global.register_extension('ComfyUI-Manager',
{'version': core.version,
'name': 'ComfyUI Manager',
'nodes': {'Terminal Log //CM'},
'nodes': {},
'description': 'It provides the ability to manage custom nodes in ComfyUI.', })