Spaces:
Running on Zero
Running on Zero
| set -euo pipefail | |
| cd "$(dirname "$0")/.." | |
| GENERATIONS="${GENERATIONS:-3}" | |
| MAX_SAMPLES="${MAX_SAMPLES:-0}" | |
| SAMPLING_STEPS="${SAMPLING_STEPS:-}" | |
| RENDER_FLAG="${RENDER_FLAG:---save-mp4}" | |
| GT_RENDER_FLAG="${GT_RENDER_FLAG:---save-gt-mp4}" | |
| OVERWRITE_FLAG="${OVERWRITE_FLAG:---no-overwrite}" | |
| COMMON_ARGS=( | |
| --include all | |
| --generations "$GENERATIONS" | |
| --max-samples "$MAX_SAMPLES" | |
| "$OVERWRITE_FLAG" | |
| ) | |
| if [[ -n "$SAMPLING_STEPS" ]]; then | |
| COMMON_ARGS+=(--num-sampling-steps "$SAMPLING_STEPS") | |
| fi | |
| if [[ -n "$RENDER_FLAG" ]]; then | |
| COMMON_ARGS+=("$RENDER_FLAG") | |
| fi | |
| if [[ -n "$GT_RENDER_FLAG" ]]; then | |
| COMMON_ARGS+=("$GT_RENDER_FLAG") | |
| fi | |
| # Run rigid and soft separately so each group gets the correct material conditioning. | |
| python run_official_demo_inference.py \ | |
| --demo-root indistri_examples/rigid \ | |
| "${COMMON_ARGS[@]}" \ | |
| --rigid all | |
| python run_official_demo_inference.py \ | |
| --demo-root indistri_examples/soft \ | |
| "${COMMON_ARGS[@]}" \ | |
| --elastic all | |