Format code (#270)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2023-05-12 19:27:59 +00:00 committed by GitHub
parent 3d8d0957e4
commit 0bc1ea782e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

6
gui.py
View File

@ -133,9 +133,9 @@ class RVC:
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).astype(
"float16"
)
npy = np.sum(
self.big_npy[ix] * np.expand_dims(weight, axis=2), axis=1
).astype("float16")
feats = (
torch.from_numpy(npy).unsqueeze(0).to(device) * self.index_rate