Qwen Image 2.1: Text to Image

This workflow generates high-quality images from text prompts using Qwen Image 2.1, an open-weight diffusion model known for strong layout and typography rendering and native 2K (2048×2048) output. At its core is a custom Qwen generator node (UUID: c291ceec-b98f-4751-9d0b-7bc288f27b30) that loads either qwen_image_2.1_bf16.safetensors or the memory-saving qwen_image_2.1_int8_convrot.safetensors. By default, it produces a single 1024×1024 image in about 25 sampling steps, with support for transparent (alpha) backgrounds when saved as PNG. ResolutionSelector sets the canvas size, and SaveImageAdvanced handles file output and metadata.

Technically, the subgraph encapsulates prompt conditioning and a built-in sampler inside the Qwen node, so you don’t need separate sampler nodes. You provide a prompt (and optionally a negative prompt if exposed), choose a resolution, and the node performs the full diffusion pass. The workflow’s MarkdownNote/Note nodes document on-canvas instructions, while SaveImageAdvanced ensures your output is written with correct color and alpha handling. This makes it ideal for fast concept visualizations, posters, and assets that benefit from clean text and layout—without leaving the ComfyUI canvas.

API

從程式碼使用此工作流

每個 Comfy 工作流都是一個 JSON 圖。下方的 payload 就是此工作流,與 ComfyUI 執行時完全相同 — 你可以從此 URL 取得、放入版本控制,或在 ComfyUI 載入並逐節點執行。

bb7e03924a5c.json
正在取得工作流 JSON…

使用 Comfy SDK 以 TypeScript 或 Python 執行。相同程式碼可用於 Comfy Cloud 或你自架的 ComfyUI — 只需更改 base URL。

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

// Run this workflow (TypeScript)
import { Comfy } from "@comfyorg/sdk";

const client = new Comfy({ apiKey: "comfyui-..." });
const wf = await client.workflows.fromFile("workflow_api.json");
const job = await client.run(wf);
await job.getOutputs("<output-node-id>")[0].toFile("output.png");

SDK 需使用 API 格式的工作流:請在 ComfyUI 開啟此工作流,並使用 檔案 → 匯出工作流(API)。

Comfy Cloud API 存取需有 API 金鑰的方案。

查看所有工作流
Showing 30 of 30 templates