Model
Trends
.ai
Model
Trends
.ai
die besten Open-Source-KI-Modelle

Set Latent Noise Mask-Node in ComfyUI

Set Latent Noise Mask attaches a MASK to a LATENT so the sampler only changes the white area: inpainting and regional regeneration with any normal checkpoint.
Node-Paket: ComfyUI core
Kategorie: Masken und Inpainting
Diese Seite ist noch nicht übersetzt und wird deshalb auf Englisch angezeigt.

Was Set Latent Noise Mask macht

KSampler can restrict denoising to part of a latent when the latent carries a noise mask. Set Latent Noise Mask takes an encoded image and a mask and returns the latent with that mask attached. Everything outside the mask is kept from the original latent at each step, so the result blends naturally with the untouched part.
Because the original pixels are still under the mask, this method works with ordinary checkpoints and at any denoise: 0.4 to repaint while keeping shapes, 0.9 to replace the content entirely. It pairs with Load Image mask editor output, Grow Mask and Feather Mask.

Eingänge

Name
Typ
Bedeutung
samples
LATENT
The latent from VAE Encode (the full picture).
mask
MASK
White where the sampler may change pixels.

Ausgänge

Name
Typ
Bedeutung
LATENT
LATENT
The latent with a noise mask for KSampler.
AD
Spar dir die Einrichtung: ComfyUI-Workflows vorinstalliert in der Cloud
BitVector führt fertige ComfyUI-Workflows auf eigenen GPUs aus. Keine Installation, keine fehlenden Nodes, keine roten Kästen. Auf dem Handy oder Laptop öffnen und in einer Minute generieren.

So verwendest du Set Latent Noise Mask

  1. Load Image, paint a mask in the mask editor (right-click, Open in MaskEditor).
  2. VAE Encode the image.
  3. Set Latent Noise Mask with the encoded latent and the image MASK output.
  4. KSampler with denoise 0.5-0.9, then VAE Decode.

Einstellungen und Tipps

  • Grow and feather the mask (GrowMask 8-16, FeatherMask) for invisible seams.
  • Describe the whole scene in the prompt, not only the patch; the model still sees the full latent.
  • For replacing objects completely, denoise 0.9-1.0 plus a larger mask works better than a tight mask.
  • To crop-and-stitch at higher detail use the Inpaint Crop and Stitch nodes or Impact Pack Detailer.

Fehlerbehebung bei Set Latent Noise Mask

The whole image changes, not only the masked part

Warum es passiert
The mask is empty or inverted (black where you painted), or the sampler receives the unmasked latent.

So behebst du es
Preview the MASK with a Convert Mask to Image node; invert with InvertMask if needed; wire the Set Latent Noise Mask output into the sampler.

A visible rectangle or outline around the edit

Warum es passiert
Hard mask edge with no feathering, or the mask was drawn at a different size than the image.

So behebst du es
Feather or grow the mask by 8-24 pixels and make sure the mask comes from the same Load Image node as the pixels.

The masked region stays almost identical

Warum es passiert
denoise is too low for the change requested.

So behebst du es
Raise denoise to 0.7-1.0 for new content.

AD
Diesen Workflow vom Handy aus starten
Jeder Workflow auf dieser Seite ist auf BitVector vorinstalliert, mit Modellen und Custom Nodes an Ort und Stelle. Einen auswählen, Prompt eingeben, fertig. Null Einrichtung, nichts herunterladen.

Fragen zu Set Latent Noise Mask

Set Latent Noise Mask or VAE Encode (for Inpainting)?

Noise mask for normal checkpoints and partial edits; VAE Encode (for Inpainting) for dedicated inpainting checkpoints and full replacement.

Can I use a mask from another image?

Yes, any MASK of the same size works, including masks from segmentation nodes.

Verwandte Nodes

VAE Encode and VAE Encode (for Inpainting)
ComfyUI core
VAE Encode converts a pixel IMAGE into a LATENT for img2img; VAE Encode (for Inpainting) does the same while blanking the masked area so an inpainting model can repaint it.
Load Image
ComfyUI core
Load Image reads a picture from the ComfyUI input folder (or an upload) and outputs an IMAGE tensor plus a MASK taken from the alpha channel, the starting point for img2img, inpainting, ControlNet and IP-Adapter graphs.
Load Image (as Mask)
ComfyUI core
Load Image (as Mask) turns one channel of a picture (alpha, red, green or blue) into a MASK, so black-and-white mask files or painted layers can drive inpainting and compositing.
KSampler
ComfyUI core
KSampler runs the denoising loop: it takes the model, prompts and a latent and produces the finished latent image, controlled by seed, steps, cfg, sampler, scheduler and denoise.
AD
Keine Lust mehr, Nodes zu reparieren? Lass es die Cloud machen
BitVector hält hunderte ComfyUI-Workflows installiert, aktuell und getestet auf schnellen Cloud-GPUs. Kein Python, keine CUDA-Fehler, keine VRAM-Grenzen. Läuft in jedem Browser.

Weitere ComfyUI-Nodes

CLIP Text Encode (Prompt)
ComfyUI core
CLIP Text Encode turns a text prompt into CONDITIONING using the model text encoder. One node holds the positive prompt, a second one the negative prompt.
ComfyUI Manager
ComfyUI-Manager
ComfyUI Manager is the extension that installs, updates and fixes custom node packs and models from inside the interface, resolves missing nodes in imported workflows and snapshots your setup.
Load Checkpoint
ComfyUI core
Load Checkpoint (CheckpointLoaderSimple) opens a .safetensors or .ckpt model file and hands out the three parts every workflow needs: the diffusion MODEL, the CLIP text encoder and the VAE.
Save Image
ComfyUI core
Save Image writes the IMAGE tensor to ComfyUI/output as a PNG, with the whole workflow embedded in the file metadata so the picture can be dragged back into ComfyUI to restore the graph.
VAE Decode
ComfyUI core
VAE Decode converts the sampled LATENT into a pixel IMAGE with the VAE; VAE Decode (Tiled) does the same in tiles for very large images.
Empty Latent Image
ComfyUI core
Empty Latent Image creates the blank latent canvas (width, height, batch_size) that text-to-image sampling starts from; dimensions must be multiples of 8 and match the model family.