moose Claude Opus 4.7 (1M context) commited on
Commit
efe093f
·
1 Parent(s): b34fbef

Preserve input image aspect ratio when sliders are at default

Browse files

The Qwen-Image-Edit pipeline defaults to 1024x1024 when given height=None
and width=None, which discards the input image's aspect ratio. When the
user hasn't touched the height/width sliders (both still at the slider
minimum of 256), read the dimensions from input image 1 and pass those
to the pipeline instead, snapped to the nearest multiple of 8 and
clamped to the slider's [256, 2048] range.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

1 file changed +11 -2
app.py+11-2