The Problem
A team deploys their image generation service using the Midjourney API. It works for 100 images/day. Then they scale to 5,000 images/day and the API cost is $500/day. They want to switch to self-hosted FLUX but they don't know Docker, GPU provisioning, or model packaging. They're stuck with an expensive API because they didn't plan their deployment strategy.
Deployment strategy is an architectural decision made early — and getting it wrong means either overpaying at scale or under-delivering at launch.
What you'll build
A decision matrix tool that takes a use case (e.g., '1000 product images/day', '50 marketing videos/week') and recommends a deployment strategy with cost projections, latency estimates, and rationale.
The Three Strategies
1. API Models
Call a provider's API — they host the model, you pay per generation.
Providers: OpenAI (Sora, DALL-E), Google (Veo, Imagen), Midjourney, Suno, Kling, Runway, fal.ai (hosted models)
Pros:
- Fastest integration — just call an API
- No infrastructure to manage
- Per-generation cost, no idle costs
- Always up-to-date models
Cons:
- Limited control over model parameters
- Per-generation cost is high at scale
- Dependent on provider uptime
- Data leaves your infrastructure
Best for: Low-to-medium volume (< 1,000 images/day), quick launches, proprietary models (Sora, Veo)
2. Self-Hosted Models
Run open-weight models on your own GPU infrastructure.
Models: FLUX.1 Schnell/Dev (Apache 2.0/non-commercial), SDXL (open), MusicGen (MIT), Stable Audio 3 (open weights), Hunyuan3D (open source)
Pros:
- Full control over model and parameters
- No per-generation cost — pay for GPU time
- Data stays on your infrastructure
- Custom LoRAs, ControlNets, fine-tuning
Cons:
- Requires Docker packaging, GPU provisioning
- Idle GPU costs (pay even when not generating)
- Model updates require redeployment
- Need GPU expertise on team
Best for: High volume (> 667 images/day), custom LoRAs, privacy requirements, cost optimization at scale
3. Managed Platforms
Deploy custom models or workflows on serverless GPU infrastructure.
Platforms: fal.ai, Replicate, Modal, RunPod Serverless
Pros:
- Deploy custom models without managing infrastructure
- Per-second billing for GPU time
- Scale-to-zero when idle (no idle costs)
- Docker-based deployment
- ComfyUI workflow deployment
Cons:
- Slightly higher cost than pure self-hosting (~20-50% overhead)
- Cold start latency (2-10s when scaling from zero)
- Platform-specific deployment patterns
- Less control than pure self-hosting
Best for: Custom workflows, medium volume, ComfyUI deployment, teams without GPU ops expertise
A startup needs to generate 500 product images/day with a custom brand LoRA. They have no GPU ops expertise. Which deployment strategy is best?
A managed platform (fal.ai/Replicate) is ideal: they can deploy their custom LoRA as a Docker image, get per-second billing, scale-to-zero when idle (500 images = 2.5 GPU-hours/day = $5/day), and don't need GPU ops expertise. Self-hosting would require Docker/GPU knowledge and pay for idle time. API can't use custom LoRAs.
Unlock the full lesson
You've read the first 2 sections. The rest of this lesson covers The 5-Factor Decision Framework, Hybrid Deployment, Platform Comparison, When to Switch Strategies, Key Takeaways, What's Next — plus a hands-on lab, quiz, and project artifact.
Create a free account to unlock Phase 0 and Phase 1 of every course — no credit card.