teticio commited on
Commit
3ae9402
1 Parent(s): 9c9bff4
Files changed (1) hide show
  1. notebooks/test_model.ipynb +7 -7
notebooks/test_model.ipynb CHANGED
@@ -60,7 +60,7 @@
60
  "metadata": {},
61
  "outputs": [],
62
  "source": [
63
- "mel = Mel(x_res=256, y_res=256)\n",
64
  "device = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n",
65
  "generator = torch.Generator(device=device)"
66
  ]
@@ -420,7 +420,7 @@
420
  "outputs": [],
421
  "source": [
422
  "image = ds['train'][264]['image']\n",
423
- "display(Audio(mel.image_to_audio(image), rate=mel.get_sample_rate()))"
424
  ]
425
  },
426
  {
@@ -462,7 +462,7 @@
462
  "outputs": [],
463
  "source": [
464
  "image2 = ds['train'][15978]['image']\n",
465
- "display(Audio(mel.image_to_audio(image2), rate=mel.get_sample_rate()))"
466
  ]
467
  },
468
  {
@@ -486,8 +486,8 @@
486
  "_, (sample_rate, audio) = audio_diffusion.generate_spectrogram_and_audio(\n",
487
  " noise=audio_diffusion.pipe.slerp(noise, noise2, alpha),\n",
488
  " generator=generator)\n",
489
- "display(Audio(mel.image_to_audio(image), rate=mel.get_sample_rate()))\n",
490
- "display(Audio(mel.image_to_audio(image2), rate=mel.get_sample_rate()))\n",
491
  "display(Audio(audio, rate=sample_rate))"
492
  ]
493
  },
@@ -600,8 +600,8 @@
600
  "_, (sample_rate, audio3) = audio_diffusion.generate_spectrogram_and_audio(\n",
601
  " noise=audio_diffusion.pipe.slerp(latents, latents2, alpha),\n",
602
  " generator=generator)\n",
603
- "display(Audio(audio, rate=mel.get_sample_rate()))\n",
604
- "display(Audio(audio2, rate=mel.get_sample_rate()))\n",
605
  "display(Audio(audio3, rate=sample_rate))"
606
  ]
607
  },
 
60
  "metadata": {},
61
  "outputs": [],
62
  "source": [
63
+ "mel = Mel()\n",
64
  "device = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n",
65
  "generator = torch.Generator(device=device)"
66
  ]
 
420
  "outputs": [],
421
  "source": [
422
  "image = ds['train'][264]['image']\n",
423
+ "display(Audio(mel.image_to_audio(image), rate=sample_rate))"
424
  ]
425
  },
426
  {
 
462
  "outputs": [],
463
  "source": [
464
  "image2 = ds['train'][15978]['image']\n",
465
+ "display(Audio(mel.image_to_audio(image2), rate=sample_rate))"
466
  ]
467
  },
468
  {
 
486
  "_, (sample_rate, audio) = audio_diffusion.generate_spectrogram_and_audio(\n",
487
  " noise=audio_diffusion.pipe.slerp(noise, noise2, alpha),\n",
488
  " generator=generator)\n",
489
+ "display(Audio(mel.image_to_audio(image), rate=sample_rate))\n",
490
+ "display(Audio(mel.image_to_audio(image2), rate=sample_rate))\n",
491
  "display(Audio(audio, rate=sample_rate))"
492
  ]
493
  },
 
600
  "_, (sample_rate, audio3) = audio_diffusion.generate_spectrogram_and_audio(\n",
601
  " noise=audio_diffusion.pipe.slerp(latents, latents2, alpha),\n",
602
  " generator=generator)\n",
603
+ "display(Audio(audio, rate=sample_rate))\n",
604
+ "display(Audio(audio2, rate=sample_rate))\n",
605
  "display(Audio(audio3, rate=sample_rate))"
606
  ]
607
  },