From 3afc80d781871f2a1e30a03ed9c25c1f39070f9b Mon Sep 17 00:00:00 2001 From: Makcum888e <79456407+Makcum888e@users.noreply.github.com> Date: Wed, 27 May 2026 12:33:20 +0300 Subject: [PATCH] [diffusion] Fix multi image input for GLM-Image (#26311) Co-authored-by: ronnie_zheng --- python/sglang/multimodal_gen/runtime/models/dits/glm_image.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/multimodal_gen/runtime/models/dits/glm_image.py b/python/sglang/multimodal_gen/runtime/models/dits/glm_image.py index 114094e7a..0cb937df8 100644 --- a/python/sglang/multimodal_gen/runtime/models/dits/glm_image.py +++ b/python/sglang/multimodal_gen/runtime/models/dits/glm_image.py @@ -65,8 +65,8 @@ class GlmImageLayerKVCache: self.k_cache = k self.v_cache = v else: - self.k_cache = torch.cat([self.k_cache, k], dim=2) - self.v_cache = torch.cat([self.v_cache, v], dim=2) + self.k_cache = torch.cat([self.k_cache, k], dim=1) + self.v_cache = torch.cat([self.v_cache, v], dim=1) def get(self): return self.k_cache, self.v_cache