store ComfyUI configs in repo for one-command pod rebuild

- comfyui/: extra_model_paths.yaml + the three MiniMax H3 workflow JSONs
- push-to-pod.sh stages everything onto the persistent volume
- install-minimax-h3.sh rebuilds a wiped container from that stage

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Hanashi
2026-08-06 02:01:32 -04:00
parent 2d6dbf9f81
commit d9b1f568bb
8 changed files with 4550 additions and 107 deletions
@@ -1,78 +0,0 @@
{
"permissions": {
"allow": [
"Bash(curl -sS -m 5 -o /dev/null -w \"HTTP %{http_code}\\\\n\" http://localhost:8188)",
"Bash(ssh *)",
"Bash(ssh-keygen -y -P \"\" -f ~/.ssh/id_ed25519_echelon)",
"Bash(ssh-add -l)",
"Bash(env)",
"Bash(echo \"exit: $?\")",
"Read(//run/user/1000/keyring/**)",
"Read(//tmp/**)",
"Bash(SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh ssh-add -l)",
"Bash(SSH_AUTH_SOCK=/run/user/1000/keyring/.ssh ssh-add -l)",
"Bash(echo \"exit2: $?\")",
"Bash(export SSH_AUTH_SOCK=/run/user/1000/keyring/.ssh)",
"Bash(curl -s \"https://huggingface.co/api/models/Comfy-Org/MiniMax-H3/tree/main?recursive=true\")",
"Bash(python3 -c ' *)",
"WebFetch(domain:github.com)",
"WebSearch",
"WebFetch(domain:huggingface.co)",
"Bash(curl -s \"https://huggingface.co/api/models/Comfy-Org/MiniMax-H3/tree/main/diffusion_models\")",
"WebFetch(domain:docs.comfy.org)",
"WebFetch(domain:blog.comfy.org)",
"WebFetch(domain:raw.githubusercontent.com)",
"WebFetch(domain:recipes.vllm.ai)",
"Bash(chmod +x scripts/pod/*.sh scripts/local/*.sh)",
"Bash(curl -sL https://raw.githubusercontent.com/Comfy-Org/ComfyUI/master/comfy_extras/nodes_minimax_h3.py -o nodes_minimax_h3.py)",
"WebFetch(domain:docs.sglang.io)",
"Bash(scp -P 14278 scripts/pod/download-weights.sh scripts/pod/start-comfyui.sh root@216.243.220.136:/workspace/minimax-h3/)",
"Bash(scp -P 14278 scripts/pod/extra_model_paths.yaml root@216.243.220.136:/ComfyUI/extra_model_paths.yaml)",
"WebFetch(domain:comfyui-wiki.com)",
"WebFetch(domain:docs.runpod.io)",
"Bash(curl -s \"https://api.github.com/repos/Comfy-Org/workflow_templates/git/trees/main?recursive=1\")",
"WebFetch(domain:kingy.ai)",
"Bash(bash /home/bt/dev/storyteller/cloud-worker/scripts/local/port-forward.sh)",
"Bash(curl -s -o /dev/null -w \"%{http_code}\" http://127.0.0.1:8188/)",
"Bash(python3 -)",
"Bash(curl -s http://127.0.0.1:8188/object_info)",
"Bash(curl -s \"https://api.github.com/search/issues?q=repo:Comfy-Org/ComfyUI+minimax+h3&per_page=30\")",
"Bash(curl -s http://127.0.0.1:8188/object_info/UNETLoader)",
"Bash(curl -s http://127.0.0.1:8188/object_info/VAELoader)",
"Bash(curl -s http://127.0.0.1:8188/object_info/CLIPLoader)",
"Bash(curl -s http://127.0.0.1:8188/object_info/CreateVideo)",
"Bash(python3 -m json.tool)",
"Bash(curl -s http://127.0.0.1:8188/object_info/SaveVideo)",
"Bash(python3 -c \"import json,sys; d=json.load\\(sys.stdin\\); print\\(json.dumps\\(d['SaveVideo']['input'],indent=1\\)[:800]\\)\")",
"Bash(scp -q -O -P 14278 /home/bt/dev/storyteller/cloud-worker/scripts/pod/make-test-images.py root@216.243.220.136:/workspace/minimax-h3/)",
"Bash(timeout 550 python3 bench/minimax_bench.py --task t2v --width 608 --height 352 --seconds 5 --steps 20 --label smoke_t2v 2>&1)",
"Bash(timeout 550 python3 bench/minimax_bench.py --task i2v --width 608 --height 352 --seconds 5 --label smoke_i2v --warm)",
"Bash(timeout 550 python3 bench/minimax_bench.py --task ref2v --width 608 --height 352 --seconds 5 --label smoke_ref2v)",
"Bash(scp -q -O -P 14278 /home/bt/dev/storyteller/cloud-worker/scripts/pod/download-weights-tmpfs.sh root@216.243.220.136:/workspace/minimax-h3/)",
"Bash(scp -q -O -P 14278 /home/bt/dev/storyteller/cloud-worker/scripts/pod/extra_model_paths.yaml root@216.243.220.136:/ComfyUI/extra_model_paths.yaml)",
"Bash(ffmpeg -v error -i /tmp/claude-1000/-home-bt-dev-storyteller-cloud-worker/309f1cfc-b7d8-47ef-a9b1-357cee94033d/scratchpad/smoke_t2v.mp4 -vf 'select=eq\\(n\\\\,60\\)' -frames:v 1 /tmp/claude-1000/-home-bt-dev-storyteller-cloud-worker/309f1cfc-b7d8-47ef-a9b1-357cee94033d/scratchpad/t2v_frame.png -y)",
"Bash(ffmpeg -v error -i /tmp/claude-1000/-home-bt-dev-storyteller-cloud-worker/309f1cfc-b7d8-47ef-a9b1-357cee94033d/scratchpad/smoke_ref2v.mp4 -vf 'select=eq\\(n\\\\,60\\)' -frames:v 1 /tmp/claude-1000/-home-bt-dev-storyteller-cloud-worker/309f1cfc-b7d8-47ef-a9b1-357cee94033d/scratchpad/ref2v_frame.png -y)",
"Bash(python3 -c \"import ast; ast.parse\\(open\\('bench/minimax_bench.py'\\).read\\(\\)\\); print\\('syntax ok'\\)\")",
"Bash(python3 *)",
"Bash(git add *)",
"Bash(git commit -q -m 'MiniMax H3 on RunPod: install/download scripts, ComfyUI wiring, benchmark harness, research docs *)",
"Bash(tail -6 /tmp/claude-1000/-home-bt-dev-storyteller-cloud-worker/309f1cfc-b7d8-47ef-a9b1-357cee94033d/tasks/betgtau6s.output)",
"Bash(git commit -q -m 'WEIGHTS.md: final download status — all 9 files present, none in progress *)",
"Bash(git commit -q -m 'docs: pad markdown table columns for raw-text readability *)",
"Bash(tail -4 /tmp/claude-1000/-home-bt-dev-storyteller-cloud-worker/309f1cfc-b7d8-47ef-a9b1-357cee94033d/tasks/betgtau6s.output)",
"Bash(git commit -q -m 'bench: multi-reference ref2v support \\(1-8 ref images, match/max sizing\\) *)",
"Bash(curl -s http://127.0.0.1:8188/queue)",
"Bash(curl -s -o /dev/null -w \"local tunnel: %{http_code}\\\\n\" --max-time 5 http://127.0.0.1:8188/)",
"Bash(ls -la ~/.ssh/)",
"Bash(git rm *)",
"Bash(scp -q -O -P 17561 scripts/pod/download-weights.sh scripts/pod/start-comfyui.sh scripts/pod/make-test-images.py root@216.243.220.136:/workspace/minimax-h3/)",
"Bash(scp -q -O -P 17561 scripts/pod/extra_model_paths.yaml root@216.243.220.136:/ComfyUI/extra_model_paths.yaml)",
"Bash(curl -s -o /dev/null -w \"tunnel to ComfyUI: %{http_code}\\\\n\" http://127.0.0.1:8188/)",
"Bash(curl -s -o /dev/null -w \"tunnel: %{http_code}\\\\n\" --max-time 8 http://127.0.0.1:8188/)",
"Bash(curl -s --max-time 8 http://127.0.0.1:8188/object_info/UNETLoader)",
"Bash(pkill -f \"ssh -N -L 8188\")",
"Bash(kill 3568392)",
"Bash(git commit -q -m 'pod reset recovery: new SSH port, consolidated downloads to 1T volume, retire tmpfs overflow *)"
]
}
}
+13 -5
View File
@@ -7,14 +7,18 @@ Current test rig: 1x B200 (180 GB) pod — connection details in `pod-info.txt`.
## Layout
- `scripts/pod/` — runs on the pod
- `install-minimax-h3.sh` — one-shot setup on a fresh pod (after `install-comfy.sh`)
- `download-weights.sh` — all weight families → `/workspace/minimax-h3/models`
- `download-weights-tmpfs.sh` — overflow files → `/dev/shm` (network-volume
quota workaround; ephemeral, re-run after pod restart)
- `comfyui/` — ComfyUI configs stored for easy rebuild
- `extra_model_paths.yaml` — installed to `/ComfyUI/extra_model_paths.yaml`
- `workflows/` — the three MiniMax H3 workflows (t2v, i2v, r2v), installed
to `/ComfyUI/user/default/workflows/`
- `scripts/pod/` — runs on the pod
- `install-minimax-h3.sh` — one-shot rebuild (ComfyUI clone + deps + configs
+ workflows + images + weight downloads + launch); idempotent, survives
pod resets since it stages from `/workspace`
- `download-weights.sh` — all weight families → `/workspace/minimax-h3/models`
- `start-comfyui.sh` — headless ComfyUI in tmux on 127.0.0.1:8188
- `make-test-images.py` — synthetic reference/first-frame images → `/ComfyUI/input`
- `scripts/local/push-to-pod.sh` — stage repo files onto the pod's persistent volume
- `scripts/local/port-forward.sh` — persistent tunnel `localhost:8188` → pod
ComfyUI panel (auto-reconnects)
- `bench/minimax_bench.py` — API-based benchmark harness (t2v / i2v / ref2v ×
@@ -28,6 +32,10 @@ Current test rig: 1x B200 (180 GB) pod — connection details in `pod-info.txt`.
## Quick start
```bash
# rebuild the pod from scratch (e.g. after a reset wiped the container disk)
scripts/local/push-to-pod.sh
ssh -p 17561 root@216.243.220.136 'bash /workspace/minimax-h3/install-minimax-h3.sh'
# tunnel to the ComfyUI panel (leave running)
scripts/local/port-forward.sh &
open http://localhost:8188
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
# Stage everything the pod needs onto the persistent volume, so a wiped
# container can be rebuilt with one command. Run from the repo root.
set -euo pipefail
POD_HOST=${POD_HOST:-216.243.220.136}
POD_PORT=${POD_PORT:-17561}
DEST=root@$POD_HOST
ssh -p "$POD_PORT" "$DEST" 'mkdir -p /workspace/minimax-h3/workflows'
scp -O -P "$POD_PORT" \
scripts/pod/install-minimax-h3.sh \
scripts/pod/download-weights.sh \
scripts/pod/start-comfyui.sh \
scripts/pod/make-test-images.py \
comfyui/extra_model_paths.yaml \
"$DEST":/workspace/minimax-h3/
scp -O -P "$POD_PORT" comfyui/workflows/*.json "$DEST":/workspace/minimax-h3/workflows/
echo "staged. rebuild with: ssh -p $POD_PORT $DEST 'bash /workspace/minimax-h3/install-minimax-h3.sh'"
+24 -24
View File
@@ -1,34 +1,34 @@
#!/bin/bash
# One-shot MiniMax H3 setup for a fresh RunPod pod that already has ComfyUI at
# /ComfyUI (see install-comfy.sh). Idempotent.
# One-shot MiniMax H3 setup for a fresh RunPod pod. Idempotent — safe to re-run
# after a pod reset (which wipes everything outside /workspace).
#
# Usage (from your machine):
# scp -O -P <port> scripts/pod/{install-minimax-h3.sh,download-weights.sh,download-weights-tmpfs.sh,extra_model_paths.yaml,make-test-images.py} root@<pod>:/root/
# ssh -p <port> root@<pod> 'bash /root/install-minimax-h3.sh'
# Usage (from your machine, repo root):
# scripts/local/push-to-pod.sh # copies repo files to the pod
# ssh -p <port> root@<pod-ip> 'bash /workspace/minimax-h3/install-minimax-h3.sh'
set -euo pipefail
HERE="$(cd "$(dirname "$0")" && pwd)"
# --- ComfyUI itself (container disk; gone after any pod edit/reset) ---
if [ ! -d /ComfyUI ]; then
git clone https://github.com/Comfy-Org/ComfyUI.git /ComfyUI
fi
cd /ComfyUI
pip install -q --break-system-packages --no-warn-script-location -r requirements.txt
pip install -q --break-system-packages hf_transfer
# deps
pip install -q --break-system-packages hf_transfer 2>/dev/null || pip install -q hf_transfer
# --- configs from the repo (staged under /workspace/minimax-h3 by push-to-pod) ---
STAGE=/workspace/minimax-h3
cp "$STAGE"/extra_model_paths.yaml /ComfyUI/extra_model_paths.yaml
mkdir -p /ComfyUI/user/default/workflows
cp "$STAGE"/workflows/*.json /ComfyUI/user/default/workflows/
# layout + scripts on the persistent volume
mkdir -p /workspace/minimax-h3/models
cp "$HERE"/download-weights.sh "$HERE"/download-weights-tmpfs.sh \
"$HERE"/make-test-images.py /workspace/minimax-h3/ 2>/dev/null || true
cp "$HERE"/start-comfyui.sh /workspace/minimax-h3/ 2>/dev/null || true
# --- test/reference images ---
python3 "$STAGE"/make-test-images.py
# wire model paths into ComfyUI
cp "$HERE"/extra_model_paths.yaml /ComfyUI/extra_model_paths.yaml
# test/reference images
python3 /workspace/minimax-h3/make-test-images.py
# weights (phase 1 makes ComfyUI usable; later phases are the bigger families)
tmux new -s downloads -d 'bash /workspace/minimax-h3/download-weights.sh' 2>/dev/null \
# --- weights (skips files already on the volume) ---
tmux new -s downloads -d "bash $STAGE/download-weights.sh" 2>/dev/null \
|| echo "downloads session already exists"
# ComfyUI headless
bash /workspace/minimax-h3/start-comfyui.sh
# --- ComfyUI headless ---
bash "$STAGE"/start-comfyui.sh
echo "Done. Watch downloads: tmux attach -t downloads ; tail -f /workspace/minimax-h3/download.log"
echo "Done. Downloads: tail -f /workspace/minimax-h3/download.log"