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

[Feature Request]: Allow PNG-RGBA for Extras Tab

Open Gourieff opened this issue 11 months ago • 2 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 ?

Hello guys! There's a small issue when I want to swap a face to PNG images (with RGBA) By default SD WebUI cuts Alpha-channel when you postprocess the image via Extras Tab

E.g.: I load the image with transparency and want to swap the face So I get the following result:

image image

As we can see the alpha channel is lost

With this little fix we can operate with all 4 channels of the input image - and the result is:

image image

If there's no any other specific reason to convert the input to the RGB for Extras (except RGB mode needs for restorers) - I can add the PR

Proposed workflow

  1. Go to the Extras Tab
  2. Load PNG (of some person) with transparency
  3. Try to swap the face via ReActor
  4. Get the result with transparency as well

Additional information

Related Issue: https://github.com/Gourieff/sd-webui-reactor/issues/382

Gourieff avatar Mar 08 '24 20:03 Gourieff

Ideally a PR should be made upstream. It should also be verified it doesn't break any functionality with non-RGBA images. https://github.com/AUTOMATIC1111/stable-diffusion-webui/pulls

catboxanon avatar Mar 09 '24 02:03 catboxanon

Related Issue: https://github.com/Gourieff/sd-webui-reactor/issues/382

There is this very significant comment there from the author...

Gourieff commented 2 days ago ... 3. Insightface doesn't work with Alpha-channel as well :( It needs BGR as the input...

I don't think this is an issue for sd-webui-forge (yet).

EDIT

I shall eat my hat, as this issue is from the author of ReActor (LOL!)

stoked that it seems like ReActor may be able to process layerdiffuse output!

altoiddealer avatar Mar 09 '24 03:03 altoiddealer