Nodes/Nynxz/Text Encode Qwen Image Edit (Fusion)
ComfyUI Node

Text Encode Qwen Image Edit (Fusion)

Fuse N reference images into one Qwen image-edit conditioning

By Nynxz·Created about a month ago·Updated 29 days ago· 5
Text Encode Qwen Image Edit (Fusion)
  • clip
  • fusion_input
  • vae
  • CONDITIONING
  • fusion_inspect
prompt
visual_aspectauto
visual_size384
fitper image
fusion_methodspatial-checkerboard
block_size2
dither_ratio0.50
blend_strength0.50
feather1.0
preserve_normtrue
content_modenone
content_strength0.00
content_temperature1.00
style_modenone
style_strength0.00
region_strength0.00
strength_roll0.00
pattern_jitter0.00
jitter_modereassign
seed0

This is the heart of the Nynxz Fusion pipeline, and honestly the node worth installing this pack for. Text Encode Qwen Image Edit (Fusion) takes a fusion_input - the collected references from Fusion Input or Fusion Images - plus your prompt, encodes each image independently through the Qwen3-VL text encoder, and blends their visual tokens on a shared spatial grid. One edit can then draw on many references at once, with you controlling how much each one gets a say.

If you've used Qwen-Image-Edit (the Apache-2.0 instruction editor that ate the mask-and-ControlNet workflow), you know it takes one input image plus a sentence. This node generalizes that: instead of one image, a grid of them, fused so a single prompt can compose from several. It's the silveroxides idea - encode several images and hand grid cells between their visual tokens - extended with a whole tuning layer.

The inputs that matter first

  • clip - the Qwen3-VL 4B/8B text encoder (the one loaded for Qwen-Image, roughly 8GB). Wire the same CLIP every other node in this pack uses.
  • prompt - your edit instruction, same style you'd give Qwen-Image-Edit.
  • fusion_input - the collector output from Fusion Input / Fusion Images.
  • visual_size - the shared grid's square-equivalent side. Higher = more visual tokens = finer fusion at more compute. Default 384; visual_aspect picks the grid's shape (auto takes it from the first image).
  • fusion_method - how sources are tiled. The default checkerboard interleaves sources cell-by-cell in equal shares (good for style mixing; note it ignores strength). spatial-grid gives each source one contiguous cell laid out row by row. spatial-strength-random scatters cells randomly weighted by each image's strength - this is the mode where your strength sliders actually control coverage. There's also the block interleave (via block_size) and a seeded dither (via dither_ratio).

The blend knobs

