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

CLIP Load Later [darkilNodes]

A CLIP loader that waits until you tell it to load

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

Text encoders are small next to diffusion models, so you might wonder why anyone would defer a CLIP load at all. The answer is workflows with choices. If your graph has a dropdown that picks between SD 1.5 and Flux, or a dynamic prompt system that routes between several models, ComfyUI will happily load every CLIP in every branch. On a long session that's a lot of RAM and a lot of startup churn. This node is the stock CLIPLoader with an any_trigger input bolted on, so the CLIP only gets loaded when an upstream node fires - not when the graph starts.

How it's built

The implementation is deliberately thin: it subclasses ComfyUI's own CLIPLoader, keeps every stock input, and just prepends the any_trigger wildcard input. When the trigger arrives, it calls the parent loader with your clip_name and type. Nothing about the loading logic is reinvented, which is exactly what you want from a "later" node - the only behavioral difference is timing.

The type combo is the big list you know from the stock loader - stable_diffusion, stable_cascade, sd3, stable_audio, mochi, ltxv, pixart, cosmos, lumina2, wan, hidream, chroma, and a dozen more. The briefs even ship the recipes, e.g. sd: clip-l, flux: clip-l + t5 via the Dual variant, wan: umt5 xxl. Get the wrong one and your encoding silently comes out wrong, so the same "check your model's text encoder" rule applies as with any loader.

Inputs and outputs

  • any_trigger (*) - wire this to whatever should gate the load. Any type works.
  • clip_name - from your text_encoders folder.
  • type - the encoder architecture combo (25 options).
  • device (optional, default/cpu) - force CPU, which is occasionally the right call for a text encoder you're barely using.

Output: CLIP, straight into your CLIPTextEncode. The node is in the darkilNodes/logic category and is not an output node, so it behaves like any other loader in the chain.

Where people get burned

Two classic traps. First, the trigger must come from something that doesn't depend on the CLIP - if you gate the CLIP load on the prompt that the CLIP is meant to encode, you've built a deadlock and ComfyUI will just sit there or error. Second, deferring the CLIP means your first run through the graph pays the load cost at the gated point instead of up front; for interactive previews that's usually fine, but don't expect it to be faster overall - it's about when memory is used, not how much total.

Installing

Same pack, same drill. ComfyUI Manager search ComfyUI-darkil-nodes, or:

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

Restart. No extra Python deps, no model downloads - it loads the text encoders already in your ComfyUI folders.

CategorydarkilNodes/logic

Inputs (4)

NameTypeDefaultDescription
any_trigger*
clip_nameCOMBO0 options:
typeCOMBO28 options: stable_diffusion, stable_cascade, sd3, stable_audio, mochi, ltxv, +22
deviceoptCOMBO2 options: default, cpu

Outputs (1)

NameTypeDescription
CLIPCLIP