Repository navigation
LTX keyframes: condition on latents, images or frames at any frame - #82
Merged
Merged
Conversation
ltx23_keyframe(x, frame, strength) and txt2vid_ltx2(keyframes =). At frame 0 a keyframe replaces the first latent frames; elsewhere it is appended as extra tokens positioned at its pixel frame and dropped before decoding. Strength below 1 gives the tokens timestep (1 - s) * sigma and blends each step's x0 estimate back toward the keyframe. image, condition_video and condition_latents become a frame-0 keyframe with bit-identical output. Ported from diffusers' pipeline_ltx2_condition.py (Apache-2.0).
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.
LTX keyframes: condition a generation on latents, an image or frames at any frame, at any strength.
Change
ltx23_keyframe(x, frame, strength).xcan be latents ([1, 128, k, H/32, W/32]), an image path, or an image or frames array.image,condition_videoandcondition_latentsare now frame-0 keyframes and can be combined with others.(1 - s) * sigma;pipelines/ltx2/pipeline_ltx2_condition.py(Apache-2.0). Recorded ininst/REFERENCES.md.two_stage. This is still refused.Checks
Tests: new
test_keyframes_ltx23.R(36 results) on the tiny CPU pipeline, plus the existingtest_txt2vid_ltx23.R(44). They cover:condition_latentsandimage;_prepare_keyframe_coords.Unchanged paths:
image,condition_video, andcondition_videowithcond_noise_scalegive bit-identical output to main.GPU, LTX-2.5 NF4, 512x512x97 (PSNR of the target frame against its keyframe):
Interior keyframes guide strongly but don't copy.
Found while testing, not fixed here
expandable_segments. Separate PR.