#!/bin/bash
source /home/fabian/ComfyUI/venv/bin/activate
export HSA_OVERRIDE_GFX_VERSION=10.1.0
export HSA_ENABLE_SDMA=0
export HIP_VISIBLE_DEVICES=0

# Find all torchvision directories
echo "=== torchvision locations ==="
find /home/fabian/ComfyUI/venv -name 'torchvision' -type d 2>/dev/null

echo "=== which init.py is loaded ==="
python3.11 -c "import torchvision; print(torchvision.__file__)" 2>&1 || true

echo "=== line 10 of loaded init ==="
python3.11 -c "
import importlib.util
spec = importlib.util.find_spec('torchvision')
print('Location:', spec.origin)
" 2>&1 || true

echo "=== check our patched file ==="
sed -n '10,14p' /home/fabian/ComfyUI/venv/lib/python3.11/site-packages/torchvision/__init__.py
