mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-07 02:58:21 +00:00
fix: use unique client_id per ComfyUI WebSocket connection (#23592)
Using user.id as client_id causes WebSocket deadlocks when the same user generates images concurrently (e.g., multi-model chat). ComfyUI routes messages by clientId, so shared IDs mean only one connection receives the completion — others hang forever. Generate a unique UUID per request, matching ComfyUI's own examples.
This commit is contained in:
parent
be38ca8e81
commit
09dccdd42f
1 changed files with 2 additions and 2 deletions
|
|
@ -681,7 +681,7 @@ async def image_generations(
|
|||
res = await comfyui_create_image(
|
||||
model,
|
||||
form_data,
|
||||
user.id,
|
||||
str(uuid.uuid4()),
|
||||
request.app.state.config.COMFYUI_BASE_URL,
|
||||
request.app.state.config.COMFYUI_API_KEY,
|
||||
)
|
||||
|
|
@ -1011,7 +1011,7 @@ async def image_edits(
|
|||
res = await comfyui_edit_image(
|
||||
model,
|
||||
form_data,
|
||||
user.id,
|
||||
str(uuid.uuid4()),
|
||||
request.app.state.config.IMAGES_EDIT_COMFYUI_BASE_URL,
|
||||
request.app.state.config.IMAGES_EDIT_COMFYUI_API_KEY,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue