mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 05:25:01 +03:00
nof0onnx not worked
This commit is contained in:
parent
3f4e68294a
commit
f2e2e87f18
3
.gitignore
vendored
3
.gitignore
vendored
@ -50,6 +50,9 @@ server/samples.json
|
||||
server/samples_0003_t.json
|
||||
server/samples_0003_o.json
|
||||
|
||||
server/test_official_v1_v2.json
|
||||
server/test_ddpn_v1_v2.json
|
||||
|
||||
start_trainer.sh
|
||||
|
||||
# venv
|
||||
|
@ -9,6 +9,7 @@ class OnnxRVCInferencerNono(OnnxRVCInferencer):
|
||||
def loadModel(self, file: str, gpu: int):
|
||||
super().loadModel(file, gpu)
|
||||
self.setProps(EnumInferenceTypes.onnxRVCNono, file, True, gpu)
|
||||
return self
|
||||
|
||||
def infer(
|
||||
self,
|
||||
|
@ -42,6 +42,7 @@ class Pipeline(object):
|
||||
self.embedder = embedder
|
||||
self.inferencer = inferencer
|
||||
self.pitchExtractor = pitchExtractor
|
||||
print("GENERATE INFERENCER:::", self.inferencer)
|
||||
|
||||
self.index = index
|
||||
self.big_npy = (
|
||||
@ -166,7 +167,9 @@ class Pipeline(object):
|
||||
npy = np.sum(self.big_npy[ix] * np.expand_dims(weight, axis=2), axis=1)
|
||||
|
||||
# recover silient font
|
||||
npy = np.concatenate([np.zeros([npyOffset, npy.shape[1]]).astype("float32"), npy])
|
||||
npy = np.concatenate(
|
||||
[np.zeros([npyOffset, npy.shape[1]]).astype("float32"), npy]
|
||||
)
|
||||
if self.isHalf is True:
|
||||
npy = npy.astype("float16")
|
||||
|
||||
@ -204,8 +207,9 @@ class Pipeline(object):
|
||||
npyOffset = math.floor(silence_front * 16000) // 360
|
||||
feats = feats[:, npyOffset * 2 :, :]
|
||||
feats_len = feats.shape[1]
|
||||
pitch = pitch[:, -feats_len:]
|
||||
pitchf = pitchf[:, -feats_len:]
|
||||
if pitch is not None and pitchf is not None:
|
||||
pitch = pitch[:, -feats_len:]
|
||||
pitchf = pitchf[:, -feats_len:]
|
||||
p_len = torch.tensor([feats_len], device=self.device).long()
|
||||
|
||||
# 推論実行
|
||||
|
Loading…
Reference in New Issue
Block a user