Skip to content

page_templater

Templates html page for injection of JS stuff ComfyUI needs to know.

template_html(webui_port=55056, comfy_url='http://127.0.0.1:8188')

Returns templated HTML page ready for RPC.

webui_port is the port used for websocket comms. comfy_url has to contain the

Source code in client/ayon_comfyui/api/iframe/page_templater.py
29
30
31
32
33
34
35
36
37
38
39
def template_html(
    webui_port: int = 55056, comfy_url: str = "http://127.0.0.1:8188"
) -> str:
    """Returns templated HTML page ready for RPC.

    webui_port is the port used for websocket comms.
    comfy_url has to contain the
    """
    return HTML_TMP.replace("{{source}}", comfy_url).replace(
        "{{port}}", str(webui_port)
    )