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

πŸ“¦ Load Dual CLIP (Triggered)

Two text encoders, one click β€” without wrecking your VRAM

By amir84ferdosΒ·Created 11 months agoΒ·Updated 5 months agoΒ· 70
πŸ“¦ Load Dual CLIP (Triggered)
  • trigger
  • clip
  • memory_stats
β—„clip_name1β–Ύβ–Ί
β—„clip_name2β–Ύβ–Ί
β—„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β–Ί

Most modern models don't use one CLIP - they use two. SDXL wants clip-l plus clip-g, FLUX runs clip-l next to a big T5, and Hidream pairs T5 with a Llama. ComfyUI's stock loaders handle that fine, but they don't care about your RAM while they do it. That's the whole point of ArchAi3D Load Dual CLIP: it's a two-slot CLIP loader with the memory-management scaffolding this pack is really known for, plus a trigger input so you can force it to run after another node finishes.

The "Triggered" in the name isn't marketing. Connect anything into trigger and the loader won't execute until that node completes. That matters in Qwen-Edit workflows where you want the text encoder loaded only after, say, a VLM node has finished pre-processing your image - or in any graph where you're trying to keep a huge CLIP off the GPU until the last possible second.

What you actually set

The dropdown that does the heavy lifting is type. It's not cosmetic - it tells the loader which pair of encoders the recipe expects, so you don't have to remember:

  • sdxl β†’ clip-l + clip-g
  • flux β†’ clip-l + T5
  • hidream β†’ T5 + Llama (recommended per the author)
  • hunyuan_image β†’ Qwen2.5-VL 7B + ByT5 small
  • newbie β†’ gemma-3-4b-it + jina clip v2

Then clip_name1 and clip_name2 pick the actual files from your models/clip folder. The memory options are where this node separates from stock ComfyUI. use_dram (default on) checks the pack's CPU-RAM cache first - offloaded CLIPs reload in about a second instead of ten-plus from disk. keep_on_vram pins a pair to VRAM permanently and skips the cache entirely; good for light CLIPs that fit alongside everything else. replace_cached evicts this loader's previous CLIP from DRAM when you switch models, so you don't hoard a pile of 5GB encoders in system RAM - turn it off only if you genuinely want several pairs cached at once. device: cpu is the cheat code for tight VRAM: encode on CPU, keep the GPU for the diffusion model.

Outputs

clip is the standard CLIP object you feed into any text-encode node. The second output, memory_stats, is a plain string with the current state of the cache - mostly there for debugging, but wire it to a text display node and you get a free memory readout.

Installation

It ships inside the ComfyUI-ArchAi3d-Qwen pack. ComfyUI Manager is the easy path - search "ArchAi3d Qwen" and hit install, or clone manually:

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

Then restart ComfyUI. One heads-up: the requirements file pulls a lot more than this node needs (opencv, google-genai, colour-science, and friends are for other nodes in the ~160-node pack), so the pip install can take a while. And this pack is dual-licensed - free for personal use, paid for commercial work, so read the license file if you're billing clients.

Where people get burned

The default use_dram cache holds a lot in system RAM. If ComfyUI starts feeling sluggish or you get OOM kills in other apps, replace_cached is already on - just don't switch it off and load four different FLUX pairs in one session. Also remember keep_on_vram skips all cache logic, so a pinned pair never gets evicted until you unpin it. Pinning two big T5-class encoders on an 8GB card is a good way to meet your OOM error. If you're on limited VRAM, load on CPU and let the sampler do its thing.

CategoryArchAi3d/Loaders

Inputs (13)

NameTypeDefaultDescription
clip_name1COMBO0 options:
clip_name2COMBO0 options:
typeCOMBO11 options: sdxl, sd3, flux, hunyuan_video, hidream, hunyuan_image, +5
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β€”