#!/bin/bash # Start ComfyUI headless on the pod inside tmux, listening on 127.0.0.1:8188. # Access from your laptop via scripts/local/port-forward.sh set -euo pipefail SESSION=comfyui LOG=/workspace/minimax-h3/comfyui.log if tmux has-session -t "$SESSION" 2>/dev/null; then echo "ComfyUI tmux session already running" exit 0 fi tmux new -s "$SESSION" -d \ "cd /ComfyUI && python main.py --listen 127.0.0.1 --port 8188 2>&1 | tee -a $LOG" echo "started; tail $LOG"