> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# ClipSetLastLayer（CLIPSetLastLayer）

<div class="node-meta"><code>CLIPSetLastLayer</code><span>model/conditioning</span><span>角色：CLIP 处理</span><span class="star">★ 常用节点</span></div>

`CLIP Set Last Layer` 是 ComfyUI 中的一个核心节点，用于控制 CLIP 模型的处理深度。它允许用户精确控制 CLIP 文本编码器在何处停止处理，从而同时影响文本理解的深度和生成图像的风格。原始 CLIP 模型保持不变：该节点在副本上操作，并返回修改后的副本。

## 参数

| 参数                   | 类型           | 默认 / 范围   | 说明                                                 |
| -------------------- | ------------ | --------- | -------------------------------------------------- |
| `clip`               | CLIP · 文本编码器 | —（连线输入）   | 修改后的 CLIP 模型（输入模型的克隆；原始 CLIP 模型不会被更改），并将指定层设置为最后一层 |
| `stop_at_clip_layer` | INT          | -24 \~ -1 | —                                                  |

## 输出

| 输出    | 类型   | 说明    |
| ----- | ---- | ----- |
| 文本编码器 | CLIP | 文本编码器 |

## 怎么接

- **上游**：CheckpointLoaderSimple / CLIPLoader / DualCLIPLoader
- **下游**：CLIPTextEncode
- **接线**：夹在 CLIP 与 CLIPTextEncode 之间，用来改层数、权重或挂钩子；输出仍接 `clip`。

## 使用案例

把 CLIP 的最后一层切掉（`stop_at_clip_layer` 设为负数，如 -1、-2）。

作用是让提示词更「松散」：层数越靠前，语义越抽象。风格化模型（尤其是动漫向）常用 -1 到 -2 来避免过度拘束。

挂在模型加载器和 `CLIPTextEncode` 之间，只影响文本侧，不影响出图质量本身。

## 端口与连线示意

![CLIPSetLastLayer 端口与连线示意](/svg/CLIPSetLastLayer.svg)

## 同类节点

[ClipTextEncode](/nodes/03/CLIPTextEncode.md) · [CLIP视觉编码](/nodes/03/CLIPVisionEncode.md) · [内补模型条件](/nodes/03/InpaintModelConditioning.md) · [参考Latent](/nodes/03/ReferenceLatent.md) · [应用风格模型](/nodes/03/StyleModelApply.md) · [音频编码器编码](/nodes/03/AudioEncoderEncode.md) · [CLIP文本编码(ControlNet)](/nodes/03/CLIPTextEncodeControlnet.md) · [规格化视频Latent](/nodes/03/NormalizeVideoLatentStart.md) · [PiD 条件处理](/nodes/03/PiDConditioning.md) · [多参考潜空间](/nodes/03/ReferenceMultiLatent.md) · [ReferenceTimbreAudio](/nodes/03/ReferenceTimbreAudio.md) · [保存条件](/nodes/03/SaveConditioning.md)
