feat: add support for init audio allowing Audio to Video (A2V) for LTX2.3#1676
Draft
LostRuins wants to merge 3 commits into
Draft
feat: add support for init audio allowing Audio to Video (A2V) for LTX2.3#1676LostRuins wants to merge 3 commits into
LostRuins wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR allows for init audio allowing Audio to Video (A2V) for LTX2.3.
Related Issue / Discussion
Implements and closes #1674
Additional Information
!! AI Disclosure: This PR was created with the assistance of OpenAI Codex !!
Besides I2V creating a video from a start frame, LTX2.3 also supports generating a video from an audio clip, audio to video (A2V) as seen in https://github.com/Lightricks/LTX-2/blob/main/packages/ltx-pipelines/src/ltx_pipelines/a2vid_two_stage.py
Previously in stable-diffusion.cpp, the audio vae encoder is ignored. This PR allows the audio latent to be created from a provided wav audio file with
--init-audio, and used instead of denoising from the default audio latent.I tested with the distilled LTX2.3 model.
Run with CLI like this:
Example outputs and audio inputs for reference:
rap.mp4
tony.mp4
epic_rap.wav
tony_stark_cave.wav
Known limitations:
sd_audio_tfile loader was added. This can probably be improved or replaced (e.g. Miniaudio, Dr Wav).Checklist
pinging those who might be interested: @stduhpf @wbruna
@leejet Marking PR as draft, but feel free to modify (you have branch access) or merge anytime at your discretion. If you prefer to replace this implementation, that's fine too.