stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Feature Request]: Add "Flip Horizontal" Button in the image preview

Open SeriousM opened this issue 1 year ago • 4 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

Like in all artistic programs there should be an option to horizontally flip the image in order to have the flipped experience. We're all humans (right?) and seeing an image from left or right creates different impressions. I guess the implementation would be very simple as it requires only to apply a css style to the image tag.

image

I searched all extensions and issues but didn't found this functionality. The image viewer already offers

  • toggle zoom
  • preview tiling
  • save the image

Proposed workflow

  1. Generate image(s)
  2. open them in the preview
  3. flip the view to change impression to the viewer

Additional information

No response

SeriousM avatar Mar 08 '23 16:03 SeriousM

very simple version of what you asked. currently it only flips with CSS so any processing still uses the original unflipped image. currently it only works for outputs in txt2img and img2img tabs.

https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/8527/files

hananbeer avatar Mar 09 '23 04:03 hananbeer

thanks @hananbeer for the quick help! should I close the issue now or will the change be merged into master?

SeriousM avatar Mar 09 '23 21:03 SeriousM

I hope it's merged but you can leave it open until then. I'm not git expert and I think I messed the PR I made several unrelated commits into a single PR 😅 if anyone knows how I could split it this will help it get approved

hananbeer avatar Mar 09 '23 22:03 hananbeer

I just found in the wiki this script which does flip the actual pixels in the image: https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Developing-custom-scripts

it's not via a button but perhaps it will help.

hananbeer avatar Mar 10 '23 06:03 hananbeer

As mentioned in the PR, should be handled as an extension.

catboxanon avatar Aug 08 '23 05:08 catboxanon