blend_strength runs 0.0 = a hard per-cell mosaic (the original behavior) to 1.0 = fully feathered, with feather setting Gaussian softening of each source's territory - but past ~1.3 cells the checkerboard pattern washes out to a flat average, per the tooltip. strength_roll is the variety lever: seed-driven random re-weighting that shifts which image dominates each run. At 0 it's off; raise it to ~0.5, bump the seed, and each run rerolls the blend. pattern_jitter is subtler - it shuffles which cells each image owns rather than re-weighting, and jitter_mode decides whether jittered cells are reassigned or swapped (swap keeps every image's token count exactly).

The fancier tiers, in one breath: content_mode derives blend weights from the tokens themselves (saliency, energy, cross-attention - needs content_strength above 0); style_mode/style_strength is experimental style release for the anime→photoreal case, flattening the reference's style signature so a LoRA can set the look (start 0.3–0.5, keep away from 1.0); region_strength lets per-image regions (drawn on a Fusion Studio or grounded by Qwen3-VL Ground) override the geometric pattern.

Outputs and wiring

Two outputs. The CONDITIONING wire goes straight into your KSampler. The fusion_inspect wire feeds the pack's Fusion Inspector node - an interactive view of exactly which image won each token cell, worth a look the first time you blend three references and wonder why it looks the way it does. There's also an optional vae input if you want to inspect pixel-space.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/Nynxz/ComfyUI-NynxzExperimental

or search "Nynxz" in ComfyUI Manager, then restart. No pack-level dependencies, but you must have a Qwen3-VL text-encoder CLIP on disk - that's the real prerequisite. Everything here is explicitly experimental: schema and defaults shift between commits, so pin the version once you've got a blend you like.

CategoryNynxz/Fusion

Inputs (23)

NameTypeDefaultDescription
clipCLIP
promptSTRING
fusion_inputNYNXZ_FUSION_INPUT
visual_aspectCOMBOautoAspect of the shared visual grid every source is fitted into. 'auto' takes it from the first image.
visual_sizeINT384128–1024Square-equivalent side length of the visual grid. Higher = more visual tokens = finer fusion detail, at more compute.
fitCOMBOper imageHow every source is framed into the grid. 'per image' honours each image's own fit (set on the grid card or the Fusion Images row). cover = center-crop to fill; contain = fit whole, letterboxed; stretch = distort to fill. 'cover' gives the old center-crop framing.
fusion_methodCOMBOspatial-checkerboardHow the sources are tiled across the token grid. checkerboard / block / dither INTERLEAVE the sources cell-by-cell in equal shares (mix their content — good for style, ignores strength). 'spatial-grid' gives each source ONE contiguous cell (source order fills a grid row by row) — N images lay out as a grid. 'spatial-strength-random' scatters cells randomly but weighted by each image's STRENGTH, so a 2x-strength image covers ~2x the frame — this is the mode where the strength sliders control coverage.
block_sizeINT21–8
dither_ratioFLOAT0.500–1Probability of selecting the first source. Remaining sources are selected with a checkerboard pattern.
blend_strengthFLOAT0.500–10.0 = hard per-cell mosaic (original behavior); 1.0 = fully feathered soft blend.
featherFLOAT1.00–6Gaussian smoothing (in visual-grid cells) applied to each source's territory. Higher = softer transitions. NOTE: the checkerboard sits at the grid's Nyquist frequency, so past ~1.3 every source contributes 1/N everywhere and the pattern washes out to a flat average.
preserve_normBOOLEANtrueRescale blended tokens to preserve embedding magnitude, avoiding washed-out conditioning.
content_modeCOMBOnoneDerive blend weights from token content instead of geometry alone. saliency = foreground wins; energy = strongest signal wins; cross-attention = agreement with the per-cell consensus (smoother). Needs content_strength above 0 to do anything.
content_strengthFLOAT0.000–1How much content weighting overrides the geometric pattern. 0 = geometry only (the default, which makes content_mode inert); 1 = content only.
content_temperatureFLOAT1.000.05–5Softmax temperature for content weights. Lower = sharper (winner-take-all); higher = softer mix.
style_modeCOMBOnoneEXPERIMENTAL. Loosen the reference's grip on style so the prompt/LoRA can set the look (e.g. an anime reference + a 2real LoRA). Spatial structure is kept either way. gist = fade the block's mean token (its overall look); whiten = flatten the per-channel token statistics (the AdaIN view of style). Needs style_strength above 0.
style_strengthFLOAT0.000–1How far to push style_mode. 0 = off, an exact no-op (the default). 1 = the block's style signature is fully flattened. Start around 0.3-0.5 — high values push the tokens out of the distribution the encoder normally produces.
region_strengthFLOAT0.000–1EXPERIMENTAL. How far per-image regions (drawn or grounded, carried on fusion_input) override the geometric pattern. 0 = geometry only, an exact no-op (the default, and what happens when no image carries a region); 1 = the semantic field fully decides which image wins each area. Feather/blend still smooth the seams.
strength_rollFLOAT0.000–1Randomly re-weight the blend each run, driven by the seed — shifts which image dominates the mix. This is the one that actually moves the result (it changes the blend proportions, not just where tokens sit). 0 = off. Raise it, then bump the seed between runs. ~0.5 is a noticeable reroll; muted images stay muted.
pattern_jitterFLOAT0.000–1Randomly reassign this fraction of grid cells to a different image, driven by the seed. 0 = the clean geometric pattern (exact default behaviour). Subtler than strength_roll — it rearranges the same tokens rather than re-weighting them. Works on any fusion_method.
jitter_modeCOMBOreassignHow pattern_jitter perturbs the grid. 'reassign' hands each jittered cell to a different image (each image's share of the grid drifts). 'shuffle' instead swaps cell positions, so every image keeps its exact token count and only the arrangement moves — break up the pattern without changing the blend ratio.
seedINT00–18446744073709550000Seed for spatial-dither-random and for pattern_jitter / strength_roll. Fixed by default; change it to re-roll the variety features. Leaving it fixed keeps the encode cached.
vaeoptVAE

Outputs (2)

NameTypeDescription
CONDITIONINGCONDITIONING
fusion_inspectNYNXZ_FUSION_INSPECTWire into a Fusion Inspector node for an interactive view of the blend field — hover the token grid, view per-source panels, and see which images win where plus the settings that produced it.