Nodes/ComfyUI_yanc/๐Ÿ˜ผ> Int
ComfyUI Node

๐Ÿ˜ผ> Int

A plain integer node with proper seed controls

By ALatentPlaceยทCreated 2 years agoยทUpdated 2 years agoยท 80
๐Ÿ˜ผ> Int
    • int
    โ—„seed0โ–บ

    This looks like it shouldn't need its own node - ComfyUI already has a generic Primitive widget that can hold an integer. The reason this one exists anyway is that the vanilla Primitive is a chameleon: it takes on whatever type the first node you connect it to expects, and getting it to behave like a clean, dedicated integer with proper randomize controls is fiddlier than it should be. Int is just that: a typed integer output, done.

    How it works

    Because the widget is built as a seed-style field, you get ComfyUI's standard control-after-generate behavior for free - fixed, increment, decrement, randomize - the same buttons you're used to on a KSampler's seed, just attached to a plain integer you can wire anywhere.

    The README calls out a specific use for it: pair Int with this pack's Load Image From Folder node. Wire Int into that node's index input, set it to fixed at 0 with increment, and each queue steps to the next image in the folder. Set it back to 0 to restart from the beginning. Outside that specific combo, it's just a general-purpose counter or seed source anywhere in your graph that wants an INT without touching your actual sampler's seed.

    The inputs and outputs that matter

    • seed (INT, default 0, min 0, max roughly 1.8 ร— 10ยนโน - the full unsigned 64-bit range) - the value itself, with randomize/increment/fixed controls attached.
    • int (INT) out - wire it anywhere an integer is expected.

    How to install it

    Via ComfyUI Manager: search "yanc" or "ComfyUI_yanc" and install, then restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ALatentPlace/ComfyUI_yanc
    

    then restart ComfyUI. No extra dependencies or model downloads.

    Common issues & troubleshooting

    Randomize gives you a huge number and it breaks whatever you fed it into. The randomize ceiling is the full 64-bit range, same as a KSampler seed. That's great for actual seeds and terrible for something like a folder index that expects a small, sane number. If you're driving Load Image From Folder or any other bounded index, use fixed + increment/decrement, never randomize.

    The value keeps resetting or won't step forward. Check the control mode isn't stuck on "fixed" when you meant increment, or vice versa - same controls, same gotcha, as any seed widget in ComfyUI.

    You wanted this to behave like the generic Primitive node and it doesn't quite. That's the point - Int is a fixed, typed integer, not a shape-shifting primitive. If you genuinely need the Primitive's ability to reconfigure itself based on what it's plugged into, use the vanilla node instead; reach for Int specifically when you want predictable integer behavior with seed-style controls.

    CategoryYANC/๐Ÿ˜ผ Basics

    Inputs (1)

    NameTypeDefaultDescription
    seedINT00โ€“18446744073709550000โ€”

    Outputs (1)

    NameTypeDescription
    intINTโ€”