deiteris / voice-changer

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

[ISSUE]: [PipelineGenerator] name 'StandardGpuResources' is not defined #185

Closed asr-aditya closed 1 month ago

asr-aditya commented 1 month ago

Voice Changer Version

Using this commit from repo: 8b35e1d379276110778c7d2f67c8fdbc0d0deac6

Operational System

Ubuntu 22.04 EC2 Instance

GPU

Tesla T4

Read carefully and check the options

Model Type

RVC

Issue Description

Unable to use index. Getting error: [PipelineGenerator] name 'StandardGpuResources' is not defined

I checked the code, the bug has been acknowledged there BUG. Is there a workaround for this for now?

Application Screenshot

No response

Logs on console

2024-10-22 07:40:53,587 INFO     [RVCr2] Initialized.
2024-10-22 07:41:10,553 INFO     [VoiceChangerManager] update configuration modelSlotIndex: 4
2024-10-22 07:41:10,553 INFO     [VoiceChangerManager] Model slot is changed 0 -> 4
2024-10-22 07:41:10,554 INFO     [RVCr2] Allocated audio buffer size: 9792
2024-10-22 07:41:10,554 INFO     [RVCr2] Allocated convert buffer size: 90080
2024-10-22 07:41:10,554 INFO     [RVCr2] Allocated pitchf buffer size: 564
2024-10-22 07:41:10,554 INFO     [VoiceChangerV2] Allocated SOLA buffer size: 4800
2024-10-22 07:41:10,554 INFO     [RVCr2] Initializing...
2024-10-22 07:41:11,161 INFO     [RVCInferencerv2] Compiling JIT model...
2024-10-22 07:41:12,889 INFO     [EmbedderManager] Reusing embedder.
2024-10-22 07:41:12,890 INFO     [PitchExtractorManager] Reusing pitch extractor.
2024-10-22 07:41:12,890 INFO     [PipelineGenerator] Loading index...
2024-10-22 07:41:12,891 INFO     [PipelineGenerator] Try loading "model_dir/4/added_IVF256_Flat_nprobe_1_master-training_v2.index"...
2024-10-22 07:41:12,918 ERROR    [PipelineGenerator] Load index failed. Index will not be used.
2024-10-22 07:41:12,918 ERROR    [PipelineGenerator] name 'StandardGpuResources' is not defined
Traceback (most recent call last):
  File "/home/ubuntu/voice-changer/server/voice_changer/RVC/pipeline/PipelineGenerator.py", line 70, in _loadIndex
    index: faiss.GpuIndexIVFFlat = faiss.index_cpu_to_gpus_list(index, gpus=[dev.index])
  File "/home/ubuntu/voice-changer/myenv-rvc/lib/python3.10/site-packages/faiss/gpu_wrappers.py", line 52, in index_cpu_to_gpus_list
    res = [StandardGpuResources() for _ in gpus]
  File "/home/ubuntu/voice-changer/myenv-rvc/lib/python3.10/site-packages/faiss/gpu_wrappers.py", line 52, in <listcomp>
    res = [StandardGpuResources() for _ in gpus]
NameError: name 'StandardGpuResources' is not defined
2024-10-22 07:41:12,955 INFO     [Pipeline] GENERATE INFERENCER<voice_changer.RVC.inferencer.RVCInferencerv2.RVCInferencerv2 object at 0x7b70c0d97850>
2024-10-22 07:41:12,955 INFO     [Pipeline] GENERATE EMBEDDER<voice_changer.RVC.embedder.OnnxContentvec.OnnxContentvec object at 0x7b70a076fc10>
2024-10-22 07:41:12,955 INFO     [Pipeline] GENERATE PITCH EXTRACTOR<voice_changer.RVC.pitchExtractor.RMVPEOnnxPitchExtractor.RMVPEOnnxPitchExtractor object at 0x7b70a0776050>
2024-10-22 07:41:12,956 INFO     [RVCr2] Initialized.
2024-10-22 07:52:56,046 INFO     [MMVC_Namespace] Disconnected SID: gPUtOIVsSWyt7nezAAAB
asr-aditya commented 1 month ago

I fixed this. I had both faiss-gpu and faiss-cpu installed which caused the issue. Reference: https://github.com/facebookresearch/faiss/issues/2892