w-okada / voice-changer

リアルタイムボイスチェンジャー Realtime Voice Changer
Other
16.65k stars 1.81k forks source link

CUDA error: invalid device ordinal CUDA kernel errors might be asynchronously reported at some other API call #258

Closed c8763876387 closed 1 year ago

c8763876387 commented 1 year ago

Hi, I think I've encounter this error after starting the server control.

Invalid device id VC PROCESSING!!!! EXCEPTION!!! CUDA error: invalid device ordinal CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Traceback (most recent call last): File "voice_changer\VoiceChanger.py", line 431, in on_request_sola File "voice_changer\RVC\RVC.py", line 339, in inference File "voice_changer\RVC\pipeline\Pipeline.py", line 133, in exec File "voice_changer\RVC\pipeline\Pipeline.py", line 126, in exec File "voice_changer\RVC\embedder\FairseqHubert.py", line 27, in extractFeatures RuntimeError: CUDA error: invalid device ordinal CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

is this something wrong with my GPU setting? But i don't know where to change it... And as the setting in the VC client, "Converter Setting" - "GPU" I can't change any of the numbers (not allowing me to change). I don't know if they're related with my problem and how to fix them.

Thank you:)

w-okada commented 1 year ago

what is your GPU?

c8763876387 commented 1 year ago

GTX 1060 6GB I don't know if it's qualified for this or not:(

w-okada commented 1 year ago

GPU is detected by app? find the message like this.

VoiceChanger Initialized (GPU_NUM:1, mps_enabled:False) if GPU_NUM is zero, not detected.

wzh7 commented 1 year ago

i get the same problem in windows 11 on rtx2060super, i get such a message VoiceChanger Initialized (GPU_NUM:1, mps_enabled:False)

oivio commented 1 year ago

I did use RVC my specs are: GTX4080 and Win10

Similar error popup to me after using RVC for about 1-2hours

VC PROCESSING!!!! EXCEPTION!!! CUDA error: unspecified launch failure
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Traceback (most recent call last):
  File "voice_changer\VoiceChanger.py", line 473, in on_request_sola
  File "voice_changer\RVC\RVC.py", line 342, in inference
  File "voice_changer\RVC\pipeline\Pipeline.py", line 94, in exec
RuntimeError: CUDA error: unspecified launch failure
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
HidekoHaruna commented 1 year ago

I have a similar error popping up when I'm trying to change the model:

Traceback (most recent call last):
  File "voice_changer\RVC\pipeline\PipelineGenerator.py", line 28, in createPipeline
  File "voice_changer\RVC\embedder\EmbedderManager.py", line 28, in getEmbedder
  File "voice_changer\RVC\embedder\EmbedderManager.py", line 45, in loadEmbedder
  File "voice_changer\RVC\embedder\FairseqHubert.py", line 19, in loadModel
  File "torch\nn\modules\module.py", line 1145, in to
    return self._apply(convert)
  File "torch\nn\modules\module.py", line 797, in _apply
    module._apply(fn)
  File "torch\nn\modules\module.py", line 797, in _apply
    module._apply(fn)
  File "torch\nn\modules\module.py", line 797, in _apply
    module._apply(fn)
  [Previous line repeated 1 more time]
  File "torch\nn\modules\module.py", line 820, in _apply
    param_applied = fn(param)
  File "torch\nn\modules\module.py", line 1143, in convert
    return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
RuntimeError: CUDA error: invalid device ordinal
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
w-okada commented 1 year ago

RuntimeError: CUDA error: invalid device ordinal

This error generally occurs when GPU ID designation fails. Try changing the GPU to -1 or 0 - it may improve the situation.

w-okada commented 1 year ago

no res close

Mornnn commented 1 year ago

I encountered the same problem, but how to check the GPU ID

RuntimeError: CUDA error: invalid device ordinal CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. WARNING:torch.distributed.elastic.multiprocessing.api:Sending process 7413 closing signal SIGTERM ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 1 (pid: 7414) of binary: /home/yy/anaconda3/envs/clip/bin/python

Bathazer commented 1 year ago

same problem errors: RuntimeError: CUDA error: out of memory CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

GTX 3060 - 6Gb

helppppp