From cda9beece293c3fcfe086abd2304f9d5e4ea2fe2 Mon Sep 17 00:00:00 2001 From: Songting Date: Sat, 30 Nov 2024 13:56:33 +0800 Subject: [PATCH] fp16 does not apply to vocoder --- app.py | 2 +- app_svc.py | 2 +- app_vc.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 81e2be4..fa984c2 100644 --- a/app.py +++ b/app.py @@ -277,7 +277,7 @@ def voice_conversion(source, target, diffusion_steps, length_adjust, inference_c mel2, style2, None, diffusion_steps, inference_cfg_rate=inference_cfg_rate) vc_target = vc_target[:, :, mel2.size(-1):] - vc_wave = bigvgan_fn(vc_target)[0] + vc_wave = bigvgan_fn(vc_target.float())[0] if processed_frames == 0: if is_last_chunk: output_wave = vc_wave[0].cpu().numpy() diff --git a/app_svc.py b/app_svc.py index 6d4f0e3..4b18095 100644 --- a/app_svc.py +++ b/app_svc.py @@ -336,7 +336,7 @@ def voice_conversion(source, target, diffusion_steps, length_adjust, inference_c mel2, style2, None, diffusion_steps, inference_cfg_rate=inference_cfg_rate) vc_target = vc_target[:, :, mel2.size(-1):] - vc_wave = vocoder_fn(vc_target).squeeze().cpu() + vc_wave = vocoder_fn(vc_target.float()).squeeze().cpu() if vc_wave.ndim == 1: vc_wave = vc_wave.unsqueeze(0) if processed_frames == 0: diff --git a/app_vc.py b/app_vc.py index 4ed3f7b..9ac37cc 100644 --- a/app_vc.py +++ b/app_vc.py @@ -295,7 +295,7 @@ def voice_conversion(source, target, diffusion_steps, length_adjust, inference_c mel2, style2, None, diffusion_steps, inference_cfg_rate=inference_cfg_rate) vc_target = vc_target[:, :, mel2.size(-1):] - vc_wave = vocoder_fn(vc_target)[0] + vc_wave = vocoder_fn(vc_target.float())[0] if vc_wave.ndim == 1: vc_wave = vc_wave.unsqueeze(0) if processed_frames == 0: