Nodes/comfyui-darkil-nodes/DualCLIP Load Later [darkilNodes]
ComfyUI Node

DualCLIP Load Later [darkilNodes]

Load two text encoders on demand — the Flux/SD3 workflow version

By pytraveler·Created 7 months ago·Updated 16 days ago· 9
DualCLIP Load Later [darkilNodes]
  • any_trigger
  • CLIP
clip_name1
clip_name2
type
device

Modern models don't have one text encoder, they have two. Flux wants clip-l plus a T5, SDXL wants clip-l plus clip-g, SD3 has its own pairings. ComfyUI's DualCLIPLoader handles that - and this node is that exact loader with an any_trigger input added, so both text encoders load only when an upstream node fires rather than at graph start. If you have a workflow that switches between model families, it stops ComfyUI from hoovering up every T5 and CLIP-G on the disk just to run one image.

How it works

Like its single-CLIP sibling, it subclasses ComfyUI's stock DualCLIPLoader and prepends the wildcard any_trigger input. Execution order in ComfyUI is determined by connections, so wiring anything into any_trigger pushes the actual load to that point in the chain - the loader sits inert until its trigger resolves, then calls the parent's load_clip with your two filenames and the pairing type. The load logic is untouched; only the timing moves.

The type combo is where you need to be careful, because it encodes the pairing recipe, not just the architecture:

  • sdxlclip-l + clip-g
  • sd3clip-l + clip-g, or clip-l + t5, or clip-g + t5
  • fluxclip-l + t5
  • hidream → t5 and/or llama, recommended t5 + llama
  • hunyuan_imageqwen2.5vl 7b + byt5 small
  • plus hunyuan_video, hunyuan_video_15, kandinsky5, kandinsky5_image, ltxv, newbie (gemma-3-4b-it + jina clip v2), and ace

Pick a recipe that doesn't match your model files and you'll get two encoders that don't belong together - the errors are usually clear, but "why does my Flux prompt look like random noise" is a classic symptom of pairing a CLIP-L with the wrong second encoder.

Inputs and outputs

  • any_trigger (*) - the gate. Any upstream value works.
  • clip_name1, clip_name2 - the two encoder files from your text_encoders folder.
  • type - the pairing combo (12 options).
  • device (optional, default/cpu).

Output: a single CLIP that feeds your CLIPTextEncode just like the stock DualCLIPLoader - which is to say, wire it to the encode node that expects the combined CLIP.

Where people get burned

Same deadlock rule as the other "later" loaders: don't let the trigger depend on the CLIP you're about to load. And a subtle one specific to dual loaders - the two encoders load as a unit, so deferring doesn't let you load only the lightweight one; the whole pairing gets pulled into memory at once. If your goal is purely saving RAM on a single-model graph, a deferred loader won't help; it shines in multi-model or branch-heavy workflows.

Installing

In pytraveler/comfyui-darkil-nodes. ComfyUI Manager search ComfyUI-darkil-nodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/pytraveler/comfyui-darkil-nodes

Restart. No Python deps or model downloads - it uses the text encoder files already in your ComfyUI folders.

CategorydarkilNodes/logic

Inputs (5)

NameTypeDefaultDescription
any_trigger*
clip_name1COMBO0 options:
clip_name2COMBO0 options:
typeCOMBO12 options: sdxl, sd3, flux, hunyuan_video, hidream, hunyuan_image, +6
deviceoptCOMBO2 options: default, cpu

Outputs (1)

NameTypeDescription
CLIPCLIP