From 1c5caf77ac88741f393cba6906abfd3ce1ad9d12 Mon Sep 17 00:00:00 2001 From: Jasper <37783831+jagilley@users.noreply.github.com> Date: Fri, 16 Dec 2022 16:26:46 -0600 Subject: [PATCH] Convert to RGB --- riffusion/audio.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/riffusion/audio.py b/riffusion/audio.py index 2ef68ae..3710533 100644 --- a/riffusion/audio.py +++ b/riffusion/audio.py @@ -105,10 +105,12 @@ def image_from_spectrogram( # Flip Y image = image.transpose(Image.FLIP_TOP_BOTTOM) + + # Convert to RGB + image = image.convert("RGB") return image - def spectrogram_from_waveform( waveform: np.ndarray, sample_rate: int,