w-okada / voice-changer

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

[ISSUE]: W-okada having high CPU usage with Index on. And noticeable delay on 4090. #995

Open levoy1 opened 8 months ago

levoy1 commented 8 months ago

Voice Changer Version

1.5.3..16a onnxgpu-cuda

Operational System

Windows 10

GPU

4090 RTX (Driver version 536.40)

Read carefully and check the options

Model Type

RVC

Issue Description

Hello! I'm new to W-Okada, and there is is something i need help with. The MMVCServerSIO/CMD window is using CPU ressources 30%-90% instead of my GPU. GPU is toogled on, and i tried F0 dets. from dio to rmvpe_onnx (which is my go to).

Edit: I tried the DirectML version also, even though it was recommended to AMD. Seems the CPU ressources were used by using INDEX.

So I'm still confused why using INDEX is having such a big impact on CPU? My GPU is almost not being used. I would gladly trade some GPU ressources for better input delay for example, since the delay was still high. Is is normal to have over 1 second delay with 64 Chunk size and 4090RTX? (Index off, high quality off, using server WASAPI).

Application Screenshot

Here are my settings:

settings settings2

Maybe someone can tell me what's wrong?

Logs on console

E:\Stable Diffusion\voicechange\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_0003_t2.json [Voice Changer] download sample catalog. samples_0003_o2.json [Voice Changer] download sample catalog. samples_0003_d2.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://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 -> 9 ................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... gin_channels: 256 self.spk_embed_dim: 109 [Voice Changer] generate new embedder. (no embedder) 2023-11-13 17:39:59.1024054 [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. 2023-11-13 17:39:59.1084450 [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... Try loading... model_dir\9\added_IVF591_Flat_nprobe_1_alloy2_v2.index GENERATE INFERENCER<voice_changer.RVC.inferencer.RVCInferencerv2.RVCInferencerv2 object at 0x000001BEE4D4B880> GENERATE EMBEDDER<voice_changer.RVC.embedder.OnnxContentvec.OnnxContentvec object at 0x000001BFC50E4640> GENERATE PITCH EXTRACTOR<voice_changer.RVC.pitchExtractor.RMVPEOnnxPitchExtractor.RMVPEOnnxPitchExtractor object at 0x000001BFC50E4670> [Voice Changer] [RVC] Initializing... done [Voice Changer][RVC]: update_settings serverReadChunkSize:64 [Voice Changer][RVC]: update_settings extraConvertSize:32768 [Voice Changer][RVC]: update_settings f0Detector:rmvpe_onnx [Voice Changer][RVC]: update_settings silentThreshold:0.0005 [Voice Changer][RVC]: update_settings enableServerAudio:1 [Voice Changer][RVC]: update_settings serverInputDeviceId:40 [Voice Changer][RVC]: update_settings serverOutputDeviceId:36 [Voice Changer][RVC]: update_settings serverMonitorDeviceId:36 [Voice Changer][RVC]: update_settings serverAudioSampleRate:48000 [Voice Changer][RVC]: update_settings modelSlotIndex:1699892416009

w-okada commented 8 months ago

Windows does not support accelerating index processing. The reason for this is that the necessary support has not been implemented on the library side, not within the app itself. Running the application on WSL (Windows Subsystem for Linux) will enable the acceleration features.

0RadicalLarry0 commented 8 months ago

I've heard the rvc voice changer doesn't have this issue. I don't know if this is even applicable, but I thought I'd say just in case.

exciar commented 7 months ago

Windows does not support accelerating index processing. The reason for this is that the necessary support has not been implemented on the library side, not within the app itself. Running the application on WSL (Windows Subsystem for Linux) will enable the acceleration features.

how to run on WSL?