AQ_CLIPSetLastLayer
CLIP skip as a standalone node (SD 1.5 anime users, this one's for you)
- clip
- CLIP
This is a thin wrapper over something ComfyUI already does on the Clip Loader - the "stop at clip layer" setting - exposed as its own node so you can apply it after load, per conditioning, without touching the loader.
That setting is CLIP skip. The idea: stop the text encoder a layer early and condition on an earlier, more general representation instead of the final one. It's a Danbooru-lineage convention - NovelAI conditioned on CLIP's penultimate layer back in 2022, that decision propagated through the anime checkpoint family, and every descendant through Pony, Illustrious, and NoobAI inherits the expectation. For SD 1.5 anime models, skip 2 is the documented rule of thumb.
How it works
The implementation is five lines: if stop_at_clip_layer is 0, return the clip unchanged; otherwise clone it and call clip.clip_layer(stop_at_clip_layer) - the exact same API the core loader uses internally. Values are negative: -1 skips the last layer, -2 the last two, down to -24.
Inputs
clip- any loaded CLIP.stop_at_clip_layer- 0 to -24, default 0 (a no-op).
Output
CLIP - the patched clip, ready for a text-encode node.
Install
Ships in AQnodes:
cd ComfyUI/custom_nodes
git clone https://github.com/2frames/ComfyUI-AQnodes
cd ComfyUI-AQnodes
pip install -r requirements.txt
or search "AQnodes" in ComfyUI Manager and restart.
Gotchas
The honest caveat, because this is one of those settings whose relevance is shrinking: on SDXL it mostly does nothing (both encoders already default to the penultimate layer), and on the modern LLM-encoder models - Flux, Qwen3-era, and friends - there is no CLIP to skip at all, so the parameter doesn't exist. If your workflow is SD 1.5 anime, this node is a fine way to flip skip without re-opening the loader. If you're on anything newer, you can skip this node entirely.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| stop_at_clip_layer | INT | 0-24–0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CLIP | CLIP | — |