Nodes/HivisionIDPhotos-ComfyUI/ENHivisionParamsNode
ComfyUI Node

ENHivisionParamsNode

The boring node the whole pack is wired around

By AIFSH·Created 2 years ago·Updated 2 years ago· 192
ENHivisionParamsNode
    • normal_params
    size
    bgcolor
    render
    kb300
    dpi300

    ENHivisionParamsNode doesn't touch a pixel. It's a pure data node that bundles every workflow setting into a single PARAMS dict, and that dict is then fanned out to HivisionNode, AddBackgroundNode, HivisionLayOutNode and LaterProcessNode. It's the least glamorous node in the pack and the one everything depends on - no PARAMS, no run.

    What it bundles

    Five settings, all picked here once:

    • size - 18 presets pulled from the official Chinese ID-photo spec table: one inch (413x295), two inches (626x413), the small/large variants, five inches (1499x1050), plus exam and visa sizes (CET-4/CET-6 at 192x144, American visa at 600x600, and so on). This is the setting that decides how HivisionNode crops and how the layout sheet is built.
    • bgcolor - one of six: blue, white, red, black, dark blue, light gray. Only AddBackgroundNode reads it.
    • render - pure_color, updown_gradient, or center_gradient; the background style, again only used by AddBackgroundNode.
    • kb (default 300) - target file size in KB, consumed by LaterProcessNode.
    • dpi (default 300) - output DPI, also LaterProcessNode.

    The smart bit is that one bundle does all of it. Want a red background and a 150KB file? Change two fields on this node and rerun - each consumer silently reads only the keys it cares about, so nothing else in the graph needs touching.

    Output

    A single normal_params (type PARAMS), which you can wire to any or all of the four consumers. In the shipped workflow it feeds all of them at once. Keep it as one wire - splitting into per-node params bundles is exactly how these workflows drift out of sync.

    Installing it

    Same pack as everything else here. ComfyUI Manager, search "HivisionIDPhotos", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AIFSH/HivisionIDPhotos-ComfyUI
    

    Restart ComfyUI. No models, no extra dependencies, no downloads - it just reads two CSVs at import time to build its dropdowns.

    Notes

    • There's a Chinese-labeled twin, ZHHivisionParamsNode, with the identical size/color lists in Chinese (一寸, 二寸, 蓝色...). Functionally interchangeable; pick the language you read.
    • The kb and dpi fields only do anything if LaterProcessNode is downstream. If you're skipping that node for a high-res deliverable, those two fields are dead weight - harmless, but easy to forget about later.
    • Trivial but dependable: this node is just a dictionary in a box, so it's the part of this September-2024-era pack least likely to break on a modern ComfyUI.
    CategoryAIFSH_HivisionIDPhotos

    Inputs (5)

    NameTypeDefaultDescription
    sizeCOMBO18 options: One inch (413, 295), Two inches (626, 413), Small one inch (378, 260), Small two inches (531, 413), Large one inch (567, 390), Large two inches (626, 413 ), +12
    bgcolorCOMBO6 options: Blue, White, Red, Black, Dark Blue, Light Gray
    renderCOMBO3 options: pure_color, updown_gradient, center_gradient
    kbINT300
    dpiINT300

    Outputs (1)

    NameTypeDescription
    normal_paramsPARAMS