include view in API wrapper
This commit is contained in:
@@ -14,6 +14,7 @@ from .data_types import ComfyWorkflowData
|
|||||||
|
|
||||||
|
|
||||||
MODEL_SERVER_URL = os.getenv("MODEL_SERVER_URL", "http://127.0.0.1:18288")
|
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
|
# 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: "
|
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:
|
async def handle_view(request: web.Request) -> web.Response:
|
||||||
"""Proxy /view requests to ComfyUI to fetch generated images"""
|
"""Proxy /view requests to raw ComfyUI server to fetch generated images"""
|
||||||
# Forward query params to ComfyUI
|
# Forward query params to raw ComfyUI (not the API wrapper)
|
||||||
query_string = request.query_string
|
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}")
|
log.debug(f"Proxying /view request to: {url}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user