prasanacodes commited on
Commit
63b4538
·
verified ·
1 Parent(s): 86f14c2

Update f5_tts/infer/utils_infer.py

Browse files
Files changed (1) hide show
  1. f5_tts/infer/utils_infer.py +4 -1
f5_tts/infer/utils_infer.py CHANGED
@@ -112,7 +112,10 @@ def load_vocoder(vocoder_name="vocos", is_local=False, local_path="", device=dev
112
  }
113
  state_dict.update(encodec_parameters)
114
  vocoder.load_state_dict(state_dict)
115
- vocoder = vocoder.eval().to(device)
 
 
 
116
  elif vocoder_name == "bigvgan":
117
  try:
118
  from third_party.BigVGAN import bigvgan
 
112
  }
113
  state_dict.update(encodec_parameters)
114
  vocoder.load_state_dict(state_dict)
115
+ #vocoder = vocoder.eval().to(device)
116
+ #vocoder = torch.nn.Module.to_empty(vocoder, device=device)
117
+ vocoder = vocoder.to_empty(device=device).eval()
118
+
119
  elif vocoder_name == "bigvgan":
120
  try:
121
  from third_party.BigVGAN import bigvgan