Nodes/DOGMA Nodes/DOGMA Local - Qwen 2.1 / Denoise o Edit / 2K
ComfyUI Node

DOGMA Local - Qwen 2.1 / Denoise o Edit / 2K

Masked Qwen inpaint at 2K, with a hard promise that nothing else moves

By axior·Created 6 months ago·Updated 2 days ago· 2
DOGMA Local - Qwen 2.1 / Denoise o Edit / 2K
  • approved_jobs
  • model
  • clip
  • vae
  • image
  • report
◄steps25►
◄cfg2.5►
◄sampler_nameeuler►
◄schedulersimple►
◄denoise0.65►
◄seed1976►
◄feather_px8►
◄negative_promptgarbled lettering, misspelled words, duplicated signs, extra text, modern logos, QR codes, websites, plastic texture, oversharpening►
◄vae_tile_size4096►
◄modeDenoise►
◄match_phototrue►
◄photo_strength0.85►
◄lying_sigma0.00►
◄lying_start0.00►
◄lying_end1.00►

The KB's summary of the 2026 inpainting situation is that instruction-editing models took most of the job except for the one thing a mask still guarantees: bit-identical pixels outside the region. This node is that guarantee, implemented. It renders each zone you approved through a Qwen 2.1 edit path and then checks that every pixel outside the mask is unchanged, and refuses to hand you the result if it is not.

That check is not decoration. Modern edit models re-emit the whole frame, so unmasked areas drift a little on every pass, and it compounds across a chain of edits. Running them through a masked latent and compositing the crop back is the standard workaround; being able to prove it worked is not something most nodes bother with.

How it works

Per zone, the node cuts the crop at render_side on the long side, builds the instruction from your per-zone prompt plus the project context, and then branches on mode.

Denoise is true masked img2img. The crop's own latent is the starting point and no duplicated reference image is supplied - the source comment explains why, and it is the best argument in the file: handing the model the photograph again as a reference conditions it to copy the defective graphics you are asking it to repair. So Denoise encodes the crop, conditions on the prompt alone unless you attached an object reference, and samples at your denoise.

Edit passes the crop as image 1 and the reference as image 2, encodes both through Qwen's reference path with a tiled encode (the pack wraps the VAE in a proxy so the reference encode respects vae_tile_size instead of exploding), and samples at denoise - which the tooltip tells you to set to 1.0 with CFG around 1.0.

Either way the sample goes through KSampler-style sampling (with LyingSigmaSampler substituted only if you move lying_sigma off zero), a tiled VAE decode, and a composite that feathers inward from the expanded zone border using a smoothstep distance ramp. Optional match_photo adds a low-frequency gain correction toward the source's local tone plus grain matching - reusing the photograph's own residual texture in Denoise mode rather than inventing white noise, which is the difference between "aged photo" and "sprinkled dots."

Inputs and outputs

approved_jobs (DOGMA_LOCAL_JOBS126) comes from the Local review node after your approvals. model, clip, vae are lazy. steps (25), cfg (2.5 - the tooltip says Denoise 2.5, Edit 1.0), sampler_name (euler), scheduler (simple), denoise (0.65), seed (1976, with a control-after-generate widget), feather_px (8, in native photo pixels), negative_prompt (a well-chosen default aimed at garbled lettering and modern logos), vae_tile_size (4096), mode (Denoise/Edit).

Optional: match_photo (on), photo_strength (0.85), lying_sigma (0; anything else requires ComfyUI-Detail-Daemon installed), lying_start, lying_end.

Outputs: image, report (STRING). The report is per zone: mode, effective denoise, CFG, which path was taken, crop size, the measured pixel delta before and after compositing, and a warning if that delta came in under 1.5/255 - the pack's way of telling you the render did nothing rather than letting you find out later.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes

Or ComfyUI Manager → DOGMA Nodes, then restart. scipy>=1.10 is the pack's only declared dependency. You will also want ComfyUI new enough to ship the core Qwen 2.1 encode node - the node raises a clear error naming it if the reference encode is not compatible.

Where people get burned

Nothing changed. The report will say so. In Denoise mode that usually means denoise too low for the size of the change; in Edit mode, check CFG - the tooltip's 1.0 base is not a typo.

Lying Sigma error. Setting it is free; it is not free to not have ComfyUI-Detail-Daemon installed, and the error says exactly that.

Feather direction. feather_px feathers inward from the expanded border, in pixels of the original photo, applied to every zone. Push it too far and the centre of a small zone never gets fully replaced; that is a feature when you want a soft repair and a bug when you want a repaint.

CategoryDOGMA/Local Inpaint 1.0.32

Inputs (19)

NameTypeDefaultDescription
approved_jobsDOGMA_LOCAL_JOBS126—
modelMODEL—
clipCLIP—
vaeVAE—
stepsINT251–100—
cfgFLOAT2.51–12Denoise img2img: 2.5 come base. Edit con riferimento: 1.0 come base. Il valore viene usato senza modifiche nascoste.
sampler_nameCOMBOeuler50 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +44
schedulerCOMBOsimple9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
denoiseFLOAT0.650–1—
seedINT19760–18446744073709550000—
feather_pxINT80–64Sfumatura verso interno del bordo espanso, in pixel della foto originale. Vale per tutte le zone.
negative_promptSTRINGgarbled lettering, misspelled words, duplicated signs, extra text, modern logos, QR codes, websites, plastic texture, oversharpening—
vae_tile_sizeINT4096512–4096—
modeCOMBODenoiseDenoise: img2img mascherato dalla foto, senza riferimento duplicato. Edit: immagine anche come riferimento, denoise 1.0. CFG consigliato: Denoise 2.5, Edit 1.0.
match_photooptBOOLEANtrue—
photo_strengthoptFLOAT0.850–1—
lying_sigmaoptFLOAT0.00-0.999–1Globale per tutte le zone. 0 = percorso originale. Richiede ComfyUI-Detail-Daemon se diverso da 0.
lying_startoptFLOAT0.000–1—
lying_endoptFLOAT1.000–1—

Outputs (2)

NameTypeDescription
imageIMAGE—
reportSTRING—