Skip to content

Commit

Permalink
fp16 does not apply to vocoder
Browse files Browse the repository at this point in the history
  • Loading branch information
Plachtaa committed Nov 30, 2024
1 parent 1399efc commit cda9bee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion app_svc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion app_vc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cda9bee

Please sign in to comment.