From 693b19ea3b5ba7bd0ca61df91b6cce0d64e30ecf Mon Sep 17 00:00:00 2001 From: James Betker Date: Sun, 22 May 2022 16:37:02 -0600 Subject: [PATCH] update mdf for legacy try --- codes/trainer/eval/music_diffusion_fid.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/codes/trainer/eval/music_diffusion_fid.py b/codes/trainer/eval/music_diffusion_fid.py index 1d0d0da5..055c72d2 100644 --- a/codes/trainer/eval/music_diffusion_fid.py +++ b/codes/trainer/eval/music_diffusion_fid.py @@ -167,10 +167,9 @@ class MusicDiffusionFid(evaluator.Evaluator): codegen = self.local_modules['codegen'].to(mel.device) codes = codegen.get_codes(mel) mel_norm = normalize_mel(mel) - precomputed_codes, precomputed_cond = self.model.timestep_independent(codes=codes, conditioning_input=mel_norm[:,:,:112], - expected_seq_len=mel_norm.shape[-1], return_code_pred=False) - gen_mel = self.diffuser.p_sample_loop(self.model, mel_norm.shape, noise=torch.zeros_like(mel_norm), - model_kwargs={'precomputed_code_embeddings': precomputed_codes, 'precomputed_cond_embeddings': precomputed_cond}) + gen_mel = self.diffuser.p_sample_loop(self.model, mel_norm.shape, + model_kwargs={'aligned_conditioning': codes, + 'conditioning_input': mel_norm}) gen_mel_denorm = denormalize_mel(gen_mel) output_shape = (1,16,audio.shape[-1]//16)