Stability-AI / StableSwarmUI

StableSwarmUI, A Modular Stable Diffusion Web-User-Interface, with an emphasis on making powertools easily accessible, high performance, and extensibility.
MIT License
4.12k stars 333 forks source link

Input image resolution management #416

Open F85x opened 2 weeks ago

F85x commented 2 weeks ago

When I use the Mask Shrink Grow option, it does not function as expected, unlike the “impaint only masked” feature in Automatic1111. The issue arises because the mask shrink process encodes the entire image before shrinking, which significantly slows down the process on low VRAM machines, especially when the image exceeds 1024x1024 pixels. In contrast, Automatic1111 optimizes resource usage by processing only the masked area’s size

mcmonkey4eva commented 2 weeks ago

This is not correct.

If you enable the option, then import to the comfy tab, you can see exactly where it encodes: image

As you can see above, the VAE encode is connected to the image scale node which comes out of the crop node, ie: it encodes only the cropped section, samples, then decodes and recomposites.

It does near the bottom have a stray encode of the image image

However because this has no connections, comfy automatically discards it and does not process that

make sure your copy of Swarm is up to date btw, improvements were made in the past couple week to relevant code

F85x commented 2 weeks ago

Thank you very much for the response and explanation!!!. I updated and used the import function to comfyui. I realized that I must be making some mistake or something is wrong with my installation because, in my case, the node takes the full size of the mask instead of the resolution I set for generation. Captura de pantalla 2024-06-17 233337 Moreover, if the image is very large, for example, 4000x3000, it doesn’t even allow me to import to comfyui and an error appears. Captura de pantalla 2024-06-17 233933