From fb563fbd199599a3d11296546a44f45cf24483a7 Mon Sep 17 00:00:00 2001 From: Daniel Socek Date: Thu, 25 Jun 2026 01:14:29 -0400 Subject: [PATCH] [Bugfix] Fix CFG-parallel broadcast dtype mismatch in GLM-Image (#3956) Signed-off-by: Daniel Socek Co-authored-by: Didan Deng <33117903+wtomin@users.noreply.github.com> --- vllm_omni/diffusion/models/glm_image/pipeline_glm_image.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vllm_omni/diffusion/models/glm_image/pipeline_glm_image.py b/vllm_omni/diffusion/models/glm_image/pipeline_glm_image.py index e6075ce10..b5dcb324d 100644 --- a/vllm_omni/diffusion/models/glm_image/pipeline_glm_image.py +++ b/vllm_omni/diffusion/models/glm_image/pipeline_glm_image.py @@ -560,6 +560,8 @@ class GlmImagePipeline(nn.Module, DiffusionPipelineProfilerMixin, SupportsCompon noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_cond - noise_pred_uncond) # Scheduler step latents = self.scheduler.step(noise_pred, t, latents, return_dict=False)[0] + # Re-cast to transformer_dtype before cfg_group.broadcast to avoid dtype mismatches across ranks + latents = latents.to(transformer_dtype) # Broadcast updated latents to all ranks cfg_group.broadcast(latents, src=0)