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
+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'"
-7
View File
@@ -1,7 +0,0 @@
# ComfyUI extra model paths — points at the RunPod network volume (1 TB) where
# all MiniMax H3 weights live. Install to /ComfyUI/extra_model_paths.yaml
minimax_workspace:
base_path: /workspace/minimax-h3/models
diffusion_models: diffusion_models
text_encoders: text_encoders
vae: vae
+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"