Nodes/ComfyUI-RookieUI/RookieUI Load Asset Mask
ComfyUI Node

RookieUI Load Asset Mask

Load the mask you painted in RookieUI's inpaint canvas

By rookiestar28·Created 4 months ago·Updated 30 days ago· 89
RookieUI Load Asset Mask
    • MASK
    asset_handle
    channel
    invertfalse
    blur_radius0

    When you paint a mask in RookieUI's Img2Img inpaint canvas - brush a region over a face, a jacket, a background - that mask has to get from the sidebar into the actual ComfyUI graph before anything can inpaint it. This is the node that does it. It's the mask counterpart to RookieUILoadAssetImage: it takes a RookieUI-managed asset handle and turns it into a MASK you can feed to an inpaint encode or a ControlNet.

    RookieUI is an A1111-style sidebar for ComfyUI, and like the image loader, this is plumbing - you almost never place it by hand. It exists so the sidebar's in-app mask editor (brush, eraser, invert, feather, the whole A1111-style masking surface) has a clean path into native execution.

    How it works

    The node reads an asset_handle pointing at a staged mask, extracts a single channel from it, and outputs a MASK. Because a painted or uploaded mask might store its coverage in any channel, you tell it which one to read - alpha, red, green, or blue - and it can invert and feather the result on the way out. That mask then wires into RookieUIVAEEncodeForInpaint's mask input, or into a ControlNet's mask, depending on your workflow.

    The inputs that matter

    • asset_handle (string) - the pointer to the staged mask, normally filled by the sidebar when you finish painting.
    • channel (alpha / red / green / blue) - which channel holds the mask. alpha is the usual answer for a painted mask with transparency; pick a color channel if your uploaded mask is a black-and-white image.
    • invert (default off) - flips masked and unmasked. Handy when you painted the part you want to keep instead of the part you want to change.

    There's also blur_radius (0–64, default 0) to feather the mask edge right here at load time - a light blur helps the inpaint blend instead of leaving a hard seam, though you can also handle feathering downstream at the encode step. Keep it modest.

    How to install it

    It ships with the pack. Via ComfyUI Manager, search ComfyUI-RookieUI, install, restart. Manually, from your ComfyUI root:

    cd ComfyUI/custom_nodes
    git clone https://github.com/rookiestar28/ComfyUI-RookieUI
    cd ComfyUI-RookieUI
    python -m pip install -r requirements.txt
    

    Then restart ComfyUI. The mask editor and this node come with the sidebar.

    Common issues

    There's one concrete gotcha the pack itself has documented: an older build had a validation-signature mismatch on this node that could throw a missing-argument error during img2img inpaint validation. If you hit a mask-related validation error on inpaint, update the pack - that specific bug was fixed, and it's exactly the kind of thing a stale install reproduces forever.

    Beyond that, the usual mask-loading confusion is the channel and the invert flag. If your inpaint is regenerating the wrong half of the image - the background instead of the subject - you've almost certainly got invert backwards or you're reading the wrong channel. Flip one and regenerate. And as with the image loader: without a live handle from the sidebar this node has nothing to load, so if you're hand-building an inpaint graph from scratch, a stock mask source plus a paint step is the more natural route - this node is the sidebar's courier, not a general-purpose mask loader.

    CategoryRookieUI/assets

    Inputs (4)

    NameTypeDefaultDescription
    asset_handleSTRING
    channelCOMBO4 options: alpha, red, green, blue
    invertBOOLEANfalse
    blur_radiusINT00–64

    Outputs (1)

    NameTypeDescription
    MASKMASK