Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[ISSUE]: OSError: libtorch_cuda.so: cannot open shared object file #1322

Open
1 of 6 tasks
kerriganx opened this issue Aug 18, 2024 · 5 comments
Open
1 of 6 tasks

[ISSUE]: OSError: libtorch_cuda.so: cannot open shared object file #1322

kerriganx opened this issue Aug 18, 2024 · 5 comments

Comments

@kerriganx
Copy link

Voice Changer Version

directly cloned from git

Operational System

Arch Linux

GPU

AMD Radeon RX 6900 XT

Read carefully and check the options

  • I've tried to Clear Settings
  • Sample/Default Models are working
  • I've tried to change the Chunk Size
  • GUI was successfully launched
  • I've read the tutorial
  • I've tried to extract to another folder (or re-extract) the .zip file

Model Type

MMVC

Issue Description

I followed the installation guide for AMD Linux and upon startup I get an error message saying libtorch_cuda.so: cannot open shared object file: No such file or directory

I also read this topic and tried different torch rocm versions with no sucess. The only thing that helps is to install torch without rocm support, but then there is no gpu acceleration.

Application Screenshot

No response

Logs on console

    Booting PHASE :__main__
    PYTHON:3.10.14 (main, Aug 18 2024, 03:43:04) [GCC 14.2.1 20240805]
    Activating the Voice Changer.
[Voice Changer] download sample catalog. samples_0004_t.json
[Voice Changer] download sample catalog. samples_0004_o.json
[Voice Changer] download sample catalog. samples_0004_d.json
[Voice Changer] model_dir is already exists. skip download samples.
    Internal_Port:18888
    protocol: HTTP
    -- ---- -- 
    Please open the following URL in your browser.
    http://<IP>:<PORT>/
    In many cases, it will launch when you access any of the following URLs.
    http://localhost:18888/
    Booting PHASE :__mp_main__
    The server process is starting up.
    Booting PHASE :MMVCServerSIO
[Voice Changer] VoiceChangerManager initializing...
[Voice Changer] model slot is changed -1 -> 11
................RVC
Process SpawnProcess-1:1:
Traceback (most recent call last):
  File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/user/Downloads/voicechanger/myenv/lib/python3.10/site-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
    target(sockets=sockets)
  File "/home/user/Downloads/voicechanger/myenv/lib/python3.10/site-packages/uvicorn/server.py", line 59, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/user/Downloads/voicechanger/myenv/lib/python3.10/site-packages/uvicorn/server.py", line 66, in serve
    config.load()
  File "/home/user/Downloads/voicechanger/myenv/lib/python3.10/site-packages/uvicorn/config.py", line 471, in load
    self.loaded_app = import_from_string(self.app)
  File "/home/user/Downloads/voicechanger/myenv/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
    module = importlib.import_module(module_str)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/user/Downloads/voicechanger/voice-changer/server/MMVCServerSIO.py", line 142, in <module>
    voiceChangerManager = VoiceChangerManager.get_instance(voiceChangerParams)
  File "/home/user/Downloads/voicechanger/voice-changer/server/voice_changer/VoiceChangerManager.py", line 131, in get_instance
    cls._instance = cls(params)
  File "/home/user/Downloads/voicechanger/voice-changer/server/voice_changer/VoiceChangerManager.py", line 94, in __init__
    self.update_settings("modelSlotIndex", self.stored_setting["modelSlotIndex"])
  File "/home/user/Downloads/voicechanger/voice-changer/server/voice_changer/VoiceChangerManager.py", line 348, in update_settings
    self.generateVoiceChanger(newVal)
  File "/home/user/Downloads/voicechanger/voice-changer/server/voice_changer/VoiceChangerManager.py", line 256, in generateVoiceChanger
    from voice_changer.RVC.RVCr2 import RVCr2
  File "/home/user/Downloads/voicechanger/voice-changer/server/voice_changer/RVC/RVCr2.py", line 21, in <module>
    from voice_changer.RVC.pitchExtractor.PitchExtractorManager import PitchExtractorManager
  File "/home/user/Downloads/voicechanger/voice-changer/server/voice_changer/RVC/pitchExtractor/PitchExtractorManager.py", line 11, in <module>
    from voice_changer.RVC.pitchExtractor.FcpePitchExtractor import FcpePitchExtractor
  File "/home/user/Downloads/voicechanger/voice-changer/server/voice_changer/RVC/pitchExtractor/FcpePitchExtractor.py", line 5, in <module>
    import torchfcpe
  File "/home/user/Downloads/voicechanger/myenv/lib/python3.10/site-packages/torchfcpe/__init__.py", line 1, in <module>
    from .tools import (
  File "/home/user/Downloads/voicechanger/myenv/lib/python3.10/site-packages/torchfcpe/tools.py", line 2, in <module>
    from .mel_extractor import Wav2Mel
  File "/home/user/Downloads/voicechanger/myenv/lib/python3.10/site-packages/torchfcpe/mel_extractor.py", line 5, in <module>
    from torchaudio.transforms import Resample
  File "/home/user/Downloads/voicechanger/myenv/lib/python3.10/site-packages/torchaudio/__init__.py", line 1, in <module>
    from torchaudio import (  # noqa: F401
  File "/home/user/Downloads/voicechanger/myenv/lib/python3.10/site-packages/torchaudio/_extension/__init__.py", line 43, in <module>
    _load_lib("libtorchaudio")
  File "/home/user/Downloads/voicechanger/myenv/lib/python3.10/site-packages/torchaudio/_extension/utils.py", line 61, in _load_lib
    torch.ops.load_library(path)
  File "/home/user/Downloads/voicechanger/myenv/lib/python3.10/site-packages/torch/_ops.py", line 643, in load_library
    ctypes.CDLL(path)
  File "/usr/lib/python3.10/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libtorch_cuda.so: cannot open shared object file: No such file or directory
@ethmth
Copy link

ethmth commented Sep 5, 2024

Same issue here, tried multiple torch versions.

@Kuuko-fokkusugaru
Copy link

Kuuko-fokkusugaru commented Sep 5, 2024

For AMD users, download the ML or standard version instead of the CUDA one.
https://huggingface.co/wok000/vcclient000/tree/main

@kerriganx
Copy link
Author

For AMD users, download the ML or standard version instead of the CUDA one. https://huggingface.co/wok000/vcclient000/tree/main

I see Windows and Mac versions here, but no Linux

@Kuuko-fokkusugaru
Copy link

For AMD users, download the ML or standard version instead of the CUDA one. https://huggingface.co/wok000/vcclient000/tree/main

I see Windows and Mac versions here, but no Linux

Oh, sorry, I failed to see that the operating system was Linux.

@M3t4ll1k0
Copy link

same problem here, linux users are a bit left behind in this project have same problem as OP and followed same instructions

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants