ComfyUI Node Runs on cloud

advPlot range

Hand-write a number range so you never have to hand-write an xyPlot

By TinyTerraΒ·Created 3 years agoΒ·Updated 3 months agoΒ· 604
advPlot range
    • plot_text
    β—„nodeβ–Ύβ–Ί
    β—„widgetβ–Ύβ–Ί
    β—„range_modeβ–Ύβ–Ί
    β—„start1.00β–Ί
    β—„step1.00β–Ί
    β—„stop5.00β–Ί
    β—„include_stoptrueβ–Ί
    β—„num_steps5β–Ί
    β—„label_typeValuesβ–Ί

    advPlot range is the first of tinyterra's plot-syntax generators, and it exists for one reason: writing a 10-value numeric axis by hand in the advanced xyPlot node is soul-destroying. You tell it which node and widget to target, how to step through a range, and it emits the exact <axis>:<label> / [node:widget='value'] syntax - ready to paste or wire straight into your x/y/z plot.

    The advanced xyPlot's syntax is powerful but verbose; every cell is a line of [12:cfg='7.5']. When you want to sweep CFG from 4 to 8, or a LoRA weight from 0.5 to 0.9, you do not want to type each line. This node generates them for you, and because it outputs a plain STRING, you can even chain generators into the main plot node over a wire.

    How it works

    Pick the target with node and widget (dropdowns that populate once the node sees your graph - they read "Connect to xyPlot for options" until you connect it into the flow), then choose a range_mode:

    • step_int / step_float - step from start by step for num_steps values. So start 0.5, step 0.1, num_steps 5 β†’ 0.5, 0.6, 0.7, 0.8, 0.9.
    • num_steps_int / num_steps_float - go from start to stop in num_steps evenly spaced values (include_stop decides whether stop itself is included).

    label_type controls the axis label like the other generators: Values (plain), Title and Values, or ID, Title and Values - matching the v_label / tv_label / idtv_label syntax of the main node.

    Output is plot_text, a STRING containing the generated <1:v_label> + [nodeid:widget='value'] lines, one axis worth per run. It's marked as an output node, so it displays the generated text in its own UI too - handy for verifying before you commit.

    Installing it

    Part of tinyterraNodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/TinyTerra/ComfyUI_tinyterraNodes.git
    

    or ComfyUI Manager β†’ tinyterraNodes. No extra dependencies.

    Gotchas

    Two things to watch. First, the node and widget dropdowns only populate after the node is connected into a graph where ComfyUI can resolve IDs - if they stay stuck on "Connect to xyPlot for options," you're looking at an unconnected/unsaved graph, not a bug. Second, floats round to 2 decimals and ints round to whole numbers, so a step_float sweep can collide into repeated values if your step is smaller than your rounding - 0.005 steps just produce duplicates. And remember each range node emits one axis; a full grid needs one per axis, or one run of the merge node to combine them.

    Category🌏 tinyterra/xyPlot

    Inputs (9)

    NameTypeDefaultDescription
    nodeCOMBO1 options: Connect to xyPlot for options
    widgetCOMBO1 options: Select node for options
    range_modeCOMBO4 options: step_int, num_steps_int, step_float, num_steps_float
    startFLOAT1.00-18446744073709550000–18446744073709550000β€”
    stepFLOAT1.00-18446744073709550000–18446744073709550000β€”
    stopFLOAT5.00-18446744073709550000–18446744073709550000β€”
    include_stopBOOLEANtrueβ€”
    num_stepsINT51–1000β€”
    label_typeCOMBOValues3 options: Values, Title and Values, ID, Title and Values

    Outputs (1)

    NameTypeDescription
    plot_textSTRINGβ€”