fix: clear stale UI state on mode switch to prevent remix noise bug#638
Merged
fix: clear stale UI state on mode switch to prevent remix noise bug#638
Conversation
When switching between Remix and Custom modes, stale values in text2music_audio_code_string and src_audio leaked across mode boundaries, causing the diffusion pipeline to incorrectly activate the cover path and produce noise output. Root cause: compute_mode_ui_updates only toggled visibility of these components but never cleared their values on mode switch. Changes: - mode_ui.py: extend output tuple to 44 elements; clear audio codes when leaving Custom mode, clear src_audio when entering modes that don't use it (Custom, Simple) - events/__init__.py: add the two new outputs to both the generation_mode.change() and _mode_ui_outputs output lists - audio_transfer.py: update send_audio_to_remix/repaint to match the new 44-element tuple (48 total with 4 data outputs) - generation_progress.py: add defensive guard to force-clear text2music_audio_code_string for non-text2music task types - mode_ui_test.py: add 11 unit tests covering state-clearing behavior
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.
When switching between Remix and Custom modes, stale values in text2music_audio_code_string and src_audio leaked across mode boundaries, causing the diffusion pipeline to incorrectly activate the cover path and produce noise output.
Root cause: compute_mode_ui_updates only toggled visibility of these components but never cleared their values on mode switch.
Changes: