Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input image resolution management #416

Open
F85x opened this issue Jun 18, 2024 · 2 comments
Open

Input image resolution management #416

F85x opened this issue Jun 18, 2024 · 2 comments

Comments

@F85x
Copy link

F85x commented Jun 18, 2024

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
Copy link
Contributor

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
Copy link
Author

F85x commented Jun 18, 2024

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

@mcmonkey4eva mcmonkey4eva reopened this Jun 18, 2024
@mcmonkey4eva mcmonkey4eva changed the title Issue with Mask Shrink Grow Function Input image resolution management Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants