Nodes/PortraitUtils/Finish & Run Config
ComfyUI Node

Finish & Run Config

Upscale factors, auto switches, flip and seed in one bundle

By heyburns·Created about a year ago·Updated 23 days ago· 3
Finish & Run Config
    • finish_config
    ◄initial_upscale2.0►
    ◄final_upscale4.0►
    ◄auto_levelsfalse►
    ◄auto_tonefalse►
    ◄auto_colorfalse►
    ◄flip_horizontalfalse►
    ◄seed0►

    What it's for

    The last stage of a photo workflow is a grab bag: how much you're upscaling, whether the auto corrections fire, whether the frame gets mirrored, what seed the run uses. PortraitUtils calls that bundle "Finish & Run" and emits it from one node.

    It's the smallest of the pack's four config bundles, and it's the one that's easy to underestimate - because two of its seven widgets plug directly into Auto Adjust (Photoshop-style), and two more are what the reader nodes exist for. Wire it once and the finishing stage has an authoritative source for all of it.

    What's in it

    initial_upscale (default 2.0) and final_upscale (default 4.0), both FLOAT from 0.1 to 100. Two factors rather than one, which matches how people actually upscale these days: a first pass to get the pixels, then a second, heavier pass for invented detail. The vocabulary is worth keeping straight, because "upscale" means three different jobs - more pixels (ESRGAN, Lanczos), more invented detail (a tile-ControlNet pass, SeedVR2), or a temporal pass for video - and the suite has no upscaler of its own. These are just numbers a reader hands to whatever upscaler you've installed.

    auto_levels, auto_tone, auto_color, all BOOLEAN, all off. These are the three Photoshop-style commands, and they're read by AutoAdjustV2 when its adjustment_mode is left on Use Finish Config switches. Enable one. Enable two or three and the node stacks them in Levels → Tone → Color order, which the pack documents as more aggressive than the normal workflow and likelier to clip. If you'd rather pick the command on the adjustment node itself, these booleans sit idle and nothing breaks.

    flip_horizontal is also consumed by AutoAdjustV2, which applies the mirror after the tone and colour work - so a flipped image is corrected and then mirrored, not the other way round. Cheap way to get a second candidate frame out of one photo.

    seed, INT from 0 to 4294967295. One value for the whole run.

    Wiring it

    One output, finish_config. Direct into AutoAdjustV2, or to the readers when a third-party node wants a primitive:

    Finish & Run Config ─┬─ finish_config ─> Auto Adjust (Photoshop-style)
                         ├─> (reader) Seed from Config ── INT ──> sampler
                         └─> (reader) Scale from Config ─ FLOAT ─> upscaler
    

    Where people get burned

    The seed isn't a widget with a dice button. It lives in a bundle, so there's no control_after_generate next to it, and nothing randomises it between runs. If you want the same seed across two samplers so an edit and its detail pass agree, this is perfect. If you want a fresh seed every queue, use a seed node inline on the sampler instead - and while you're there, check your global "widget control mode." ComfyUI's default fires the randomiser after the value is sent, so the number in the box isn't the one that ran. Set it to Before once per install; it's the first thing most people fix and the last thing they remember they fixed.

    The scale factors aren't a scale node. They're FLOATs for whatever upscaler you've wired. Setting final_upscale to 4 doesn't guarantee 4x of anything if the node receiving the number ignores it.

    And the usual bundle constraint: finish_config connects to PortraitUtils consumers and readers, not to a STRING/INT/FLOAT socket. That's the readers' job.

    Install

    ComfyUI Manager → search PortraitUtils (publisher heyburns, GPLv3), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/heyburns/PortraitUtils
    /path/to/ComfyUI/venv/bin/python -m pip install -r PortraitUtils/requirements.txt
    

    ComfyUI's Python environment, not a system one: numpy, Pillow>=9.1, opencv-python-headless>=4.10.0.84 and tifffile, with a single OpenCV wheel variant. Restart the ComfyUI server afterwards. Upscaler weights are separate installs and are not bundled here.

    CategoryPortraitUtils/Config V2

    Inputs (7)

    NameTypeDefaultDescription
    initial_upscaleFLOAT2.00.1–100—
    final_upscaleFLOAT4.00.1–100—
    auto_levelsBOOLEANfalse—
    auto_toneBOOLEANfalse—
    auto_colorBOOLEANfalse—
    flip_horizontalBOOLEANfalse—
    seedINT00–4294967295—

    Outputs (1)

    NameTypeDescription
    finish_configPORTRAIT_FINISH_CONFIG_V2—