[GH-ISSUE #2404] Audio block passed. Index search FAILED or disabled #1675

Open
opened 2026-10-20 10:11:04 +00:00 by bsakaguchi · 3 comments
Owner

Originally created by @HeMingBoy on GitHub (Dec 8, 2024).
Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/2404

微信图片_20241209054352

Originally created by @HeMingBoy on GitHub (Dec 8, 2024). Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/2404 ![微信图片_20241209054352](https://github.com/user-attachments/assets/a13d2970-4386-4858-8553-83c3f5a3ba48)
Author
Owner

@HeMingBoy commented on GitHub (Dec 8, 2024):

Please, does anyone know how to fix this

<!-- gh-comment-id:2526402659 --> @HeMingBoy commented on GitHub (Dec 8, 2024): Please, does anyone know how to fix this
Author
Owner

@sonictuzi commented on GitHub (Dec 29, 2024):

are you fix it?

<!-- gh-comment-id:2564857377 --> @sonictuzi commented on GitHub (Dec 29, 2024): are you fix it?
Author
Owner

@zzkyyds commented on GitHub (Jul 1, 2025):

    try:
        if hasattr(self, "index") and self.index_rate != 0:
            leng_replace_head = int(rate * feats[0].shape[0])
            npy = feats[0][-leng_replace_head:].cpu().numpy().astype("float32")
            score, ix = self.index.search(npy, k=8)
            weight = np.square(1 / score)
            weight /= weight.sum(axis=1, keepdims=True)
            npy = np.sum(self.big_npy[ix] * np.expand_dims(weight, axis=2), axis=1)
            if self.config.is_half:
                npy = npy.astype("float16")
            feats[0][-leng_replace_head:] = (
                torch.from_numpy(npy).unsqueeze(0).to(self.device) * self.index_rate
                + (1 - self.index_rate) * feats[0][-leng_replace_head:]
            )
        else:
            printt("Index search FAILED or disabled"),这段代码报错的,把index rete调成非0
<!-- gh-comment-id:3024119163 --> @zzkyyds commented on GitHub (Jul 1, 2025): try: if hasattr(self, "index") and self.index_rate != 0: leng_replace_head = int(rate * feats[0].shape[0]) npy = feats[0][-leng_replace_head:].cpu().numpy().astype("float32") score, ix = self.index.search(npy, k=8) weight = np.square(1 / score) weight /= weight.sum(axis=1, keepdims=True) npy = np.sum(self.big_npy[ix] * np.expand_dims(weight, axis=2), axis=1) if self.config.is_half: npy = npy.astype("float16") feats[0][-leng_replace_head:] = ( torch.from_numpy(npy).unsqueeze(0).to(self.device) * self.index_rate + (1 - self.index_rate) * feats[0][-leng_replace_head:] ) else: printt("Index search FAILED or disabled"),这段代码报错的,把index rete调成非0
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
RVC-Project/Retrieval-based-Voice-Conversion-WebUI#1675
No description provided.