Spaces:
Runtime error
Runtime error
fix audio logging for VAE
Browse files- 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),
|