Choose by the outputs your next node requires. Use InpaintModelConditioning when the downstream path needs modified positive conditioning, modified negative conditioning, and a latent from the same node. If the path needs only a latent, first keep the route already present in the workflow if it satisfies the downstream sockets. Choose VAEEncodeForInpaint on the basis of its grow_mask_by control only when the workflow specifically requires that control. If neither condition decides the choice, the documented interfaces alone do not establish which route is more suitable; consult the requirements of the workflow you are following. These are different output contracts, not interchangeable names for the same operation.
Decide from the next node, then wire in order
Start at the sampler or other immediate consumer and identify its required sockets. The official node documentation lists positive, negative, vae, pixels, and mask as InpaintModelConditioning inputs; its outputs are positive, negative, and latent. VAEEncodeForInpaint takes pixels, vae, mask, and grow_mask_by, and returns a latent. Its documentation describes that latent as including an encoded representation and a noise mask. Neither node’s listed outputs should be inferred from its name alone.
Use this sequence:
- Inspect the downstream node’s socket labels. If the route needs positive and negative conditioning as well as a latent from the inpainting node, shortlist
InpaintModelConditioning. If only a latent is needed, keep the existing route when it satisfies the downstream sockets; selectVAEEncodeForInpaintbased ongrow_mask_byonly when the workflow specifically requires that control. Otherwise, the documented interfaces do not decide which route is more suitable, so check the workflow requirements. - For
InpaintModelConditioning, connect positive and negative conditioning outputs from the existing prompt-conditioning path, the intended VAE, the source image topixels, and the mask tomask. Pass its three outputs to compatible downstream sockets. - For
VAEEncodeForInpaint, connect the source image topixels, the intended VAE tovae, and the mask tomask; setgrow_mask_byas required by the workflow. Connect its latent output only where a compatible latent input is expected. - Check the displayed socket types, not just wire color: image data is
IMAGE, a mask isMASK, the VAE isVAE, conditioning isCONDITIONING, and the encoded result isLATENT. A wire that looks plausible is not proof that the socket types or downstream contract match.
Hypothetical interface acceptance worksheet
Suppose a downstream sampler path has three required inputs: positive conditioning, negative conditioning, and latent. This is an interface-selection example derived from the documented sockets, not a ComfyUI run or a guarantee about image quality. Record the actual graph labels before deciding:
| Hypothetical requirement or observation | InpaintModelConditioning | VAEEncodeForInpaint | Decision |
|---|---|---|---|
| Downstream requires positive conditioning | Output listed as CONDITIONING | No positive output listed | Conditioning node supplies this interface |
| Downstream requires negative conditioning | Output listed as CONDITIONING | No negative output listed | Conditioning node supplies this interface |
| Downstream requires latent | Output listed as LATENT | Output listed as LATENT | Both list a latent; check the other required sockets |
Graph labels image IMAGE, mask MASK, VAE VAE | Matching input labels are documented | Matching input labels are documented | Connect by type, then inspect graph compatibility |
The table screens for socket compatibility only. It does not establish that the nodes produce equivalent latents, masks, or generated results.
Limits and what to do when the graph fails
If the chosen route leaves a required conditioning socket without a source, do not try to substitute a latent for conditioning: they are distinct documented data types. Recheck the downstream interface and use a route that actually provides the missing output, or retain the graph’s existing conditioning path where the workflow expects it.
If a connection is rejected or the graph cannot be evaluated, read the socket’s displayed type and compare it with the node documentation. Confirm that pixels comes from image data, mask from a mask source, and vae from a VAE source. The documentation identifies grow_mask_by as an integer controlling mask expansion for VAEEncodeForInpaint; it does not specify a universal value, pixel-to-latent formula, or guaranteed visual effect. Treat its setting as workflow-specific rather than assuming that a larger value always improves blending. The supplied documentation also does not define a quality comparison between these two routes.
Common questions
Do both nodes output a latent? Yes. Both documentation pages list a `LATENT` output. Only `InpaintModelConditioning` also lists positive and negative conditioning outputs.
Does `VAEEncodeForInpaint` replace prompt conditioning? Its documented interface returns a latent, not positive or negative conditioning. Connect prompt conditioning separately if the downstream graph requires it.
Should I choose by node color or name? No. Use the downstream socket requirements and displayed type labels. Names and colors are not a substitute for checking the input and output contract.
Official documentation: InpaintModelConditioning · VAEEncodeForInpaint
Sources and next step
- InpaintModelConditioning - ComfyUI Built-in Node Documentation
- VAEEncodeForInpaint - ComfyUI Built-in Node Documentation
This guide interprets public documentation and uses explicitly hypothetical acceptance examples, not application tests. Controls and availability can change; verify the cited manual against your installed version.
For work created in Imagild, carry the input requirements and acceptance checklist into the photo editor. The external software controls discussed above belong to their respective products.