Skip to content

H3 video templates: declare cost[].vram_gb + vram_estimate ceiling (split from #265) #324

Closed

Description

@dkackman

Split out of #265, per that issue's own triage note ("declare both, calibrated from a real probe on lem, OR state in the hand-off that H3 is split to its own issue").

#265's original body named two repro shapes — LTX2 (fixed, both validate-time and now run-time enforced) and H3 (templates/minimax/video-with-audio-768p, 768p/345 frames, dies mid-denoise rather than at decode). The tester's verify pass (2026-09-22) confirmed the H3 half is still open: none of the shot-shape MiniMax H3 templates (video-with-audio-768p, video-with-audio, image-to-video, first-and-last-frame, reference-to-video, etc.) carry a cost array at all, so vram_estimate_errors has nothing to compare a projection against even once a vram_estimate block is added.

Why this is a separate issue rather than folded into #265's fix: the LTX2 ceiling was calibrated from a real, already-observed OOM figure (2.69 GiB needed for VAE decode conv3d at 960x544x345, 557 MiB free). No equivalent measured number exists for the H3 templates' failure mode — H3 OOMs mid-denoise, not at decode, so the mechanism (and therefore the formula's base_gb/bytes_per_voxel split) is not simply a copy of the LTX2 numbers. The closest existing real measurement in the repo is docs/WORKFLOW_GUIDE.md's on-demand-VAE table: image-to-video.json at 960x544/124 frames peaks at 18.03 GiB reserved. That is one data point for one template at one frame count — not enough to fit a two-parameter formula, and not at the 768p resolution or frame count the issue's own repro names. A trustworthy ceiling needs at least one more real data point near the failure boundary (e.g. a controlled run of video-with-audio-768p at increasing frame counts on lem, watching for the actual OOM), which is GPU time better spent as its own scoped session than folded into #265's.

Ask: on lem, run templates/minimax/video-with-audio-768p (and ideally image-to-video for a second resolution point) at a few frame counts approaching the OOM boundary, record the peak reserved VRAM at each, then declare cost ({device: "cuda", name: "RTX 3090", vram_gb: 24, minutes: <measured>}) and a vram_estimate (base_gb, bytes_per_voxel over width * height * num_frames, reason citing the calibration run) on each shot-shape H3 template that currently has neither. Wire-up (apply_vram_estimate at run time, vram_estimate_errors at validate time) already exists from #265/#266 — this issue is declaration-and-calibration only, no new engine code expected.

Depends on nothing further from #266 (already landed, offload profile stable).

Activity

  1. added a commit that references this issue on Sep 22, 2026
  2. dkackman commented on Sep 22, 2026

    @dkackman
    OwnerAuthor

    Fixed by declaring cost/vram_estimate on the MiniMax H3 shot templates that have real measured minutes to satisfy workflow_schema.json's "never derived" rule for cost.minutes.

    Calibration: two real data points fit a two-parameter linear ceiling over width*height*num_frames:

    • image-to-video at 960x544x124 succeeded at 18.03 GiB peak reserved (docs/WORKFLOW_GUIDE.md, existing data point).
    • video-with-audio-768p at 1344x768x345 (the family's own num_frames ceiling) OOM'd mid-denoise on lem, needing >=25.82 GiB (20.25 GiB already allocated + a refused 5.57 GiB allocation) on a 23.56 GiB card (job 282172105da1, 2026-09-22).
    • Fitted: base_gb=16.3, bytes_per_voxel=28.71, voxel_variables=["width","height","num_frames"].

    Declared on 5 templates (workflows/templates/minimax/):

    • video-with-audio-768p, video-with-audio, reference-to-video, enhance-prompt: added both cost (minutes from this box's own observed_minutes — 9.87, 6.6, 7.88, 5.67 respectively) and vram_estimate.
    • storyboard: already had a curated cost (10.1 min); added vram_estimate only.

    Verified functionally (loaded dw/vram_estimate.py directly and ran vram_estimate_errors() against all 5 edited files): video-with-audio-768p at num_frames=345 — the issue's own OOM repro shape — now correctly refuses with "width*height*num_frames = 1344*768*345 projects to 25.82 GB VRAM, above the 24 GB declared...". No false positives on any of the 5 at their defaults or at num_frames=345.

    Left undeclared (11 remaining minimax shot templates, none has a measured minutes figure — declaring cost for them would mean fabricating minutes, which the schema explicitly forbids): chain-matched-and-aligned, chain-matched-to-audio, chain-video-continuity, chained-segments, composable-references, enhance-prompt-with-image, first-and-last-frame, generated-subject-reference, image-to-video, last-frame-only, voice-timbre-reference. These need either real GPU calibration runs or maintainer-approved proxy minutes as a follow-up — happy to open a tracking issue if wanted, but didn't want to declare unverified numbers on this pass.

    Commit: 7b057b9 on fix/324-h3-vram-estimate, merged to develop at cd34174 (8459606..cd34174), pushed.
    Deployed: ssh lem '~/diffusers-workflow/scripts/deploy.sh develop' — systemd restart, healthy at cd34174, 2026-09-21 04:51 UTC.

    Worked as: model sonnet, provider anthropic.

    Suggested regression case (for the tester to confirm and add, likely regression-suite-model-specific.md since it's H3-specific): validate_workflow on templates/minimax/video-with-audio-768p with arguments={"num_frames": 345} should return valid: false with a vram_estimate error at arguments, citing ~25.82 GB projected against the 24 GB ceiling.

  3. dkackman commented on Sep 22, 2026

    @dkackman
    OwnerAuthor

    Verified over MCP against lem develop @ 8459606 (deployed as cd34174 per hand-off), model opus, provider anthropic.

    Repro (the issue's OOM shape): validate_workflow(name="templates/minimax/video-with-audio-768p", arguments={"num_frames": 345}) → valid: false, one error at path arguments: "widthheightnum_frames = 1344768345 projects to 25.82 GB VRAM, above the 24 GB declared for RTX 3090 …" citing job 282172105da1 and #324 in the reason. Matches the expected shape exactly.

    Adjacent cases:

    • Same template, no arguments / {} / {"num_frames": 124} → valid: true, estimate 9.9 min observed (5 runs). No false positive at the default.
    • Boundary sweep on the declared formula (16.3 + 28.71 B/voxel, GiB): num_frames 243, 260, 277 → valid: true; 294 → valid: false at 24.41 GB. Cutoff lands between 277 and 294, consistent with the declared constants.
    • templates/minimax/video-with-audio at num_frames=345 → valid: true (lower resolution stays under the ceiling; estimate 19.0 min observed). storyboard default → valid: true, 11.8 min.
    • templates/minimax/image-to-video at 345 → valid: true with no vram error — expected, since it's one of the 11 left undeclared per the hand-off. Not a defect of this issue; the hand-off's proposed follow-up tracking issue would cover it.
    • list_workflows(shape=shot, traits=has-audio) now shows cost {cuda, RTX 3090, 24 GB} on video-with-audio-768p (9.87), video-with-audio (6.6), reference-to-video (7.88), enhance-prompt (5.67), storyboard (10.1).

    One anomaly unrelated to the fix: the very first no-argument validate_workflow on video-with-audio-768p, fired in parallel with four other validate calls, came back HTTP 500: Internal Server Error from /api/validate; the identical call retried sequentially (twice) returned valid. Filed separately rather than held against this issue.

    Regression case added to regression-suite-model-specific.md per the hand-off's suggestion.

  4. added
    status:verifiedTester confirmed the fix via a real MCP call
    and removed on Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    owner:testerTester's turn to actstatus:verifiedTester confirmed the fix via a real MCP call

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions