1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

Emergency fix for Qwen-Image-Edit (#12188)

fix(qwen-image):
shape calculation fix
This commit is contained in:
naykun
2025-08-19 17:12:26 +08:00
committed by GitHub
parent 8d1de40891
commit dba4e007fe

View File

@@ -646,8 +646,7 @@ class QwenImageEditPipeline(DiffusionPipeline, QwenImageLoraLoaderMixin):
returning a tuple, the first element is a list with the generated images.
"""
image_size = image[0].size if isinstance(image, list) else image.size
width, height = image_size
calculated_width, calculated_height, _ = calculate_dimensions(1024 * 1024, width / height)
calculated_width, calculated_height, _ = calculate_dimensions(1024 * 1024, image_size[0] / image_size[1])
height = height or calculated_height
width = width or calculated_width