mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2024-12-29 19:15:04 +08:00
Format code (#270)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
3d8d0957e4
commit
0bc1ea782e
6
gui.py
6
gui.py
@ -133,9 +133,9 @@ class RVC:
|
|||||||
score, ix = self.index.search(npy, k=8)
|
score, ix = self.index.search(npy, k=8)
|
||||||
weight = np.square(1 / score)
|
weight = np.square(1 / score)
|
||||||
weight /= weight.sum(axis=1, keepdims=True)
|
weight /= weight.sum(axis=1, keepdims=True)
|
||||||
npy = np.sum(self.big_npy[ix] * np.expand_dims(weight, axis=2), axis=1).astype(
|
npy = np.sum(
|
||||||
"float16"
|
self.big_npy[ix] * np.expand_dims(weight, axis=2), axis=1
|
||||||
)
|
).astype("float16")
|
||||||
|
|
||||||
feats = (
|
feats = (
|
||||||
torch.from_numpy(npy).unsqueeze(0).to(device) * self.index_rate
|
torch.from_numpy(npy).unsqueeze(0).to(device) * self.index_rate
|
||||||
|
Loading…
Reference in New Issue
Block a user