Repository navigation
fix(inference): enable quantized SeaCache and correct Transfer control CFG - #282
Merged
Merged
Conversation
pengcuo
marked this pull request as ready for review
October 8, 2026 12:35
pengcuo
marked this pull request as draft
October 9, 2026 03:16
pengcuo
marked this pull request as ready for review
October 9, 2026 03:25
pengcuo
enabled auto-merge (squash)
October 9, 2026 03:52
lfengad
approved these changes
Oct 9, 2026
foreverlms
approved these changes
Oct 9, 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.
Quantized inference currently ignores
--diffusion-cache, and Transfer does not declare its extra no-control forward to the sampler. Enable the existing SeaCache setting for ModelOpt FP8 and runtime MXFP8/NVFP4, and register the extra branch only while control guidance is active so branch histories and FSDP forward counts stay aligned.Also sync the control-CFG composition fix: text guidance must scale the existing conditional prediction while the additional control increment remains
(control_guidance - 1) * (full - no_control). With text guidance 3 and control guidance 1.5, the old formula subtracts 1.5 times the control delta instead of adding 0.5 times it. Use1 + (control_guidance - 1) / text_guidanceinside the conditional hook and reject zero text guidance when control-CFG is active.Validation:
inference_test.py,transfer_test.py, anddiffusion_cache_test.pypassed on GB200. Coverage includes distinct cached branch residuals, interval-boundary resets, and control-CFG composition with text guidance. The six new composition/zero-guidance cases fail before the formula fix.d91e640, including unit tests, inference smoke tests, and training regressions.Historical reference validation: the saved September 9 no-cache result (
245d2b9) used the earlier control-CFG semantics. Itscontrol_guidance=1.5with text guidance 3 corresponds tocontrol_guidance=2.5under this formula (new = 1 + text_guidance * (old - 1)). A separate cache-off/cache-on run uses that exact conversion with the original checkpoint, prompts, seed, and control input; the saved control videos decode identically across all 121 frames. Both runs produced 121 frames. The cached result has 32.62 dB mean frame PSNR against the historical no-cache video, and 32.54 dB against the current no-cache result. This explicitly checks the original reported case rather than relying only on agreement between two current outputs.