MCPcopy Create free account
hub / github.com/MoonInTheRiver/DiffSinger / build_tts_model

Method build_tts_model

usr/diffsinger_task.py:33–47  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

31 self.pe.eval()
32
33 def build_tts_model(self):
34 mel_bins = hparams['audio_num_mel_bins']
35 self.model = GaussianDiffusion(
36 phone_encoder=self.phone_encoder,
37 out_dims=mel_bins, denoise_fn=DIFF_DECODERS[hparams['diff_decoder_type']](hparams),
38 timesteps=hparams['timesteps'],
39 K_step=hparams['K_step'],
40 loss_type=hparams['diff_loss_type'],
41 spec_min=hparams['spec_min'], spec_max=hparams['spec_max'],
42 )
43 if hparams['fs2_ckpt'] != '':
44 utils.load_ckpt(self.model.fs2, hparams['fs2_ckpt'], 'model', strict=True)
45 # self.model.fs2.decoder = None
46 for k, v in self.model.fs2.named_parameters():
47 v.requires_grad = False
48
49 def validation_step(self, sample, batch_idx):
50 outputs = {}

Callers

nothing calls this directly

Calls 2

load_ckptMethod · 0.80
GaussianDiffusionClass · 0.50

Tested by

no test coverage detected