#!/bin/bash
# Check how model_management handles VAE
grep -n -E "class.*ModelPatcher|def load_model|def lowvram|keep_loaded|current_loaded|KEEP" /home/fabian/ComfyUI/comfy/model_management.py | head -40
echo "=== VAE class ==="
grep -n -E "class VAE|def decode|def encode|first_stage|load_device|offload" /home/fabian/ComfyUI/comfy/sd.py | head -30
echo "=== model patcher keep ==="
grep -n -E "keep|pin|persist|resident|locked" /home/fabian/ComfyUI/comfy/model_management.py | head -20
