DeepFilterNet: one late frame ends it for the session (and fails CI on Windows) #910

Closed
opened 2026-11-18 19:11:17 +00:00 by charles · 1 comment
Owner

Seen twice on the Windows runners on 2026-11-18, each time on the first frame after DeepFilterNet reported it was running:

  • release run 382, packaged flaxative.exe --check-noise-suppression: "DeepFilterNet could not start: this computer takes 250 ms to clean each 10 ms of sound, too slow to keep up" (worked around in xtask package: three attempts, then a warning);
  • CI run 387, test audio_rt::tests::deep_filter_check_passes: "DeepFilterNet stopped after 0 frames: this computer takes 250 ms to clean each 10 ms of sound, too slow to keep up" — this failed the Windows job and blocked the nightly.
    The same builds passed on other runs, and Linux measures 0.09 ms per frame, so the machine is not too slow on average.

The defect (crates/fluxer-audio/src/denoise.rs, Remote::process). A single frame that takes longer than FRAME_TIMEOUT (250 ms) ends DeepFilterNet for the rest of the session (fallback to RNNoise, "could not start" in settings). On a user's machine one scheduling hiccup, a page-in of the model's weights on the first frames, or the worker thread not yet being warm does that. The rule that should end it is sustained slowness (the existing average over SPEED_WINDOW), not one late frame.

Wanted.

  1. Find why the first frame is slow on Windows specifically (the loader's warm-up not exercising the same path as the first real frame; the worker thread parked; lazy initialisation in tract on first run; debug vs release) and warm it up properly on the loader thread before reporting Running.
  2. One late frame must not end DeepFilterNet: when a frame is not back in time, that frame goes out through the stand-in (RNNoise or unprocessed, whichever keeps the audio continuous and in order — no backlog, no reordering, no doubled latency), the late result is discarded, and DeepFilterNet continues. Give up only on sustained slowness (average over the window above the real-time budget) or on N consecutive late frames; say which N and why. The capture thread must never block longer than its real-time budget waiting for a frame (250 ms of blocked capture is itself an audible gap: check what the user hears today during that wait and fix it).
  3. Tests: a scripted slow worker (first frame late; one late frame mid-stream; sustained slowness; a worker that never answers) with the expected outcome for each, including that audio keeps flowing in order; deep_filter_check_passes and --check-noise-suppression must not depend on the timing of a single frame.
  4. Then remove or keep the xtask package three-attempts workaround, and say which and why.
Seen twice on the Windows runners on 2026-11-18, each time on the **first** frame after DeepFilterNet reported it was running: - release run 382, packaged `flaxative.exe --check-noise-suppression`: "DeepFilterNet could not start: this computer takes 250 ms to clean each 10 ms of sound, too slow to keep up" (worked around in `xtask package`: three attempts, then a warning); - CI run 387, test `audio_rt::tests::deep_filter_check_passes`: "DeepFilterNet stopped after 0 frames: this computer takes 250 ms to clean each 10 ms of sound, too slow to keep up" — this failed the Windows job and blocked the nightly. The same builds passed on other runs, and Linux measures 0.09 ms per frame, so the machine is not too slow on average. **The defect (crates/fluxer-audio/src/denoise.rs, `Remote::process`).** A single frame that takes longer than `FRAME_TIMEOUT` (250 ms) ends DeepFilterNet for the rest of the session (fallback to RNNoise, "could not start" in settings). On a user's machine one scheduling hiccup, a page-in of the model's weights on the first frames, or the worker thread not yet being warm does that. The rule that should end it is sustained slowness (the existing average over `SPEED_WINDOW`), not one late frame. **Wanted.** 1. Find why the first frame is slow on Windows specifically (the loader's warm-up not exercising the same path as the first real frame; the worker thread parked; lazy initialisation in tract on first `run`; debug vs release) and warm it up properly on the loader thread before reporting `Running`. 2. One late frame must not end DeepFilterNet: when a frame is not back in time, that frame goes out through the stand-in (RNNoise or unprocessed, whichever keeps the audio continuous and in order — no backlog, no reordering, no doubled latency), the late result is discarded, and DeepFilterNet continues. Give up only on sustained slowness (average over the window above the real-time budget) or on N consecutive late frames; say which N and why. The capture thread must never block longer than its real-time budget waiting for a frame (250 ms of blocked capture is itself an audible gap: check what the user hears today during that wait and fix it). 3. Tests: a scripted slow worker (first frame late; one late frame mid-stream; sustained slowness; a worker that never answers) with the expected outcome for each, including that audio keeps flowing in order; `deep_filter_check_passes` and `--check-noise-suppression` must not depend on the timing of a single frame. 4. Then remove or keep the `xtask package` three-attempts workaround, and say which and why.
Author
Owner

In nightly 2026.1118.390 (PRs #912 and #914). The Windows CI job passed on the deterministic tests and on the DeepFilterNet start-up check; a real call on a Windows PC has not been tried.

In nightly 2026.1118.390 (PRs #912 and #914). The Windows CI job passed on the deterministic tests and on the DeepFilterNet start-up check; a real call on a Windows PC has not been tried.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#910
No description provided.