perf(minimax-h3): reduce native runtime overhead - #1241
Draft
yifeif-nv wants to merge 8 commits into
Draft
Conversation
Build T2VA, FL2VA, and Ref2VA together from the pinned full Comfy INT8 denoisers and NVFP4 AWQ text checkpoint. Keep normal generation as the default and enable fixed-base super resolution only through an explicit build option. Preserve dynamic request shapes, synchronized audio, and native C++ execution. Keep model semantics in the H3 family and provide the generic runtime, bundle loading, and Windows media support needed to consume it. Document clean setup, CLI and C++ consumption, checkpoint semantics, cache settings, and artifact rebuild requirements on the model page. Signed-off-by: yifeif-nv <277870278+yifeif-nv@users.noreply.github.com>
Size owned dynamic I/O and serial activation storage from live request shapes while preserving profile bounds, external bindings, aliasing, and CUDA graph behavior. Invalidate cached activation requirements when shapes change. Use bounded Windows bulk reads through the existing mutation-protected plan handle and expose nested loading timings. Opt shared H3 text and vision engines into the serial policy without changing engine payloads, model precision, sampling, or cache thresholds. Validate with fourteen focused CPU tests, RTX dynamic input/output and shared-arena transitions, and a full native audiovisual request. Full configuration performance qualification remains separate. Signed-off-by: yifeif-nv <277870278+yifeif-nv@users.noreply.github.com>
Exercise ordered audiovisual requests through one public C++ task, reusing native CLI media readers and the Windows MP4 writer. Keep manifest validation, per-request receipts, process identity, and timing boundaries explicit. Document different-prompt, duration, and mode sequences without adding a second model workflow or a Python runtime dependency. Refuse existing output artifacts and conflicting cache paths. Signed-off-by: yifeif-nv <277870278+yifeif-nv@users.noreply.github.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
Allocate the four T2VA, FL2VA, and REF2VA FirstBlockCache tensors from validated live row counts. Late-bind request-sized storage while preserving profile-MAX ABI checks, auxiliary bindings, and stage-release policies. Guard resident reuse against undersized buffers. Keep model math, quantization, profile ranges, and cache thresholds unchanged. Add CPU bounds and capacity coverage; all 14 selected CPU tests pass. Full GPU workflow measurements are pending. Signed-off-by: yifeif-nv <277870278+yifeif-nv@users.noreply.github.com>
Document clean-machine setup and native CLI/C++ reproduction for the normal and explicit super-resolution deliveries. Record exact inputs, supported dynamic ranges, cache conditions and measurement boundaries. Tie runtime evidence to its tested source revision and distinguish completed results from unmeasured cases and limited quality checks. Keep raw logs, machine identifiers and private fixtures out of the public documentation. Signed-off-by: yifeif-nv <277870278+yifeif-nv@users.noreply.github.com>
Refresh the configuration matrix and quality findings with the final available measurements. Separate the tested runtime revision from documentation commits and retain explicit unmeasured comparisons, cache conditions and deployment limitations. Keep source, engines and sampling unchanged. Publish only sanitized reproduction instructions and aggregate evidence. Signed-off-by: yifeif-nv <277870278+yifeif-nv@users.noreply.github.com>
Replace the long report with a two-page brief covering all twelve measured configurations, setup, native commands, dynamic input limits, and quality boundaries. Link the model guide and frozen detailed reproduction protocol instead of repeating experiment history. Clarify NVFP4-source BF16 text compute and existing native CUDA helpers. Preserve the measured runtime revision; no runtime or benchmark changes. Signed-off-by: yifeif-nv <277870278+yifeif-nv@users.noreply.github.com>
Put the six normal/SR mode timings and native CLI commands first, followed by a clean Windows installation, bundle builds, inputs, and cache protocol. Keep a Markdown-only reading path with shared CLI argument definitions and explicit 124/345-frame selection, without adding a runtime wrapper script. Preserve measured-source, quantization, timing and quality boundaries. No runtime, bundle, or benchmark data changes. Signed-off-by: yifeif-nv <277870278+yifeif-nv@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Reduce native MiniMax H3 runtime overhead while preserving the unified T2VA, FL2VA, and Ref2VA delivery in #1240, including explicit fixed-base super resolution and dynamic prompt/duration support. This draft is based on that PR's
19e37595033d802c7dedfed77f2a8f42b1d4a992baseline.Exit Criteria
Implementation
Validation
Measured runtime source:
aa594f6010bd59204c2edc3061fc6e5042572c0d. Documentation-only follow-up:2d8d27edd8945f0cc01c894f705c553cde9e928c(results-first Markdown report and Quick Start).ctest --test-dir <build> --output-on-failure -R "^(minimax_h3_(math|conditioning|fl2va_runtime|ref2va_runtime)|bundle_format_v1|task_api|cli|family_loader|dynamic_library|runtime_cache_persistence|windows_utf8_argv|windows_media|dataset_answer|benchmark_worker_e2e)$": 14/14 passed, including live-cache capacity and profile-bound cases.4dcfdc79revision,<build>/test_trt_module_dynamic_input.exepassed owned/external I/O transitions and two real RTX contexts sharing/growing an activation arena. These generic tests were not rerun on the current revision; shared runtime code is unchanged by the latest family-only commit.h3_benchmark_video requests.json --validate-only: passed. The same nine-request manifest also completed native generation in one process/task, covering repeated/different/1662-token prompts, T2VA/FL2VA/REF2VA transitions and changed/restored references. All nine outputs passed full decode and sampled scene checks; the report distinguishes API/request/process timing.python tools/legal_headers.py --check: zero findings on the measured runtime revision.git diff --check 19e37595...HEADand staged documentation whitespace checks passed.python -m tools.model_ci validatepassed and model-support inventory tests passed (7 tests); The current Markdown report's ten PowerShell blocks parsed successfully, and all twelve CLI argument combinations passed a CPU-only argument-expansion check. No additional generation runs were performed for this documentation revision. Full website build was not run because website dependencies were not installed.Single-observation, unprofiled fresh-process E2E seconds with copied seeded RTX caches and both FBC thresholds 0.3 (124 output frames):
Completed long cases (345 output frames): native T2VA 2819.268 s, FL2VA 3042.447 s and Ref2VA 4940.005 s; SR T2VA 742.129 s, FL2VA 697.108 s and Ref2VA 1750.920 s. Short T2VA empty-RTX-cache-path checks completed at 580.089 s native and 242.461 s SR; these are not OS/driver-cold measurements.
The Markdown report and Quick Start starts with the six configuration rows, both frame-count timings, and native CLI commands. The Quick Start below includes clean Windows installation, bundle builds, input preparation, and the seeded-cache timing protocol. Dynamic-input and quality boundaries remain explicit. It links the C++ guide and frozen detailed protocol for exact fixtures, cache preparation, stage timings and evidence. Original authorized-recipient fixtures are supplied separately, not publicly uploaded.
These are measured configuration results, not a general speedup or arbitrary-hardware latency guarantee. Full-motion/listening qualification and additional matched-baseline coverage remain incomplete. Long native Ref2VA was compared directly for quality against the intermediate bulk runtime (PSNR 24.978547 dB / SSIM 0.823267), with scene content retained but detail and framing differences. That older run overlapped CPU compilation and is not a controlled timing baseline. No current-head remote premerge pass or cross-platform qualification is claimed.
Notes For Future Readers
This is stacked on #1240; the main-targeted diff includes that baseline until it lands. For the performance increment, review
19e37595..aa594f60. The baseline branch and PR are unchanged. Review generic allocation/file-reading mechanics first, then the H3 serial policy, request-sized caches and family-owned benchmark.The measurements use the same bundles with both FBC thresholds at 0.3; product defaults remain unchanged. FBC and SR are not claimed to be equivalent to an uncached native-resolution reference. Profiled timing is diagnostic and will not be mixed with ordinary process wall time.
No checkpoints, engines, generated media, raw traces, local logs, machine paths, or hardware identifiers are included. Public C++ API declarations are unchanged by the performance increment; rebuild the matching backend/runtime together. The selected measurement matrix and report are complete; keep this PR Draft pending review of the recorded quality limitations and current-head validation.