Nodes/DOGMA Nodes/DOGMA - Protezione colore
ComfyUI Node

DOGMA - Protezione colore

A four-position dial instead of a float you have to guess

By axior·Created 6 months ago·Updated 2 days ago· 2
DOGMA - Protezione colore
    • low_frequency_strength
    ◄protezione_colorealta►

    This is the smallest node in the pack and one of the more useful ones. It has no inputs, one dropdown, and one float output. Its entire job is to name the number.

    That number is low_frequency_strength - the dial the DOGMA render nodes use when they composite a re-rendered region back over your original image. The problem it solves is the oldest complaint about masked inpainting: the patch comes back with a different broad brightness and color cast than its surroundings, because the region round-tripped through the VAE and the model re-decided what "the same light" means. In A1111 that showed up as the famous grey box around a detailed face. The fix at the compositing stage is to compare the generated patch against the source at low frequency - the broad tone, not the detail - and pull it back toward the original by some fraction.

    Do that fraction by hand and you are guessing a float between 0 and 1 with no feedback loop. This node gives you four words instead.

    How it works

    The choices map to constants in the source, and the mapping is the part worth reading twice:

    minima = 1.00
    bassa  = 0.65
    media  = 0.35
    alta   = 0.15
    

    The value is how much of the generated low-frequency content survives. So minima at 1.0 effectively means "keep the render's own tone" - barely any correction - and alta at 0.15 means "subtract 85% of the broad difference," i.e. force the patch's overall color and luminance to match the photograph. The default is alta. Counter-intuitive naming, but the tooltip on the node itself spells it out, and the direction is right: the more protection you want for the original's color, the smaller the number.

    That is the whole mechanism. One dropdown in, one float out.

    Inputs and outputs

    The single input is protezione_colore, the four-position enum above. The single output is low_frequency_strength (FLOAT).

    Wire it into the low_frequency_strength input of a DOGMA phase-3 render node (DOGMAPhase3RenderV122 or DOGMAPhase3RenderV123, both of which default that field to 0.15 - the same as alta). If your workflow has several render nodes, one dial feeding all of them keeps them consistent, which is the actual reason to use this instead of typing numbers into each node.

    Install

    It ships with the pack. ComfyUI Manager search DOGMA Nodes, or:

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

    requirements.txt asks for scipy>=1.10 and nothing else - the low-frequency math on the render side is scipy's Gaussian filtering plus torch interpolation. Restart ComfyUI after cloning.

    When to move the dial

    Start at alta if your source is a photograph with real film grain or a strong ambient color. The generated patch is the new thing in the frame and it should be the one that conforms.

    Drop to media or bassa when the render is supposed to change the region's overall color - repainting a sign in a different hue, swapping the material, brightening a lamp. Heavy protection there fights your own prompt and you get a muddled in-between, half way to the color you asked for.

    minima is the escape hatch: it makes the protection essentially a no-op, which is what you want when you have already matched the patch by other means (a match_photo style correction, or a color-protection tile node later in the graph) and a second correction would just double up.

    One caveat that applies to this whole family: protection is a broad-tone fix, not a seam fix. Hard edges still come from mask expansion and feathering on the prepare side.

    CategoryDOGMA/v1.0.24

    Inputs (1)

    NameTypeDefaultDescription
    protezione_coloreCOMBOaltaProtegge colore e luminosita: minima=1, bassa=.65, media=.35, alta=.15.

    Outputs (1)

    NameTypeDescription
    low_frequency_strengthFLOAT—