HuggingFace Triple CLIP Loader
The Three-Encoder Loader for SD3 and Friends, Minus the Folder Juggling
- CLIP
Stable Diffusion 3 and its family condition on three text encoders: CLIP-L, CLIP-G, and the big T5-XXL. That trio is why SD3 follows prompts about as well as it does - and why loading it is fiddly, because those three files live in one place in ComfyUI's mental model and another in Hugging Face's repo layout. HfTripleClipLoader sidesteps the whole thing: give it a repo, get a CLIP.
It's the middle sibling of the pack's loader family (dual for Flux, quadruple for HiDream, triple here), and it solves the same annoying problem as the rest: files already sitting in your HF cache shouldn't have to be copied into models/text_encoders by hand.
How it works
The defaults are tuned for stabilityai/stable-diffusion-3-medium: all three repo_id fields point at that repo, the subfolder_1..3 defaults are text_encoders, and the filename defaults are clip_l.safetensors, clip_g.safetensors, and t5xxl_fp16.safetensors - which is exactly how SD3's repo lays out its encoders. So the stock case is: leave the defaults, hit run.
Under the hood it's the pack's shared loader engine - resolve the HF cache snapshot (or a local path), auto-detect or use the explicit filename, merge shards if the checkpoint is split, and hand all three state dicts to Comfy's load_text_encoder_state_dicts. No type dropdown here; the encoders are detected from the state dicts themselves. Output is a single CLIP.
Inputs and outputs
- repo_id_1 / 2 / 3 - each accepts an HF repo ID, an absolute path, or a
./relativepath from the ComfyUI root. All three must be set. - subfolder_1..3 and filename_1..3 - optional; the defaults already match the SD3 repo, but override them when you're loading a different repo or a sharded checkpoint (use the
.index.jsonfilename for sharded files).
One CLIP out, wired into CLIPTextEncode as usual.
Installing it
It's part of Duanyll Nodepack:
cd ComfyUI/custom_nodes
git clone https://github.com/Duanyll/duanyll_nodepack
or install "Duanyll Nodepack" through ComfyUI Manager and restart.
Where people get burned
Same as its siblings: the node reads your HF cache, it doesn't download. The description claims it "Downloads a model from Hugging Face," but the code raises FileNotFoundError with Run \hf download <repo>` first` if the repo isn't cached. Get SD3 medium cached once:
hf download stabilityai/stable-diffusion-3-medium
A second trap is the T5 half of the trio. T5-XXL is a ~9.5B encoder - most of SD3's RAM/VRAM footprint is that one file. If you're on a tight card, that's where a quantized T5 or the smaller T5 encoder makes the difference, and it's worth knowing the loader isn't the bottleneck. And as with every loader here: ambiguous folders need an explicit filename, or the node refuses to guess.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| repo_id_1 | STRING | stabilityai/stable-diffusion-3-medium | The Hugging Face repo ID, an absolute path (/path/to/model), or a relative path (./models/...) from the ComfyUI root. |
| repo_id_2 | STRING | stabilityai/stable-diffusion-3-medium | The Hugging Face repo ID, an absolute path (/path/to/model), or a relative path (./models/...) from the ComfyUI root. |
| repo_id_3 | STRING | stabilityai/stable-diffusion-3-medium | The Hugging Face repo ID, an absolute path (/path/to/model), or a relative path (./models/...) from the ComfyUI root. |
| subfolder_1opt | STRING | text_encoders | The subfolder where the model is located. Applies to both Hugging Face repos and local paths. |
| subfolder_2opt | STRING | text_encoders | The subfolder where the model is located. Applies to both Hugging Face repos and local paths. |
| subfolder_3opt | STRING | text_encoders | The subfolder where the model is located. Applies to both Hugging Face repos and local paths. |
| filename_1opt | STRING | clip_l.safetensors | The checkpoint file to load. If not specified, will auto-detect. For sharded checkpoints, use the index file (e.g., 'model.index.json'). |
| filename_2opt | STRING | clip_g.safetensors | The checkpoint file to load. If not specified, will auto-detect. For sharded checkpoints, use the index file (e.g., 'model.index.json'). |
| filename_3opt | STRING | t5xxl_fp16.safetensors | The checkpoint file to load. If not specified, will auto-detect. For sharded checkpoints, use the index file (e.g., 'model.index.json'). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CLIP | CLIP | — |