Two things that stop pip install deepfilternet from being enough to export a model on Windows. Neither is a code bug on main, so I have not sent patches — they are a release and a docs question respectively. Both are easy to work around once you know, which is really why I am writing them down.
Context: I wanted to convert the published DeepFilterNet3 checkpoint to ONNX myself rather than depend on a repackaged model of unknown origin, and I wanted it to be one command for anyone. Everything below is Windows 10, Python 3.11, torch 2.1.2, deepfilternet==0.5.6 from PyPI.
1. The PyPI wheel cannot export; main can
df.scripts.export scripts the encoder and the ERB decoder with torch.jit.script before exporting them. With the 0.5.6 wheel that fails:
RuntimeError: Unsupported value kind: Tensor
right after Exporting model 'enc'.
The same operation against this repo at d375b2d — same interpreter, same torch, same checkpoint — succeeds. So the model definition on main is scriptable and 0.5.6's is not; it looks simply stale, and there are many commits since that release.
A new release would fix this for anyone installing from PyPI. The workaround meanwhile is to force jit=False, which produces graphs that differ byte-wise from a jit=True export but behave identically — I compared the denoised output of both over a 60 s file and it was sample-for-sample identical.
2. torchaudio has no WAV backend on Windows unless soundfile is installed
df.io.load_audio raises:
RuntimeError: Couldn't find appropriate backend to handle uri
...\clean_freesound_33711.wav and format None.
soundfile is declared as an extra (deepfilternet[soundfile]), but on Windows torchaudio has no built-in fallback, so without it any audio load fails — including get_test_sample(), which the exporter calls before it exports anything. pip install deepfilternet alone therefore cannot enhance or export a file on Windows.
I do not know whether you would rather make soundfile a hard dependency there or just mention it in the README; either would have saved me a while. It is easy to misdiagnose, because the failure surfaces from the check step and reads like an export problem.
Not blocking, just noting
Three separate Windows/first-run bugs are in #702, and the tract/ndarray version split that stops cargo build --features tract compiling is in #703.
Once past all of it the tract runner works very well — our own export streams frame-at-a-time at roughly 45× realtime and removes more background chatter than the prebuilt model we had been using. Thanks for the work.
Two things that stop
pip install deepfilternetfrom being enough to export a model on Windows. Neither is a code bug onmain, so I have not sent patches — they are a release and a docs question respectively. Both are easy to work around once you know, which is really why I am writing them down.Context: I wanted to convert the published DeepFilterNet3 checkpoint to ONNX myself rather than depend on a repackaged model of unknown origin, and I wanted it to be one command for anyone. Everything below is Windows 10, Python 3.11, torch 2.1.2,
deepfilternet==0.5.6from PyPI.1. The PyPI wheel cannot export;
maincandf.scripts.exportscripts the encoder and the ERB decoder withtorch.jit.scriptbefore exporting them. With the 0.5.6 wheel that fails:right after
Exporting model 'enc'.The same operation against this repo at
d375b2d— same interpreter, same torch, same checkpoint — succeeds. So the model definition onmainis scriptable and 0.5.6's is not; it looks simply stale, and there are many commits since that release.A new release would fix this for anyone installing from PyPI. The workaround meanwhile is to force
jit=False, which produces graphs that differ byte-wise from ajit=Trueexport but behave identically — I compared the denoised output of both over a 60 s file and it was sample-for-sample identical.2.
torchaudiohas no WAV backend on Windows unlesssoundfileis installeddf.io.load_audioraises:soundfileis declared as an extra (deepfilternet[soundfile]), but on Windows torchaudio has no built-in fallback, so without it any audio load fails — includingget_test_sample(), which the exporter calls before it exports anything.pip install deepfilternetalone therefore cannot enhance or export a file on Windows.I do not know whether you would rather make
soundfilea hard dependency there or just mention it in the README; either would have saved me a while. It is easy to misdiagnose, because the failure surfaces from the check step and reads like an export problem.Not blocking, just noting
Three separate Windows/first-run bugs are in #702, and the
tract/ndarrayversion split that stopscargo build --features tractcompiling is in #703.Once past all of it the tract runner works very well — our own export streams frame-at-a-time at roughly 45× realtime and removes more background chatter than the prebuilt model we had been using. Thanks for the work.