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