Fix stale latent_length in LTXVAddGuideMulti and LTXVAddGuidesFromBatch - #614
Open
stuttlepress wants to merge 1 commit into
Open
Fix stale latent_length in LTXVAddGuideMulti and LTXVAddGuidesFromBatch#614stuttlepress wants to merge 1 commit into
stuttlepress wants to merge 1 commit into
Conversation
…read Both nodes captured latent_length once before the guide loop. After each append_keyframe call the latent grows by the guide's frame count, but latent_length stayed frozen. get_latent_index uses latent_count = latent_length - num_keyframes to resolve negative frame indices, so latent_count shrank with each iteration causing subsequent guides with negative frame_idx to resolve to wrong (earlier) positions. Fix: read latent_length from latent_image.shape[2] at the top of each loop iteration, matching the behaviour of chained single-guide nodes.
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.
latent_lengthis not updated across multipleappend_keyframecalls,resulting in incorrect resolution of negative frame indices.
Fix: read
latent_lengthfromlatent_image.shape[2]at the top ofeach loop iteration, matching the behaviour of chained single-guide nodes.