Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[ISSUE]: CUDA failure 700: an illegal memory access was encountered or CUDA error: invalid argument #1451

Open
6 tasks done
Mtsumame opened this issue Feb 5, 2025 · 9 comments

Comments

@Mtsumame
Copy link

Mtsumame commented Feb 5, 2025

Voice Changer Version

MMVCServerSIO_win_onnxgpu-cuda_v.1.5.3.18a.zip

Operational System

Windows 10

GPU

NVIDIA GeForce RTX 4080

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

RVC

Issue Description

English translation is below Japanese.

お世話になっております。
私はRVCを使用してVtuberとして配信をするのにvc clientを使っています。

配信を続けてしばらくすると「CUDA failure 700: an illegal memory access was encountered」 または 「CUDA error: invalid argument」のエラーが発生し音声が聞こえなくなります。

パススルーモードに変更すると問題なく変換前の音声が聞こえます。

このエラーが出るときの特徴を以下に記載します。
・一時期はずっと発生していなかった。(配信を行って約150時間の間はこのエラーが発生しなかった。)
・一度発生すると再発しやすい。(一度発生するとVCClientを再起動しても1時間ほどで発生する。短い時は数分で同様の症状が起こる。PCを再起動すると発生する確率が下がるように感じる)
・負荷をかけると発生しやすい。(配信していないときでもゲームと同時に動作させているときにエラーが発生した)

対応としてVCClientの再インストール、CUDAとpytorchのアップデートを行いました。(しかしCUDAとpytorchのアップデートを適切に行うことができたかどうか、私にはわかりませんでした。)
この対応の結果、一時的に発生が収まりましたが再発してしまいました。

追加の情報が必要であればお教えください。
どうぞよろしくお願いいたします。

English
Thank you for all your help.
I am using vc client to live streaming as a vtuber using RVC.

After a while when I continue to live streaming using VCClient, I get a “CUDA failure 700: an illegal memory access was encountered” or “CUDA error: invalid argument” error and I cannot hear the audio.

If I change to pass-through mode, I can hear the audio before conversion without any problem.

The characteristics of when this error occurs are described below.
・It did not occur all the time for a period of time. (I did not get this error for about 150 hours of my live feed.)
・Once it occurs, it tends to recur. (Once it occurs, it occurs after an hour or so even after restarting VCClient. At shorter times, the same symptoms occur within a few minutes. The probability of the error occurring seems to decrease when the PC is restarted.)
・The error tends to occur under load. (The error occurred when the game and VCClient were running at the same time, even when the game was not being distributed.)

In response to the error, I re-installed VCClient and updated CUDA and pytorch. (I did not know if I had properly updated CUDA and pytorch, however.)
The outbreak temporarily stopped, but it came back.

Please let me know if you need any additional information.
I would be happy to provide you with any solutions or to modify the program.

Application Screenshot

添付は配信時のタスクマネージャーの画面です。この時点ではエラーは発生していませんが、この条件下でエラーが発生することがあります。

I have attached the task manager screen at the time of delivery. At the time of the attached image, no errors are occurring, but errors can occur under this condition.

Image

Logs on console

以下はつくよみちゃんで同様のエラーを再現したときのログです。繰り返しの部分は削除しております。また、音声が聞こえなくなる際のエラーは2種類ありますので2種類のログを記載しております。

Below is a log of a similar error reproduced using model of "Tsukuyomi-chan". Repeated parts have been deleted. In addition, there are two types of errors that occur when audio is not heard, so I have included two types of logs.

F:\VCClient\Cuda\MMVCServerSIO>MMVCServerSIO.exe -p 18888 --https false --content_vec_500 pretrain/checkpoint_best_legacy_500.pt --content_vec_500_onnx pretrain/content_vec_500.onnx --content_vec_500_onnx_on true --hubert_base pretrain/hubert_base.pt --hubert_base_jp pretrain/rinna_hubert_base_jp.pt --hubert_soft pretrain/hubert/hubert-soft-0d54a1f4.pt --nsf_hifigan pretrain/nsf_hifigan/model --crepe_onnx_full pretrain/crepe_onnx_full.onnx --crepe_onnx_tiny pretrain/crepe_onnx_tiny.onnx --rmvpe pretrain/rmvpe.pt --model_dir model_dir --samples samples.json
Booting PHASE :main
PYTHON:3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
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://:/
In many cases, it will launch when you access any of the following URLs.
http://127.0.0.1:18888/

