#!/bin/bash # The demo service. One card holds VGGT-Omega + VAE + the MiniMax-H3 transformer + both adapters. # CARD=0 service/run.sh --port 8412 export CUDA_VISIBLE_DEVICES=${CARD:-0} export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True export PYTORCH_ALLOC_CONF=expandable_segments:True cd "$(dirname "$0")/.." # Exit code 3 = the service found its CUDA context poisoned and asked to be reloaded; anything else stops. while :; do python service/app.py "$@" [ $? = 3 ] || break sleep 2 done