mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-06-09 15:56:39 +00:00
fix: handle stereo format in sd_audio (#1489)
Co-authored-by: leejet <leejet714@gmail.com>
This commit is contained in:
parent
67dda3f897
commit
cde20d5ef0
@ -2789,7 +2789,10 @@ static sd_audio_t* waveform_to_sd_audio(const StableDiffusionGGML* sd,
|
||||
free(audio);
|
||||
return nullptr;
|
||||
}
|
||||
std::memcpy(audio->data, waveform.data(), sample_bytes);
|
||||
|
||||
auto wavaform_t = waveform.permute({1, 0, 2, 3});
|
||||
std::memcpy(audio->data, wavaform_t.data(), sample_bytes);
|
||||
|
||||
return audio;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user