ComfyUI Node

D2 XY Seed

Random seeds on demand — type -1, get a fresh number every run

By da2el-ai·Created 2 years ago·Updated 3 days ago· 66
D2 XY Seed
    • x / y_list
    • LIST
    • BATCH
    seeds-1 -1

    A1111 users get one thing for free that ComfyUI makes you build: a seed field where -1 means "surprise me." D2 XY Seed is that behavior packaged for the XY plot. You type a list of seed values - any of which can be -1 - and it outputs one line per entry, resolving each -1 to a real random number at run time.

    The use case is batch sampling. Put a few seeds into the plot and you get variation; leave every seed as -1 and every run of the plot uses a fresh set of randoms, which is how you do "generate N options and pick your favorite" without ever typing a number.

    The input and outputs

    • seeds - newline-separated values (default is -1 twice). Numbers pass through as-is; -1 resolves to a random seed.

    Outputs:

    • x / y_list - the resolved seeds as newline-separated text, for an XY Plot.
    • LIST - the same values as an array, for list nodes.
    • BATCH - the values as a list output, for feeding multiple seeds into a sampler in one go.

    The x / y_list output is the one you wire into a plot's x_list/y_list - and the docs are explicit about the other half of the deal: set the plot's x_type/y_type to INT. If you leave it on STRING, the seeds still work but they're strings, and downstream nodes may not treat them as numbers.

    How it works

    Trivial and predictable: split the input on newlines, resolve each -1 via the pack's seed generator, join back up. No caching, no memory of past runs - every execution re-rolls any -1. That's the behavior you want for "fresh random each time," and it's also the thing to remember when you're trying to reproduce a result: -1 in the saved workflow means "whatever it rolled that run," so store the resolved value if you want the image back.

    Installing

    Part of the D2-nodes-ComfyUI pack - install the pack, not the node.

    • ComfyUI Manager → search "D2-nodes-ComfyUI" → Install → restart.
    • Or cd ComfyUI/custom_nodes && git clone https://github.com/da2el-ai/D2-nodes-ComfyUI and restart.

    Dependencies: piexif, charset-normalizer - nothing heavy, no model downloads. Pack gotcha: v32.0.0+ requires the newer ComfyUI V3 schema; older ComfyUI → pre-32.0.0 release.

    Which seed node to use

    The pack has two: D2 XY Seed (this one) and D2 XY Seed2. This one is for hand-typed lists where -1 means random. Seed2 is for generated runs - give it a count and a mode (fixed, increment, decrement, randomize) and it produces a whole list for you, like 8 random seeds or 10 incrementing from a base. If you find yourself typing long numeric lists, that's the node you want instead. For everything else, this is the one.

    CategoryD2/XY Plot

    Inputs (1)

    NameTypeDefaultDescription
    seedsSTRING-1 -1

    Outputs (3)

    NameTypeDescription
    x / y_listSTRING
    LISTLIST
    BATCH*