Flux.1 Dev: Text to Image

This ComfyUI workflow, titled 'Flux.1 Dev: Text to Image', is designed to generate high-quality images from text prompts using the Flux Dev full version. The workflow leverages multiple model files and requires substantial VRAM to operate effectively. It is particularly noted for its superior prompt-following capabilities and exceptional image quality. Key components of this workflow include the VAEDecode and SaveImage nodes, which are responsible for decoding the latent representations into images and saving the final output, respectively. The KSampler node plays a crucial role in sampling the latent space to generate diverse image outputs. The workflow also utilizes the UNETLoader and VAELoader nodes for loading the UNET and VAE models, which are essential for the diffusion process. Additionally, the CLIPTextEncodeFlux node encodes the text prompt into a format that the model can understand, ensuring that the generated images closely align with the input text.

API

Use this workflow from code

Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.

flux_dev_full_text_to_image.json
Fetching workflow JSON…

Run it from TypeScript or Python with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.

// Install (beta)
npm i @comfyorg/sdk

// Run "Flux.1 Dev: Text to Image" (TypeScript)
import { Comfy } from "@comfyorg/sdk";

const client = new Comfy({ apiKey: "comfyui-..." });

// This workflow, exported in API format (see note below)
const wf = await client.workflows.fromFile("flux_dev_full_text_to_image_api.json");

const job = await client.run(wf);
await job.getOutputs("9")[0].toFile("output.png"); // SaveImage

The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API).

Comfy Cloud API access requires a plan with an API key.

FAQ

Frequently Asked Questions

View all workflows
Showing 30 of 30 templates