Nodes/ComfyUI-XJNodes/SEGS Color Correct RGB Hook
ComfyUI Node

SEGS Color Correct RGB Hook

Fix the tint the detail pass left behind

By alexjx·Created 10 months ago·Updated 4 months ago· 0
SEGS Color Correct RGB Hook
    • hook
    red0
    green0
    blue0
    feather0

    Detail passes sometimes come back with a color cast - the inpainted face is a touch too red, the whole region slightly warm or cool against the rest of the shot. Sometimes the fix isn't clever color matching, it's a simple offset: push red down 10, green up 5, done. XJSegsColorCorrectRGBHookProvider is that blunt instrument, delivered as a hook you plug into an Impact Pack detailer.

    Like the other hook providers in this pack, this node doesn't process anything itself. It builds a DETAILER_HOOK object that Impact Pack's FaceDetailer or Detailer (SEGS) calls into at the right moment - specifically after VAE decode, before the crop is stitched back. At that point it shifts each RGB channel by a fixed amount: add an offset to red, green, or blue in 0–255 space, clamp, and put the result back. There's also a feather input, and when a mask is available the correction is blended in only within the masked region, feathered at the edges, so the color change doesn't abruptly end at the crop boundary.

    The interface:

    • red, green, blue - INT, -255 to 255, default 0. Channel offsets; negative cools, positive warms that channel.
    • feather - 0–100, default 0. Edge softness for the masked correction.
    • Output: hook, wired into the detailer_hook input of FaceDetailer / Detailer (SEGS).

    When you'd reach for it: a reproducible cast from a specific model+sampler combo. If a particular detailer always warms the skin slightly, dialing in a red -5 and blue +5 once fixes every run without you touching the image in post. That's the advantage over doing it in an editor - it's baked into the workflow, so it's consistent and shareable. Keep expectations calibrated: it's a fixed offset, not an adaptive fix. For casts that vary run to run, the pack's Color Match Hook (which matches statistics to the original) is the smarter tool; this one is for the steady, predictable tint.

    Install is the shared pack routine:

    cd ComfyUI/custom_nodes
    git clone https://github.com/alexjx/ComfyUI-XJNodes
    

    Restart ComfyUI, find the hook providers under XJNodes/segs/hooks, or install via ComfyUI Manager by searching "ComfyUI-XJNodes". No models, no extra pip packages (requirements.txt is empty) - you just need Impact Pack present for the DETAILER_HOOK input to exist.

    Personal-pack caveat: expect zero tutorials and test per channel. The offset scale is in 0–255 units, so small INT steps are usually all you need - a value of 50 is already a heavy shift.

    CategoryXJNodes/segs/hooks

    Inputs (4)

    NameTypeDefaultDescription
    redINT0-255–255
    greenINT0-255–255
    blueINT0-255–255
    featherINT00–100

    Outputs (1)

    NameTypeDescription
    hookDETAILER_HOOK