#!/bin/bash # Get Python stack trace with py-spy PID=$(pgrep -f 'python main.py' | head -1) if [ -z "$PID" ]; then echo "NO PROCESS"; exit 1; fi echo "=== py-spy dump (thread stacks) ===" /home/fabian/ComfyUI/venv/bin/py-spy dump --pid $PID 2>&1 | head -80