Nodes/ComfyUI-WebUI-Prompt-Bridge/WebUI Bridge SAM/Inpaint Config
ComfyUI Node

WebUI Bridge SAM/Inpaint Config

Read the SAM/Inpaint settings your Bridge is holding

By dianfangsihuo·Created 3 months ago·Updated 6 days ago· 39
WebUI Bridge SAM/Inpaint Config
    • config_json
    • enabled
    module_config

    WebUI Bridge SAM/Inpaint Config is the config reader for the pack's SAM/Inpaint module - the sibling of the ADetailer and ControlNet config taps. The main Bridge node stores SAM model, prompt mode, confidence, mask blur/dilate, inpaint denoise, area and padding in its module_config JSON; this node pulls just the sam_inpaint section out so you can see it or feed it to your own nodes.

    SAM - Segment Anything, Meta's promptable segmentation model - is the masking backbone this ecosystem reaches for when it needs to select a specific object rather than cut out the foreground. In this pack, its settings are stored here and consumed downstream: Set Latent Mask reads the mask-related settings, and Inpaint Conditioning uses the inpaint_denoise. This node is where those settings become visible.

    How it works

    One input, two outputs, no models involved. Feed it the module_config string:

    • config_json - the sam_inpaint section pretty-printed: model (sam_vit_b, sam_vit_l, sam_vit_h, sam_hq_vit_h, mobile_sam, or custom), prompt_mode (auto/point/box/mask), confidence, mask_blur, dilate, inpaint_denoise, area (whole_picture vs only_masked), padding.
    • enabled - whether the SAM/Inpaint module is switched on in the Bridge.

    The enabled flag matters more than it looks. The pack's downstream nodes check it before acting - Inpaint Conditioning picks its denoise from SAM's inpaint_denoise only when the module is on. If you configured SAM settings but the module is off, the config is dead weight.

    Inputs and outputs

    • module_config (required) - the settings JSON from the main node's module_config output.
    • Outputs: config_json (STRING) and enabled (BOOLEAN).

    How to install

    Part of the ComfyUI-WebUI-Prompt-Bridge pack: Manager → ComfyUI WebUI Prompt Bridge, or clone into custom_nodes and restart. No models for the node itself - but remember this is just the config. Actually running SAM (producing the MASK) requires a SAM plugin and its model files; the pack will offer to install a SAM node pack, and you still need the sam_vit_b-family weights somewhere in your models.

    Common issues

    The recurring trap in this pack: a config node reads, it doesn't run. Seeing SAM settings here doesn't mean a SAM model is running - the feature reference is explicit that the pack will not guess or auto-create third-party SAM loaders/segmenters. A MASK has to arrive from a real SAM/segmenter node into Set Latent Mask or Inpaint Conditioning. If enabled is false while you expected SAM-driven inpainting, flip the module on in the main node's settings first. And if masks come out too fat or thin, the dilate value (range −64 to +64) is the dial, not confidence.

    Categoryconditioning/webui/modules

    Inputs (1)

    NameTypeDefaultDescription
    module_configSTRING

    Outputs (2)

    NameTypeDescription
    config_jsonSTRING
    enabledBOOLEAN