Learn how to deploy a Serverless endpoint running ComfyUI from the Runpod Hub and use it to generate images with FLUX Dev.
curl
.jq
command-line JSON processor (optional but recommended).Using a different model
runpod/worker-comfyui:<version>-base
- Clean ComfyUI install with no models.runpod/worker-comfyui:<version>-flux1-schnell
- FLUX.1 schnell model.runpod/worker-comfyui:<version>-flux1-dev
- FLUX.1 dev model.runpod/worker-comfyui:<version>-sdxl
- Stable Diffusion XL model.runpod/worker-comfyui:<version>-sd3
- Stable Diffusion 3 medium model.<version>
with the latest release version from GitHub Releases.If you need a model that’s not listed here, or have your own LoRA, or need custom nodes, you can use this customization guide to create your own custom worker.32vgrms732dkwi
). Your endpoint URL will follow this pattern: https://api.runpod.ai/v2/ENDPOINT_ID/run
for asynchronous requests.
comfyui_workflow.json
with the following FLUX.1-dev-fp8 workflow:
text
field in node 6, or adjust generation parameters like steps
, cfg
, width
, and height
in their respective nodes.
/run
endpoint to submit an asynchronous job that will generate an image based on your ComfyUI workflow.
Replace ENDPOINT_ID
with your actual endpoint ID and YOUR_API_KEY
with your Runpod API key in the following command:
/status
endpoint with the job ID you received in the previous step.
Use the following command to check your job’s progress, replacing the placeholders (ENDPOINT_ID
, JOB_ID
, and YOUR_API_KEY
) with your actual values:
delayTime
field shows how long the job waited in the queue before processing began, measured in milliseconds.
COMPLETED
. Once your job completes, the status endpoint will return the generated image data encoded in base64 format.
When your job finishes successfully, you’ll receive a response containing the output:
executionTime
field shows how long the actual image generation took, while delayTime
indicates the initial queue wait time. Both values are in milliseconds.
To save the complete response for processing, use this command:
decode_comfyui_image.py
to decode the base64 image data from your JSON response: