fix: convert boundary_ratio from timestep space to index space via inverse sigma_shift#32
Open
Auraithm wants to merge 1 commit intoOpenMOSS:mainfrom
Open
fix: convert boundary_ratio from timestep space to index space via inverse sigma_shift#32Auraithm wants to merge 1 commit intoOpenMOSS:mainfrom
Auraithm wants to merge 1 commit intoOpenMOSS:mainfrom
Conversation
…verse sigma_shift
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.
Summary
boundary_ratio=0.9represents the DiT1/DiT2 switch point at timestep 900. In inference, this value is correctly compared against actual timestep values. However, intraining_step, it was incorrectly used as an index fraction formax/min_timestep_boundary.Due to sigma_shift (flow_match.py L57), the scheduler's timestep array is non-linearly spaced — timestep 900 sits at index ~250 (shift=3), not index 900. Using 0.9 as the index boundary caused DiT1 to be trained on 90% of indices and DiT2 on only 10%, while in inference DiT2 handles the majority of denoising (timestep 900→0).
Fix
Apply inverse sigma_shift to convert
boundary_ratiofrom timestep space to index space before passing it tomax/min_timestep_boundary. This aligns training with inference behavior.Reference