From 90de6fe15fe61c1c08d1a26db030beff5ffd34f8 Mon Sep 17 00:00:00 2001 From: Alexander Kunitsyn Date: Fri, 24 Jul 2026 11:42:29 +0000 Subject: [PATCH] Fix Kandinsky 5 I2V: don't duplicate image latent into visual_cond channels Kandinsky5I2VPipeline.prepare_latents injected the conditioning image both as the first latent frame and into the visual_cond channels; the reference implementation (kandinskylab/kandinsky-5) only does the former. The duplicate over-conditions the first frame and produces mesh/visual artifacts. Remove the redundant injection to match the reference. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/diffusers/pipelines/kandinsky5/pipeline_kandinsky_i2v.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/diffusers/pipelines/kandinsky5/pipeline_kandinsky_i2v.py b/src/diffusers/pipelines/kandinsky5/pipeline_kandinsky_i2v.py index e82dc737f1a9..634305daff6b 100644 --- a/src/diffusers/pipelines/kandinsky5/pipeline_kandinsky_i2v.py +++ b/src/diffusers/pipelines/kandinsky5/pipeline_kandinsky_i2v.py @@ -725,7 +725,6 @@ def prepare_latents( ) visual_cond_mask[:, 0:1] = 1 - visual_cond[:, 0:1] = image_latents latents = torch.cat([latents, visual_cond, visual_cond_mask], dim=-1)