MCPcopy Create free account
hub / github.com/Comfy-Org/ComfyUI / send_progress_text

Method send_progress_text

server.py:1435–1445  ·  view source on GitHub ↗
(
        self, text: Union[bytes, bytearray, str], node_id: str, sid=None
    )

Source from the content-addressed store, hash-verified

1433 return json_data
1434
1435 def send_progress_text(
1436 self, text: Union[bytes, bytearray, str], node_id: str, sid=None
1437 ):
1438 if isinstance(text, str):
1439 text = text.encode("utf-8")
1440 node_id_bytes = str(node_id).encode("utf-8")
1441
1442 # Pack the node_id length as a 4-byte unsigned integer, followed by the node_id bytes
1443 message = struct.pack(">I", len(node_id_bytes)) + node_id_bytes + text
1444
1445 self.send_sync(BinaryEventTypes.TEXT, message, sid)

Callers 7

executeMethod · 0.80
executeMethod · 0.80
_stream_sonilo_musicFunction · 0.80
_display_textFunction · 0.80
executeMethod · 0.80
executeMethod · 0.80

Calls 2

send_syncMethod · 0.95
encodeMethod · 0.45

Tested by

no test coverage detected