def METHOD_NAME(self, units, f0, volume, spk_id=None, spk_mix_dict=None, aug_shift=None,
            gt_spec=None, infer=True, infer_speedup=10, method='dpm-solver', k_step=None, use_tqdm=True,
            spk_emb=None, spk_emb_dict=None):
    '''
    input:
        B x n_frames x n_unit
    return:
        dict of B x n_frames x feat
    '''
    x = self.stack(units.transpose(1, 2)).transpose(1, 2)
    x = x + self.f0_embed((1 + f0 / 700).log()) + self.volume_embed(volume)
    if self.use_speaker_encoder:
        if spk_mix_dict is not None:
            assert spk_emb_dict is not None
            for k, v in spk_mix_dict.items():
                spk_id_torch = spk_emb_dict[str(k)]
                spk_id_torch = np.tile(spk_id_torch, (len(units), 1))
                spk_id_torch = torch.from_numpy(spk_id_torch).float().to(units.device)
                x = x + v * self.spk_embed(spk_id_torch)
        else:
            x = x + self.spk_embed(spk_emb)
    else:
        if self.n_spk is not None and self.n_spk > 1:
            if spk_mix_dict is not None:
                for k, v in spk_mix_dict.items():
                    spk_id_torch = torch.LongTensor(np.array([[k]])).to(units.device)
                    x = x + v * self.spk_embed(spk_id_torch - 1)
            else:
                x = x + self.spk_embed(spk_id - 1)
    if self.aug_shift_embed is not None and aug_shift is not None:
        x = x + self.aug_shift_embed(aug_shift / 5)
    x = self.decoder(x)
    x = self.norm(x)
    x = self.dense_out(x)
    if not infer:
        x = F.mse_loss(x, gt_spec)
        if self.l2reg_loss > 0:
            x = x + l2_regularization(model=self, l2_alpha=self.l2reg_loss)
    return x