Repository navigation
[TRTLLM-16807][feat] Support combined Omni references in video serving - #21226
Conversation
Signed-off-by: Yibin Li <109242046+yibinl-nvidia@users.noreply.github.com>
Signed-off-by: Yibin Li <109242046+yibinl-nvidia@users.noreply.github.com>
Signed-off-by: Yibin Li <109242046+yibinl-nvidia@users.noreply.github.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Reference contract and multipart parsing tensorrt_llm/serve/openai_protocol.py, tensorrt_llm/serve/openai_video_routes.py, examples/visual_gen/serve/README.md |
Reference fields accept lists that mix uploads and structured references. Multipart parsing handles repeated fields and parses nonempty text parts as JSON. Endpoint documentation includes audio references, and the README describes combined media inputs. |
Slot validation and endpoint coverage tensorrt_llm/serve/visual_gen_utils.py, tests/unittest/_torch/visual_gen/test_trtllm_serve_endpoints.py |
Parameter parsing checks explicit references against pipeline slot metadata. Tests cover JSON and multipart inputs, reference ordering, unsupported slots, count limits, and invalid JSON parts. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Feature
Sequence Diagram(s)
sequenceDiagram
participant Client
participant openai_video_routes
participant parse_visual_gen_params
participant LoadedPipeline
Client->>openai_video_routes: Send video-generation request with media references
openai_video_routes->>parse_visual_gen_params: Pass parsed request
parse_visual_gen_params->>LoadedPipeline: Check reference slot metadata
parse_visual_gen_params-->>openai_video_routes: Accept request or return validation error
Suggested reviewers: schetlur-nv
Merge Risk: 
Minimal · up to 96091
-
The reference-handling change matches the supported contracts, with no established user-impacting regression. Normal CI follow-up remains appropriate.
Pre-merge checks: 
5
-
Full details: Description check
-
Explanation
The description includes the required Description, Test Coverage, and PR Checklist sections. It explains the problem, solution, affected routes, model scope, tests, runtime validation, and API compatibility consideration.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 8 functions across 4 files.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
|
/bot run |
|
PR_Github #81764 [ run ] triggered by Bot. Commit: |
|
PR_Github #81764 [ run ] completed with state
|
Signed-off-by: Yibin Li <109242046+yibinl-nvidia@users.noreply.github.com>
|
/bot run |
|
PR_Github #82074 [ run ] triggered by Bot. Commit: |
|
PR_Github #82074 [ run ] completed with state |
mikeiovine
left a comment
There was a problem hiding this comment.
Stamp on behalf of runtime devs, delegating proper review to @NVIDIA/trt-llm-torch-visual-gen-devs
|
Automatically added "ci: full pre-merge approved" because this PR has satisfied the required GitHub review approvals. Unresolved review conversations and other required checks remain independent merge requirements. |
Description
Video requests can combine text, image, video, and audio references, but repeated multipart reference fields previously kept only the last part. This silently dropped conditioning inputs and allowed requests to evade model reference-count limits.
Preserve every multipart reference in per-modality order, including repeated uploads and mixtures of uploads with JSON reference objects/lists. Extend the request schema to accept upload lists and keep model capability/limit validation in the shared serving path for both
/v1/videosand/v1/videos/sync. Add a MiniMax H3 Ref2VA example; the endpoint handling is model-independent.Currently, only MiniMax H3 in Ref2VA mode supports the full Omni input combination (text, image, video, and audio). The shared endpoint handling is model-independent, so other models can use it when they implement and declare the corresponding input capabilities.
Test Coverage
test_trtllm_serve_endpoints.py,test_visual_gen_utils.py, andtest_minimax_h3_pipeline.py.SKIP=type-check,clang-format,ruff-legacy pre-commit run -apassed.trtllm-serve: one multipart request with prompt + image + video + audio returned HTTP 202, completed, and downloaded through/v1/videos/{id}/contentwith HTTP 200. Output: H.264 960×544, 124 frames at 24 FPS, stereo AAC at 32 kHz. Full FFmpeg decode and all 124 video frames verified; audio was non-silent. Generation/encoding took approximately 491 seconds on one GPU.PR Checklist
Dev Engineer Review
The request schema now accepts a single reference or a list of uploads and JSON reference objects. Multipart parsing preserves part order within each modality and supports repeated and mixed parts. Shared validation checks model-declared reference slots and count limits for video-generation requests.
The change updates video-reference handling, serving documentation, and endpoint tests. Model capabilities determine supported modalities and reference limits. Test execution results are not established by the repository inspection.
QA Engineer Review
test_trtllm_serve_endpoints.pyadds tests for JSON and multipart requests, both video routes, repeated and mixed references, ordering, reference limits, unsupported audio, and malformed parts. The test file is listed in the CItests/integration/test_lists/test-db/l0_cpu.ymllist. No manual-QA listing is established. Coverage verdict: sufficient for the described request-parsing and validation changes. Test execution status is unavailable.Per-File QA Perspective
examples/visual_gen/serve/README.md: Documents combined text, image, video, and audio inputs, including repeated and mixed multipart references. Verify the model-dependent support guidance against the served API.tensorrt_llm/serve/openai_protocol.py: Reference fields now accept lists containing uploads or JSON reference objects. Verify schema parsing for single values, lists, and multipart uploads.tensorrt_llm/serve/openai_video_routes.py: Both video routes parse repeated reference fields and preserve order within each modality. Verify empty parts, malformed JSON parts, and mixed upload/object values.tensorrt_llm/serve/visual_gen_utils.py: Video requests validate reference slots and counts before reference processing. Verify that unsupported modalities and excess references fail before upload materialization.tests/unittest/_torch/visual_gen/test_trtllm_serve_endpoints.py: Adds endpoint tests for reference transports, ordering, limits, and error cases. The file is listed in the CIl0_cpu.ymllist; no manual-QA listing is established.