From 8ceec90d76767035a63b879d659a2ed8e12c5bba Mon Sep 17 00:00:00 2001 From: victolee0 <39608452+victolee0@users.noreply.github.com> Date: Tue, 28 Jan 2025 04:47:01 +0900 Subject: [PATCH] fix check_inputs func in LuminaText2ImgPipeline (#10651) --- src/diffusers/pipelines/lumina/pipeline_lumina.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/diffusers/pipelines/lumina/pipeline_lumina.py b/src/diffusers/pipelines/lumina/pipeline_lumina.py index 5b37e9a503..133cb2c5f1 100644 --- a/src/diffusers/pipelines/lumina/pipeline_lumina.py +++ b/src/diffusers/pipelines/lumina/pipeline_lumina.py @@ -396,8 +396,10 @@ class LuminaText2ImgPipeline(DiffusionPipeline): prompt_attention_mask=None, negative_prompt_attention_mask=None, ): - if height % 8 != 0 or width % 8 != 0: - raise ValueError(f"`height` and `width` have to be divisible by 8 but are {height} and {width}.") + if height % (self.vae_scale_factor * 2) != 0 or width % (self.vae_scale_factor * 2) != 0: + raise ValueError( + f"`height` and `width` have to be divisible by {self.vae_scale_factor * 2} but are {height} and {width}." + ) if prompt is not None and prompt_embeds is not None: raise ValueError(