CarlGao4 / Demucs-Gui

A GUI for music separation AI demucs
GNU General Public License v3.0
499 stars 37 forks source link

Bug: App freezes due to TypeError after loading model #28

Closed will2dye4 closed 10 months ago

will2dye4 commented 10 months ago

happen

  1. Launch the app.
  2. Select a model (I used htdemucs).
  3. Click Load.
  4. All controls in the app window are disabled, and the app does not respond to drag and drop events.

I see the following in ~/.config/demucs-gui/log right after loading the model:

Traceback (most recent call last):
  File "GuiMain.py", line 170, in showParamSettingsFunc
  File "GuiMain.py", line 382, in __init__
  File "separator.py", line 75, in getAvailableDevices
TypeError: unsupported operand type(s) for /: 'str' and 'int'

What is the platform you are using?

macOS

log

2023-10-19 14:17:29,993 (GuiMain.py) (Line 952) [INFO] : Python version: 3.11.5 (main, Sep 11 2023, 08:27:25) [Clang 14.0.6 ] 2023-10-19 14:17:29,994 (GuiMain.py) (Line 953) [INFO] : Demucs GUI version: 1.0a1 2023-10-19 14:17:30,018 (GuiMain.py) (Line 954) [INFO] : System: macOS-10.16-x86_64-i386-64bit 2023-10-19 14:17:30,030 (GuiMain.py) (Line 955) [INFO] : Architecture: 64bit 2023-10-19 14:17:30,031 (GuiMain.py) (Line 956) [INFO] : CPU: i386 2023-10-19 14:17:30,031 (GuiMain.py) (Line 957) [INFO] : CPU count: 10 2023-10-19 14:17:30,032 (GuiMain.py) (Line 958) [INFO] : System memory: 34359738368 (32.0GB) 2023-10-19 14:17:30,033 (GuiMain.py) (Line 961) [INFO] : System free memory: 613171200 (584.766MB) 2023-10-19 14:17:30,033 (GuiMain.py) (Line 964) [INFO] : System swap memory: 0 (0B) 2023-10-19 14:17:31,429 (audio.py) (Line 29) [INFO] : Soundfile version: 0.12.1 2023-10-19 14:17:31,430 (audio.py) (Line 30) [INFO] : libsndfile version: 1.1.0 2023-10-19 14:17:31,430 (audio.py) (Line 31) [INFO] : SoXR version: 0.3.7 2023-10-19 14:17:31,431 (audio.py) (Line 32) [INFO] : libsoxr version: 0.1.3-7-gacc0dac 2023-10-19 14:17:31,431 (separator.py) (Line 43) [INFO] : Demucs version: 4.1.0a2 2023-10-19 14:17:31,431 (separator.py) (Line 44) [INFO] : PyTorch version: 2.1.0 2023-10-19 14:17:32,700 (audio.py) (Line 40) [INFO] : ffmpeg -version output: ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers built with Apple clang version 14.0.0 (clang-1400.0.29.202) configuration: --prefix=/usr/local/Cellar/ffmpeg/6.0 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox libavutil 58. 2.100 / 58. 2.100 libavcodec 60. 3.100 / 60. 3.100 libavformat 60. 3.100 / 60. 3.100 libavdevice 60. 1.100 / 60. 1.100 libavfilter 9. 3.100 / 9. 3.100 libswscale 7. 1.100 / 7. 1.100 libswresample 4. 10.100 / 4. 10.100 libpostproc 57. 1.100 / 57. 1.100

2023-10-19 14:17:32,837 (audio.py) (Line 45) [INFO] : ffprobe -version output: ffprobe version 6.0 Copyright (c) 2007-2023 the FFmpeg developers built with Apple clang version 14.0.0 (clang-1400.0.29.202) configuration: --prefix=/usr/local/Cellar/ffmpeg/6.0 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox libavutil 58. 2.100 / 58. 2.100 libavcodec 60. 3.100 / 60. 3.100 libavformat 60. 3.100 / 60. 3.100 libavdevice 60. 1.100 / 60. 1.100 libavfilter 9. 3.100 / 9. 3.100 libswscale 7. 1.100 / 7. 1.100 libswresample 4. 10.100 / 4. 10.100 libpostproc 57. 1.100 / 57. 1.100

2023-10-19 14:17:42,377 (GuiMain.py) (Line 270) [INFO] : Loading model htdemucs from repo /Applications/Demucs-GUI.app/Contents/MacOS/pretrained 2023-10-19 14:17:42,901 (GuiMain.py) (Line 292) [INFO] : Model loaded within 0.5213s 2023-10-19 14:17:42,903 (GuiMain.py) (Line 293) [INFO] : Model: htdemucs Repo: /Applications/Demucs-GUI.app/Contents/MacOS/pretrained Type: Bag of models Audio channels: 2 Sample rate: 44100 Sources: drums, bass, other, vocals

Model 0: Type: HTDemucs Default segment: 7.8 Weight: [1.0, 1.0, 1.0, 1.0] Traceback (most recent call last): File "GuiMain.py", line 170, in showParamSettingsFunc File "GuiMain.py", line 382, in init File "separator.py", line 75, in getAvailableDevices TypeError: unsupported operand type(s) for /: 'str' and 'int'

will2dye4 commented 10 months ago

I guess maybe this was fixed by https://github.com/CarlGao4/Demucs-Gui/commit/c24b60cda7ffc1fb5e8461f9b48b384baa819bc0 but a new release hasn't been built yet?

CarlGao4 commented 10 months ago

You are right, but Intel Mac will not encounter any problem without the fix and I haven't built releases for Apple Silicon I'll make sure 1.0 can run

will2dye4 commented 10 months ago

Thanks. The version of the app published for macOS x64 seems to work (so far) on Apple Silicon, except for encountering the TypeError I described above. Are you planning to release a new version including commit https://github.com/CarlGao4/Demucs-Gui/commit/c24b60cda7ffc1fb5e8461f9b48b384baa819bc0 any time soon?

CarlGao4 commented 10 months ago

maybe before Nov