Skip to content

Commit cde20d5

Browse files
stduhpfleejet
andcommitted
fix: handle stereo format in sd_audio (#1489)
Co-authored-by: leejet <leejet714@gmail.com>
1 parent 67dda3f commit cde20d5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/stable-diffusion.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2789,7 +2789,10 @@ static sd_audio_t* waveform_to_sd_audio(const StableDiffusionGGML* sd,
27892789
free(audio);
27902790
return nullptr;
27912791
}
2792-
std::memcpy(audio->data, waveform.data(), sample_bytes);
2792+
2793+
auto wavaform_t = waveform.permute({1, 0, 2, 3});
2794+
std::memcpy(audio->data, wavaform_t.data(), sample_bytes);
2795+
27932796
return audio;
27942797
}
27952798

0 commit comments

Comments
 (0)