Nodes/ComfyUI-NynxzNodes/Text Encode (Fusion)
ComfyUI Node

Text Encode (Fusion)

Text Encode (Fusion) — the node that actually mixes your reference images

By Nynxz·Created 10 months ago·Updated a day ago· 0
Text Encode (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
strength_roll0.00
pattern_jitter0.00
jitter_modereassign
seed0

Wire two reference images into an image-editing model and it reads them one after the other, picks what it likes from each, and hands you an average - a face that's neither subject, a style that's both-and-neither. Text Encode (Fusion) from ComfyUI-NynxzNodes attacks that at the level where the problem actually lives: the conditioning. Instead of letting the model average whole reference images, it encodes each source separately through the vision tower and then mixes their visual tokens one cell at a time, under a weight map you control - by spatial pattern or by content.

This is the engine of the whole Fusion group (the one node that does the real work - Fusion Input and Fusion Images just collect sources for it). It's built for the Qwen3-VL text encoder - load a qwen3vl_4b or qwen3vl_8b CLIP, the same tower Krea 2 and the Qwen-Image family use, which is why it's called "Fusion" rather than named after any one model. On a plain text encoder, this node has nothing to fuse.

What you actually set

Inputs: clip (the Qwen3-VL encoder), prompt, and fusion_input from a Fusion Input or Fusion Images node. Then a pile of tuning, of which a beginner needs about four knobs:

  • visual_size (default 384) - the side length of the shared visual grid every source is fitted into. Bigger = more visual tokens = finer fusion detail, at more compute. 384 is a sane starting point; raise it when the blend is mushy.
  • fusion_method - how sources are tiled across the token grid. The default spatial-checkerboard interleaves sources cell-by-cell in equal shares - good for mixing style, ignores strength. spatial-grid gives each source one contiguous block. spatial-strength-random scatters cells randomly but weighted by each image's strength - this is the mode where per-source strength sliders actually control coverage.
  • fit (default per image) - how each source is framed into the grid; cover = center-crop to fill, contain = fit whole (letterboxed), stretch = distort.
  • seed - feeds the randomized variety features (strength_roll, pattern_jitter). Leave it fixed and the encode caches; bump it to re-roll the blend.

Everything else is advanced but genuinely useful once you've got the basics: blend_strength/feather soften the per-cell mosaic into a graded blend; content_mode (saliency/energy/cross-attention) derives weights from what's in the tokens rather than geometry; style_mode with style_strength loosens the reference's grip on style so a prompt/LoRA can set the look - handy for "anime reference plus a realism LoRA"; strength_roll randomly re-weights the blend each run ("the one that actually moves the result" per the author).

Outputs: the CONDITIONING (wire to your sampler) and a fusion_inspect payload for the Fusion Inspector node - wire that in whenever you're tuning, because seeing which source won which cell turns blind knob-twiddling into debugging.

Install

In Nynxz's Custom Nodes: ComfyUI Manager → search "NynxzNodes" and install from the registry, or

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

No pip deps, but hand-clones need the UI built (pnpm install && pnpm build; web/ is gitignored) - the registry/Manager install is the easy path. Restart, update ComfyUI if nodes don't show.

The trap

Fusion and the pack's Regions group share the word but do different jobs: fusion decides which reference wins a token, Regions decides which LoRA fires on one. Don't reach for Fusion to separate character identities - that's a per-token LoRA gate's job, not a visual-token blend's.

CategoryNynxz/Fusion

Inputs (22)

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.
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.