Downloads · 30 days
0
damiang/sglang-worker-minimax-build
sglang-worker-minimax-build is a machine learning model from damiang. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
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, gen…
Downloads · 30 days
0
Access
Public
Updated Aug 11, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py34.6 KB · 80%
From the Hugging Face model README
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.
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.
Non-secret variables:
MODEL_ID=<private-ref2va-only-repo>
MODEL_REVISION=<immutable-commit>
MODEL_VARIANT=ref2va
HF_CACHE_ROOT=/runpod-volume/huggingface-cache/hub
SGLANG_PORT=30010
NUM_GPUS=8
ULYSSES_DEGREE=8
WARMUP_RESOLUTIONS=1344x768
RUNPOD_INIT_TIMEOUT=1200
GENERATION_TIMEOUT_SECONDS=840
POLL_INTERVAL_SECONDS=2
MAX_REFERENCE_BYTES=536870912
MAX_PROMPT_CHARS=6000
ALLOWED_REFERENCE_HOSTS=<comma-separated-storage-hosts>
S3_REGION=auto
S3_BUCKET=<bucket>
S3_OUTPUT_PREFIX=generations
OUTPUT_URL_TTL_SECONDS=3600
Secrets:
HF_TOKEN=<read-only-token-for-cached-model>
S3_ENDPOINT_URL=<s3-or-r2-endpoint>
S3_ACCESS_KEY_ID=<least-privilege-key>
S3_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.
python3 -m venv .venv
.venv/bin/pip install -r requirements-dev.txt
.venv/bin/pytest -q
.venv/bin/ruff check worker tests
docker buildx build --platform linux/amd64 \
-t <registry>/sglang-worker-minimax:<version> \
--push .
The image contains SGLang and worker dependencies, but no model weights or credentials.
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.