mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-06 05:57:03 +08:00
show text progress preview
This commit is contained in:
parent
cc33cd3422
commit
25e9031ab9
@ -32,12 +32,13 @@ from app.frontend_management import FrontendManager
|
|||||||
from app.user_manager import UserManager
|
from app.user_manager import UserManager
|
||||||
from app.model_manager import ModelFileManager
|
from app.model_manager import ModelFileManager
|
||||||
from app.custom_node_manager import CustomNodeManager
|
from app.custom_node_manager import CustomNodeManager
|
||||||
from typing import Optional
|
from typing import Optional, Union
|
||||||
from api_server.routes.internal.internal_routes import InternalRoutes
|
from api_server.routes.internal.internal_routes import InternalRoutes
|
||||||
|
|
||||||
class BinaryEventTypes:
|
class BinaryEventTypes:
|
||||||
PREVIEW_IMAGE = 1
|
PREVIEW_IMAGE = 1
|
||||||
UNENCODED_PREVIEW_IMAGE = 2
|
UNENCODED_PREVIEW_IMAGE = 2
|
||||||
|
TEXT = 3
|
||||||
|
|
||||||
async def send_socket_catch_exception(function, message):
|
async def send_socket_catch_exception(function, message):
|
||||||
try:
|
try:
|
||||||
@ -878,3 +879,8 @@ class PromptServer():
|
|||||||
logging.warning(traceback.format_exc())
|
logging.warning(traceback.format_exc())
|
||||||
|
|
||||||
return json_data
|
return json_data
|
||||||
|
|
||||||
|
def send_progress_text(self, text: Union[bytes, bytearray, str], sid=None):
|
||||||
|
if isinstance(text, str):
|
||||||
|
text = text.encode("utf-8")
|
||||||
|
self.send_sync(BinaryEventTypes.TEXT, text, sid)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user