SwarmUI icon indicating copy to clipboard operation
SwarmUI copied to clipboard

Mask Shrink Grow + ControlNet

Open F85x opened this issue 1 year ago • 2 comments

Expected Behavior

When selecting Mask Shrink Grow while editing an image with a mask, it is expected that ControlNet can be applied to the cropped image.

Actual Behavior

It seems that the preprocessor uses the full image instead of the one cropped by the mask. This makes it impossible to efficiently apply ControlNet.

Steps to Reproduce

Edit an image, apply a mask, and select Mask Shrink Grow. Enable the ControlNet option and use any available model. image

Debug Logs

None

Other

No response

F85x avatar Aug 26 '24 19:08 F85x

+1! This behaviour is bugging me since the day i started using Swarm. The same issue with controlnet being applied incorrectly happens when you enable tiling in refiner/upscaler.

limonadinis avatar Sep 01 '24 13:09 limonadinis

Hello! I have no idea how to help with the code to fix this issue, but while playing around with the workflow tab, I found that the problem apparently gets resolved if, instead of inputting the "SwarmLoadImageB64" as the image in the "Apply ControlNet" node, we use the output from the "SwarmImageCrop" node. I hope this at least helps someone who knows how to modify the code. Thanks! image

F85x avatar Oct 07 '24 14:10 F85x

Fixed controlnet with mask-shrunk init image

mcmonkey4eva avatar Nov 10 '24 15:11 mcmonkey4eva