Repository navigation
feat(aiperf): profile existing text-to-image models - #1787
Merged
yizhuoz004 merged 8 commits intoOct 18, 2026
Merged
Conversation
Connect the persistent native server to the public image-generation Task. Reuse the performance server's request mapping and return complete PNG bytes before temporary-file cleanup, with native artifact identity and Task timing records. Add existing-checkpoint discovery, a published-client image profiling command, transport regression tests and a concise usage guide. Owning-family correctness and group-wide GPU qualification remain separate prerequisites; model specs and quality criteria are unchanged. Signed-off-by: Yizhuo Zhang <yizhuoz@nvidia.com>
Apply the existing qualification profile's request controls before formatting AIPerf inputs. Omit unspecified guidance sentinels and require explicit dimensions, denoising steps, seed and guidance so requests describe the actual fixed workload. Signed-off-by: Yizhuo Zhang <yizhuoz@nvidia.com>
Use the public bundle inspector to validate the existing profile's checkpoint, immutable revision, Task, precision, quantization and explicit build controls before qualification. Preserve actual bundle build metadata in the result, including effective precision boundaries. Reject mismatched bundles before inference and cover identity and build-setting mismatches with regression tests. Signed-off-by: Yizhuo Zhang <yizhuoz@nvidia.com>
Keep frame count, duration and frame-rate options exclusive to the existing video transport. The single-image route now rejects those fields instead of silently discarding them. Add request-mapping regressions and cover quantization mismatches in bundle qualification. Signed-off-by: Yizhuo Zhang <yizhuoz@nvidia.com>
The existing pinned Qwen-Image snapshot provides vocabulary, merges and tokenizer configuration without tokenizer.json, so bundle building failed after compiling all three engines. Serialize those checkpoint assets with its Transformers fast tokenizer before engine construction. Preserve pre-serialized bytes when present and never write into the immutable snapshot. Regression tests retain token IDs, added tokens and cache contents; existing model specifications and correctness criteria remain unchanged. Signed-off-by: Yizhuo Zhang <yizhuoz@nvidia.com>
Preserve the server's no-text timing-log contract for image requests. Forward the full negative prompt to the native Task, but record only its SHA-256 and byte count alongside the numeric generation controls. Verify that private prompt text never enters the JSONL record. Signed-off-by: Yizhuo Zhang <yizhuoz@nvidia.com>
Serialize the official split vocabulary and merges with the checkpoint tokenizer before building engines. Preserve existing serialized assets, native bundle sections and cached checkpoint files. Signed-off-by: Yizhuo Zhang <yizhuoz@nvidia.com>
Use the startup timeout exercised by qualification so the example also works when replacing the small image bundle with a large existing model. Signed-off-by: Yizhuo Zhang <yizhuoz@nvidia.com>
yizhuoz004
marked this pull request as ready for review
October 18, 2026 07:28
18 tasks done
This was referenced Oct 18, 2026
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
The performance server returned a server-local image URL whose artifact was deleted by default, and the persistent native server had no image-generation operation. Stage 6 of #1667 connects every existing text-to-image checkpoint to published AIPerf. Closes #1673.
Exit Criteria
88ceb9f(seven checkpoints, 20 existing variants).Implementation
b64_jsonbefore temporary-file cleanup; preserve files until cancelled native calls finish.image-profile. Verify checkpoint/revision/precision/build provenance and each decoded PNG's native artifact hash, geometry and count. Reject unsupported batching, streaming, URL, quality and video-only image controls.pip install aiperf==0.13.0, existing build-guide links and an extended startup timeout verified with large bundles. Timing records retain prompt hashes and numeric controls.Change categories
Validation
Commands and Results
All seven checkpoints passed their original owning-family model criteria on the exact served bundle, then actual PyPI AIPerf 0.13.0. Each client run used three prompts, concurrency one, five measured requests plus one warmup, zero errors and six complete PNG/native SHA-256 matches: 35 measured + 7 warmup, 42 verified responses in total. The corpus uses the original family prompt, a red bicycle at a white wall, and a watercolor mountain lake at sunrise.
Settings below list precision, resolution, steps and guidance/CFG; seed is 42 except Stable Diffusion (0). Existing mixed-precision layer defaults are retained. These shared-host, small-sample measurements use different existing workloads and are not capacity rankings.
All unique HTTP outputs were visually inspected. Stable Diffusion's existing 256×256/ten-step profile produces weak, often abstract images despite passing its unchanged PSNR/SSIM contract; PNG transport identity is not a semantic-quality claim.
Correctness: six checkpoints passed their full unchanged direct E2E selector (one requested/executed case, no requested skips). FLUX.2-dev's full BF16 build succeeded, but the combined build/native test OOMed loading the text encoder. That original failure remains recorded. After the build process exited, the identical BF16 bundle passed the owner's original
_native,_official_referenceand_assert_contract, with byte-identical matched latents, unchanged settings and thresholds: one fresh-process case passed in 356.45 seconds, zero skips. The paired native/reference images show the requested cat at sunset. Its subsequent real AIPerf run is the BF16 row above.python -m tools.ci pipeline source-quality: 307 passed with Ruff/clang-format onf5d08c74a.python -m tools.ci pipeline package: source archive, native wheel, installed SDK/CLI and immediate native-library loading passed for all 136 families on frozenf5d08c74a.9ebd43aea; changed serving/qualification and tokenizer-asset tests: 33 passed in the detachedf5d08c74areview. Qwen/FLUX family CPU suites: 20/36 passed. Native/HF tokenizer IDs match on 129/111 actual-checkpoint prompts; original vocabularies and merges are preserved.e16c79cbe; its only change fromf5d08c74ais the guide's tested startup-timeout flag and rationale.Reproduce each row with its table profile, retained already-built bundle and three-prompt JSONL; the environment points to the native runtime, server interpreter and pip-installed client:
For direct serving, use
trtmc-server BUNDLE --model-name MODEL --startup-timeout 1800 --request-timeout 1800; the qualifier sets those timeouts automatically. The website guide contains the directaiperf profileexample. Original correctness entry point:python -m pytest families/OWNER/tests/test_e2e.py --e2e-model PROFILE -qwith the documented runtime/cache environment. The FLUX.2 retained-artifact verification imports and calls the same owner's native/reference/comparison functions after its successful full build; it does not replace or modify the failed combined selector.Hardware, Environment, and Revisions
Linux aarch64, shared GB300, CUDA 13.3, TensorRT 11.1, PyTorch 2.12, Diffusers 0.39.0, published AIPerf 0.13.0. Checkpoint pins and model settings are unchanged from the linked manifests. Implementation head:
e16c79cbefe3adeef561bb704d2dbf92c8ed075a.Measurement epochs remain explicit: PixArt
216358918; Stable Diffusion/Z-Image27148b4d0; both Qwen models and both FLUX modelsf5d08c74a. Later changes add request validation/provenance, prompt-record privacy, family tokenizer assets and the guide timeout; measurements are not relabelled as executions on a later head. Per-request raw data, hashes, bundles, software/configuration and failure attempts are retained locally.Not Run / Remaining Gaps
Additional precision, quantization, distributed and partial/L0 variants are inventoried without qualification claims. The original combined FLUX.2 BF16 selector remains an OOM failure; its unchanged model criteria and actual serving workload are independently verified as described above. Required internal CI passed on current head
e16c79cbebefore normal squash merge. Stable Community CI, CPU, metadata, DCO and CodeRabbit passed; no review threads remained unresolved. Optional experimental Dev CI was still running at merge and is not claimed as passed. Repository merge requirements remain unchanged.Contributor Self-Review
Notes For Future Readers
One image per nonstreaming request is the qualified workload. Model semantics and quality remain family-owned; HTTP/native identity certifies transport. Editing and video are the following separate stages. The guide is
website/docs/user-guides/profile-images-with-aiperf.md.Risk level
Persistent worker dispatch and media lifetime change. Complete-output/ownership regressions, real existing-model qualification and exact-head CI provide separate validation tiers.