Nodes/Doom_Flux_NodePack/Doom Reference Free
ComfyUI Node

Doom Reference Free

Get your reference ready without the reference-node zoo

By PeterMikhai·Created about a year ago·Updated 6 days ago· 1
Doom Reference Free
    • image_1
    • mask_1
    ui_state{}

    Image-to-image, reference-based generation, and character work all start the same way: you have a picture, and it's never the right size, orientation, or canvas for what you're about to do. The stock answer is a chain of resize, crop, pad, and mask nodes that makes your graph look like plumbing. Doom_ReferenceFree is the Doom pack's attempt to compress that whole prep stage into one node with a point-and-click UI - load a reference, crop it, normalize it, even pad it for outpainting, and get out a ready image plus a mask when you're extending the canvas.

    It's aimed squarely at the modern reference-hungry models - Flux 2 with its up-to-ten-reference input, Kontext-style editors, and the video models that take a first frame. Those models care a lot about how their reference is framed, and this node is the "make it presentable" step.

    How it works

    The node is widget-driven. You don't wire an image in; you interact with a UI widget inside the node (the README describes it as a JS widget with multiple slots; the free version ships one processed reference output). The state - which image, what crop, what transforms - lives in a ui_state JSON string. That's a Nodes 2.0-era design, and it's worth understanding because it's the thing that trips people up.

    Per the description, the prep pipeline covers the usual suspects: normalize (fix scale/color), crop (including face-aware and manual crop), align/upscale, and outpaint padding for extending the canvas. When outpainting is on, the node also emits a mask marking the new padding area.

    The inputs and outputs

    • ui_state - the JSON blob the widget manages. The tooltip says it plainly: "node state (managed by the widget)". Don't hand-edit this. If you see {} sitting there and no UI, that's a frontend issue, not a prompt you need to write.

    Outputs:

    • image_1 - the processed reference, ready to feed a sampler, an I2I node, or a reference slot.
    • mask_1 - the outpaint padding mask, when outpainting is enabled. 0 is the original area, 1 is the padding - wire it into whatever inpaint/outpaint conditioning your model uses.

    Setup

    Standard pack install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/PeterMikhai/Doom_Flux_NodePack
    

    Restart ComfyUI, or search "DoomAI Nodes" in Manager. No extra dependencies.

    Where people get burned

    • The widget doesn't render. This node is built on the newer Nodes 2.0 UI plumbing (ui_state is the giveaway). On an older ComfyUI or a stale frontend, you'll get a bare node with a {} string and no way to load an image. Update ComfyUI first; if the widget still won't appear, that's the version gap, not you.
    • mask_1 only exists when outpainting is on. Expect a mask unconditionally and you'll wire a null into your mask input and wonder why nothing is masked.
    • It's the free tier. The Pro pack (DoomAI_Pro) holds the fancier reference features; the free node is the honest single-reference version. Don't go hunting for four slots that this build doesn't ship.
    • The mask polarity. 0 = original, 1 = padding. If your inpaint node expects 1 for the region to keep, invert it. Classic mismatch, one InvertMask away from fixed.

    One thing in its favor: it's from the same single-maintainer pack as the rest of the Doom family, and the reference-prep job is one where a rough-but-widget-y node beats a precise-but-sprawling node chain for everyday use. When the widget renders, it's genuinely the fastest way to get a reference presentable in this pack's workflows.

    CategoryDoom/Utils

    Inputs (1)

    NameTypeDefaultDescription
    ui_stateSTRING{}JSON-состояние узла (управляется виджетом)

    Outputs (2)

    NameTypeDescription
    image_1IMAGEОбработанный референс
    mask_1MASKМаска расширения холста (если outpainting)