CLIP Set Last Layer
The CLIP-skip dial, and the three models where it actually changes anything
- clip
- CLIP
Every text-to-image model has to decide which layer of its text encoder gets to speak for your prompt, and this node is the manual override for that choice. CLIP has a stack of layers, and they encode different levels of abstraction: the final layers are specific ("a wizard with a beard and robe"), the earlier layers are general ("a man"). CLIPSetLastLayer clones your CLIP and tells it to stop at an earlier layer, so the conditioning is built from a more general reading of your words. That's the entire thing, and it's the same operation people have called "CLIP skip" since the A1111 days.
The one input that matters
- stop_at_clip_layer - an integer from -1 to -24.
-1(the default) is the final layer: no skipping.-2skips the last layer,-3skips two, and so on. Yes, it's a negative number; the UI counts backward from the end of the encoder, which is confusing until you realize-1is the normal setting.
The output is a CLIP - the same CLIP, just reconfigured - so you wire it into your regular text encoder (CLIPTextEncode) exactly where you'd put the un-modified CLIP.
Where it's a real dial, and where it's a trap
This is the part that saves people from an hour of frustration. The setting matters on SD 1.5: the classic anime models descend from NovelAI's convention of conditioning on the penultimate layer, so anime SD 1.5 checkpoints want -2 and realistic ones want -1. That's the whole historical reason the knob exists.
On SDXL and everything derived from it - Illustrious, Pony, NoobAI - the default is already -2. Both SDXL text encoders condition on the penultimate layer before you touch anything, so setting -2 here changes nothing, and setting -1 is what actually breaks Pony and turns output into noise. The only reason to add the node on an SDXL-lineage model is as insurance against a custom loader that passes -1 by default. "CLIP skip 2 fixes anime" is advice that stopped being true when the models moved off SD 1.5.
And on the 2026-generation models - Z-Image, Flux 2 Klein, Anima, anything with a Qwen3 or Mistral encoder - this node does nothing at all. There is no CLIP in those stacks, no layers to skip, and the concept didn't get ported. The idea survived inside those architectures (Klein stacks several hidden layers into its conditioning as a fixed choice), but the knob is gone. Don't add this node to a modern workflow expecting it to do anything.
How you get it and troubleshooting
It ships with ComfyUI core - it's in the node menu under "CLIP Set Last Layer", no install. The classic failure is thinking you've found a quality lever on SDXL: you'll set -2, see no change, and conclude the node is broken. It isn't - you're restating a default. The version that changes anything is -1 on an SDXL-lineage model (bad idea) or a real -2 on SD 1.5 (correct for anime). If you're on a modern model, save yourself the click and leave the node out of the graph entirely.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| stop_at_clip_layer | INT | -1-24–-1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CLIP | CLIP | — |