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

πŸ“¦ Load Diffusion Model (Triggered)

Load a diffusion model (UNET) with memory management and execution order control. [Parameters] trigger: Connect to any output to force execution order (e.g., run after QwenVL Server Control). keep_on_vram: Pin model to GPU VRAM permanently. Protected from ComfyUI auto-eviction. Skips DRAM cache. Best for light models that fit in VRAM alongside other models. If you change the model name, the old one is automatically unpinned. use_dram: Check DRAM cache (CPU RAM) for previously loaded model. Much faster than disk reload (~1s vs 10-30s). Model stays in RAM between runs. replace_cached: When switching to a different model, evict THIS loader's previous model from DRAM first. Saves RAM. Turn off to keep multiple models cached (needs lots of RAM). cache_to_local_ssd: RunPod only β€” copy model file from network drive to local NVMe for faster loading. No effect on local PC. auto_free_vram: Safety net for serverless. Before loading from disk, checks free VRAM. If below min_free_vram_gb, unpins ALL pinned models and asks ComfyUI to free VRAM. Only triggers when loading a DIFFERENT model (same model reuses cache). Does nothing if memory is already sufficient. min_free_vram_gb: Threshold in GB for auto_free_vram. Example: 10 means "if less than 10 GB free VRAM, free up first". auto_free_dram: Safety net for serverless. Before loading from disk, checks free system RAM. If below min_free_dram_gb, clears ALL DRAM cache entries. Only triggers on DRAM miss (same model returns from cache without checking). min_free_dram_gb: Threshold in GB for auto_free_dram. Example: 10 means "if less than 10 GB free RAM, clear DRAM cache first".

By amir84ferdosΒ·Created 10 months agoΒ·Updated 4 months agoΒ· 65
πŸ“¦ Load Diffusion Model (Triggered)
  • trigger
  • model
  • memory_stats
β—„unet_nameβ–Ύβ–Ί
β—„weight_dtypeβ–Ύβ–Ί
β—„keep_on_vramfalseβ–Ί
β—„use_dramtrueβ–Ί
β—„replace_cachedtrueβ–Ί
β—„cache_to_local_ssdtrueβ–Ί
β—„auto_free_vramfalseβ–Ί
β—„min_free_vram_gb10.0β–Ί
β—„auto_free_dramfalseβ–Ί
β—„min_free_dram_gb10β–Ί
CategoryArchAi3d/Loaders

Inputs (11)

NameTypeDefaultDescription
unet_nameCOMBO0 options:
weight_dtypeCOMBO4 options: default, fp8_e4m3fn, fp8_e4m3fn_fast, fp8_e5m2
triggeropt*Connect to any output to ensure this node runs after that node completes
keep_on_vramoptBOOLEANfalseKeep model on GPU VRAM permanently. Skips all DRAM cache logic. Good for light models that fit in VRAM.
use_dramoptBOOLEANtrueCheck DRAM cache for previously offloaded model. Much faster than disk reload.
replace_cachedoptBOOLEANtrueWhen switching models, evict THIS loader's previous model from DRAM first. Saves RAM. Turn off to keep multiple models cached (needs lots of RAM).
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
modelMODELβ€”
memory_statsSTRINGβ€”