Optional
protocols: string | string[]Readonly
CLOSED: 3Readonly
CLOSING: 2Readonly
CONNECTING: 0Readonly
OPEN: 1Protected
_polling_Protected
_polling_Optional
clientOptional
init: RequestInitOptional
init: RequestInitOptional
socketProtected
socket_Static
DEFAULT_Static
DEFAULT_Static
DEFAULT_Static
IS_Adds an event listener for the specified event type.
The type of event to listen for.
The callback function to be executed when the event is triggered.
Rest
...args: ArgumentMap<ComfyUIClientEvents>[Extract<T, keyof ComfyUIClientEvents>]Optional
options: any(Optional) Additional options for the event listener.
A function that removes the event listener when called.
Protected
addConnects to the WebSocket server by creating a new socket connection.
The options for connecting to the server.
Optional
polling?: { The options for polling.
Optional
interval?: numberOptional
websocket?: { The options for the WebSocket connection.
Private
createFetches API data based on the provided route and options.
NOTE: CORS policy: Request header field comfy-user is not allowed by Access-Control-Allow-Headers in preflight response. Please use empty string in browser.
The route for the API request.
Optional
options: RequestInit(Optional) Additional options for the request.
A promise that resolves to the API response.
Adds an event listener for the specified event type.
The type of event to listen for.
The callback function to be executed when the event is triggered.
Rest
...args: ArgumentMap<ComfyUIClientEvents>[Extract<T, keyof ComfyUIClientEvents>]Optional
options: any(Optional) Additional options for the event listener.
A function that removes the event listener when called.
Adds an event listener for the specified event type.
The type of event to listen for.
The callback function to be executed when the event is triggered.
Rest
...args: ArgumentMap<ComfyUIClientEvents>[Extract<T, keyof ComfyUIClientEvents>]Optional
options: any(Optional) Additional options for the event listener.
A function that removes the event listener when called.
Protected
removePrivate
startGenerates a URL for viewing a specific file with the given filename, subfolder, and type.
The name of the file to view.
The subfolder where the file is located.
The type of the file.
The URL for viewing the file.
Static
load
A client for interacting with the ComfyUI API server using WebSockets.
NOTE: CORS policy: Request header field comfy-user is not allowed by Access-Control-Allow-Headers in preflight response. Please config.use empty string in browser.
Example