[5565357] Fix SDXL NVFP4 export and performance - #2336
Draft
ajrasane wants to merge 1 commit into
Draft
Conversation
Signed-off-by: ajrasane <131806219+ajrasane@users.noreply.github.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
|
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2336 +/- ##
=======================================
Coverage 79.31% 79.31%
=======================================
Files 527 527
Lines 61482 61482
=======================================
Hits 48765 48765
Misses 12717 12717
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What does this PR do?
Type of change: Bug fix
Adds an SDXL-specific mixed-precision FP4 recipe:
The previous SDXL path could accept mismatched checkpoints and lose projection fusion. This change validates fresh and restored quantizer state, rejects incompatible checkpoints before export, normalizes supported FP8 Q/DQ, validates raw and final NVFP4 graph topology, and publishes checked ONNX artifacts atomically.
Non-SDXL quantization and the generic NVFP4 exporter remain unchanged.
Usage
python quantize.py \ --model sdxl-1.0 \ --model-dtype Half \ --trt-high-precision-dtype Half \ --format fp4 \ --block-size 16 \ --batch-size 2 \ --calib-size 128 \ --n-steps 20 \ --quantized-torch-ckpt-save-path ./sdxl-fp4 \ --onnx-dir ./onnx-sdxl-fp4Testing
Before your PR is "Ready for review"
CONTRIBUTING.md: N/AAdditional Information
Tracking: [5565357]