sd-forge-layerdiffuse
sd-forge-layerdiffuse copied to clipboard
Transparent image infotext + saving support
Title. Transparent images are currently passed to the UI as a uint8 array where Gradio handles it. This properly adds infotext to the image and also adds the option for a user to save these images (in addition to the checkered-patterned image currently saved).
Works! ππ
It would be helpful if the checkbox were ticked by default. It took me some time to realize I needed to search for it in the settings. Since the transparent image variant is the one primarily used, I don't see value in saving only the checkerboard version anyway. Enabling the transparent image option by default seems like a sensible choice to me. What do you think?
has some weird blurry efffect if save format is set to webp, any ideas?
Save as PNG
Save as WEBP (and converted to PNG for uploading to GitHub)
WebP currently has the alpha channel stripped. That would need to be fixed upstream.
https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/c8a5322d1f97a429e3ddc87a0feb44128b900bbd/modules/images.py#L553-L555
Can confirm this commit works to fix the saving issue where the transparent png isn't also saved in the output folder. With this one, both are saved in the output dir, even if it's an external dir.
An option to not save the "checkerboard" preview would be appreciated. This is useless content to output except for a preview purpose, I don't think it should be saved at all personally, but if someone has a use for it, an option would be alright.
I haven't done any testing to verify but my guess is the checkerboard background is the one returned by default for compatibility reasons. Most webui code and extensions will strip out the alpha channel if one is found. The transparent image being passed into extra_result_images
theoretically prevents any further processing being done to it.
Waiting to make any changes to this PR until lllyasviel has a chance to review it.
During batch generation when the '*-transparent.png' copy is saved, it has the incorrect seed in the info text.
como la puedo usar?
Thanks for this work ! γΎ(βΒ°βΒ°β)οΎοΎ Can someone please describe in detail the steps to resolve the issue? As a user with no programming foundation, how should I operate? (I tried replacing the .py file with the same name, and although the checkbox appeared, the image generated by layerdiffuse became with a solid black background.Still not saving transparent image successfully)
Closing in favor of https://github.com/layerdiffusion/sd-forge-layerdiffuse/pull/99 which more fully encompasses these issues.