Spaces:
Runtime error
Runtime error
moose Claude Opus 4.7 (1M context) commited on
Commit ·
09cc589
1
Parent(s): 7a46cb6
Derive output aspect ratio from first image, not last
Browse filesMulti-image edits were inheriting the second input's aspect ratio
because output dimensions were calculated from image[-1]. Use image[0]
so the subject/canvas (slot 1) drives output size.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
624 unmodified lines625626627628629630631624 unmodified lines[`~pipelines.qwenimage.QwenImagePipelineOutput`] if `return_dict` is True, otherwise a `tuple`. Whenreturning a tuple, the first element is a list with the generated images."""image_size = image[-1].size if isinstance(image, list) else image.sizecalculated_width, calculated_height = calculate_dimensions(1024 * 1024, image_size[0] / image_size[1])height = height or calculated_heightwidth = width or calculated_width624 unmodified lines625626627628629630631624 unmodified lines[`~pipelines.qwenimage.QwenImagePipelineOutput`] if `return_dict` is True, otherwise a `tuple`. Whenreturning a tuple, the first element is a list with the generated images."""image_size = image[0].size if isinstance(image, list) else image.sizecalculated_width, calculated_height = calculate_dimensions(1024 * 1024, image_size[0] / image_size[1])height = height or calculated_heightwidth = width or calculated_width
qwenimage/pipeline_qwenimage_edit_plus.py+1-1