MiniMax-H3 Ref2VA on RunPod Serverless
Queue-based RunPod worker for MiniMax-H3 reference-to-video-and-audio generation. It starts a private SGLang server only after resolving a pre-cached Hugging Face snapshot, stages reference media with SSRF checks, generates one video at a time, validates the MP4, uploads it to S3-compatible storage, and returns a presigned URL.
Performance profile
The production default is resident BF16/FP32 Ref2VA with Ulysses-8 on 8×H200. It deliberately disables Torch compile and warms 1344x768, matching the validated lossless path. Breakable CUDA graphs remain opt-in because the published recipe reports no measured speedup for the captured Ref2VA signature.
The linked SGLang selector's 8×B200 FL2VA/T2VA profile is a different workload. It has much lower warmed latency, but it cannot accept reference conditions and should be deployed as a separate endpoint.
Required endpoint configuration
Non-secret variables:
1MODEL_ID=<private-ref2va-only-repo>
2MODEL_REVISION=<immutable-commit>
3MODEL_VARIANT=ref2va
4HF_CACHE_ROOT=/runpod-volume/huggingface-cache/hub
5SGLANG_PORT=30010
6NUM_GPUS=8
7ULYSSES_DEGREE=8
8WARMUP_RESOLUTIONS=1344x768
9RUNPOD_INIT_TIMEOUT=1200
10GENERATION_TIMEOUT_SECONDS=840
11POLL_INTERVAL_SECONDS=2
12MAX_REFERENCE_BYTES=536870912
13MAX_PROMPT_CHARS=6000
14ALLOWED_REFERENCE_HOSTS=<comma-separated-storage-hosts>
15S3_REGION=auto
16S3_BUCKET=<bucket>
17S3_OUTPUT_PREFIX=generations
18OUTPUT_URL_TTL_SECONDS=3600
Secrets:
1HF_TOKEN=<read-only-token-for-cached-model>
2S3_ENDPOINT_URL=<s3-or-r2-endpoint>
3S3_ACCESS_KEY_ID=<least-privilege-key>
4S3_SECRET_ACCESS_KEY=<least-privilege-secret>
The RunPod key is used by the caller and deployment tooling only. It is never passed to the worker.
Local verification
1python3 -m venv .venv
2.venv/bin/pip install -r requirements-dev.txt
3.venv/bin/pytest -q
4.venv/bin/ruff check worker tests
Build
1docker buildx build --platform linux/amd64 \
2 -t <registry>/sglang-worker-minimax:<version> \
3 --push .
The image contains SGLang and worker dependencies, but no model weights or credentials.
Request
Submit
examples/ref2va-job.json to
POST https://api.runpod.ai/v2/<endpoint-id>/run. The top-level
policy.executionTimeout and
policy.ttl values use milliseconds, per RunPod's queue API.
Deployment settings
- Queue endpoint, H200 only, 8 GPUs per worker
- Active workers 0, max workers 1, handler concurrency 1
- Queue-delay autoscaling at 2 seconds
- FlashBoot enabled, 600-second idle timeout
- 900-second execution timeout and 3600-second job TTL
- No network volume; attach the private Ref2VA-only repository as the cached model