mindbotz-style-sheets-v2 / submit_batch.sh
TheMindExpansionNetwork's picture
20 character style sheets — Krea2 Turbo on RTX 4070, full pipeline included
8b5a784 verified
Raw History Blame Contribute Delete
1.22 kB
#!/bin/bash
# Submit 19 remaining staged workflows to ComfyUI (via SSH tunnel), build jobs.json ledger
BASE=/home/ubuntu/mindbotz-studio/datasets/mindbotz-style-sheets-v2
LEDGER="$BASE/jobs.json"
echo "[" > "$LEDGER"
first=1
for wf in "$BASE"/workflows/wf_*.json; do
slug=$(basename "$wf" .json); slug=${slug#wf_}
[ "$slug" = "01_wizard_raccoon" ] && continue # canary already done
payload=$(python3 -c "import json,sys; print(json.dumps({'prompt': json.load(open('$wf')), 'client_id': 'hermes-dataset-v2'}))")
resp=$(curl -s --max-time 30 -X POST "http://127.0.0.1:8188/prompt" -H "Content-Type: application/json" -d "$payload")
pid=$(echo "$resp" | python3 -c "import json,sys
d=json.load(sys.stdin)
print(d.get('prompt_id', d.get('error','SUBMIT_FAIL')))" 2>/dev/null)
[ $first -eq 0 ] && echo "," >> "$LEDGER"
python3 -c "import json; print(json.dumps({'id':'$slug','prompt_id':'$pid'}))" >> "$LEDGER"
first=0
echo "$slug -> $pid"
sleep 1
done
echo "]" >> "$LEDGER"
echo "=== ledger: $(python3 -c "import json; d=json.load(open('$LEDGER')); print(len(d),'jobs,', sum(1 for j in d if not j['prompt_id'].startswith('SUBMIT') and len(j['prompt_id'])>20),'ok')" 2>/dev/null || echo 'parse-issues')"