Nodes/RES4LYF/ConditioningTruncate
ComfyUI Node Runs on cloud

ConditioningTruncate

The fix for SD3.5's silent 77-token quality cliff

By ClownsharkBatwing·Created 2 years ago·Updated 21 days ago· 1,222
ConditioningTruncate
  • conditioning
  • conditioning

SD3.5 conditions on three text encoders at once - CLIP-L, CLIP-G, and T5-XXL - and while the T5 side handles long, natural-language prompts fine, the CLIP components still carry the old 77-token ceiling every CLIP-based model has had since SD1.5. The node's own description spells out what happens if you ignore that: tokens beyond 77 don't just get quietly dropped, they degrade the image. ConditioningTruncate is the fix - trim your positive conditioning back to that 77-token boundary before it reaches the sampler, so the CLIP side never sees more than it was built to handle.

How it works

It's a single-purpose node: hand it a conditioning, it truncates the CLIP portion to 77 tokens and passes the rest through. There's nothing to configure - no width parameter, no threshold to set. Per its own description, it's meant specifically for positive conditioning on SD3.5.

The inputs and outputs that matter

  • conditioning (CONDITIONING) - your positive conditioning, typically straight out of your text encode node.

Output: conditioning (CONDITIONING), truncated and ready to wire into your sampler's positive slot.

It's a small node doing one specific job, but it's the kind of thing that's easy to miss entirely if you don't already know it exists - nothing in a normal SD3.5 workflow tells you your CLIP conditioning silently went past 77 tokens, and the failure looks like generic quality loss rather than an obvious error. That's exactly the gap this node closes: a one-line insurance policy against a bug you'd otherwise only find by accident.

How to install it

Via ComfyUI Manager, search "RES4LYF". Or:

cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF/
cd RES4LYF
pip install -r requirements.txt

then restart.

Common issues & troubleshooting

Use it whenever you're on SD3.5 with a positive prompt that might run long. Natural-language prompts push past 77 tokens easily once you're writing full sentences, and unlike a lot of AI-generation quirks, this one has a concrete, documented cause rather than being folklore - the node's own description names the exact failure. There's not much downside to routing your SD3.5 positive conditioning through this by default.

Other T5-conditioned models don't need this. Flux, HiDream, and Chroma don't share this specific CLIP-side degradation the way SD3.5 does - this node is called out for SD3.5 by name because that's where the author found the problem, not because every T5-conditioned model has a hidden 77-token trap.

Pair it with ConditioningZeroAndTruncate on your negative side. That's the sibling node in this pack, and it exists because the stock ConditioningZeroOut node has the same untruncated-embedding problem on the negative path. Truncating only your positive conditioning and leaving the negative on stock ConditioningZeroOut gets you half the fix.

CategoryRES4LYF/conditioning

Inputs (1)

NameTypeDefaultDescription
conditioningCONDITIONING

Outputs (1)

NameTypeDescription
conditioningCONDITIONING