[VCClient] Access http://127.0.0.1:18888/
[VCClient] wait web server...0 http://127.0.0.1:18888/
Booting PHASE :main
Booting PHASE :MMVCServerSIO
[Voice Changer] VoiceChangerManager initializing...
[Voice Changer] model slot is changed -1 -> 0
................RVC
[Voice Changer] [RVCr2] Creating instance
VoiceChangerV2 Initialized (GPU_NUM(cuda):1, mps_enabled:False, onnx_device:GPU)
[Voice Changer][RVC]: update_settings gpu:0
[Voice Changer][RVCr2] Initializing...
2025-02-02 21:30:43.1140570 [W:onnxruntime:, session_state.cc:1030 onnxruntime::VerifyEachNodeIsAssignedToAnEp] Some nodes were not assigned to the preferred execution providers which may or may not have an negative impact on performance. e.g. ORT explicitly assigns shape related ops to CPU to improve perf.
2025-02-02 21:30:43.1184447 [W:onnxruntime:, session_state.cc:1032 onnxruntime::VerifyEachNodeIsAssignedToAnEp] Rerunning with verbose output on a non-minimal build will show node assignments.
[Voice Changer] generate new embedder. (no embedder)
2025-02-02 21:30:43.4781076 [W:onnxruntime:, session_state.cc:1030 onnxruntime::VerifyEachNodeIsAssignedToAnEp] Some nodes were not assigned to the preferred execution providers which may or may not have an negative impact on performance. e.g. ORT explicitly assigns shape related ops to CPU to improve perf.
2025-02-02 21:30:43.4823095 [W:onnxruntime:, session_state.cc:1032 onnxruntime::VerifyEachNodeIsAssignedToAnEp] Rerunning with verbose output on a non-minimal build will show node assignments.
[Voice Changer] Loading index...
[Voice Changer] Index file is not found
GENERATE INFERENCER<voice_changer.RVC.inferencer.OnnxRVCInferencer.OnnxRVCInferencer object at 0x0000014DC2FBBCD0>
GENERATE EMBEDDER<voice_changer.RVC.embedder.OnnxContentvec.OnnxContentvec object at 0x0000014DC305D480>
GENERATE PITCH EXTRACTOR<voice_changer.RVC.pitchExtractor.RMVPEOnnxPitchExtractor.RMVPEOnnxPitchExtractor object at 0x0000014DC305D4E0>
[Voice Changer] [RVC] Initializing... done
[Voice Changer][RVC]: update_settings enableServerAudio:1
[Voice Changer][RVC]: update_settings serverAudioSampleRate:48000
[Voice Changer][RVC]: update_settings serverInputDeviceId:66
[Voice Changer][RVC]: update_settings serverOutputDeviceId:59
[Voice Changer][RVC]: update_settings serverMonitorDeviceId:32
[Voice Changer][RVC]: update_settings extraConvertSize:131072
[Voice Changer][RVC]: update_settings f0Detector:crepe_full
[Voice Changer][RVC]: update_settings silentThreshold:0.0003
[Voice Changer][RVC]: update_settings serverReadChunkSize:192
[Voice Changer][RVC]: update_settings serverOutputAudioGain:3.1
[Voice Changer][RVC]: update_settings modelSlotIndex:1738499026000
[Voice Changer] VoiceChangerManager initializing... done.
[Voice Changer] MMVC_Rest initializing...
[Voice Changer] MMVC_Rest initializing... done.
[Voice Changer] MMVC_SocketIOApp initializing...
[Voice Changer] MMVC_SocketIOApp initializing... done.
[VCClient] wait web server... done 200
[INFO] [DSH] voice-changer-native-client.exe
[INFO] [DSH] Creating WndMsg Listener Window
[INFO] [DSH] Get number of capabilities
[INFO] [DSH] Get stream caps: 0
[INFO] [DSH] Get stream caps: 1
[INFO] [DSH] Get stream caps: 2
[INFO] [DSH] Get stream caps: 3
[INFO] [DSH] Get stream caps: 4
[INFO] [DSH] Get stream caps: 5
[INFO] [DSH] Get stream caps: 6
[INFO] [DSH] Get stream caps: 7
[INFO] [DSH] Get stream caps: 8
[INFO] [DSH] Get stream caps: 9
[INFO] [DSH] Get stream caps: 10
[INFO] [DSH] Get stream caps: 11
[INFO] [DSH] Get stream caps: 12
[INFO] [DSH] Get stream caps: 13
[INFO] [DSH] Get stream caps: 14
[INFO] [DSH] Get stream caps: 15
[INFO] [DSH] Get stream caps: 16
[INFO] [DSH] Get stream caps: 17
[INFO] [DSH] Get stream caps: 18
[INFO] [DSH] Get stream caps: 19
[INFO] [DSH] Get stream caps: 20
[INFO] [DSH] Get stream caps: 21
[INFO] [DSH] Get stream caps: 22
[INFO] [DSH] Get stream caps: 23
[INFO] [DSH] Get stream caps: 24
[INFO] [DSH] Get stream caps: 25
[INFO] [DSH] Get stream caps: 26
[INFO] [DSH] Get stream caps: 27
[INFO] [DSH] Get stream caps: 28
[INFO] [DSH] Get stream caps: 29
[INFO] [DSH] Get stream caps: 30
[INFO] [DSH] Get stream caps: 31
[INFO] [DSH] Get stream caps: 32
[INFO] [DSH] Destroying parent object
[INFO] [DSH] Destroying WndMsg Listener Window
[INFO] [DSH] Destroyed window
[INFO] [DSH] Unregistered window class
[2025-02-02 21:30:46] connet sid : PughUQuc4gl8ds2VAAAC
[2025-02-02 21:30:46] connet sid : PxlChMzn1P-VT_EkAAAD
[Voice Changer] update configuration: serverAudioStated 1
[Voice Changer][RVC]: update_settings serverAudioStated:1
Devices:
[Input]: ServerAudioDevice(kind='audioinput', index=66, name='マイク (NVIDIA Broadcast)', hostAPI='Windows WASAPI', maxInputChannels=2, maxOutputChannels=0, default_samplerate=48000.0, available_samplerates=[]) None
[Output]: ServerAudioDevice(kind='audiooutput', index=59, name='CABLE Input (VB-Audio Virtual Cable)', hostAPI='Windows WASAPI', maxInputChannels=0, maxOutputChannels=2, default_samplerate=48000.0, available_samplerates=[]) None
[Monitor]: ServerAudioDevice(kind='audiooutput', index=32, name='スピーカー (GSX 1000 Main Audio)', hostAPI='Windows DirectSound', maxInputChannels=0, maxOutputChannels=2, default_samplerate=44100.0, available_samplerates=[]) None
Sample Rate:
[Model]: 40000
[Input]: 48000 -> True
[Output]: 48000 -> True
[Monitor]: 48000 -> True
Generated Strengths: for prev:(4096,), for cur:(4096,)
[Voice Changer] server audio performance []
status: started:1, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] warming up... generating sola buffer.
[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2

******************[... similar connection attempts repeated many times ...] *****************************

[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
2025-02-02 21:40:08.2047006 [E:onnxruntime:Default, cuda_call.cc:119 onnxruntime::CudaCall] CUDA failure 700: an illegal memory access was encountered ; GPU=0 ; hostname=DESKTOP-KH8IBQS ; expr=cudaMemcpyAsync(dst_data, src_data, bytes, cudaMemcpyDeviceToHost, GetStream(kCudaStreamDefault));
2025-02-02 21:40:08.2347745 [E:onnxruntime:Default, cuda_call.cc:119 onnxruntime::CudaCall] CUDA failure 700: an illegal memory access was encountered ; GPU=0 ; hostname=DESKTOP-KH8IBQS ; expr=cudaStreamSynchronize(static_cast<cudaStream_t>(GetComputeStream()));
[Voice Changer] VC PROCESSING EXCEPTION!!! [ONNXRuntimeError] : 1 : FAIL : CUDA failure 700: an illegal memory access was encountered ; GPU=0 ; hostname=DESKTOP-KH8IBQS ; expr=cudaMemcpyAsync(dst_data, src_data, bytes, cudaMemcpyDeviceToHost, GetStream(kCudaStreamDefault));
[ONNXRuntimeError] : 1 : FAIL : CUDA failure 700: an illegal memory access was encountered ; GPU=0 ; hostname=DESKTOP-KH8IBQS ; expr=cudaMemcpyAsync(dst_data, src_data, bytes, cudaMemcpyDeviceToHost, GetStream(kCudaStreamDefault));
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 228, in inference
File "voice_changer\RVC\pipeline\Pipeline.py", line 179, in exec
File "voice_changer\RVC\pipeline\Pipeline.py", line 80, in extractPitch
File "voice_changer\RVC\pitchExtractor\CrepeOnnxPitchExtractor.py", line 38, in extract
File "voice_changer\RVC\pitchExtractor\onnxcrepe\core.py", line 87, in predict
File "voice_changer\RVC\pitchExtractor\onnxcrepe\core.py", line 191, in infer
File "onnxruntime\capi\onnxruntime_inference_collection.py", line 200, in run
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : CUDA failure 700: an illegal memory access was encountered ; GPU=0 ; hostname=DESKTOP-KH8IBQS ; expr=cudaMemcpyAsync(dst_data, src_data, bytes, cudaMemcpyDeviceToHost, GetStream(kCudaStreamDefault));
[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: an illegal memory access was encountered
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.

CUDA error: an illegal memory access was encountered
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: an illegal memory access was encountered
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.

[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: an illegal memory access was encountered
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.

CUDA error: an illegal memory access was encountered
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: an illegal memory access was encountered
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.

[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: an illegal memory access was encountered
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.

CUDA error: an illegal memory access was encountered
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: an illegal memory access was encountered
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.

[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: an illegal memory access was encountered
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.

CUDA error: an illegal memory access was encountered
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: an illegal memory access was encountered
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.

[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: an illegal memory access was encountered
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.

CUDA error: an illegal memory access was encountered
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: an illegal memory access was encountered
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.

[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: an illegal memory access was encountered
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.

CUDA error: an illegal memory access was encountered
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: an illegal memory access was encountered
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.

[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: an illegal memory access was encountered
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.

CUDA error: an illegal memory access was encountered
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: an illegal memory access was encountered
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.

[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: an illegal memory access was encountered
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.

CUDA error: an illegal memory access was encountered
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: an illegal memory access was encountered
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.

[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: an illegal memory access was encountered
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.

CUDA error: an illegal memory access was encountered
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: an illegal memory access was encountered
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.

[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: an illegal memory access was encountered
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.

CUDA error: an illegal memory access was encountered
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: an illegal memory access was encountered
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.

[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: an illegal memory access was encountered
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.

CUDA error: an illegal memory access was encountered
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: an illegal memory access was encountered
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.

[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: an illegal memory access was encountered
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.

CUDA error: an illegal memory access was encountered
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: an illegal memory access was encountered
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.

[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: an illegal memory access was encountered
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.

CUDA error: an illegal memory access was encountered
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: an illegal memory access was encountered
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.

[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: an illegal memory access was encountered
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.

CUDA error: an illegal memory access was encountered
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: an illegal memory access was encountered
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.

[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: an illegal memory access was encountered
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.

CUDA error: an illegal memory access was encountered
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: an illegal memory access was encountered
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.

[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] update configuration: serverAudioStated 0
[Voice Changer][RVC]: update_settings serverAudioStated:0
[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:0, model_sr:40000, chunk:192
input : id:66, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
serverAudioStarted Changed: 0

******************[... Or the following error occurs ...] *****************************

[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:65, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:65, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: invalid argument
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.

CUDA error: invalid argument
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 228, in inference
File "voice_changer\RVC\pipeline\Pipeline.py", line 257, in exec
RuntimeError: CUDA error: invalid argument
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.

[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: invalid argument
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.

CUDA error: invalid argument
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: invalid argument
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.

[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: invalid argument
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.

CUDA error: invalid argument
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: invalid argument
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.

[Voice Changer] server audio performance [0, 0, 0, 0]
status: started:1, model_sr:40000, chunk:192
input : id:65, sr:48000, ch:2
output : id:59, sr:48000, ch:2
monitor: id:32, sr:48000, ch:2
[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: invalid argument
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.

CUDA error: invalid argument
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: invalid argument
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.

[Voice Changer] VC PROCESSING EXCEPTION!!! CUDA error: invalid argument
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.

CUDA error: invalid argument
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.
Traceback (most recent call last):
File "voice_changer\VoiceChangerV2.py", line 239, in on_request
File "voice_changer\RVC\RVCr2.py", line 216, in inference
RuntimeError: CUDA error: invalid argument
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.

@Kuuko-fokkusugaru
Copy link

Kuuko-fokkusugaru commented Feb 5, 2025

RVC does not need CUDA or Pytorch installed. Only the nvidia drivers are required. Try uninstalling CUDA and Pytorch and leave only the nvidia drivers installed.

It could be also tied to the version of the drivers. Did this happen before with older versions of the drivers? Which version are you using? You can try to do a clean installation of the nvidia drivers or rolling back to an older version.

Alternatively, you can also try RVC v2 and see if the same issue happens.

https://huggingface.co/wok000/vcclient000/tree/main

@Mtsumame
Copy link
Author

Mtsumame commented Feb 5, 2025

Thank you very much for your prompt comments.
I will try to remove CUDA and Pytorch.
I am using the latest version of NVIDIA (566.36). I play a lot of newer games so I will not lower the version but will try to see if I get any errors in the environment with CUDA and Pytourch removed.
I will try this environment for a week and then comment again. Or when the error occurs I will comment.

I tried RVC v2, but the converted sound is choppy, so I use RVC v1.

Thank you.

@Mtsumame
Copy link
Author

Mtsumame commented Feb 6, 2025

Today I tried to stream live with CUDA and Pytorch removed, but after about an hour I got the error “CUDA error: an illegal memory access was encountered”. I live-streamed for 2.5 hours in total, and the error occurred only once.

A new version of NVIDIA driver has been released and I will try changing the version from 566.36 to 572.16.
If I still have problems with the new NVIDIA driver, I will downgrade to a version earlier than 566.36. (But I don't remember what version I was using previously so will downgrade to one or two versions earlier.)

If you have any other advice, please give me a comment.

@Kuuko-fokkusugaru
Copy link

Kuuko-fokkusugaru commented Feb 6, 2025

The drivers that gave me the best results in performance and stability are the 561.09 just in case that you want to try.
Does RVC always gives you the error regardless of the game that you are playing? Could it be that the game that you are playing lately could be causing the issue?
Does it happens even if you aren't playing any game?
I am just wondering if certain heavy games need to make an intensive usage of the GPU and somewhat crash RVC.
Let's see if we can hunt this down!

@Kuuko-fokkusugaru
Copy link

Another suggestion, if all of the above fails, is to do a clean install of the 561.09 drivers using DDU (Display Driver Uninstaller). It will help you to uninstall the drivers and remove any trace and file remained for a proper clean reinstall.

https://www.guru3d.com/download/display-driver-uninstaller-download/

If you have never used or heard about DDU, don't worry, it's a little utility used by professionals and enthusiasts to properly remove drivers. Just make sure to download the ones that you want to install first.

@Mtsumame
Copy link
Author

Mtsumame commented Feb 6, 2025

Thank you for offering solutions I hadn't thought of. Your expert insight was truly valuable.

The RVC crashes are not caused by any particular game. They also occur when the game is not being played. However, I feel that the incidence of RVC errors may be related to CPU and GPU usage.

I previously ran a high graphics 3D game and RVC at the same time to see if this crash was caused by intensive CPU or GPU use but the error did not occur for 30 minutes.
However, I may have been testing for too short a time, so I will try 3 different tests for 1-2 hours: launching RVC with a game with a high GPU load, launching RVC with a game with a low load, and launching RVC alone.
These tests will be done with the latest NVIDIA driver.

If the error occurs after that, try a clean install of the 561.09 drivers using DDU.

First, I will perform three tests to see if there is a relationship between errors and GPU utilization.
Thank you very much for your advice.

@Mtsumame
Copy link
Author

Mtsumame commented Feb 8, 2025

Thank you for your recent instruction on how to deal with the error.

I had the same error with the latest NVIDIA drivers, so I did a clean install of 561.09 drivers using DDU. However, I still get the same error. The error also occurred when running RVC alone.

Here is what I have newly found out about the error. The error is not because my computer is incompatible with the RVC, but because something is wrong with my computer and it may be incompatible with software that uses a lot of GPU.
Yesterday, I participated in the beta test of Monster Hunter Wilds and some error prevented me from continuing the game for more than 10 minutes. This game had a previous beta test and I was able to play the game without any problems at that time. This beta test is different from the last beta test in content but I do not think the changes caused the crash.

I have not yet done a study on GPU utilization and the frequency of RVC errors and will do so in this environment.

@Kuuko-fokkusugaru
Copy link

Maybe you should try to monitor the GPU temperature and see if it's rising too much.
Or maybe it could be some issue and incompatibility introduced by the recent Windows 11 update 24H2. Since Windows updated to 24H2, many users experienced all kinds of issues with different software, hardware, and even games. I am not aware of such issues with RVC though. I do not have 24H2 update yet, but my friend does and she can use RVC just fine. I guess the issue could be caused by many things... I wish @w-okada could give you some better insight into the possible causes because I am not a developer and he could help you directly in Japanese which may be more comfortable for you.

There is a Discord server for RVC where you may be able to find some help. The server is not so active, but maybe you are lucky and find a good answer. The server is mostly Japanese so it may be easier for you. This is the Discord server link: https://discord.gg/3k8N7xXH

@Mtsumame
Copy link
Author

Mtsumame commented Feb 9, 2025

Thank you very much for all your answers. Also, thank you for sharing the link to the RVC Discord server.
The GPU temperature is between 50 and 60 degrees Celsius, so I don't think there is any problem. The Windows version is Windows 10 22H2.

I will change some settings and try to run RVC. If the error no longer occurs, I will share what I did to stop the error from occurring.

Thanks a lot for all the advice.

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

No branches or pull requests

2 participants