ComfyUI native API integration with ComfyStream#180
Closed
BuffMcBigHuge wants to merge 7 commits intoyondonfu:mainfrom
Closed
ComfyUI native API integration with ComfyStream#180BuffMcBigHuge wants to merge 7 commits intoyondonfu:mainfrom
BuffMcBigHuge wants to merge 7 commits intoyondonfu:mainfrom
Conversation
Author
TEST_00002.mp4EmbeddedComfyClient is slightly faster at the moment. Optimizations still to be developed. |
…ced uncessary base64 input frame operations, prep for multi-instance, cleanup.
…dded config for server management.
…ame size handling, commented out some logging.
Author
|
Closed in lieu of livepeer#59. |
eliteprox
added a commit
that referenced
this pull request
May 17, 2025
* add recording and download, improve control button layout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One of the primary limitations of building workflows within ComfyStream is the use of the hiddenswitch fork.
Many difficulties arise when particular node packs do not play well with the EmbeddedComfyClient. Careful testing and modifications to existing nodes is usually required to enable full functionality. Nonetheless, there are usually other issues that may come from dependency on the fork, such as delays or limitations with newer ComfyUI features, including native performance optimizations.
I set out to replace the EmbeddedComfyClient with communication directly to a running ComfyUI instance through a native API and Websocket connection.
Sending Data: All data can be sent via REST
POST /promptthrough the Comfy API. Currently, the method to pass incoming frames is done via the comfyui-tooling-nodes, withETN_LoadImageBase64, where the input frame is passed as base64 data in the prompt request itself. This node will be migrated to the ComfyStream/nodespack.Receiving Data: Message events from the webhook are parsed, and data can be received and added to the
image_outputstensor array for WebRTC frames. The comfyui-tooling-nodes includesETN_SendImageWebSocketwhich includes a Blob format with prefix similar to how Comfy sends previews to the UI. Upon successfully capturing the Blob, the prompt can then be called for the next subsequent frame.It is obvious that this process is not as efficient as the hiddenswitch method of communicating with the ComfyStream
tensor_cachedirectly, however it opens up new opportunities for parallelization through multi-inference gpu scaling as well as multi-gpu scaling, an avenue I'm investigating as a performance increase./nodespack, and add auto-replacement