Nodes/ComfyUI_DeleteModelPassthrough/Controlled CLIP Text Encode (Prompt)
ComfyUI Node

Controlled CLIP Text Encode (Prompt)

A CLIP text encoder you can pause — for when you don't want the prompt encoded yet

By Isi-dev·Created about a year ago·Updated 8 months ago· 5
Controlled CLIP Text Encode (Prompt)
  • clip
  • trigger
  • CONDITIONING
text

Controlled CLIP Text Encode is the odd one out in a memory-management pack: it doesn't free anything, it just wraps the stock CLIPTextEncode node and adds a trigger input. Feed the trigger a value and it encodes your prompt normally, handing back a CONDITIONING ready for the sampler. Leave it unplugged and it returns None instead - no encoding, no CLIP pass, no work done.

Why would you want that? Because in ComfyUI, a node only executes when something downstream actually needs its output. That's the whole execution model. But it executes eagerly in dependency order, which means a text encoder sitting in a big workflow still runs the moment its inputs are ready. The trigger wire turns that into a gate: nothing runs until whatever you connected to trigger has produced a value, so you can sequence the CLIP pass relative to other heavy work, or skip it entirely by leaving the trigger dead. If you're juggling VRAM and the CLIP pass is part of the OOM problem - think a huge T5-XXL text encoder on a small card - deferring it until the last moment can be the difference between a clean run and a crash.

The inputs that matter

The node is genuinely minimal. From the schema:

  • text - your prompt, a multiline text box. What gets encoded.
  • clip - the CLIP model, wired from a CLIPLoader or checkpoint loader.
  • trigger - the gate. Any type works; the node just checks whether it's None.

Output is a single CONDITIONING, which feeds the positive/negative inputs of a KSampler or conditioning nodes. When the trigger fires, the wrapper forwards the call straight to the stock CLIPTextEncode.encode() - the source is a few lines of delegation, nothing clever.

The catch, as ever

When it's paused, the output is None. Wire that into a KSampler and you'll get a different kind of error than an OOM - something like "NoneType has no attribute 'copy'". So this node is a deliberate skip-or-run switch, not a "maybe encode later" hint. The honest use case: prompt A/B setups where you want to run one branch of a workflow without paying for the CLIP pass on the other, or large workflows where you've got a reason to hold the encoding until after a heavy model load. If your actual goal is just "I'm done with the CLIP, get rid of it," the Delete Model nodes in the same pack are the right tool - this one only gates the work, it doesn't clean up after it.

Install comes with the pack: ComfyUI Manager (search "DeleteModelPassthrough") or git clone https://github.com/Isi-dev/ComfyUI_DeleteModelPassthrough into custom_nodes and restart. No models, no extra dependencies beyond the pack's psutil. It's a WIP utility pack with a small footprint, so set expectations: this is a power-user convenience for workflow sequencing, not a fix for a fundamentally overloaded card. On a genuinely tight GPU, GGUF-quantized text encoders (city96's T5-XXL GGUFs) will do far more for you than gating the stock encoder.

CategoryMemory Management

Inputs (3)

NameTypeDefaultDescription
textSTRINGThe text to be encoded.
clipCLIPThe CLIP model used for encoding the text.
trigger*

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING