Nodes/comfyUI-tool-2lab/seed 生成随机数
ComfyUI Node

seed 生成随机数

The seed input that marks itself as user-facing when you publish

By AI2lab·Created 2 years ago·Updated 2 years ago· 23
seed 生成随机数
    • seed
    seed0
    exporttrue

    On the surface this node looks like a joke: an integer that goes in and comes right back out. It's just a seed pass-through. But look at the category it lives in - workflow2Api - and the second input, an export toggle, and the whole thing makes sense. This node's real job is to tell the 2lab platform "when this workflow gets published as an app, let the end user set the seed here."

    That's the core idea of the entire comfyUI-tool-2lab pack: you build a workflow locally, then publish it to the 2lab WeChat mini-program platform, which turns it into an app other people can run. The pack can't know which knobs your users should touch, so it gives you explicit "input" nodes - seed, text, image, choice - that mark themselves as user-facing. InputSeed (2lab) is the seed one.

    The inputs and outputs that matter:

    • seed (INT) - the value, default 0, from 0 up to a 64-bit max. Type a seed or wire one in from another node.
    • export (BOOLEAN) - default true. When true, the seed becomes an editable field in the published app. Set it false and the seed is fixed at whatever you've typed, which is exactly what you want when a seed is load-bearing for a specific look.
    • seed out (INT) - feeds your sampler's seed socket. It's an output node, so ComfyUI runs it as a terminal.

    Two honest warnings. First, this node doesn't randomize anything by itself. The default seed is 0, and a seed of 0 is a valid seed - it'll just be suspiciously reproducible. For variety you'll still need to roll the seed yourself (a random-seed node or a fixed value you change), or expose the field in the published app and let users do it. Second, if you're not publishing to the 2lab platform - which most non-Chinese users aren't - this node is a seed input with extra steps, and you'd be better off with the seed widget on your sampler node.

    That's the honest take: InputSeed is a platform-integration node, not a utility. Use it if you're building toward a 2lab publish, ignore it otherwise.

    Installing it

    Part of AI2lab/comfyUI-tool-2lab. ComfyUI Manager → search "comfyUI-tool-2lab" → install → restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AI2lab/comfyUI-tool-2lab
    

    Restart ComfyUI. Light requirements, no model downloads.

    Common issues

    The two gotchas are the ones above: expecting randomization that isn't there, and expecting the export toggle to do something locally. It doesn't - export only matters once the workflow is on the 2lab server. If you publish a workflow and the seed field isn't showing up in the app, check that export is true on this node. And note the pack's platform relies on a WeChat QR binding (2lab_key.png on first launch) and a China-market backend; if that workflow isn't in your life, this node is inert.

    Category🦊2lab/workflow2Api

    Inputs (2)

    NameTypeDefaultDescription
    seedINT00–18446744073709550000
    exportBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    seedINT