fix(mps): stale wgp_config regeneration, Z Image float64→float32, smoke test#1770
Closed
huangyebiaoke wants to merge 1 commit into
Closed
fix(mps): stale wgp_config regeneration, Z Image float64→float32, smoke test#1770huangyebiaoke wants to merge 1 commit into
huangyebiaoke wants to merge 1 commit into
Conversation
- setup.py: re-generate wgp_config.json when attention_mode is blank (prevents silent generation failures after branch switch or upgrade) - pipeline_z_image.py: use float32 for DPM-Solver ODE steps on MPS (MPS backend does not support float64; fall back to solver_dtype) - shared/mps/test_mps_smoke.py: quick validation script (<30s, no models) tests MPS availability, basic matmul, device_patch, model imports, wgp_config validity, and memory reporting
Author
|
Closing — most fixes were already in @deepbeepmeep's commit |
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.
Follow-up to #1768. Addresses remaining issues from @cn0ss's systematic MPS test report in #1750.
Changes
1. setup.py — stale wgp_config.json detection
create_wgp_config()previously skipped generation if the file existed, leaving stale configs with blankattention_modeafter branch switches or upgrades. On MPS, blank attention_mode causes the model to load but produce no output files (reported by @cn0ss).Fix: Validate existing config — if
attention_modeorvideo_profileare missing/empty, force regeneration.2. pipeline_z_image.py — MPS float64 → float32
Z Image Turbo was the only tested feature still failing on MPS, crashing with:
Root cause: The DPM-Solver ODE steps use
torch.float64at 5 sites. On CUDA this works; on MPS the backend rejects float64 entirely.Fix: Detect MPS device and use
solver_dtype = torch.float32. For 4-step distilled models this is numerically fine.3. shared/mps/test_mps_smoke.py — Quick validation script
Runs in <30 seconds without model weights. Validates:
Testing