[Bugfix] Fix CFG-parallel broadcast dtype mismatch in GLM-Image (#3956)

Signed-off-by: Daniel Socek <daniel.socek@intel.com>
Co-authored-by: Didan Deng <33117903+wtomin@users.noreply.github.com>
This commit is contained in:
Daniel SocekandDidan Deng authored and GitHub committed 2026-06-25 13:14:29 +08:00
1 parent 0fd2620d56
commit fb563fbd19
1 file changed
+2
@@ -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)