Crate comfyui_client

Source
Expand description

§ComfyUI Client

Rust Version GitHub Actions CI crates.io Downloads docs.rs License

Rust client for ComfyUI.

§API Reference

The following table lists the available APIs in ComfyUIClient:

MethodURLPurposeClient Method
GET/history/{prompt_id}Retrieves the history for a specified promptget_history
GET/promptRetrieves the current prompt informationget_prompt
GET/viewRetrieves view data for a file (e.g., images)get_view
POST/promptSends a prompt in JSON formatpost_prompt
POST/upload/imageUploads an image to ComfyUIupload_image

Additionally, the client establishes a WebSocket connection to /ws to receive real-time events from ComfyUI.

§Examples

Refer to examples.

§License

MulanPSL-2.0

Re-exports§

pub use crate::errors::ClientError;
pub use crate::errors::ClientResult;

Modules§

errors
Module containing error definitions.
meta
Module containing metadata such as prompt and file information.

Structs§

ClientBuilder
A builder for creating a ComfyUIClient instance.
ComfyUIClient
A client for interacting with the ComfyUI service.
EventStream
A structure representing the event stream received via a websocket connection.