From a80bc822a206e5d728e735f647c4c25b6c035b2d Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Wed, 5 Mar 2025 08:58:44 -0500 Subject: [PATCH] Partially revert last commit. --- comfy_extras/nodes_lt.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/comfy_extras/nodes_lt.py b/comfy_extras/nodes_lt.py index b608b940713..4550b246a51 100644 --- a/comfy_extras/nodes_lt.py +++ b/comfy_extras/nodes_lt.py @@ -194,6 +194,11 @@ def generate(self, positive, negative, vae, latent, image, frame_idx, strength): frame_idx, latent_idx = self.get_latent_index(positive, latent_length, frame_idx, scale_factors) assert latent_idx + t.shape[2] <= latent_length, "Conditioning frames exceed the length of the latent sequence." + if frame_idx == 0: + latent_image, noise_mask = self.replace_latent_frames(latent_image, noise_mask, t, latent_idx, strength) + return (positive, negative, {"samples": latent_image, "noise_mask": noise_mask},) + + num_prefix_frames = min(self._num_prefix_frames, t.shape[2]) positive, negative, latent_image, noise_mask = self.append_keyframe(