Environment Variables
HF_TOKEN
(string): HuggingFace API token with read permissions, used to download gated models. Read more about HuggingFace tokens here.COMFY_MODEL
(string): Text2Image model being used.- options:
"sd3"
,"flux"
- options:
Endpoints
/prompt/
The ComfyUI defined endpoint to generate an image. After receving a GPU worker address from the/route/
endpoint, a /prompt/
endpoint would have the following structure.
Inputs
For both “sd3” and “flux”: Payload:prompt
(string): The model prompt used to generate the image.width
(int): Width in pixels of the resulting generated image.height
(int): Height in pixels of the resulting generated image.steps
(int): Number of diffusion steps taken during image generation. The assumed default is 28.seed
(int): The value used to initialize the random noise pattern in the diffusion model. Used for reproducability.
signature
(string): A cryptographic string that authenticates the url, cost, and reqnum fields in the response, proving they originated from the server. Clients can use this signature, along with the server’s public key, to verify that these specific details have not been tampered with.cost
(float): The estimated compute resources for the request. The units of this cost are defined by the PyWorker.endpoint
(string): Name of the Endpoint.reqnum
(int): The request number corresponding to this worker instance. Note that workers expect to receive requests in approximately the same order as these reqnums, but some flexibility is allowed due to potential out-of-order requests caused by concurrency or small delays on the proxy server.url
(string): The address of the worker instance to send the request to.
JSON
Outputs
prompt_id
(string): A unique identifier assigned by the ComfyUI instance for this specific workflow execution or prompt.number
(int): A sequential number assigned by the ComfyUI instance to this prompt. This number reflects the order in which prompts are received or processed by the worker.node_errors
(object): An object that contains details about any errors that occurred within specific nodes during the workflow execution.outputs
(object): An object containing the outputs generated by specific nodes in the ComfyUI workflow. The keys of this object are the string identifiers of the nodes that produced output
JSON
/custom_workflow/
Allows a client to send a complete, user-defined ComfyUI workflow (in JSON format) to the server for execution. It includes thepayload
and auth_data
objects, but modified according to the user’s design.
The workflow is a direct ComfyUI graph. Here is an example, similar to the SD3 workflow.
JSON