From 3fd6160cf8b05976b4975583c91b4108d8d90f29 Mon Sep 17 00:00:00 2001 From: victolee0 <39608452+victolee0@users.noreply.github.com> Date: Sat, 25 Jan 2025 22:25:41 +0900 Subject: [PATCH] fix check_inputs func in LuminaText2ImgPipeline --- 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 5b37e9a503a8..133cb2c5f146 100644 --- a/src/diffusers/pipelines/lumina/pipeline_lumina.py +++ b/src/diffusers/pipelines/lumina/pipeline_lumina.py @@ -396,8 +396,10 @@ def check_inputs( 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(