Spaces:
Running on Zero
Running on Zero
Fix dimension auto-update for Gradio 6 + respect user-set dimensions
#4
by LPX55 - opened
- update_dimensions_on_upload now unwraps Gradio 6 Gallery (image, caption) tuples and reads .size from the PIL image directly instead of the invalid ['path'] dict access that caused 'Error updating dimensions: tuple indices must be integers or slices, not str'.
- Auto-fill only applies to dimensions still unset (None); user-set values are never overridden, and the error/gallery-cleared paths no longer wipe settings.
- input_images.upload now passes current height/width so the handler can see what's set.
- infer() fallback: replaced the dead height==256 and width==256 check with per-dimension None handling.
LPX55 changed pull request status to merged