Nodes/comfyui-qwen35-anima/Qwen3.5 Vision Encode (Anima)
ComfyUI Node

Qwen3.5 Vision Encode (Anima)

No ControlNet on Anima? Reference images through the text encoder instead

By GumGum10·Created 6 months ago·Updated 6 months ago· 33
Qwen3.5 Vision Encode (Anima)
  • clip
  • vit
  • image
  • CONDITIONING
text
modeadd
image_size448
vision_weight0.30

Anima has no ControlNet - it's the one structural gap that kept SDXL anime installs alive after everything else about it improved. So when people want a reference image to steer the output, the workaround is to smuggle the visual content in through the text path instead. That's exactly what this node does: it takes the Qwen3.5 CLIP, the ViT, a reference image and your text, and returns CONDITIONING you feed straight into the sampler.

Think of it as style or character transfer via the prompt itself, not pose or depth control. Useful in exactly the situation Anima's prompt adherence is weak in: when words genuinely aren't enough to describe the look you want.

How it works

The image runs through the ViT and comes out as a stack of 2560-dimensional visual embeddings. The key design decision in this pack: those embeddings bypass the text encoder's 32-layer backbone entirely. The backbone (24 Mamba2 SSM + 8 attention layers) was trained on text only - feeding it visual tokens would garble them. So the node projects the visual features through just the final norm block (2560 → 1024) and injects them into the token stream by one of three modes:

  • add (default) - mean-pools the ViT patches into a single style vector and adds it to every text token before the norm projection. The pack's recommendation for style/character transfer.
  • replace_padding - overwrites the trailing padding tokens with projected visual tokens. Token count stays the same; a middle ground.
  • concat - prepends every visual token before the text. The code's own warning: cross-attention can put 80%+ of its weight on the visual tokens and drown the prompt. Try this last.

Inputs that matter

Required: clip (must come from LoadQwen35AnimaCLIP - a stock Anima CLIP will error out), vit (from LoadQwen35ViT), image, and text. The three optional knobs are where the tuning happens:

  • mode - the injection mode above. Keep add until you have a reason not to.
  • image_size - resize target, default 448, and it must be a multiple of 32 (16px patch × 2 merge). 448 gives 196 visual tokens, 224 gives 49. Bigger is more detail but slower; the default is a fine starting point.
  • vision_weight - how much the visual signal matters. For add mode: 0.1 is subtle, 0.3 is moderate, 1.0 means the visual perturbation matches the text hidden states in magnitude. Start at the default 0.3.

Output is a single CONDITIONING, which wires into the positive input of your KSampler just like a CLIPTextEncode output.

Reality check

Two things to know before you build a workflow around this. First, it needs the ViT weights - qwen35_vit.safetensors - which are not currently published anywhere accessible, and the extraction script the code references isn't in the repo either (see the LoadQwen35ViT page). Right now you can wire the graph, but it won't run until those weights exist or you extract them yourself.

Second, this is not ControlNet, and don't expect ControlNet fidelity. A pooled style vector in the token stream is a vibe, not a faithful copy. Character identity will drift toward the reference, but it won't lock to it the way pose/depth conditioning would. As a style-transfer hack on a model that has no other option, that's fine. As a stand-in for precise likeness, it'll disappoint.

Troubleshooting

  • "Connect a Qwen3.5 CLIP loader" - the node reaches into the qwen35_4b transformer internals to stash visual embeddings before encoding. A stock Anima CLIP won't have that plumbing, so the CLIP input has to come from LoadQwen35AnimaCLIP.
  • "ViT input is None" / file missing - the ViT file genuinely isn't shipped yet; that's the blocker, not your setup.
  • ComfyUI load errors on the CLIP side - the FP8 encoder needs ComfyUI v0.16.3+; the README names that as the tested floor.

It's a clever feature on a model starved for conditioning options. It just needs its other half to ship.

Categoryconditioning/Anima

Inputs (7)

NameTypeDefaultDescription
clipCLIP
vitQWEN35_VIT
imageIMAGE
textSTRINGText prompt. Visual features from the image will be injected via the selected mode.
modeoptCOMBOaddHow to inject visual features: - add: pool ViT patches into a style vector, add to every text token (best for style/character transfer) - replace_padding: overwrite padding tokens with visual features (middle ground) - concat: prepend all visual tokens before text (can drown out text prompt)
image_sizeoptINT44864–768Resize image to this size (both H and W, must be multiple of 32). 448 = 196 visual tokens, 224 = 49 tokens. Larger = more detail but slower.
vision_weightoptFLOAT0.300–10Scale factor for visual influence. For 'add' mode (pre-norm): 0.1=subtle, 0.3=moderate, 1.0=strong (visual same magnitude as text). For 'concat'/'replace_padding': scales projected token magnitudes.

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING