ComfyUI Node

心宝❤分层数

A dropdown that just picks a number — and why that's useful

By 98624017·Created 9 months ago·Updated 4 months ago· 2
心宝❤分层数
    • 分层数
    layers1层

    Here's the whole node: a dropdown that says 1层, 2层, 3层, 4层, or 5层, and an output that emits the corresponding integer. That's it. One input, no widgets beyond the dropdown, one output. If that sounds like a waste of a node, you're right - and that's exactly why it exists.

    This is ComfyUI plumbing in its purest form, and the KB's node-plumbing doc describes the pattern precisely: a value node that breaks a setting out of a widget and turns it into a wire, so the graph can fan it out and change it in one place. "How many layers should this product page have?" is a value you want to set once and have respected by several nodes at once - the batch that generates the screens, the PSD compositor that stacks them, maybe a text node that names them.

    Why a dropdown instead of a plain integer

    The author chose an enum with friendly Chinese labels (1层 through 5层) over a raw INT box because the point is choice clarity, not arbitrary input. You can't type 7 and get a nonsensical "seven layers" value that no downstream node knows how to honor; you're constrained to the five options the pack's workflow actually supports. The 分层数 (layer count) INT output is what downstream nodes read.

    Where it actually gets used

    The natural pairing is with the pack's XinbaoBatchToPSD node: generate N screens, stack them as N layers in a PSD. The layer count has to be decided before generation (that's how many images you batch), and this node is the single knob that decides it. Change 1层 to 5层 and the whole graph re-batches to five images and writes a five-layer PSD, without hunting through five different nodes for the count.

    If you're not building a workflow where the layer count needs to be a wire, this node is pure overhead - you'd type the number into a batch-size widget instead. It earns its place in workflows that are meant to be re-run and re-tuned by someone who shouldn't have to understand the wiring.

    Installing

    Ships in comfyui-banana-li-linux:

    cd ComfyUI/custom_nodes
    git clone https://github.com/98624017/comfyui-banana-li-linux
    

    Restart ComfyUI. No dependencies, no model downloads, no computation - the output is a plain INT you can wire anywhere an integer fits. If you're building the pack's one-click detail-page workflow and want the "how many layers" decision to live in one obvious place, this is it.

    Category心宝❤工具

    Inputs (1)

    NameTypeDefaultDescription
    layersCOMBO1层5 options: 1层, 2层, 3层, 4层, 5层

    Outputs (1)

    NameTypeDescription
    分层数INT