Nodes/ComfyUI-easygoing-nodes/CLIP Scale Qwen Block
ComfyUI Node

CLIP Scale Qwen Block

Scale the Qwen-VL text encoder layer by layer — 60 sliders, one idea

By easygoing0114·Created 12 months ago·Updated 5 days ago· 5
CLIP Scale Qwen Block
  • clip
  • CLIP
model.embed_tokens1.00
visual.patch_embed1.00
visual.blocks.01.00
visual.blocks.11.00
visual.blocks.21.00
visual.blocks.31.00
visual.blocks.41.00
visual.blocks.51.00
visual.blocks.61.00
visual.blocks.71.00
visual.blocks.81.00
visual.blocks.91.00
visual.blocks.101.00
visual.blocks.111.00
visual.blocks.121.00
visual.blocks.131.00
visual.blocks.141.00
visual.blocks.151.00
visual.blocks.161.00
visual.blocks.171.00
visual.blocks.181.00
visual.blocks.191.00
visual.blocks.201.00
visual.blocks.211.00
visual.blocks.221.00
visual.blocks.231.00
visual.blocks.241.00
visual.blocks.251.00
visual.blocks.261.00
visual.blocks.271.00
visual.blocks.281.00
visual.blocks.291.00
visual.blocks.301.00
visual.blocks.311.00
visual.merger1.00
model.layers.01.00
model.layers.11.00
model.layers.21.00
model.layers.31.00
model.layers.41.00
model.layers.51.00
model.layers.61.00
model.layers.71.00
model.layers.81.00
model.layers.91.00
model.layers.101.00
model.layers.111.00
model.layers.121.00
model.layers.131.00
model.layers.141.00
model.layers.151.00
model.layers.161.00
model.layers.171.00
model.layers.181.00
model.layers.191.00
model.layers.201.00
model.layers.211.00
model.layers.221.00
model.layers.231.00
model.layers.241.00
model.layers.251.00
model.layers.261.00
model.layers.271.00
model.norm1.00
lm_head1.00

Qwen-2.5-VL-7B is the text encoder riding shotgun in the Qwen-Image workflows - it's what turns your prompt into tokens the diffusion model actually respects, and a big part of why those models follow complex prompts so well. CLIP Scale Qwen Block is the surgical counterpart to the SDXL version in this pack: one slider per layer, and you decide what each part of that 7B encoder contributes.

If you've never had a reason to touch your text encoder, this node is a solution looking for a problem - and that's fine. It earns its keep in two scenarios. First, debugging: if a Qwen-based model is ignoring part of your prompt or over-rendering text, scaling individual layers lets you isolate which layer is the culprit instead of guessing. Second, merge work: when you're blending two models that share the Qwen encoder, this is how you take the text understanding from each parent in blocks rather than as one monolithic weight.

How it works

The node clones your CLIP, pulls its key patches, and strips the internal transformer. prefix so the short layer names match the widget names. Then it matches each weight to the longest matching widget prefix - with an exact-boundary check, so model.layers.1 can't accidentally match model.layers.10. Weights under a non-1.0 slider get grouped by scale and applied through add_patches. One structural difference from the SDXL node: this one passes the weight itself as the patch, so the math lands as weight × scale directly.

Every slider runs 0.0 to 2.0 in 0.01 steps. 1.0 leaves the layer untouched, 0.0 zeroes it out, above 1.0 amplifies it. All defaults are 1.0, so the node is a no-op until you move something.

The inputs, grouped

The schema exposes 65 floats, but they sort into three families you can read at a glance:

  • model.embed_tokens - the token embedding table. The most drastic single knob; every token flows through it.
  • visual.patch_embed, visual.blocks.0visual.blocks.31, visual.merger - the vision tower. Important if this CLIP is ever used to encode image inputs, mostly idle for pure text prompting.
  • model.layers.0model.layers.27, model.norm, lm_head - the 28 LLM layers plus the output head. This is the part that actually understands your prompt, and where the interesting experiments live.

