Nodes/Doom_Flux_NodePack/Doom Flux1 Inpaint Sampler
ComfyUI Node

Doom Flux1 Inpaint Sampler

Masked inpainting for Flux.1 without the plumbing

By PeterMikhai·Created about a year ago·Updated 6 days ago· 1
Doom Flux1 Inpaint Sampler
  • model
  • conditioning
  • image
  • mask
  • vae
  • output
  • denoised_output
noise_seed0
schedulersimple
steps20
denoise1.00
sampler_nameeuler
guidance3.5
max_shift1.15
base_shift0.50
noise_masktrue

Doom Flux1 Inpaint Sampler is the pack's answer to "fix this region, leave the rest alone" on Flux.1. You hand it an image, a mask, a VAE, and a conditioning, and it runs the proper masked-inpaint pipeline in a single node: it masks the pixels out of the image, encodes the masked version as the concat latent Flux expects, builds the noise mask from your mask, and samples. In a stock ComfyUI graph that's a chain of VAEEncode, SetLatentNoiseMask, and conditioning-concat nodes - here it's one purple box.

Worth a moment on the bigger picture: as the KB's inpainting doc notes, instruction-editing models (Qwen-Image-Edit, Flux 2 Klein) took over most edit work between 2025 and 2026, and masked inpainting's share of the discourse has shrunk accordingly. But masked inpainting still owns the jobs where "leave everything else untouched" is the whole point - object removal, seam repair, controlled region swaps, the uncensored stack. For those, this node is the direct route.

How it works

The mechanics are textbook Flux inpainting, all folded into one execute:

  1. Your mask (1 = regenerate) is resized to the image size.
  2. The masked-out pixels are erased from the image (the mask region is "filled" so the encoder doesn't see the thing you want replaced).
  3. The erased image is VAE-encoded into a concat_latent_image, and both that and the mask are pushed into the conditioning - the two conditions Flux.1's inpainting expects. This is the part stock ComfyUI makes you wire by hand.
  4. noise_mask is attached to the latent, the shift is computed from resolution (max_shift/base_shift, defaults 1.15/0.5), and sampling runs single-pass at CFG 1 with guidance (default 3.5) as the Flux guidance embedding.

There's a noise_mask boolean toggle (default true) that controls whether the mask actually constrains where noise is applied - leave it on unless you know why you'd turn it off. denoise defaults to 1.0; for gentler region edits, lower it. Outputs are the usual output and denoised_output latents; decode with an external VAEDecode.

The inputs that matter: image, mask, vae, conditioning, guidance, denoise, noise_seed, and steps (20 is fine for dev).

Installing it

The whole pack installs at once:

cd ComfyUI/custom_nodes
git clone https://github.com/PeterMikhai/Doom_Flux_NodePack

Restart ComfyUI (or ComfyUI Manager). No extra pip deps. Needs a current ComfyUI - V3 API. README's DoomAI_nodes.git line is stale; use Doom_Flux_NodePack.

Common issues

  • Edits leak outside the mask. Usually a mask-feathering or resolution problem - make sure the mask is white (1) exactly where you want regeneration and black elsewhere, and check that noise_mask didn't get flipped off.
  • "The rest of my image changed anyway." This is the inherent limitation of whole-latent masked inpainting - the unmasked area still passes through VAE encode/decode. The KB's inpainting doc recommends crop-and-stitch patterns when pixel-perfect preservation matters; if that's your requirement, this node is the wrong tool, not a broken one.
  • No negative prompt. It's a single-pass CFG-1 sampler; there's no negative conditioning input and none is needed for Flux.1.
  • Masked-out region comes back blank or garbled at very low denoise - the model needs some noise budget to regenerate the region. Keep denoise near 1.0 for true region replacement.

It's the pack's most "real workflow" sampler: give it a mask and it does exactly what old-school ComfyUI inpainting does, minus the tangle of wires.

CategoryDoom/Sampler

Inputs (14)

NameTypeDefaultDescription
noise_seedINT00–18446744073709550000
modelMODEL
schedulerCOMBOsimple9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
stepsINT201–10000
denoiseFLOAT1.000–1
sampler_nameCOMBOeuler44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
conditioningCONDITIONING
guidanceFLOAT3.50–100
max_shiftFLOAT1.150–100
base_shiftFLOAT0.500–100
noise_maskBOOLEANtruetrue — использовать noise_mask из маски
imageIMAGEИсходное изображение
maskMASKМаска области перегенерации
vaeVAE

Outputs (2)

NameTypeDescription
outputLATENT
denoised_outputLATENT