StableSwarmUI icon indicating copy to clipboard operation
StableSwarmUI copied to clipboard

Input image resolution management

Open F85x opened this issue 1 year ago • 2 comments

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

F85x avatar Jun 18 '24 01:06 F85x

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

mcmonkey4eva avatar Jun 18 '24 02:06 mcmonkey4eva

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

F85x avatar Jun 18 '24 02:06 F85x