ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

About VAE Encode (for Inpainting) Node

Open tiptinker opened this issue 2 years ago • 8 comments

Your question

image

Is group 1 and 2 supposed to have the same effect?

Logs

No response

Other

No response

tiptinker avatar Sep 13 '24 04:09 tiptinker

Nope. VAE Encode (for inpainting) is a special-purpose node used when filling in with a denoise value of 1.0 using an inpainting model. It fills the masked area with a gray image because the inpainting model requires it.

EDIT: grayscale -> gray

ltdrdata avatar Sep 13 '24 06:09 ltdrdata

When using InpaintModelConditioning node instead of the VAE Encode (for inpainting), should we also make the input image grayscale masked?

image

tiptinker avatar Sep 13 '24 08:09 tiptinker

When using InpaintModelConditioning node instead of the VAE Encode (for inpainting), should we also make the input image grayscale masked?

No. Using InpaintModelConditioning is for the purpose of lowering the denoise to less than 1.0 in the form of img2img, so you shouldn't erase it to gray. For that, you need to configure the workflow using the conventional SetLatentNoiseMask method.

ltdrdata avatar Sep 13 '24 08:09 ltdrdata

You mean this? image

Can you share a standard inpainting workflow using InpaintModelConditioning node?

thanks!

tiptinker avatar Sep 13 '24 08:09 tiptinker

You mean this? image

Can you share a standard inpainting workflow using InpaintModelConditioning node?

thanks!

Oh, my mistake. When using that, there's no need to use SetLatentNoiseMask. InpaintModelConditioning is already handling the processing for the mask.

ltdrdata avatar Sep 13 '24 08:09 ltdrdata

OK, thanks for your time!

tiptinker avatar Sep 13 '24 08:09 tiptinker

One more question, I see many people use Differential Diffusion node in inpainting workflow, what does that do?

image

tiptinker avatar Sep 13 '24 08:09 tiptinker

One more question, I see many people use Differential Diffusion node in inpainting workflow, what does that do?

image

This allows you to adjust the strength of denoising when the mask is given in grayscale. Most commonly, when blur is applied to the mask, the edges are softly weakened. This way, even if strong denoising is applied to the central part, the denoising becomes weaker towards the edges, resulting in smooth inpainting.

ltdrdata avatar Sep 13 '24 09:09 ltdrdata