Output is a single CLIP socket, which feeds a CLIP Text Encode node exactly like any other encoder. The pack also ships CLIP Save Qwen, so unlike the SDXL side you can persist your edits: scale → save → load the custom encoder in other workflows.

Install

Search Easygoing in the ComfyUI Manager, or clone it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/easygoing0114/ComfyUI-easygoing-nodes.git

Restart ComfyUI. No extra pip dependencies, but it does require a ComfyUI build with the V3 node API - on an old install nothing from this pack registers, so update ComfyUI first if the node doesn't appear.

What to watch for

Change one layer at a time and compare generations, same as any scaling experiment - ten sliders moved at once tells you nothing. And don't expect the effect to be obvious in every model: the Qwen-2.5-VL encoder is already a strong, well-tuned stack, so gentle tweaks (0.6–0.9 on a late layer) tend to be the ones that survive contact with a real workflow. Zeroing whole sections of a 7B LLM can collapse prompt adherence hard and fast, which is dramatic but rarely what you wanted.

Categoryadvanced/model_merging/model_specific

Inputs (66)

NameTypeDefaultDescription
clipCLIP
model.embed_tokensFLOAT1.000–2
visual.patch_embedFLOAT1.000–2
visual.blocks.0FLOAT1.000–2
visual.blocks.1FLOAT1.000–2
visual.blocks.2FLOAT1.000–2
visual.blocks.3FLOAT1.000–2
visual.blocks.4FLOAT1.000–2
visual.blocks.5FLOAT1.000–2
visual.blocks.6FLOAT1.000–2
visual.blocks.7FLOAT1.000–2
visual.blocks.8FLOAT1.000–2
visual.blocks.9FLOAT1.000–2
visual.blocks.10FLOAT1.000–2
visual.blocks.11FLOAT1.000–2
visual.blocks.12FLOAT1.000–2
visual.blocks.13FLOAT1.000–2
visual.blocks.14FLOAT1.000–2
visual.blocks.15FLOAT1.000–2
visual.blocks.16FLOAT1.000–2
visual.blocks.17FLOAT1.000–2
visual.blocks.18FLOAT1.000–2
visual.blocks.19FLOAT1.000–2
visual.blocks.20FLOAT1.000–2
visual.blocks.21FLOAT1.000–2
visual.blocks.22FLOAT1.000–2
visual.blocks.23FLOAT1.000–2
visual.blocks.24FLOAT1.000–2
visual.blocks.25FLOAT1.000–2
visual.blocks.26FLOAT1.000–2
visual.blocks.27FLOAT1.000–2
visual.blocks.28FLOAT1.000–2
visual.blocks.29FLOAT1.000–2
visual.blocks.30FLOAT1.000–2
visual.blocks.31FLOAT1.000–2
visual.mergerFLOAT1.000–2
model.layers.0FLOAT1.000–2
model.layers.1FLOAT1.000–2
model.layers.2FLOAT1.000–2
model.layers.3FLOAT1.000–2
model.layers.4FLOAT1.000–2
model.layers.5FLOAT1.000–2
model.layers.6FLOAT1.000–2
model.layers.7FLOAT1.000–2
model.layers.8FLOAT1.000–2
model.layers.9FLOAT1.000–2
model.layers.10FLOAT1.000–2
model.layers.11FLOAT1.000–2
model.layers.12FLOAT1.000–2
model.layers.13FLOAT1.000–2
model.layers.14FLOAT1.000–2
model.layers.15FLOAT1.000–2
model.layers.16FLOAT1.000–2
model.layers.17FLOAT1.000–2
model.layers.18FLOAT1.000–2
model.layers.19FLOAT1.000–2
model.layers.20FLOAT1.000–2
model.layers.21FLOAT1.000–2
model.layers.22FLOAT1.000–2
model.layers.23FLOAT1.000–2
model.layers.24FLOAT1.000–2
model.layers.25FLOAT1.000–2
model.layers.26FLOAT1.000–2
model.layers.27FLOAT1.000–2
model.normFLOAT1.000–2
lm_headFLOAT1.000–2

Outputs (1)

NameTypeDescription
CLIPCLIP