Accelerate video generation by allocating smaller models to intermediate diffusion timesteps and larger models to capacity-critical early and late stages. Achieves 1.65x speedup and 57% FLOP reduction while maintaining visual quality. Use when video generation latency or computational cost is critical and you have multiple model sizes available.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Accelerate video generation by allocating smaller models to intermediate diffusion timesteps and larger models to capacity-critical early and late stages. Achieves 1.65x speedup and 57% FLOP reduction while maintaining visual quality. Use when video generation latency or computational cost is critical and you have multiple model sizes available.
When to Use This Skill
Video generation inference where latency is critical (streaming, interactive applications)
Scenarios with strict computational budgets (edge devices, cloud costs)
Deployments with multiple model checkpoints (small, base, large)
Batch processing where throughput matters more than per-sample latency
Quality-conscious workflows where efficiency shouldn't hurt visual results
When NOT to Use This Skill
Single-model deployments without size variants
Real-time generation where step count itself is the bottleneck (use faster diffusion instead)
Situations requiring deterministic, reproducible results per timestep
Models where architecture significantly changes across sizes
Core Insight
Video diffusion models operate over many timesteps (typically 30-100). But not all timesteps are equal:
From the paper, tested on LTX-Video and WAN 2.1 models:
Metric
Large Only
FlowBlending
Improvement
Speed (frames/sec)
0.6 fps
1.0 fps
1.65x faster
FLOPs per sample
1.0
0.4265
57.35% reduction
LPIPS (visual quality)
0.082
0.084
-2.4% (negligible)
Temporal coherence
0.91
0.89
-2.2% (acceptable)
Key: Performance gains with minimal quality loss.
Stage Transitions and Smoothness
Switching models between stages could cause artifacts. The paper addresses this:
Overlapping transitions: Use larger model for 2-3 steps overlapping stage boundaries
Momentum-based blending: Smooth predictions from both models at boundaries
Consistency regularization: Ensure predictions don't diverge across model switch
defsmooth_stage_transition(self, step, num_steps):
"""Smooth model switching at stage boundaries"""
progress = step / num_steps
transition_width = 0.05# 5% overlap on each side of boundary
early_boundary = 0.30
late_boundary = 0.70ifabs(progress - early_boundary) < transition_width:
# Near early→middle boundary: blend models
weight_large = 1.0 - (progress - (early_boundary - transition_width)) / transition_width
returnself.blend_models(self.models['large'], self.models['small'], weight_large)
# ... similar for middle→late boundary
Velocity-Divergence Computation
To determine stage thresholds for your own models:
defcompute_velocity_divergence_analysis(model_small, model_base, model_large, prompts, num_steps=50):
"""Analyze where capacity matters"""
divergence_by_step = []
for step inrange(num_steps):
divergences = []
for prompt in prompts:
x_random = torch.randn(...) # Same noise for fair comparison# Get predictions from each model
pred_small = model_small.predict(x_random, step, prompt)
pred_base = model_base.predict(x_random, step, prompt)
pred_large = model_large.predict(x_random, step, prompt)
# Compute divergence as variance of predictions
all_preds = torch.stack([pred_small, pred_base, pred_large])
divergence = torch.var(all_preds, dim=0).mean()
divergences.append(divergence)
avg_divergence = torch.stack(divergences).mean()
divergence_by_step.append(avg_divergence)
# Find inflection points: where divergence is low
low_divergence_steps = [i for i, d inenumerate(divergence_by_step) if d < threshold]
return divergence_by_step, low_divergence_steps
Trade-offs and Limitations
Aspect
Trade-off
Quality
2-3% visual quality loss vs. large-only is typical
Consistency
Temporal coherence slightly reduced at model switches
Flexibility
Requires multiple model sizes (not all apps have this)
Complexity
Stage detection + blending adds ~5% overhead
Benefit
1.5-1.7x speedup justifies the trade for most use cases
Composability with Other Techniques
FlowBlending stacks with other acceleration approaches:
Technique
Combination
Result
Flash Diffusion
Use faster schedules within stages
+1.5x speedup (combined: 2.5x)
Quantization
Quantize smaller models more aggressively
+1.2x speedup (combined: 2.0x)
Knowledge distillation
Distill large→small at stage level
Better small model → 2.0x speedup
Early stopping
Skip late stages for draft-quality
+2x speedup, -10% quality
Implementation Checklist
Multiple model size checkpoints available (or create via distillation)
Analyze velocity divergence for your models/domain