-
Notifications
You must be signed in to change notification settings - Fork 13
Mask input causes error #35
Comments
maybe fixed it #36 |
Hi this didn't fix it, still has the same problem |
Is the resolution of the mask the same as the image? |
@laksjdjf I think when I do the print outs, the problem is that mask.shape[0] and mask.shape[1] are both 1's, so the mask_size = 1 and the downsample rate becomes 0. Here is what I have: DOWNSAMPLE RATE 0 Note that the mask works perfectly fine with the inpainting controlnet. The IPAdapter also works well when the mask isn't included. The problem occurs when the mask is added into the IPAdapter. |
Where did you insert the print statement? Is it above this? IPAdapter-ComfyUI/ip_adapter.py Line 300 in 1127a2d
|
Yeah. The division by 0 comes from the down_sample_rate = 0, which comes from mask_size = 1 since mask.shape[0] = 1 and mask.shape[1] = 1, so when you do down_sample_rate = int((mask_size // 64 // out.shape[1]) ** (1/2)) |
I can confirm, the issue I was initially refering to was fixed. |
I ran this workflow and, strangely, no errors occurred. |
I have a solution to this problem and will update it, as a recent update to Comfy allows the aspect ratio of the image to be known. |
Hi, was this ever pushed and solved? |
Some specification changes have been made to the mask. |
Hi!
When I try to add a mask like in the example you showed, this error appears during sampler node running:
The error appeared some ComfyUI updates ago.
The text was updated successfully, but these errors were encountered: