Nodes/ComfyUI-ArchAi3d-Qwen/πŸ“¦ Load CLIP (Triggered)
ComfyUI Node

πŸ“¦ Load CLIP (Triggered)

A single-CLIP loader that remembers where it left things

By amir84ferdosΒ·Created 11 months agoΒ·Updated 5 months agoΒ· 70
πŸ“¦ Load CLIP (Triggered)
  • trigger
  • clip
  • memory_stats
β—„clip_nameβ–Ύβ–Ί
β—„typeβ–Ύβ–Ί
β—„keep_on_vramfalseβ–Ί
β—„use_dramtrueβ–Ί
β—„replace_cachedtrueβ–Ί
β—„deviceβ–Ύβ–Ί
β—„cache_to_local_ssdtrueβ–Ί
β—„auto_free_vramfalseβ–Ί
β—„min_free_vram_gb10.0β–Ί
β—„auto_free_dramfalseβ–Ί
β—„min_free_dram_gb10β–Ί

If you only ever load one text encoder at a time, this is the leaner sibling to the pack's Load Dual CLIP node. Same memory machinery, one encoder instead of two, and a type dropdown that maps to the right model family so you stop guessing which CLIP goes with what.

Honestly, most people reach for this in exactly two situations. Either they're on a low-VRAM card and want fine control over when the CLIP sits on the GPU, or they're building serverless/RunPod workflows where reloading a 5GB text encoder from disk on every cold start is the difference between a 30-second job and a two-minute one. The type recipes are the quick way in: stable_diffusion β†’ clip-l, stable_cascade β†’ clip-g, flux β†’ T5-XXL (or clip-l), wan β†’ umt5-XXL, hidream β†’ Llama-3.1 or T5, qwen_image β†’ the Qwen-VL encoders. If you're doing Qwen-Edit work - the instruction-editing model this pack orbits - that last one is your bread and butter.

The inputs that matter

clip_name picks the file from models/clip, and type picks the recipe. Beyond that it's the same memory panel as the dual loader:

  • trigger - wire any output into it to force execution order. The pack's Qwen workflows use this to load the CLIP after image pre-processing finishes.
  • keep_on_vram - pins the CLIP to VRAM so ComfyUI's auto-eviction leaves it alone. Perfect for a small encoder you use every single run.
  • use_dram - the pack's CPU-RAM cache. Reload from RAM (~1s) instead of disk (~10-30s). On by default.
  • replace_cached - evict this loader's previous CLIP from DRAM when you switch files. Saves RAM; turn off if you genuinely want multiple encoders cached.
  • device - cpu is your friend when VRAM is tight: the encode happens on CPU, leaving the GPU for sampling.
  • cache_to_local_ssd - a RunPod-only fast path that copies the model to local NVMe. Does nothing on a normal PC; you can ignore it.

Outputs

clip feeds straight into your CLIPTextEncode or the Qwen encoder nodes in this same pack. The memory_stats string output is a cache/VRAM status report you can pipe to a display node for debugging.

Installation

It lives in the ComfyUI-ArchAi3d-Qwen pack. Easiest via ComfyUI Manager (search "ArchAi3d Qwen"), or:

cd ComfyUI/custom_nodes/
git clone https://github.com/amir84ferdos/ComfyUI-ArchAi3d-Qwen.git
cd ComfyUI-ArchAi3d-Qwen
pip install -r requirements.txt

Restart ComfyUI and the node appears under ArchAi3d/Loaders. The requirements file installs the whole pack's dependencies, not just this node's - expect a chunky install. And remember the dual license: free for personal use, commercial use needs a paid license from the author.

Where people get burned

The DRAM cache keeps offloaded encoders in system RAM, so if you load a bunch of different models in one session, watch your RAM, not just your VRAM. keep_on_vram is sticky: once pinned, a model stays on the GPU until the loader unpins it (which happens automatically when you pick a different CLIP). One classic trap - if you set device to cpu, the cache still stores the model in RAM either way, so that's RAM plus VRAM working together, not a substitution. And if the node's dropdown ever shows no CLIP files, you haven't dropped any into ComfyUI/models/clip yet - that's the first thing to check.

CategoryArchAi3d/Loaders

Inputs (12)

NameTypeDefaultDescription
clip_nameCOMBO0 options:
typeCOMBO18 options: stable_diffusion, stable_cascade, sd3, stable_audio, mochi, ltxv, +12
triggeropt*Connect to any output to ensure this node runs after that node completes
keep_on_vramoptBOOLEANfalseKeep CLIP on GPU VRAM permanently. Skips all DRAM cache logic. Good for light models that fit in VRAM.
use_dramoptBOOLEANtrueCheck DRAM cache for previously offloaded CLIP. Much faster than disk reload.
replace_cachedoptBOOLEANtrueWhen switching CLIPs, evict THIS loader's previous CLIP from DRAM first. Saves RAM. Turn off to keep multiple CLIPs cached.
deviceoptCOMBODevice to load CLIP on. Use 'cpu' to save VRAM.
cache_to_local_ssdoptBOOLEANtrueRunPod: copy model to local SSD for faster loading. No effect on local PC.
auto_free_vramoptBOOLEANfalseBefore loading: if free VRAM is below threshold, unpin all models and let ComfyUI free VRAM.
min_free_vram_gboptFLOAT10.00–80Minimum free VRAM (GB) required. If below this, auto-free kicks in.
auto_free_dramoptBOOLEANfalseBefore loading: if free RAM is below threshold, clear DRAM cache to free system memory.
min_free_dram_gboptFLOAT100–256Minimum free RAM (GB) required. If below this, DRAM cache is cleared.

Outputs (2)

NameTypeDescription
clipCLIPβ€”
memory_statsSTRINGβ€”