Model
Trends
.ai
Model
Trends
.ai
de beste open source AI-modellen

CLIP Set Last Layer-node in ComfyUI

CLIP Set Last Layer is the ComfyUI equivalent of "clip skip": it stops the text encoder a few layers early (-2 is the common setting for anime and Pony models).
Nodepakket: ComfyUI core
Categorie: Conditioning en prompts
Deze pagina is nog niet vertaald en wordt daarom in het Engels getoond.

Wat CLIP Set Last Layer doet

CLIP has 12 (SD 1.5) or 24 (SDXL) transformer layers. Some models were trained with the output of the second-to-last layer rather than the last one, which is called clip skip 2 in other interfaces. CLIP Set Last Layer takes a CLIP, truncates it at the chosen layer and returns the modified CLIP for the prompt nodes.
The value is negative: -1 is the normal full encoder, -2 skips one layer, and so on. Most anime checkpoints, NovelAI descendants, Pony and many Illustrious merges recommend -2. Realistic SD 1.5 and SDXL base models usually expect -1.

Invoer

Naam
Type
Wat het is
clip
CLIP
The text encoder from the checkpoint or LoRA loader.
stop_at_clip_layer
INT
-1 (no skip) down to -24. -2 equals clip skip 2.

Uitvoer

Naam
Type
Wat het is
CLIP
CLIP
The truncated encoder for CLIP Text Encode.
AD
Sla de installatie over: ComfyUI-workflows voorgeïnstalleerd in de cloud
BitVector draait kant-en-klare ComfyUI-workflows op eigen GPU's. Geen installatie, geen ontbrekende nodes, geen rode vakken. Open het op je telefoon of laptop en genereer binnen een minuut.

Zo gebruik je CLIP Set Last Layer

  1. Insert the node between the loader CLIP output and the CLIP Text Encode nodes.
  2. Set stop_at_clip_layer to the value from the model page (-2 for most anime models).
  3. Wire both prompt nodes to this node output.

Instellingen en tips

  • Put it after Load LoRA so the LoRA patches the full encoder first.
  • If a model page says "clip skip 1", leave the node out; it equals -1.
  • Changing the value changes the look of the same prompt noticeably; compare -1 and -2 before settling.

Problemen met CLIP Set Last Layer oplossen

Anime model looks muddy, generic or off-style

Waarom het gebeurt
The model expects clip skip 2 and the graph encodes with the full CLIP.

Zo los je het op
Add CLIP Set Last Layer at -2 before the prompt nodes.

The setting has no effect

Waarom het gebeurt
The prompt nodes are still connected to the original CLIP, bypassing this node.

Zo los je het op
Rewire both CLIP Text Encode nodes to the output of CLIP Set Last Layer.

Error on Flux or SD3 workflows

Waarom het gebeurt
T5-based encoders do not support layer truncation the same way; the node is meant for CLIP-L/G.

Zo los je het op
Remove the node from Flux and SD3 graphs; those models do not use clip skip.

AD
Start deze workflow vanaf je telefoon
Elke workflow op deze pagina staat voorgeïnstalleerd op BitVector, met modellen en custom nodes al op hun plek. Kies er een, typ een prompt, klaar. Nul installatie, niets te downloaden.

Vragen over CLIP Set Last Layer

Is -2 the same as clip skip 2 in AUTOMATIC1111?

Yes, exactly.

Does it affect LoRAs?

Only the text encoder part; place the node after Load LoRA.

Verwante nodes

AD
Nodes repareren beu? Laat de cloud het doen
BitVector houdt honderden ComfyUI-workflows geïnstalleerd, bijgewerkt en getest op snelle cloud-GPU's. Geen Python, geen CUDA-fouten, geen VRAM-limieten. Werkt in elke browser.

Meer ComfyUI-nodes

ComfyUI Manager
ComfyUI-Manager
ComfyUI Manager is the extension that installs, updates and fixes custom node packs and models from inside the interface, resolves missing nodes in imported workflows and snapshots your setup.
KSampler
ComfyUI core
KSampler runs the denoising loop: it takes the model, prompts and a latent and produces the finished latent image, controlled by seed, steps, cfg, sampler, scheduler and denoise.
Save Image
ComfyUI core
Save Image writes the IMAGE tensor to ComfyUI/output as a PNG, with the whole workflow embedded in the file metadata so the picture can be dragged back into ComfyUI to restore the graph.
VAE Decode
ComfyUI core
VAE Decode converts the sampled LATENT into a pixel IMAGE with the VAE; VAE Decode (Tiled) does the same in tiles for very large images.
Empty Latent Image
ComfyUI core
Empty Latent Image creates the blank latent canvas (width, height, batch_size) that text-to-image sampling starts from; dimensions must be multiples of 8 and match the model family.
Load Image
ComfyUI core
Load Image reads a picture from the ComfyUI input folder (or an upload) and outputs an IMAGE tensor plus a MASK taken from the alpha channel, the starting point for img2img, inpainting, ControlNet and IP-Adapter graphs.