anapnoe / stable-diffusion-webui-ux

Stable Diffusion web UI UX
GNU Affero General Public License v3.0
997 stars 58 forks source link

[Feature Request]: Aspect ratio lock #17

Closed MakingMadness closed 1 year ago

MakingMadness commented 1 year ago

Is there an existing issue for this?

What would your feature do ?

Allow the user to easily scale image size while preserving aspect ratio.

Proposed workflow

  1. Press the open lock button near width and height. It will turn into a closed lock.
  2. Change either width or height.
  3. The opposite dimension will scale to preserve the aspect ratio.
  4. I believe there's a limitation that means the dimensions must be multiples of 8, if this is true then the opposite dimension's slider will turn red until it is a valid value.

Additional information

No response

anapnoe commented 1 year ago

it seems so, this is a feature of great value I agree I will add it in my todo list thanks

bryanray commented 1 year ago

there is a ext for it, but after recent update it is broken to this repo

anapnoe commented 1 year ago

You send same message 3 times probably unintentionally The current repo will not update to an unstable release from master the problem is that there is no versioning system with the extensions so if you try to install the latest update from the extension panel inside the ui, it will download the latest release which is incompatible with the previous stable releases in order to make it work you need to go to the extension repository and download the previous commit of the extension, download and extract it in the extensions folder if the one you download doesn't work either then go and repeat the process until you find the one that works

bryanray commented 1 year ago

You send same message 3 times probably unintentionally The current repo will not update to an unstable release from master the problem is that there is no versioning system with the extensions so if you try to install the latest update from the extension panel inside the ui, it will download the latest release which is incompatible with the previous stable releases in order to make it work you need to go to the extension repository and download the previous commit of the extension, download and extract it in the extensions folder if the one you download doesn't work either then go and repeat the process until you find the one that works

yup i am on proxy, it must be duplicated, it happened sometimes

BinaryQuantumSoul commented 1 year ago

This is a good feature proposition. Another good possibility could be to have an aspect ratio picker with common 1:1, 16:9, etc. in the place of the lock button. Or both of them, next to the switch width/height buttons

BinaryQuantumSoul commented 1 year ago

Actually, you could cooperate to implement this extension by default. It does exactly what is asked here: lock and aspect ratio selector. https://github.com/thomasasfk/sd-webui-aspect-ratio-helper

https://user-images.githubusercontent.com/22506439/227396634-7a63671a-fd38-419a-b734-a3d26647cc1d.mp4

FutonGama commented 1 year ago

Well the extension is working in general but only one thing is not working correctly, the Locker icon is not resizing the slider for some reason, i'm trying to discover here and the only thing i know is related to the sd_theme_editor, removing that works but i don't want to remove it so i'm trying to discover a way to fix. chrome_MsOIv9DCH7

Edit: Disable "Dispatch event change on release, for slider and input number components" Fixed my problem