teticio commited on
Commit
c5dcd04
1 Parent(s): 4734cf5

fix audio logging for VAE

Browse files
Files changed (1) hide show
  1. scripts/train_vae.py +1 -1
scripts/train_vae.py CHANGED
@@ -91,7 +91,7 @@ class ImageLogger(Callback):
91
  for _, image in enumerate(images[k]):
92
  audio = mel.image_to_audio(
93
  Image.fromarray(image, mode='RGB').convert('L')
94
- if channels == 3 else Image.fromarray(image[0]))
95
  pl_module.logger.experiment.add_audio(
96
  tag + f"/{_}",
97
  normalize(audio),
 
91
  for _, image in enumerate(images[k]):
92
  audio = mel.image_to_audio(
93
  Image.fromarray(image, mode='RGB').convert('L')
94
+ if channels == 3 else Image.fromarray(image[:, :, 0]))
95
  pl_module.logger.experiment.add_audio(
96
  tag + f"/{_}",
97
  normalize(audio),