[TRTLLM-14268][feat] Add VisualGen serving benchmark - #18672
Draft
ishovkun wants to merge 22 commits into
Draft
Conversation
Signed-off-by: Igor Shovkun <igshov@gmail.com>
Measured the parallel layouts against each other on B300 with Cosmos3-Super at 1280x720 x 189 frames, comparing engine-side generation time from the Server-Timing header. 4 GPU (mean generation, 3 requests each): cfg2 x ulysses2, vae4 28.75 s (was shipped) cfg2 x ulysses2, vae4, async 28.68 s (now shipped) cfg1 x ulysses4, vae4 29.73 s +3.4% cfg2 x ulysses2, vae1 32.93 s +14.6% cfg2 x ring2 unsupported for Cosmos3 cross-attention 8 GPU: cfg2 x ulysses4, vae8, async 15.10 s (new config, 1.90x over 4 GPU) cfg1 x ulysses8, vae8 15.79 s +4.5% So cfg_size=2 is worth its two ranks at both sizes, and parallel VAE is the single largest contributor at 4 GPUs. async_ulysses is within noise here but matches what ltx2-4gpu and wan2.2-t2v-fp4-4gpu already set, so both Cosmos3 configs now enable it. Also drop the "launch with torchrun --nproc_per_node=4" note from the 4-GPU config: trtllm-serve spawns the workers itself, verified by the server reporting "Launching 4 workers / World size: 4 / CFG size: 2 / Ulysses size: 2" with no launcher wrapper. Signed-off-by: Igor Shovkun <ishovkun@nvidia.com>
Trading two Ulysses ranks for tensor parallel is 2.2x faster and uses 42% less memory per rank. Measured on 4xH200 with Cosmos3-Super-Image2Video at 1280x720 x 189 frames, 10 steps, 3 sequential requests, comparing engine-side generation time from the Server-Timing header: cfg1 x tp2 x ulysses2 30.77 s 78 GB/rank cfg2 x ulysses2 67.85 s 134 GB/rank cfg1 x ulysses4 68.67 s 134 GB/rank cfg_size=1 is not the cause of the speedup: cfg1 x ulysses4 also runs cfg1 and is slow. The difference is spending two ranks on tensor parallel instead of on Ulysses, which shards the weight matrices rather than replicating them. parallel_vae_size stays at 4. Dropping it to 1 costs 14.6% on B300 and OOMs outright on H200, where a single rank cannot hold the full 720p x 189-frame decode in 139.8 GiB. Also drop the measurement tables that had accumulated in both config headers; that detail belongs in commit messages, not in shipped config files. Signed-off-by: Igor Shovkun <ishovkun@nvidia.com>
Signed-off-by: Igor Shovkun <igshov@gmail.com>
Signed-off-by: Igor Shovkun <igshov@gmail.com>
Signed-off-by: Igor Shovkun <igshov@gmail.com>
Signed-off-by: Igor Shovkun <igshov@gmail.com>
Signed-off-by: Igor Shovkun <igshov@gmail.com>
Signed-off-by: Igor Shovkun <igshov@gmail.com>
Signed-off-by: Igor Shovkun <igshov@gmail.com>
Signed-off-by: Igor Shovkun <igshov@gmail.com>
Signed-off-by: Igor Shovkun <igshov@gmail.com>
Signed-off-by: Igor Shovkun <igshov@gmail.com>
Signed-off-by: Igor Shovkun <ishovkun@nvidia.com>
Signed-off-by: Igor Shovkun <ishovkun@nvidia.com>
…isual-gen Signed-off-by: Igor Shovkun <ishovkun@nvidia.com>
Signed-off-by: Igor Shovkun <ishovkun@nvidia.com>
Signed-off-by: Igor Shovkun <ishovkun@nvidia.com>
ishovkun
force-pushed
the
cosmos3-benchmark-visual-gen
branch
from
September 3, 2026 23:05
7f56909 to
4e7cd90
Compare
Signed-off-by: Igor Shovkun <ishovkun@nvidia.com>
Signed-off-by: Igor Shovkun <ishovkun@nvidia.com>
…isual-gen Signed-off-by: Igor Shovkun <ishovkun@nvidia.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.
@coderabbitai summary
Description
Add a portable online-serving benchmark for VisualGen, with one combined
server/client lifecycle wrapper and independently usable server and client
scripts.
The benchmark:
video-to-video, Transfer, text-to-audio-video,
text-and-image-to-audio-video, and Action policy/forward/inverse dynamics;
standalone server before sending requests;
supplied;
distributions, diffusion time, denoising-step timing, vision decode time,
and total pipeline time when the server exposes them;
metrics, result, and metadata artifacts;
client while keeping server-side temporary media isolated and disposable;
TRANSFER_CONTROLSJSON mapping, including client-derived edge/blur andprecomputed depth/segmentation/world-space-map controls;
image_referenceandvideo_referencemultipartfields while keeping
INPUT_REFERENCEas the shell file-path interface;End-to-end Action validation also exposed and fixes two integration issues:
/v1/modelswhenthe requested model is an equivalent local checkpoint path;
rejecting the typed multipart
image_referencepayload.The runtime change is internal to Cosmos3 Action preprocessing. This PR does
not change the public VisualGen API, model equations, or runtime dependencies.
Test Coverage
tests/unittest/scripts/test_benchmark_visual_gen.pytests/unittest/_torch/visual_gen/test_cosmos3_action.pytests/integration/defs/visual_gen/test_visual_gen_benchmark.pytests/integration/defs/perf/test_visual_gen_perf_sanity.pyupstream/mainat3503e3f9bb; the latest upstream delta has noCosmos3 or VisualGen overlap
1/1 requests, 0.8446 s diffusion, 1.1406 s generation, 1.3889 s latency
request-0001.safetensorscontainingvideo (17, 480, 832, 3),action (16, 10), and scalarframe_rateThe one-request Action run is functional validation, not an official
performance baseline.
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.