Problem
fal.ai charges $0.15-$0.25 per Wan 2.1 generation. Self-hosted on spot A100s costs $0.03-0.04 per generation -- 4-6x cheaper.
Benchmarks
| GPU |
480p (5s clip) |
720p (5s clip) |
Cost/hr (spot) |
Cost/gen (480p) |
| A100 80GB |
~170s |
~523s |
$0.78 |
$0.037 |
| H100 SXM |
~85s |
~284s |
$1.00 |
$0.024 |
Proposal
Create a self-hosted inference pipeline:
- RunPod Serverless for burst workloads (pay per second, auto-scale to zero)
- Vast.ai spot A100s for batch processing (cheapest bulk rate)
- Retry logic for spot preemption
- Batch queue with progress tracking
For 5,000 tracks x 3 video segments each = 15,000 generations:
- On H100 spot at 480p: 15,000 / 42 per hour = 357 GPU-hours = $357 total
- vs fal.ai: 15,000 x $0.15 = $2,250 total
Implementation
- New:
src/generator/self_hosted.py -- RunPod/Vast.ai client
src/generator/video_pipeline.py -- add "self-hosted" provider
src/generator/model_router.py -- route to self-hosted for bulk jobs
- Docker image with Wan 2.1 + ComfyUI for deployment
Risk
- Spot instances can be preempted mid-generation (lost work)
- Need checkpointing or accept ~5% retry rate
- More DevOps overhead than API calls
Labels: cost-optimization, infrastructure
Problem
fal.ai charges $0.15-$0.25 per Wan 2.1 generation. Self-hosted on spot A100s costs $0.03-0.04 per generation -- 4-6x cheaper.
Benchmarks
Proposal
Create a self-hosted inference pipeline:
For 5,000 tracks x 3 video segments each = 15,000 generations:
Implementation
src/generator/self_hosted.py-- RunPod/Vast.ai clientsrc/generator/video_pipeline.py-- add "self-hosted" providersrc/generator/model_router.py-- route to self-hosted for bulk jobsRisk
Labels: cost-optimization, infrastructure