Nodes/TWanSigmaGraph/Sigma Schedule Graph
ComfyUI Node

Sigma Schedule Graph

The sigma schedule you draw by hand

By Temult·Created about a year ago·Updated about a year ago· 15
Sigma Schedule Graph
    • sigmas
    • steps
    steps20
    graph_data[{"x": 0.0, "y": 1.0}, {"x": 1.0, "y": 0.0}]

    Every ComfyUI workflow has a scheduler, and for years the whole job was picking which preset from the dropdown. TWanSigmaGraph ("Sigma Schedule Graph") throws the presets away and lets you draw the sigma curve yourself - click, drag, and your noise schedule is a shape on a canvas instead of a name. The TWan in the title tells you where it comes from: the Wan-video tinkerer scene, where people genuinely obsess over how denoising effort is distributed across frames.

    It's a niche tool, and it knows it. Eight impressions on Google, an "Advanced (WIP)" button that's disabled, an alpha-stage warning in its own README. That's fine - for 99% of your generation you want Euler + beta, not a hand-drawn curve. But the moment you're trying to shave minutes off a Wan render, or you've read that a custom sigma schedule is what separates a good video from a mediocre one, this is the node that turns "what if the noise curve bent here?" into something you can actually test.

    How it works

    The graph is a bidirectional editor: a top textarea and a canvas that stay in sync. Type a comma list (1.00, 0.67, 0.33, 0.00) or a full JSON point array, and the graph redraws; drag the points and the text updates. Behind the scenes you're editing graph_data, a JSON list of {x, y} control points where x runs from 0 (fully noisy) to 1 (clean).

    When the node executes, the backend parses that JSON, throws out anything invalid (NaN, Inf, malformed), and gets defensive about boundaries: if you forgot a point at x=0 or x=1 it quietly adds one, sorts everything by x, and dedupes. Then it linearly interpolates the curve at steps evenly spaced positions and clamps each sigma to a minimum of 0.001 - so your curve never hits literal zero mid-denoise. The result is a torch.float32 tensor of exactly steps values. One quirk worth knowing: stock schedulers hand a sampler steps+1 sigmas with a trailing zero; this node gives you exactly the count you asked for, which is part of why its author's own sampler pair is the intended target.

    The inputs and outputs that matter

    Only two inputs, and really only one you touch:

    • steps (INT, default 20, 1–1000) - how many sigma values to generate. Change it and watch the preview resize; the whole point is that your conceptual curve scales to any step count.
    • graph_data (STRING) - the control points. Normally you never type here; the widget writes it for you as you drag.

    Outputs:

    • sigmas (SIGMAS) - the tensor, wire it into any sampler that accepts custom sigma schedules. The README points at the author's companion TWanSigmaSampler; the stock KSampler has no sigmas input, so you need an Advanced/Custom sampler node here.
    • steps (INT) - the step count, handy for keeping downstream nodes in sync.

    Installation

    No model files, no heavy deps - just torch>=2.6.0, which you already have. Easiest route is ComfyUI Manager: search "TWanSigmaGraph" and install. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Temult/TWanSigmaGraph
    

    Then restart ComfyUI. You'll find Sigma Schedule Graph under sampling → custom. The node lives as TWanSigmaGraph.py plus a js/ folder - the graph widget is frontend, so if the canvas ever goes missing, the JS didn't load.

    Troubleshooting

    The README is refreshingly honest about its rough edges:

    • Blank widget on first load. Known alpha bug - refresh the page.
    • Presets not saving. Slots 1–8 are localStorage under sigma_graph_saveSlots; make sure your browser allows it for 127.0.0.1.
    • Your curve keeps reverting to the four-point default (1.00, 0.67, 0.33, 0.00). The widget caches per-node under TWanSigmaGraph_last_<node.id>; to hard-reset, delete that key in dev-tools → Application → Local Storage.

    One trap that will actually bite you: this node outputs raw sigmas, and it's picky about what consumes them. Plug it into a plain KSampler and nothing connects - you need a custom/Advanced sampler or the author's pair. Also remember the KB's standing warning: reshaping sigma curves hard is exactly what breaks flow-matching image models, so hand-drawn schedules are a Wan/DDPM-style hobby horse, not a general upgrade. If you're on Flux and reaching for this, you're doing it for research, not because it helps.

    Categorysampling/custom_sampling

    Inputs (2)

    NameTypeDefaultDescription
    stepsINT201–1000
    graph_dataSTRING[{"x": 0.0, "y": 1.0}, {"x": 1.0, "y": 0.0}]

    Outputs (2)

    NameTypeDescription
    sigmasSIGMAS
    stepsINT