Skip to content

Add method to stream text to node UI#8018

Merged
comfyanonymous merged 2 commits intoComfy-Org:masterfrom
christian-byrne:text-progress-prev
May 11, 2025
Merged

Add method to stream text to node UI#8018
comfyanonymous merged 2 commits intoComfy-Org:masterfrom
christian-byrne:text-progress-prev

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented May 9, 2025

Add PromptServer method that can be called by nodes to send text progress to client UI like

from server import PromptServer

class Node:
    @classmethod
    def INPUT_TYPES(cls):
        return {
            "hidden" : {
                "unique_id": "UNIQUE_ID",
            }
        }

    RETURN_TYPES = (,)
    FUNCTION = "send_message"

    def send_message(self, unique_id=None):
        PromptServer.instance.send_progress_text("test message", unique_id)
        return (,)

which can be used with LLM nodes or to show messages when a node is executing/executed

@comfyanonymous comfyanonymous merged commit 235d390 into Comfy-Org:master May 11, 2025
5 checks passed
@christian-byrne christian-byrne deleted the text-progress-prev branch May 11, 2025 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants