#!/bin/bash
# Find VAE.decode method
grep -n "def decode\|def encode\|def decode_tiled\|disable_offload\|patcher\|load_model\|self.first_stage" /home/fabian/ComfyUI/comfy/sd.py | head -30
echo "=== decode method ==="
sed -n '/class VAE:/,/^class /p' /home/fabian/ComfyUI/comfy/sd.py | grep -n "def decode\|patcher\|load_model\|offload\|self.first_stage_model.to\|self.first_stage_model.eval" | head -20
echo "=== patcher setup ==="
sed -n '700,800p' /home/fabian/ComfyUI/comfy/sd.py
