add small zimage test and fix bug#1734
Merged
lvliang-intel merged 4 commits intomainfrom Apr 24, 2026
Merged
Conversation
Signed-off-by: Xin He <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a CUDA test + fixture for a minimal “Z-Image” diffusion model and adjusts tiny-model module construction and safetensors renaming behavior.
Changes:
- Add
tiny_z_image_model_pathfixture and atest_z_image_tuneCUDA test. - Update tiny-model helper to replace certain nested modules with reduced “tiny” modules.
- Adjust
rename_weights_filesto special-case single.safetensorsfiles.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| test/test_cuda/models/test_diffusion.py | Adds a CUDA test exercising Z-Image quantization/saving path. |
| test/helpers.py | Changes tiny-model construction to replace nested modules rather than mutating configs in-place. |
| test/fixtures.py | Adds a session-scoped fixture that builds a minimal Z-Image model with config overrides. |
| auto_round/utils/model.py | Special-cases renaming when only one .safetensors file exists. |
Signed-off-by: Xin He <[email protected]>
Signed-off-by: Xin He <[email protected]>
Contributor
Author
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
lvliang-intel
approved these changes
Apr 24, 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.
Description
This pull request introduces support for testing and handling a new diffusion model, "Z-Image", and makes improvements to model file renaming and test fixture setup. The main changes include adding a test fixture and test case for the Z-Image model, updating the weights file renaming logic, and refining how model modules are loaded in tests.
Support for Z-Image diffusion model:
tiny_z_image_model_pathintest/fixtures.pyto create and clean up a minimal Z-Image model for testing, with custom configuration overrides.test_z_image_tuneintest/test_cuda/models/test_diffusion.pyto verify quantization and saving for the Z-Image model using the new fixture.Model file handling improvements:
rename_weights_filesinauto_round/utils/model.pyto handle the case where there is only one.safetensorsfile by renaming it directly, avoiding unnecessary enumeration.Test utilities and module loading:
_get_moduleintest/helpers.pyto directly set reduced modules for specific model attributes, improving how models with nested modules are handled in test environments.Type of Change
Related Issues
Fixes or relates to #
Checklist Before Submitting