Video generation optimization is hosted and testable through the production Modal Diffusers path, but it is not production-certified yet. The engine recognizes video-generation models and has a production-deployed Modal Diffusers video runtime, client, load-test path, hardware-routing plumbing, semantic-alignment lab quality gate, temporal-consistency canary telemetry, video recipe lane, source-bound live-cert evidence formatting, source-bound HF coverage probing, fixture-aware image-conditioned planning, Modal
/result revalidation for saved certification evidence, request-shape-bound baseline/optimized certification checks including image-conditioning hash identity, applied-optimization proof binding, a no-paid five-model command planner, a sequential Modal streak runner, and a portable local Diffusers video export runtime. As of 2026-06-26, the Wan-AI/Wan2.1-T2V-1.3B-Diffusers H100 paid canary proved Pyramid Attention Broadcast applies and preserves the semantic gate, but it measured 4.874s/video versus a 4.603333s/video baseline, a 0.944x speedup outside the required 2x-4x band. A follow-up First-Block Cache canary on Engine 2fde20da8268722b808379acb726c095b69468a0 proved Modal applies video_cache_strategy:"first_block_cache" with video_cache_applied:true, but measured only 1.171x speedup and semantic alignment regressed from 0.28692 to 0.27982. The next speed evidence path is the explicit owner-run combined canary --speed-canary first_block_cache_fp8_compile, which asks Modal to apply First-Block Cache, FP8 dynamic quantization, torch.compile, and decode chunking together. It is not a default, promotion, or certificate by itself. Runs must not be treated as production-certified until the five-model, ten-row, 2x-4x, quality-preserving gates pass.Status today
| Capability | State |
|---|---|
| Model recognition | Recognized as the video-gen modality |
| Hardware sizing | Conservative single-GPU Modal Diffusers planning profile exists. This is not optimization evidence |
| Modal runtime and load test | Production Modal runtime, TypeScript client, /video-gen-diffusers, /video-gen-benchmark, load-test adapter, generic serving benchmark path, and hardware adapter are wired for Diffusers video benchmarks. The runtime emits frame-derived temporal-consistency canary metrics, can optionally emit CLIP-based video_semantic_alignment, and the adapter fails below-threshold quality results. Current paid production evidence is single-model Wan H100 canary evidence, not a five-model certificate |
| Live certification producer | scripts/live-modal-optimization-certify.ts accepts video-native Diffusers knobs, including --quantization, --compile, --compile-mode, --decode-chunk-size, --attention-slicing, --enable-channels-last, --enable-vae-tiling, --enable-model-cpu-offload, --video-cache-strategy pyramid_attention_broadcast, --video-cache-strategy first_block_cache, image-to-video --image-file or --image-base64 plus --image-content-type, and Wan GGUF loader metadata when explicitly planned. It emits saved Modal evidence with call-id, source-commit provenance, and applied optimization fields when the load-test result contains a measured non-integrity quality gate. Raw image payloads are request-only; saved certification evidence stores imageConditioningSha256 and imageContentType. --source-commit-sha <40hex> refuses paid live certification if the command was generated for a different checkout or the checkout has uncommitted changes. --video-semantic-eval --min-semantic-alignment <calibrated-threshold> requests the local semantic-alignment gate. MP4 integrity alone is not promoted to quality evidence, and temporal consistency remains canary evidence only |
| Five-model coverage, planner, runner, and certification guard | Local no-paid HF coverage probing must prove source-bound video-gen/diffusers support for the planned models before paid command output is usable. GGUF video packages stay excluded unless --gguf-loader-evidence-file supplies source-bound Modal proof for the explicit Wan GGUF loader with matching gguf_base_model_id, gguf_transformer_file, and pipeline_loader:"gguf-wan-transformer" telemetry. Proven GGUF rows become owner-runnable only when the dry-run plan carries explicit --gguf-family wan, --gguf-base-model-id, and --gguf-transformer-file metadata and saved Modal output reports the same loader. The default no-paid streak candidate is text-prompt only, skips image-conditioned families, and uses Pyramid Attention Broadcast as the optimized speed candidate while First-Block Cache remains an explicit high-VRAM canary. FP8, torch.compile, and decode chunking stay gated by default; --speed-canary first_block_cache_fp8_compile is an owner-run evidence mode that emits combined First-Block Cache, FP8 dynamic, torch.compile, and decode chunking commands only when the operator asks for that canary. Those rows count only if Modal reports quantization_applied:"fp8_dynamic", compile_applied:true, decode_chunk_size_applied:true, decode_chunk_size:4, and video_cache_applied:true with video_cache_strategy:"first_block_cache". VAE tiling, attention slicing, channels-last, and CPU offload stay as fit or lab levers and are not default five-win speed proof by themselves. Image-conditioned models can be selected only when the probe and certifier receive an explicit fixture manifest or global image fixture with image/* content type. Local no-paid dry-run planning then emits ten owner-runnable Modal Diffusers commands for five distinct baseline/optimized pairs without submitting paid work. Each generated command carries --confirm-live, a per-command --max-estimated-cost-usd, --source-commit-sha, fixed --seed, explicit positive video semantic gate args, request-profile fixture flags when needed, GGUF loader flags when planned, and real optimized Diffusers knobs instead of labels only. Owner-approved paid execution should go through scripts/run-video-gen-optimization-streak.ts, which runs baseline then optimized pairs in order and stops on the first child failure, mismatched or non-Modal child evidence, missing or nonpositive measured child actual cost, missing MODAL_APP_URL or COMPUTE_API_SECRET, insufficient remaining parent cost cap for the next child command cap, per-child actual-cost cap breach, or total cost-cap breach. The runner re-validates command request shape before launch, including GPU, GPU count, duration, timeout, prompt, dimensions, frame count, FPS, steps, guidance, seed, semantic threshold, image-conditioned fixture flags, GGUF loader flags, and planned optimized knob parity. It also fetches Modal /result/<callId> for each successful child before trusting its call id or launching the next paid command, checks fetched qualityGate, secondsPerVideo, and actual-cost parity, re-validates child stdout identity even when Modal client logs include JSON before the final evidence object, positive measured child actualCostUsd with sub-cent precision, nested qualityGate.score plus qualityGate.threshold agreement with measured semantic evidence, absence of contradictory qualityGate aliases, and remaining parent budget against the next child command cap before the next paid child command starts. The saved-result certifier requires five distinct model wins, saved Modal result provenance bound to each fc-* call id, source commit evidence matching the planned Engine commit, completed Modal /result verification for every saved call id, 2x-4x speedup across every reported speed metric, preserved measured video quality from a production-grade reference or semantic metric with qualityGate.source bound to the same Modal call and metric token, nested qualityGate.score matching videoSemanticAlignment, nested qualityGate.threshold matching the planned semantic threshold, no contradictory qualityGate aliases across saved evidence/config aliases or fetched Modal /result aliases, fetched nested qualityGate score/source/threshold parity against measured Modal semantic evidence, fetched secondsPerVideo parity against saved speed evidence, valid MP4 integrity, matching GPU/backend/model identity, matching baseline/optimized quality metric identity, matching baseline/optimized request shape including image-conditioning SHA-256 and content type when present, saved request-shape agreement with Modal /result, matching GGUF loader telemetry when planned, optimized video_cache_applied=true for PAB, First-Block, or combined speed-canary rows, and no failed or duplicate row in the streak |
| Optimization | Functional for owner-approved Modal canaries, not production-certified. The Diffusers recipe declares hardware, baseline, and serving phases, exposes Pyramid Attention Broadcast as the current measured cache candidate, and adds First-Block Cache as an explicit high-VRAM canary. The First-Block canary is now Modal-applied and user-testable, but the saved-result certifier blocked it at 1.171x speedup plus semantic regression, so it is not a production speed candidate. FP8, torch.compile, and decode chunking stay gated by default; the explicit --speed-canary first_block_cache_fp8_compile mode exists only to gather Modal-applied combined-stack evidence. The generic quality-gate runner has a disabled-by-default videoSemanticAlignment adapter over Modal /video-gen-benchmark, but it stays pending unless MODAL_VIDEO_GEN_QUALITY_EVAL_ENABLED=true and the candidate supplies an explicit semantic threshold |
| Serving and deploy | Not production deployable in the current runtime baseline. The managed/BYOC RunPod Diffusers env builder now tags video workers as video-gen and preserves explicit Modal-proven video request defaults plus DIFFUSERS_VIDEO_CACHE_STRATEGY, decode chunking, attention slicing, channels-last, VAE tiling, and model CPU offload for later delivery validation. This is delivery plumbing, not optimization evidence |
| Code and export | Generic vLLM artifacts are blocked for video-gen. Engine export and the dashboard Code tab now emit portable Diffusers video runtime files for local delivery review, including Modal-proven video optimization envs for DIFFUSERS_VIDEO_CACHE_STRATEGY, decode chunking, attention slicing, channels-last, VAE tiling, and model CPU offload. These files are still not production certification |
| What a run yields | Local adapter evidence only unless an owner-approved Modal run captures real baseline and optimized video measurements |
scripts, src, modal, and tests must have no tracked or untracked changes before those artifacts can be used to start the paid Modal streak.
Planned stack target
These are the techniques the video-gen Modal runtime path is designed to apply. They are not production-certified today.| Technique | Trigger | Planned win | Plan |
|---|---|---|---|
| Context parallelism | Multi-GPU video deployments | Higher throughput for long clips | Future, requires runtime attestation |
| FP8 dynamic precision | Wired single-GPU Modal video target plus compatible model, currently L40S, H100, or H200 | Lower memory and latency | Gated by default. Owner-run combined canary only through --speed-canary first_block_cache_fp8_compile until Modal proves applied-knob success |
| torch.compile and decode chunking | Compatible video runtime | Lower latency and safer memory use | Gated by default. Owner-run combined canary only through --speed-canary first_block_cache_fp8_compile until Modal proves applied-knob success |
| Pyramid Attention Broadcast | Compatible Diffusers video transformer on high-VRAM single-GPU targets | Lower repeated attention cost | Current measured cache candidate when video_cache_strategy:"pyramid_attention_broadcast" and video_cache_applied:true are reported, but the 2026-06-26 Wan canary was slower and cannot certify production |
| First-Block Cache | Compatible Diffusers video transformer and scheduler on high-VRAM single-GPU targets | Lower repeated block compute | Modal-applied canary only. The 2026-06-26 Wan H100 run reported video_cache_strategy:"first_block_cache" and video_cache_applied:true, but the certifier blocked it at 1.171x speedup plus semantic regression |
| Channels-last memory format | Compatible Diffusers video modules on high-VRAM single-GPU targets | Better GPU memory layout | Modal-attested lab or fit candidate when channels_last_applied=true, MP4 integrity, semantic alignment, and VRAM headroom all pass |
| Attention slicing | VRAM-constrained Diffusers video pipeline where SDPA/xFormers is not already the faster memory path | Lower peak attention memory and better fit margin, not a standalone speed claim | Current Modal-supported memory and fit candidate when applied and reported |
| Model CPU offload | Single-GPU Diffusers video pipeline with memory pressure | Lower GPU residency and better fit margin, not a standalone speed claim | Current Modal-supported memory and fit candidate when model_cpu_offload_applied:true is reported |
| VAE tiling | Memory-sensitive video generation or decode | Lower peak memory and better fit margin | Current Modal-supported memory and fit candidate when applied and reported |
Quality gates
These gates separate local Modal canary planning from final production certification.| Metric | Threshold | Source |
|---|---|---|
| Per-frame FID delta | Under 5.0 | Reference video comparison |
| Temporal consistency | Deployment-specific | Modal frame-derived adjacent-frame canary check |
| Video semantic alignment | Deployment-specific | Modal CLIP frame-prompt semantic gate |
| Production streak quality | No optimized regression | video_reference_similarity, video_semantic_alignment, video_prompt_alignment, clip_video_alignment, or VBench-style reference metrics |
Planned detection, routing, and application
| Decision | Selection rule | Planned runtime behavior |
|---|---|---|
| Video-generation modality | Pipeline model and runtime | Routes to the gated Modal Diffusers video-generation recipe |
| Context parallelism | Multi-GPU deployment | Future: split long-context video work across GPUs after the Modal runtime applies and reports the technique |
| Channels-last, attention slicing, model CPU offload, and VAE tiling | Channels-last requires a high-VRAM single-GPU target and compatible Diffusers modules; model CPU offload is single-GPU only; fit knobs require compatible runtime and pipeline modules | Applies and reports each requested Diffusers optimization setting where quality gates pass |
| FP8, torch.compile, and decode chunking | Compatible video runtime plus family-specific Modal proof | Gated by default; --speed-canary first_block_cache_fp8_compile emits the owner-run combined canary and still requires Modal-applied telemetry for every requested knob |
Verification before production
- The plan should show the selected video-generation technique.
- Benchmarks should report per-frame latency, total video latency, peak VRAM, and quality deltas.
- Generated runtime files should preserve the same precision and compile settings.
Local verification added
- Engine and dashboard local capability mirrors now expose video-gen as
testable:true,optimizable:true,deployable:false, serving backenddiffusers, and allowed optimizerservingonly. - The video-generation recipe now declares hardware, baseline, and Diffusers serving phases with
benchmarkAdapter:"video-generation",/video-gen-benchmark,video_secondbilling, andvideoSemanticAlignmentas the lab quality metric. Temporal consistency remains canary telemetry, not production no-loss proof. - Live lab intake now accepts
video-genplus Diffusers manifests with a runnable baseline and serving candidate on wired video-capable Modal GPUs, while non-Diffusers video backends and L4 video runs stay blocked before paid work. - Modal Diffusers video runtime methods export MP4 output through Diffusers
export_to_videoand report video-output integrity before counting benchmark successes. - Modal Diffusers video runtime methods compute a frame-derived temporal-consistency score and threshold.
/video-gen-benchmarkaggregates the score and fails below-threshold results even when MP4 integrity passes. - Modal Diffusers video runtime methods compute
video_semantic_alignmentwhen semantic eval is requested by scoring sampled generated frames against the prompt with CLIP./video-gen-benchmarkaggregates the semantic score and the load-test adapter exposes it asqualityGate.source: "modal:<callId>:video_semantic_alignment"when requested. Semantic eval requires an explicitmin_semantic_alignment; the live lab runner now supplies the local threshold for video-gen Diffusers serving manifests, and the final five-model certifier still requires saved Modal evidence from approved paid runs. - The TypeScript Modal client posts video-native fields to
/video-gen-diffusersand/video-gen-benchmark, includingnum_frames,fps, image-to-video conditioning,decode_chunk_size,motion_bucket_id, andnoise_aug_strength. - The TypeScript Modal client also posts optional semantic fields:
semantic_quality,min_semantic_alignment, andclip_model_id. - The dashboard Test tab now has a local video-generation preview path. Optimized and deployed video previews send Modal Diffusers decode chunking, attention slicing, VAE tiling, and channels-last through
/api/infer; explicit requests can also pass model CPU offload. Engine routes the request to Modal/video-gen-diffusers, maps applied-knob telemetry back to the dashboard with the returned MP4 data for preview/download, propagates request aborts, and cancels submitted Modal video calls on abort, timeout, or poll failure. This is a local Modal-first preview path, not production certification. - When a video-generation Test target has a real optimized version and execution trace, the Test tab exposes a Compare action that starts
/api/infer/dual-runwith the same prompt and video request shape for baseline and optimized runtimes. The compare view renders the returned MP4 artifacts, dimensions, frame count, FPS, video semantic score, MP4 integrity, cache-applied evidence, GPU, and latency side by side. This is a user testing and diagnosis surface; production certification still requires the source-bound Modal streak and saved/resultverification gates below. - The dashboard Deploy surface recognizes native video-generation nodes as video-gen/Diffusers workloads, but managed and BYOC deploy remain disabled with the same five-model Modal proof gate. Completed video-generation runbooks route the post-runbook action to Export instead of Deploy, and Export/codegen remains the testable hosting-prep path until production certification exists.
runLoadTest({ modality: "video-gen", servingBackend: "diffusers" })now routes to the dedicated video benchmark adapter instead of image-gen or generic stress paths, and the live lab serving runner requests semantic video quality before accepting measured candidates.- Generic
benchmark_serving_configvideo-generation runs are video-native now: they use total video latency, videos/sec,video_secondbilling, and a default semantic-alignment gate before any measured candidate can be applied. They do not treat temporal consistency as production no-loss proof. - The generic promotion quality-gate registry now has a config-gated
videoSemanticAlignmentadapter for video generation. With the flag off it is indistinguishable from an unwired gate and returns pending without a Modal call; withMODAL_VIDEO_GEN_QUALITY_EVAL_ENABLED=true, it runs the existing Modal/video-gen-benchmarksemantic path and returns the measuredvideo_semantic_alignmentscore only when Modal reports a passed semantic gate. - Engine export and the dashboard Code tab now generate portable Diffusers runtime artifacts for video-gen models: Dockerfile, Docker Compose, and K8s config that preserve the base image entrypoint and point at
/v1/videos/generations. The base Diffusers runtime usesDiffusionPipeline, exports MP4 output withexport_to_video, reads the exported video optimization envs, and fails/healthuntil the pipeline is loaded. - The generated portable runtime carries video-native request defaults such as
num_frames,fps,duration_seconds, width, height, inference steps, and guidance scale. It also persists Modal-proven video optimization defaults throughDIFFUSERS_VIDEO_CACHE_STRATEGY,DIFFUSERS_VIDEO_DECODE_CHUNK_SIZE,DIFFUSERS_VIDEO_ATTENTION_SLICING,DIFFUSERS_ENABLE_CHANNELS_LAST,DIFFUSERS_ENABLE_VAE_TILING, andDIFFUSERS_ENABLE_MODEL_CPU_OFFLOAD; requested unsupported self-host knobs fail closed instead of silently serving a weaker baseline. The managed/BYOC RunPod Diffusers env builder now preserves the same explicit video defaults and optimization envs when that delivery path is later validated. Portable and managed/BYOC runtime artifacts remain for local review or later delivery validation only and do not replace the Modal evidence loop. - The load-test adapter exposes Modal semantic alignment as the returned quality gate when requested, with
source: modal:<callId>:video_semantic_alignment; temporal consistency remains canary telemetry and MP4 integrity remains separate asvideoOutputIntegrity. - Hardware profiling delegates video-gen candidates through the dedicated load-test adapter.
- Invalid prompt, dimensions, frame count, total frame-pixel budget, fps, and video-specific knobs are gated before paid Modal submission.
- Explicit Wan GGUF Modal requests now have a no-paid loader boundary:
gguf_family:"wan",gguf_base_model_id, andgguf_transformer_filemust travel together through preflight, the TypeScript Modal client, and/video-gen-benchmark; Modal reportspipeline_loader:"gguf-wan-transformer"plus the same GGUF metadata when that path runs. This is loader scaffolding only by default. GGUF rows become supportable in the HF coverage gate only when--gguf-loader-evidence-filesupplies matching source-bound Modal loader evidence. Those rows become owner-runnable only when an explicit dry-run plan carries the same GGUF loader metadata and the saved Modal output reports the same loader. scripts/live-modal-optimization-certify.tsnow threads--prompt,--num-frames,--fps,--decode-chunk-size,--attention-slicing,--enable-channels-last,--enable-vae-tiling,--enable-model-cpu-offload,--video-cache-strategy,--quantization,--compile, and--compile-modeinto the Diffusers video benchmark request. Model CPU offload is rejected before paid work when paired with FP8, torch.compile, GGUF loader metadata, or multi-GPU targets. The video load-test result now preserves the Modal call id in result metadata so saved evidence can bind to the measured Modal run.scripts/live-modal-optimization-certify.tsnow threads--video-semantic-eval,--min-semantic-alignment, and--clip-model-idinto the Diffusers video benchmark request.--min-semantic-alignmentis required and must be greater than 0 when--video-semantic-evalis set. This is still no-paid local wiring until an owner approves live Modal runs.scripts/live-modal-optimization-certify.tsnow accepts--source-commit-sha <40hex>, refuses paid live certification when that value does not match the current Engine checkout or the checkout has uncommitted changes, and writes the source commit into the saved video Modal evidence.scripts/certify-optimization-techniques.tsemits source-boundvideo-gen/diffusersModal commands with a real 40-character Engine commit SHA, so the generic technique planner and the dedicated streak planner both feed the same direct live-certifier safety check before paid work.- The default dedicated streak planner now uses
video-pyramid-attention-broadcastas the optimized speed candidate on high-VRAM single-GPU runs.video-first-block-cacheis emitted as an explicit canary only. Attention slicing, channels-last, model CPU offload, and VAE tiling remain separate Modal-attested lab or fit candidates, not hidden extras on the cache command. scripts/live-modal-optimization-certify.tsnow accepts and emits--seedplus the request shape used by video benchmarks: prompt, dimensions, frame count, FPS, inference steps, guidance scale, seed, image-conditioning SHA-256 plus content type for image-to-video requests, and optional semantic-eval fields. Raw image payloads are not serialized into saved evidence. The dry-run planner includes a fixed seed so baseline and optimized rows are comparable.- Modal
/video-gen-benchmark, the load-test adapter, live-cert output, and the saved-result certifier now bind applied optimization proof. Baseline rows must match the planned unoptimized request shape. Optimized PAB and First-Block rows must prove Modal reportedvideo_cache_applied=truewith the requestedvideo_cache_strategy. Channels-last and fit rows must provechannels_last_applied=true,attention_slicing_applied=true,model_cpu_offload_applied=true, orenable_vae_tiling_applied=truewhen those knobs are selected. If a worker fails to apply a requested knob, certification fails. - The video candidate generator currently emits Modal-attested or canary candidates: FP16 baseline, Pyramid Attention Broadcast, First-Block Cache, high-VRAM channels-last, attention slicing, model CPU offload for single-GPU fit, and VAE tiling. FP8, torch.compile, decode chunking, and USP context-parallel candidates are intentionally not emitted until Modal applies and reports those techniques.
- Model CPU offload follows the Diffusers
enable_model_cpu_offload()path and is treated as a memory/fit lever, not a speed claim. Modal evidence must reportmodel_cpu_offload_applied:truebefore the candidate can count. - The RunInfra dashboard runbook execution UI mirrors that execution boundary: A100-class, L4, B200, and multi-GPU video-gen plans do not list the FP8 plus torch.compile native technique. L40S, H100, and H200 single-GPU plans can show it when the rest of the Modal Diffusers path is selected.
scripts/hf-video-gen-coverage-probe.tscreates the source-bound no-paid HF support report required before paid command output is usable:
source:"hf-video-gen-coverage-probe", measured:false, backend:"diffusers", modality:"video-gen", source-matched to the Engine checkout, generated from clean relevant Engine source paths, and at least 90 percent supportable. For Hugging Face list mode, --candidate-search-limit widens the no-paid discovery pool used for the report and the strict-ready streak candidate; the emitted modelSource.limit must match that widened search value. The generated five-model Modal streak candidate must still be strict-ready model by model. Credential-blocked models can count as supportable but cannot be selected for the five-model streak until they are strict-ready. GGUF-packaged video repos are not credential-blocked supportable models by default; they stay unsupported unless a source-bound Wan GGUF loader evidence file proves matching base-model, transformer-file, and gguf-wan-transformer telemetry. Proven GGUF rows count as supportable coverage and remain excluded from the default strict-ready streak candidate. They can become owner-runnable only when the certifier is given those model ids explicitly and derives matching GGUF loader flags from the same source-bound coverage report. The default streak candidate is text-prompt based, so image-conditioned video families are skipped until explicit image fixtures are planned.
To admit proven Wan GGUF loader rows into broad HF supportable coverage after owner-approved Modal loader proof, pass the evidence file to the no-paid probe:
--gguf-family wan, --gguf-base-model-id, and --gguf-transformer-file into both baseline and optimized live-cert commands for that model, and it avoids FP8 or torch.compile on the GGUF package because that path is not certified.
To include image-conditioned video models, provide a fixture manifest keyed by exact Hugging Face model id. The fixture is request input only; saved evidence stores only the image SHA-256 and content type.
scripts/certify-video-gen-optimization-streak.tscan print the no-paid command plan without launching paid work, but paid command output requires the source-bound coverage report:
.env, pass the env file that the child Modal commands should load:
--request-profile image-conditioned, --image-file, and --image-content-type for the matching model only.
--source-commit-sha on every paid command, the planned --env-file for each child command, and the final saved-result certification command. The default optimized commands carry --video-cache-strategy pyramid_attention_broadcast and require saved Modal evidence with video_cache_strategy:"pyramid_attention_broadcast" plus video_cache_applied:true; First-Block Cache canaries carry --video-cache-strategy first_block_cache and require the same applied-cache proof for that strategy. To generate the combined speed-canary commands, run the planner with --speed-canary first_block_cache_fp8_compile; the optimized commands then carry --quantization fp8_dynamic, --compile, --compile-mode max-autotune, --decode-chunk-size 4, and --video-cache-strategy first_block_cache, and certification still requires Modal-applied proof for every knob. VAE tiling, attention slicing, channels-last, and model CPU offload remain lab or fit candidates, not the default speed path. The sequential runner requires MODAL_APP_URL and COMPUTE_API_SECRET, verifies planned child env files exist before launching a live child process, re-validates the paid command request shape, planned optimized knob parity, image-conditioned command flags, GGUF loader flags, fetches Modal /result/<callId> for each successful child before trusting the call id or launching the next paid command, checks fetched qualityGate, secondsPerVideo, and actual-cost parity, treats each child stdout as the planned Modal evidence row even when Modal client logs include JSON before the final evidence object, checks nested qualityGate.score plus qualityGate.threshold parity, rejects contradictory qualityGate aliases, requires positive measured child actualCostUsd with actualCostSource:"modal-video-benchmark-elapsed-seconds", checks that measured cost against the child command’s cap, and checks remaining parent budget against the next child command cap before the next paid child can start. Do not run the generated paid Modal commands directly or without owner approval.
scripts/run-video-gen-optimization-streak.tsis the operator path for approved paid Modal execution:
actualCostUsd is missing, nonpositive, or missing actualCostSource:"modal-video-benchmark-elapsed-seconds", stops before launching a child whose command cap no longer fits the remaining parent cap, stops when measured child actualCostUsd exceeds that command’s cap, stops on total cost-cap breach, and evaluates saved certification only after all ten Modal commands succeed.
scripts/certify-video-gen-optimization-streak.tscan validate saved Modal evidence after approved Modal runs:
--verify-modal-results, contacts Modal /result/<callId> for every saved fc-* call using MODAL_APP_URL and COMPUTE_API_SECRET, and refuses readiness if that revalidation is missing or inconsistent. Saved JSON alone cannot certify a streak. The certifier rejects RunPod or non-Modal optimization evidence, self-reported Modal rows without matching Modal /result payloads, saved evidence from a different Engine source commit, conflicting source aliases, missing fetched Modal /result qualityGate proof, contradictory saved or fetched Modal /result qualityGate aliases, fetched nested qualityGate score/source/threshold mismatches, fetched secondsPerVideo mismatches, missing or nonpositive saved actual cost, saved actual cost without actualCostSource:"modal-video-benchmark-elapsed-seconds", Modal /result payloads that are missing, incomplete, failed, missing matching positive actual_cost_usd, missing matching actual_cost_source, or inconsistent with saved throughput, quality, timestamp, request-shape, phase, candidate, source SHA, or image-conditioning hash evidence, speedups outside 2x-4x on any reported speed metric, MP4-integrity-only quality claims and common integrity aliases, temporal-consistency-only canary evidence, baseline/optimized request-shape mismatches, baseline/optimized quality metric mismatches, quality gates not bound to the measured Modal call, quality gate metric or source mismatches against the certified production metric, quality regressions, duplicate baseline/optimized rows for the same model, missing or failed statuses, error rows, and baseline/optimized pairs with mismatched model, GPU, or backend. It also accepts saved JSON results wrapped by normal command logs, including bracket-prefixed log lines before the final evidence object.
Availability notes
- Video-generation optimization is hosted and testable for owner-approved Modal canaries, but still requires the five-model quality-preserving 2x-4x Modal streak before production certification.
- Modal is the required optimization and verification loop for this work. RunPod BYOC can only validate a later delivery path after Modal evidence exists.
- Context parallelism will depend on multi-GPU runtime support.
- First-Block Cache is functional as a Modal-applied canary, but it remains blocked from production promotion until it proves a 2x-4x quality-preserving five-model streak.
- This page will move from in-development to available only after the video-gen path produces owner-approved Modal measurements, quality-preserving 2x-4x wins, synchronized UI/export support, and production certification evidence.