Repository navigation
Conversation
gongsearch
added a commit
to gongsearch/DeepFilterNet
that referenced
this pull request
Nov 28, 2026
Fixes the two causes of upstream issue Rikorose#713 (output turns to NaN after ~78 s of digital silence when the host flushes subnormals to zero): - The silence guard in DfTract::process never fired: on silence the model picks the zero mask, and that branch reset skip_counter, so it went 0, 1, 0, 1 and the network kept running on every silent frame while the norm states decayed towards 0. skip_counter is now driven by the RMS check alone; after 5 silent frames the network is skipped (output 0, lsnr -15) until a signal comes back. This also saves CPU while a mic is muted. - band_unit_norm / band_unit_norm_t give 0 for a bin whose running norm is 0 instead of 0/0 = NaN (as in upstream PR Rikorose#718). Output for audio without digital silence is bit-identical (deep-filter CLI, with and without post filter). New tests: zero norm state for both layouts, and 3 minutes of zeros through DfTract followed by a signal (fails with the old skip_counter reset). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Audio hosts that flush subnormal floats to zero can drive a silent bin's running norm to zero after sustained digital silence. Both unit-normalization layouts then divide by zero. Emit zero for that bin and keep the existing calculation for nonzero norms.
Fixes #713.
Verification
lib.rsunit tests passed on Linux in a focused Cargo build using the upstream direct dependency versions. Formatting check passed with stable rustfmt.