
The Z-Image: Text to Image workflow is designed to transform textual descriptions into high-quality images with a focus on photorealism and aesthetic diversity. Utilizing the Z-Image model, this workflow is particularly adept at producing images that are not only visually stunning but also highly responsive to both positive and negative prompts, allowing for fine-tuning and creative exploration. The workflow employs specific nodes such as SaveImage for output management and MarkdownNote for documentation, alongside a unique node type identified by the ID 9b9009e4-2d3d-445f-9be5-6063f465757e, which plays a crucial role in the image generation process.
Technically, this workflow leverages the qwen_3_4b.safetensors text encoder and the z_image_bf16.safetensors diffusion model to interpret and render textual inputs into images. The process involves running the diffusion model for 30 to 50 steps with a classifier-free guidance (cfg) scale of 3 to 5, ensuring a balance between adhering to the prompt and introducing creative variability. This setup makes the workflow particularly useful for artists and designers seeking to generate diverse image outputs from textual descriptions, providing a foundation for creative freedom and exploration.
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/2a9b4417b44f.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 "Z-Image: Text to Image" (Python)
from comfy_sdk import Comfy
client = Comfy(api_key="comfyui-...")
# This workflow, exported in API format (see note below)
wf = client.workflows.from_file("image_z_image_api.json")
job = client.run(wf)
for output in job.get_outputs("95"): # SaveImageAdvanced
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














