闲兔Qwen Image 2.1 工作台
Unpacking the Qwen Image 2.1 workbench
- clip
- vae
- positive
- negative
- latent
What it is, plainly
闲兔Qwen Image 2.1 工作台 is a text-encode node with a management layer bolted on top. It does what core's Qwen Image 2.1 text encoder does - same tokenization, same encoding call - and around that it hosts up to sixteen reference images, keeps them numbered so <image1> … <image16> in your prompt refer to the right slots, and gives you presets for the jobs people actually do with this family: character editing, product shots, outfit and background swaps, pose transfer, multi-person compositing, turnaround sheets.
The pack's own README is honest about the scope: it does not replace the Qwen Image 2.1 model or the sampling workflow. You still build the loader, sampler and decoder. What it removes is the bookkeeping - the pile of Load Image nodes, the folder of half-named reference files, and remembering which one <image3> was supposed to be. One caveat on timing: this model is past the knowledge base's coverage edge (which stops at Qwen-Image-2.0, API-only), and there's no community corpus on 2.1 yet. Early-adopter territory.
How it works
The node ships a large custom frontend, and behind it the plumbing is one hidden string. reference_images is a JSON array the UI writes into the widget: each entry is either a path or a {name, subfolder, type} record, and every path must resolve inside your ComfyUI input folder. Python parses it, caps it at sixteen, rejects absolute paths and .., and verifies each file exists before doing any work - so a bad slot is a message on the node, not a crash mid-sampling.
Then, per reference image, it scales the picture to roughly resolution × resolution pixels with aspect preserved, rounded to multiples of 32 (Lanczos), composites any alpha over white, and collects them. Two branches follow, and the choice is yours:
- No VAE wired: the images go into the tokenizer as vision tokens (
keep_vision=True). - VAE wired: the scaled images are VAE-encoded into reference latents, and those are appended to both conditionings instead.
That mirrors core's 2.1 encode behavior, and it's the one wiring decision that changes how the model treats your references. Connect the VAE for edit-shaped work against reference latents; leave it off if you want the multimodal encoder to see the images directly.
The returned latent is a zeros tensor sized from the first reference image (or 1024×1024 with no references), at 64 channels and 16× downscale. So reference slot one sets your canvas - and since that's a 2.1-shaped latent, don't try to decode it with another family's VAE. Change detection hashes the actual bytes of every reference image, so swapping the pixels behind an unchanged filename re-runs the graph instead of serving a cached image.
Inputs and outputs
clip is the required multimodal text encoder for 2.1 - the wrong CLIP here means the image path through tokenize either errors or does nothing for you. positive_prompt and negative_prompt are the pair you'd expect, with dynamic-prompt syntax enabled, so {a|b} wildcards work. Note the KB's finding that negatives are inert on guidance-distilled models: if you're on a turbo-style 2.1 build at CFG 1, don't burn time tuning the negative box.
resolution is the real knob: reference images are scaled to about resolution² pixels with aspect preserved, and 0 means keep original dimensions (rounded to 32). It's your defense against the geometric drift people hit on the 2509-era editor, where an uncontrolled input resolution stretched proportions - and if your reference has text in it, don't scale it down.
reference_images is the JSON list the panel maintains - you won't type in it. Optional: vae (see above) and 分镜, a string input reserved for a future storyboard node. Today the encoder literally discards it - a stub for a wiring contract, not a feature.
Outputs are positive and negative into your sampler, and latent straight into the sampler's latent slot. Don't add an Empty Latent node as well; this is that node, with a reference-derived size.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/xiantuhenlan/ComfyUI-Xiantu-QwenImage21-Workbench
Or search the pack title in ComfyUI Manager. Restart, then hard-refresh the browser - this one matters more than usual, because the upload panel, presets and pose tab are all frontend JS. Skip the refresh and you'll be staring at a bare JSON text field. Zero Python dependencies, and the pack ships no models, VAEs or text encoders: you bring 2.1's weights yourself.
Where it bites
"第N张参考图不存在" means a slot points at a file that's no longer in ComfyUI/input - usually you cleaned the input folder, or pointed at a generated image from another directory.
"参考图清单不是有效 JSON" is the frontend failing to load - stale browser cache, most often. Hard-refresh; if it persists, check the console for a JS error from the pack.
Reordering renumbers everything. The thumbnail order is the <imageN> order. Drag a new image into slot one and every prompt reference downstream silently points at the wrong picture. This is the most common way people get nonsense out of these workflows.
Aspect ratio surprises. Because slot one sets the latent size, swapping your first reference from portrait to landscape changes your output canvas. That's intended, and worth doing deliberately. And no, it isn't a one-click app: outputs feed a normal 2.1 sampling chain.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| positive_prompt | STRING | — | |
| negative_prompt | STRING | — | |
| resolution | INT | 10240–4096 | 参考图按约 resolution × resolution 像素缩放并保持比例;0 表示保留原尺寸并取 32 的倍数。 |
| reference_images | STRING | [] | — |
| vaeopt | VAE | — | |
| 分镜opt | STRING | 预留给闲兔分镜节点的 JSON 连线接口。 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |