Comfy-Org / Comfy-Org/ComfyUI

Is it possible to make a request through the websocket connection to the ComfyUI backend?

Open
#8,154 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

I made it work locally, but once we hosted the ComfyUI on the cluster with multiple replicas it broke, and I don't see any way around the issues, but to redo the integration using websockets. The problem I am not sure how to deal with is that opening a websocket connection with one of the pods, and sending a prompt via a separate http request (to the same URL) might end up opening connections with two different machines due to the round robin routing that the k8s cluster's load balancer is doing. Would it be possible to send a request to the backend using the existing websocket connection instead? That would be the ideal solution, but the last time I looked at it, I saw that the ComfyUI frontend was using regular http requests to send prompts so I don't have a reference for how that could be done if it's at all possible.

Is there a frontend to backend message that could support this?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.