Nodes/ComfyUI-GGUF-Loader/Qwen-Image img2img ⚡
ComfyUI Node

Qwen-Image img2img ⚡

The one-node prep step for Qwen-Image that feeds a stock KSampler

By ChrisColeTech·Created about a month ago·Updated 4 days ago· 10
Qwen-Image img2img ⚡
  • model
  • clip
  • vae
  • images
  • model
  • positive
  • negative
  • latent
  • denoise
prompt
negative_prompt
strength0.60
batch_size1
width1024
height1024

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: a DiffSynthCnetPatch on a cloned MODEL for DiffSynth patches, or the standard conditioning-hint path for InstantX/Union/Fun. You never choose.
  • control_mode - manual (default, you connect control_image yourself), auto_canny (edges derived from image via plain Canny - no download), or auto_depth (depth via Depth Anything V2 - downloads depth_ckpt_name on first use). Pick whichever matches the checkpoint you loaded; an explicitly connected control_image always overrides the auto modes.
  • mask - for an inpaint checkpoint, the region to inpaint. Note the tooltip's warning: control_image is 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 stock ReferenceLatent uses. 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.

Category🤖 CCTech/Qwen-Image

Inputs (10)

NameTypeDefaultDescription
modelMODEL
clipCLIP
vaeVAE
promptSTRING
negative_promptSTRING
strengthFLOAT0.600–1img2img only. How much of the init image(s) to discard. Ignored without images.
batch_sizeINT11–4096
widthINT102416–16384Output size. With init image(s) this resizes them.
heightINT102416–16384
imagesoptIMAGEOne or more init images for img2img (batch-aware - a batch of N becomes N independent img2img generations). Leave unconnected for txt2img.

Outputs (5)

NameTypeDescription
modelMODEL
positiveCONDITIONING
negativeCONDITIONING
latentLATENT
denoiseFLOAT