teticio commited on
Commit
212ab44
1 Parent(s): f67abdb

print seed

Browse files
Files changed (1) hide show
  1. notebooks/test_model.ipynb +3 -3
notebooks/test_model.ipynb CHANGED
@@ -74,7 +74,7 @@
74
  "\n",
75
  "#@markdown teticio/audio-diffusion-instrumental-hiphop-256 - trained on instrumental hiphop\n",
76
  "\n",
77
- "model_id = \"teticio/audio-diffusion-256\" #@param [\"teticio/audio-diffusion-256\", \"teticio/audio-diffusion-breaks-256\", \"audio-diffusion-instrumenal-hiphop-256\"]"
78
  ]
79
  },
80
  {
@@ -252,7 +252,7 @@
252
  },
253
  "outputs": [],
254
  "source": [
255
- "start_step = 600 #@param {type:\"slider\", min:0, max:1000, step:10}\n",
256
  "overlap_secs = 2 #@param {type:\"integer\"}\n",
257
  "mel.load_audio(audio_file)\n",
258
  "overlap_samples = overlap_secs * mel.get_sample_rate()\n",
@@ -260,6 +260,7 @@
260
  "stride = slice_size - overlap_samples\n",
261
  "generator = torch.Generator()\n",
262
  "seed = generator.seed()\n",
 
263
  "track = np.array([])\n",
264
  "not_first = 0\n",
265
  "for sample in range(len(mel.audio) // stride):\n",
@@ -300,7 +301,6 @@
300
  "_, (sample_rate,\n",
301
  " audio2) = audio_diffusion.generate_spectrogram_and_audio_from_audio(\n",
302
  " raw_audio=mel.get_audio_slice(slice),\n",
303
- " generator=generator,\n",
304
  " mask_start_secs=1,\n",
305
  " mask_end_secs=1)\n",
306
  "display(Audio(audio, rate=sample_rate))\n",
 
74
  "\n",
75
  "#@markdown teticio/audio-diffusion-instrumental-hiphop-256 - trained on instrumental hiphop\n",
76
  "\n",
77
+ "model_id = \"teticio/audio-diffusion-instrumental-hiphop-256\" #@param [\"teticio/audio-diffusion-256\", \"teticio/audio-diffusion-breaks-256\", \"audio-diffusion-instrumenal-hiphop-256\"]"
78
  ]
79
  },
80
  {
 
252
  },
253
  "outputs": [],
254
  "source": [
255
+ "start_step = 100 #@param {type:\"slider\", min:0, max:1000, step:10}\n",
256
  "overlap_secs = 2 #@param {type:\"integer\"}\n",
257
  "mel.load_audio(audio_file)\n",
258
  "overlap_samples = overlap_secs * mel.get_sample_rate()\n",
 
260
  "stride = slice_size - overlap_samples\n",
261
  "generator = torch.Generator()\n",
262
  "seed = generator.seed()\n",
263
+ "print(f'Seed = {seed}')\n",
264
  "track = np.array([])\n",
265
  "not_first = 0\n",
266
  "for sample in range(len(mel.audio) // stride):\n",
 
301
  "_, (sample_rate,\n",
302
  " audio2) = audio_diffusion.generate_spectrogram_and_audio_from_audio(\n",
303
  " raw_audio=mel.get_audio_slice(slice),\n",
 
304
  " mask_start_secs=1,\n",
305
  " mask_end_secs=1)\n",
306
  "display(Audio(audio, rate=sample_rate))\n",