diff --git a/vllm_omni/diffusion/models/z_image/pipeline_z_image.py b/vllm_omni/diffusion/models/z_image/pipeline_z_image.py index 8a3913195..e025440a7 100644 --- a/vllm_omni/diffusion/models/z_image/pipeline_z_image.py +++ b/vllm_omni/diffusion/models/z_image/pipeline_z_image.py @@ -564,14 +564,14 @@ class ZImagePipeline(nn.Module): # Run CFG only if configured AND scale is non-zero apply_cfg = self.do_classifier_free_guidance and current_guidance_scale > 0 + latents_typed = latents.to(self.od_config.dtype) if apply_cfg: - latents_typed = latents.to(self.transformer.dtype) latent_model_input = latents_typed.repeat(2, 1, 1, 1) prompt_embeds_model_input = prompt_embeds + negative_prompt_embeds timestep_model_input = timestep.repeat(2) else: - latent_model_input = latents.to(self.transformer.dtype) + latent_model_input = latents_typed prompt_embeds_model_input = prompt_embeds timestep_model_input = timestep diff --git a/vllm_omni/diffusion/models/z_image/z_image_transformer.py b/vllm_omni/diffusion/models/z_image/z_image_transformer.py index 67e672343..a4f073faa 100644 --- a/vllm_omni/diffusion/models/z_image/z_image_transformer.py +++ b/vllm_omni/diffusion/models/z_image/z_image_transformer.py @@ -614,7 +614,6 @@ class ZImageTransformer2DModel(CachedTransformer): quant_config: "QuantizationConfig | None" = None, ) -> None: super().__init__() - self.dtype = torch.bfloat16 self.in_channels = in_channels self.out_channels = in_channels self.all_patch_size = all_patch_size