from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS __all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"] WEB_DIRECTORY = "./web" from aiohttp import web from server import PromptServer from pathlib import Path if hasattr(PromptServer, "instance"): # NOTE: we add an extra static path to avoid comfy mechanism # that loads every script in web. PromptServer.instance.app.add_routes( [web.static("/kjweb_async", (Path(__file__).parent.absolute() / "kjweb_async").as_posix())] )