ComfyUI/comfy/distributed/server_stub.py
doctorpangloss 748924de12 Improve model downloading
- adding known controlnet models now works better
 - comfyui_controlnet_aux sometimes wants torchhub paths with files that are in the form directory/filename.safetensors. This is now supported
 - save_with_filename now correctly matches again
2025-10-06 15:21:10 -07:00

36 lines
1.1 KiB
Python

from __future__ import annotations
import uuid
from typing import Literal, Optional
from ..component_model.executor_types import ExecutorToClientProgress, StatusMessage, ExecutingMessage
from ..component_model.queue_types import BinaryEventTypes
class ServerStub(ExecutorToClientProgress):
"""
This class is a stub implementation of ExecutorToClientProgress. This will handle progress events.
"""
def __init__(self):
self.client_id = str(uuid.uuid4())
self.last_node_id = None
self.last_prompt_id = None
def send_sync(self,
event: Literal["status", "executing"] | BinaryEventTypes | str | None,
data: StatusMessage | ExecutingMessage | bytes | bytearray | None, sid: str | None = None):
pass
def queue_updated(self, queue_remaining: Optional[int] = None):
pass
def send_progress_text(self, text: str, node_id: str = None):
pass
@property
def receive_all_progress_notifications(self) -> bool:
return False
def add_on_prompt_handler(self, handler):
pass