kunci115 commited on
Commit
a83e764
·
unverified ·
1 Parent(s): ac77a76

Update socket.py

Browse files

[edit] adjusting mel_spec_type on load_model use case

Files changed (1) hide show
  1. src/f5_tts/socket.py +8 -4
src/f5_tts/socket.py CHANGED
@@ -19,10 +19,14 @@ class TTSStreamingProcessor:
19
 
20
  # Load the model using the provided checkpoint and vocab files
21
  self.model = load_model(
22
- DiT,
23
- dict(dim=1024, depth=22, heads=16, ff_mult=2, text_dim=512, conv_layers=4),
24
- ckpt_file,
25
- vocab_file,
 
 
 
 
26
  ).to(self.device, dtype=dtype)
27
 
28
  # Load the vocoder
 
19
 
20
  # Load the model using the provided checkpoint and vocab files
21
  self.model = load_model(
22
+ model_cls=DiT,
23
+ model_cfg=dict(dim=1024, depth=22, heads=16, ff_mult=2, text_dim=512, conv_layers=4),
24
+ ckpt_path=ckpt_file,
25
+ mel_spec_type="vocos", # or "bigvgan" depending on vocoder
26
+ vocab_file=vocab_file,
27
+ ode_method="euler",
28
+ use_ema=True,
29
+ device=self.device
30
  ).to(self.device, dtype=dtype)
31
 
32
  # Load the vocoder