Qwen-Image img2img ⚡
The one-node prep step for Qwen-Image that feeds a stock KSampler
- model
- clip
- vae
- images
- model
- positive
- negative
- latent
- denoise
Most model-specific workflows make you stitch together three or four stock nodes before you sample: empty latent, prompt encode, control attach, init image encode. Qwen-Image img2img collapses all of that into one node. Type your prompt, connect your model/clip/vae from Qwen-Image Model Loader, optionally connect an init image, and out come model, positive, negative, latent and denoise - straight into a stock KSampler. Leave image unconnected and it's a txt2img prep instead.
The inputs that matter
The core five are model, clip, vae, prompt (multiline), and negative_prompt. Then the geometry: strength (0.6 default, img2img only - how much of the init image to discard, ignored without an image), batch_size, width and height (1024×1024 default, steps of 8). With an init or control image, width/height resize it to your output size.
The interesting part is the optional stack:
image- the init image for img2img. Leave unconnected for txt2img. In the auto control modes it also serves as the source photo the control map is derived from.qwen_control- from Qwen-Image ControlNet Loader. The node routes to whichever attachment mechanism the checkpoint needs: aDiffSynthCnetPatchon a cloned MODEL for DiffSynth patches, or the standard conditioning-hint path for InstantX/Union/Fun. You never choose.control_mode-manual(default, you connectcontrol_imageyourself),auto_canny(edges derived fromimagevia plain Canny - no download), orauto_depth(depth via Depth Anything V2 - downloadsdepth_ckpt_nameon first use). Pick whichever matches the checkpoint you loaded; an explicitly connectedcontrol_imagealways overrides the auto modes.mask- for an inpaint checkpoint, the region to inpaint. Note the tooltip's warning:control_imageis still required even for inpaint - the mask only refines the region, it doesn't replace the control map. There's no way to auto-derive a mask from a photo alone.control_strength- how hard the control map pulls (1.0 default).edit_reference- for Qwen-Image-Edit checkpoints: the photo you want edited. This is not ControlNet and not the img2img init image. It's VAE-encoded and attached to positive conditioning as the model's real edit input (reference_latents), the same mechanism comfy's stockReferenceLatentuses. Leave it unconnected for a non-Edit checkpoint.
That last distinction is where people get tangled, so say it plainly: image answers "what do I start denoising from," control_image answers "what structure do I follow," and edit_reference answers "what photo am I actually editing." Three different questions, three different sockets, and an Edit checkpoint run without its reference behaves like a plain generator fine-tuned for editing.
The outputs
model, positive, negative, latent, denoise - five outputs into a stock KSampler (the pack's own Qwen-Image KSampler works too, and adds the diffusers denoise-parity toggle). Then VAE Decode.
Guard rails worth knowing
The node refuses to sample a half-configured setup: qwen_control connected with nothing usable to attach raises immediately. The reverse - control_image connected but no qwen_control loaded - is not an error; it's ignored with a warning, so you can leave a preprocessor chain wired in while you toggle the ControlNet loader on and off.
Installing it
Part of the ComfyUI-GGUF-Loader pack under 🤖 CCTech/Qwen-Image. ComfyUI Manager → search "ComfyUI-GGUF-Loader" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/ChrisColeTech/ComfyUI-GGUF-Loader
cd ComfyUI-GGUF-Loader
pip install -r requirements.txt
Common issues
Mismatching the ControlNet format to the control map is the classic: a depth patch fed a canny edge map produces confident nonsense. Match control_mode to the checkpoint - the DiffSynth canny patch wants auto_canny, the depth one wants auto_depth, and for anything else (pose/lineart) use manual. Second: forgetting edit_reference on an Edit checkpoint, which silently turns an edit into a generation. And third: for inpaint, connect control_image and mask - the mask alone won't carry the job.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| vae | VAE | — | |
| prompt | STRING | — | |
| negative_prompt | STRING | — | |
| strength | FLOAT | 0.600–1 | img2img only. How much of the init image(s) to discard. Ignored without images. |
| batch_size | INT | 11–4096 | — |
| width | INT | 102416–16384 | Output size. With init image(s) this resizes them. |
| height | INT | 102416–16384 | — |
| imagesopt | IMAGE | One or more init images for img2img (batch-aware - a batch of N becomes N independent img2img generations). Leave unconnected for txt2img. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |
| denoise | FLOAT | — |