> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# CLIPLoader - ComfyUI Built-in Node Documentation

> Complete documentation for the CLIPLoader node in ComfyUI. Learn its inputs, outputs, parameters and usage.

CLIPLoader 节点用于从文件加载文本编码器模型（CLIP、T5 或类似模型），使其可供其他需要将文本提示转换为数值表示的节点使用。该节点支持多种模型架构，每种架构需要特定的编码器类型。

## 输入

| 参数       | 描述                                                                                   | 数据类型   | 是否必需 | 取值范围                                                                                                                                                                                                                                                                                                                                                         |
| -------- | ------------------------------------------------------------------------------------ | ------ | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `CLIP名称` | 要加载的文本编码器模型文件名。该文件必须位于 `ComfyUI/models/text_encoders/` 或 `ComfyUI/models/clip/` 目录中。 | STRING | 是    | `text_encoders` 文件夹中找到的文件列表                                                                                                                                                                                                                                                                                                                                  |
| `类型`     | 所加载模型的架构类型。这决定了使用哪个具体的编码器变体。默认值为 `"stable_diffusion"`。                               | STRING | 是    | `"stable_diffusion"`<br />`"stable_cascade"`<br />`"sd3"`<br />`"stable_audio"`<br />`"mochi"`<br />`"ltxv"`<br />`"pixart"`<br />`"cosmos"`<br />`"lumina2"`<br />`"wan"`<br />`"hidream"`<br />`"chroma"`<br />`"ace"`<br />`"omnigen2"`<br />`"qwen_image"`<br />`"hunyuan_image"`<br />`"flux2"`<br />`"ovis"`<br />`"longcat_image"`<br />`"cogvideox"` |
| `设备`     | 加载模型的目标设备。`"default"` 在可用时使用 GPU，而 `"cpu"` 强制使用 CPU 加载。这是一个高级选项（默认值：`"default"`）。    | STRING | 否    | `"default"`<br />`"cpu"`                                                                                                                                                                                                                                                                                                                                     |

### 支持的编码器类型映射

`type` 参数为给定的模型架构选择正确的编码器。以下是常见的映射关系：

| 类型                | 编码器                      |
| ----------------- | ------------------------ |
| stable\_diffusion | clip-l                   |
| stable\_cascade   | clip-g                   |
| sd3               | t5 xxl / clip-g / clip-l |
| stable\_audio     | t5 base                  |
| mochi             | t5 xxl                   |
| cogvideox         | t5 xxl（226 令牌填充）         |
| cosmos            | old t5 xxl               |
| lumina2           | gemma 2 2B               |
| wan               | umt5 xxl                 |
| hidream           | llama-3.1（推荐）或 t5        |
| omnigen2          | qwen vl 2.5 3B           |

## 输出

| 输出名称   | 描述                               | 数据类型 |
| ------ | -------------------------------- | ---- |
| `clip` | 已加载的文本编码器模型，可连接到其他节点进行文本编码和条件控制。 | CLIP |

> 本文档由 AI 生成。如果您发现任何错误或有改进建议，欢迎贡献！ [在 GitHub 上编辑](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/CLIPLoader/zh.md)

***

**Source fingerprint (SHA-256):** `1051bfe5570dff81719682cb09938bae4c03e94e0e72f7a2be84867cccb48017`
