Nodes/ComfyUI Inspire Pack/Inpaint Preprocessor Provider (SEGS)
ComfyUI Node Runs on cloud

Inpaint Preprocessor Provider (SEGS)

Inpaint ControlNet for detail passes

By ltdrdata·Created 3 years ago·Updated 9 months ago· 805
Inpaint Preprocessor Provider (SEGS)
    • SEGS_PREPROCESSOR
    black_pixel_for_xinsir_cnfalse

    This one wires an inpainting ControlNet into an Impact Pack detail pass. Inpaint ControlNet is a specialized mode where the mask itself is the condition - the model is told "here's the region to regenerate, blend it into the surrounding pixels," and it does noticeably cleaner edge blending than plain model inpainting because it was trained to be mask-aware. Inside the SEGS detailing loop, that means the refined crop reintegrates into the full image with less of a visible seam.

    It's a subtle upgrade, not a headline feature. Impact Pack's detailer already crops, resamples, and composites regions back - adding an inpaint ControlNet on top mostly buys you smoother boundaries and better context-awareness on the redraw. Worth it when you're getting telltale halos or hard edges where a detailed region meets the rest of the image.

    How the SEGS provider pattern works

    Like all of Inspire's SEGS/ControlNet nodes, this doesn't preprocess anything itself. Impact Pack detects a region, crops it, resamples at full resolution, and pastes it back; Apply ControlNet (SEGS) conditions that resample. Because the crops don't exist when you build the graph, the preprocessing is deferred: this node emits a SEGS_PREPROCESSOR recipe that gets run per-region at detail time. The underlying inpaint preprocessor comes from Fannovel16's ControlNet Auxiliary Preprocessors.

    The inputs and outputs that matter

    Almost nothing to set - this is close to a zero-config provider. The one option:

    • black_pixel_for_xinsir_cn (optional, default off) - a compatibility flag. Different inpaint ControlNet models expect the masked area encoded differently; the xinsir-style inpaint ControlNets want the region to be black pixels rather than the default encoding. If you're using an xinsir inpaint ControlNet and the results look wrong, flip this on. With any other inpaint ControlNet, leave it off. That's genuinely the whole decision.

    The single output is SEGS_PREPROCESSOR, which connects to the preprocessor input of Impact Pack's Apply ControlNet (SEGS).

    How to install it

    ComfyUI Manager: search ComfyUI Inspire Pack, install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ltdrdata/ComfyUI-Inspire-Pack
    

    then restart. It's a Dr.Lt.Data pack (ComfyUI-Manager, Impact Pack), so it's a trustworthy install.

    Common issues & troubleshooting

    No visible output. Correct - the node only takes effect feeding an Apply ControlNet (SEGS) node inside an Impact Pack detailing graph.

    Red node after restart. Missing dependencies. Install comfyui_controlnet_aux and the Impact Pack alongside Inspire.

    You still need an inpaint ControlNet checkpoint. The provider only handles preprocessing. Load an actual inpaint ControlNet matched to your base model and feed it into Apply ControlNet (SEGS).

    Weird artifacts in the masked region, and you're on an xinsir inpaint model. This is exactly what black_pixel_for_xinsir_cn is for - turn it on. If you're not on an xinsir model, the flag being on can cause the same kind of breakage, so turn it back off. It's a per-model switch, not a quality dial.

    Seams still visible. An inpaint ControlNet helps blending but it's not magic. Also check your detailer's feather/mask settings in the Impact Pack node itself - a lot of seam problems live there, not here.

    CategoryInspirePack/SEGS/ControlNet

    Inputs (1)

    NameTypeDefaultDescription
    black_pixel_for_xinsir_cnoptBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    SEGS_PREPROCESSORSEGS_PREPROCESSOR