diff --git a/scripts/pod/start-comfyui.sh b/scripts/pod/start-comfyui.sh index f921e46..2d9aa25 100755 --- a/scripts/pod/start-comfyui.sh +++ b/scripts/pod/start-comfyui.sh @@ -6,6 +6,11 @@ set -euo pipefail LOG=/workspace/minimax-h3/comfyui.log +# wait out any process that is mid-shutdown before deciding it's "running" +for i in 1 2 3 4 5; do + pgrep -f "python3? main.py" >/dev/null || break + sleep 2 +done if pgrep -f "python3? main.py" >/dev/null; then echo "ComfyUI already running" exit 0