Update gui.py

This commit is contained in:
RVC-Boss 2023-05-30 13:17:10 +00:00 committed by GitHub
parent fa97c3f8bd
commit a68037be3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

6
gui.py
View File

@ -150,8 +150,12 @@ class RVC:
assert feats.dim() == 1, feats.dim()
feats = feats.view(1, -1)
padding_mask = torch.BoolTensor(feats.shape).fill_(False)
if Config.is_half:
feats = feats.half()
else:
feats = feats.float()
inputs = {
"source": feats.half().to(device),
"source": feats.to(device),
"padding_mask": padding_mask.to(device),
"output_layer": 9 if self.version == "v1" else 12,
}