Nodes/ComfyUI-QI-QwenEditSafe/Qwen 2.5 VL Loader (Wrapper) — by wallen0322
ComfyUI Node

Qwen 2.5 VL Loader (Wrapper) — by wallen0322

Feed Qwen 2.5 VL a stable image and your edits stop drifting in color

By wallen0322·Created 12 months ago·Updated 10 months ago· 56
Qwen 2.5 VL Loader (Wrapper) — by wallen0322
  • clip
  • clip
fixed_size672
geometryletterbox
color_modegrayscale
neutralizetrue
desaturate0.12
mp_policyoff

The Qwen-Image-Edit family is dual-encoded: the Qwen2.5-VL vision branch reads who and what is in your picture, and the VAE branch carries the actual appearance. The VL branch matters way more than people realize, and it's also the fiddly one - feed it a raw, full-resolution, saturated image and its idea of "this scene" drifts, which shows up as color shift and inconsistency in your edits. QI_QwenVLClipWrapper from wallen0322's QI pack is a tiny preprocessing wrapper that stabilizes exactly that input. It doesn't load a model and it doesn't encode anything itself - it wraps the CLIP you already loaded and quietly rewrites the image the VL branch sees.

What it actually does

You hook it between the official Load CLIP (qwen_image) and your QI encoder: clip → wrapper → encoder. It returns a CLIP proxy, and the proxy intercepts tokenize(). For every image it runs a fixed preprocessing pipeline before handing it to the VL branch:

  • geometry - letterbox (default) resizes the short side up and pads with neutral 50% gray, or center_crop squares it up by cropping.
  • color_mode - grayscale (default) drops to luma only, neutral_gray flattens everything to its mean, original keeps color.
  • desaturate (default 0.12) - pulls saturation down toward gray, which suppresses the green-shift on bright scenes.
  • mp_policy - off / limit (cap at 1.4MP) / tiers (step the cap down for large sources). The VL branch needs the subject, not the resolution.

The inputs that matter

That's the whole list: fixed_size (default 672, range 224–1024), geometry, color_mode, neutralize (the master switch for the desaturation), desaturate, mp_policy. Output is a single clip - feed it into QI_TextEncodeQwenImageEdit_Safe or QI_RefEditEncode_Safe wherever you'd previously wired your loaded CLIP.

The README ships tuned recipes rather than theory:

  • Portrait: center_crop · 672 · grayscale · 0.15 · off
  • Full / vertical: letterbox · 896 · grayscale · 0.15 · off
  • Landscape: letterbox · 896 · grayscale · 0.15 · limit
  • High-key / bright scenes: letterbox · 672 · neutral_gray · 0.10 · off
  • Color-change edits: color_mode=original with desat ≤ 0.05, or neutralize off

One discrepancy to know: the README calls 896 the default fixed_size, but the shipped code defaults to 672. Trust the code default as a starting point and bump to 896 for landscape and full-body shots - that's the intended split.

How to install

Same pack, same one-time install: Manager search ComfyUI-QI-QwenEditSafe, or

cd ComfyUI/custom_nodes
git clone https://github.com/wallen0322/ComfyUI-QI-QwenEditSafe

then restart. No extra Python packages, no model downloads - this node adds a layer on top of the Qwen-Edit model you already run (GGUF quant or Nunchaku INT4 loader, per the sample workflows).

Gotchas

  • It only helps if your QI encoder is actually going through it - wire it between the Load CLIP node and the encoder, not beside them.
  • If your edits look oversaturated or tinted, your first move is desaturate up, not the encoder settings. The VL branch is usually the color culprit.
  • It pairs naturally with the pack's QI_RefEditEncode_Safe for portraits, since that node's whole job is consistency and this wrapper feeds it a consistent vision input. Consider the recipes above as a set.
CategoryQI by wallen0322

Inputs (7)

NameTypeDefaultDescription
clipCLIP
fixed_sizeINT672224–1024
geometryCOMBOletterbox2 options: letterbox, center_crop
color_modeCOMBOgrayscale3 options: grayscale, neutral_gray, original
neutralizeBOOLEANtrue
desaturateFLOAT0.120–0.5
mp_policyCOMBOoff3 options: off, limit, tiers

Outputs (1)

NameTypeDescription
clipCLIP