-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path__init__.py
More file actions
34 lines (26 loc) · 971 Bytes
/
Copy path__init__.py
File metadata and controls
34 lines (26 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
try:
import server
except ImportError:
print("The module is not inside comfy context")
else:
from aiohttp import web
import os, sys
current_dir = os.path.dirname(os.path.abspath(__file__))
if current_dir not in sys.path:
sys.path.insert(0, current_dir)
from mcww.comfy import comfyExtension
async def available_at(request):
return web.json_response(comfyExtension.availableAt())
server.PromptServer.instance.app.add_routes([
web.get("/mcww/available_at", available_at)
])
async def get_logo(request):
return web.json_response({"logo": comfyExtension.getLogo()})
server.PromptServer.instance.app.add_routes([
web.get("/mcww/get_logo", get_logo)
])
comfyExtension.launchInThread()
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
WEB_DIRECTORY = "./comfy_web_dir"
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]