
This ComfyUI workflow, titled '2.1 Creator - Diffusion Basics,' is designed to introduce users to the foundational concepts of image generation using diffusion models. At its core, the workflow leverages the Z-Image-Turbo model to transform random noise into coherent images based on textual prompts. The process begins with the 'EmptyLatentImage' node, which generates a noisy canvas at a specified resolution. This noise is then iteratively refined through the 'KSampler' node, which utilizes the 'ModelSamplingAuraFlow' to guide the denoising process, informed by the textual input encoded by the 'CLIPTextEncode' node.
The workflow is structured to load essential components like the UNET model ('UNETLoader'), a text encoder ('CLIPLoader'), and a variational autoencoder ('VAELoader') to facilitate the conversion of text to image. The 'VAEDecode' node plays a crucial role in converting the final latent representation back into a viewable image format. Finally, the 'SaveImage' node ensures that the generated image is saved with a specified prefix. This workflow is particularly useful for those new to diffusion models, providing a hands-on approach to understanding how text-based image generation works technically and practically.
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.
GET https://comfy.org/workflows/download/e173ace9bf90.jsonFetching workflow JSON…
Run it from Python or TypeScript with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.
# Install (beta)
pip install comfy-sdk # Python
npm i @comfyorg/sdk # TypeScript
# Run this workflow (Python)
from comfy_sdk import Comfy
client = Comfy(api_key="comfyui-...")
wf = client.workflows.from_file("workflow_api.json")
job = client.run(wf)
for output in job.get_outputs("<output-node-id>"):
output.to_file(output.name)The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API). API access requires a Comfy Cloud plan with an API key. SDK docs · Get an API key
FAQ














