include view in API wrapper

This commit is contained in:
Colter Downing
2025-12-03 20:22:45 -08:00
parent f04138e13b
commit e839cfc6e8
+4 -3
View File
@@ -14,6 +14,7 @@ from .data_types import ComfyWorkflowData
MODEL_SERVER_URL = os.getenv("MODEL_SERVER_URL", "http://127.0.0.1:18288")
COMFYUI_URL = os.getenv("COMFYUI_URL", "http://127.0.0.1:18188") # Raw ComfyUI server
# This is the last log line that gets emitted once comfyui+extensions have been fully loaded
MODEL_SERVER_START_LOG_MSG = "To see the GUI go to: "
@@ -110,10 +111,10 @@ async def handle_ping(_):
async def handle_view(request: web.Request) -> web.Response:
"""Proxy /view requests to ComfyUI to fetch generated images"""
# Forward query params to ComfyUI
"""Proxy /view requests to raw ComfyUI server to fetch generated images"""
# Forward query params to raw ComfyUI (not the API wrapper)
query_string = request.query_string
url = f"{MODEL_SERVER_URL}/view?{query_string}"
url = f"{COMFYUI_URL}/view?{query_string}"
log.debug(f"Proxying /view request to: {url}")