Skip to content

fix: clear stale UI state on mode switch to prevent remix noise bug#638

Merged
ChuxiJ merged 1 commit intomainfrom
fix/remix-mode-state-leakage-noise-bug
Feb 19, 2026
Merged

fix: clear stale UI state on mode switch to prevent remix noise bug#638
ChuxiJ merged 1 commit intomainfrom
fix/remix-mode-state-leakage-noise-bug

Conversation

@ChuxiJ
Copy link
Contributor

@ChuxiJ ChuxiJ commented Feb 19, 2026

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

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
@ChuxiJ ChuxiJ merged commit 52e3b22 into main Feb 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments