Nodes/Custom Graph Sigma for ComfyUI/πŸ“ˆ Custom Graph Sigma
ComfyUI Node

πŸ“ˆ Custom Graph Sigma

Draw your noise schedule instead of picking one from a dropdown

By JoeNavarkΒ·Created about a year agoΒ·Updated about a year agoΒ· 30
πŸ“ˆ Custom Graph Sigma
    • curve_data
    • sigmas
    β—„steps20β–Ί
    β—„start_y1.00β–Ί
    β—„end_y0.00β–Ί
    β—„curve_dataβ–Ί

    Every scheduler in ComfyUI hides a curve. Karras, exponential, linear - these are all just descriptions of how much noise gets stripped at each step, and normally you pick one from a dropdown and move on. Custom Graph Sigma (the CustomSplineSigma node) skips the dropdown: it puts the curve on the node and lets you draw it. Click to drop control points, drag to reshape, shift+click to delete, and the node turns your shape into a real SIGMAS tensor that feeds straight into a sampler.

    Is that overkill? For most SD 1.5 and SDXL work, honestly yes. Default Karras is tuned well enough that drawing your own schedule is a hobby, not an upgrade. Where it earns its keep is the fiddly stuff the defaults weren't designed for - video models like Wan where people hand-tune sigma curves to balance motion vs. detail, or any experiment where you want to probe exactly how the noise-removal shape changes the output. If you've ever wanted "more steps in the middle, then a hard drop at the end" and could only approximate that with a preset, this is your node.

    How it works

    The heavy lifting happens in the node's frontend. A small canvas widget renders your control points, connects them with a centripetal Catmull-Rom spline (smooth, and it doesn't wildly overshoot the way a naive cubic can), and writes the result as JSON into the node's curve_data field. On execute, the Python side reads that JSON. If the frontend provided sampled curve points it uses those directly for a pixel-perfect match; otherwise it falls back to interpolating your control points with scipy. Either way it then resamples to however many values you asked for and scales the result so the schedule starts at start_y and ends at end_y.

    The inputs that matter

    • steps - how many values end up in the output tensor. Default 20, up to 4096. Fewer steps = chunkier schedule; the curve gets sampled down, it doesn't get smarter.
    • start_y and end_y - the sigma range. Defaults are 1.0 β†’ 0.0, i.e. full noise down to clean. Keep start_y above end_y: samplers expect a descending sequence, and this node won't fix one for you.
    • curve_data - the JSON the graph produces. You normally don't touch it, but it's a real string output too, which means you can save a curve as text and paste it back in later, or feed one node's curve_data into another's to copy a shape between workflows.

    There's also a preset_selector dropdown the frontend adds (Simple, Karras, Exponential, VP, VE, Linear, Polyexponential, DPM-Solver-Fast, Custom) - handy for a starting point, but it's a UI convenience, not a real input; picking one just drops control points onto the graph.

    The two outputs are sigmas (the SIGMAS tensor - wire it into the sigmas input of SamplerCustom or SamplerCustomAdvanced, or anything else that eats a SIGMAS) and curve_data (the JSON string).

    Installing it

    ComfyUI Manager, search "Custom Graph Sigma", install, restart. Or the manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/JoeNavark/comfyui_custom_sigma_editor
    # restart ComfyUI
    

    No model files, no API key, no heavy download. The pack ships no requirements file and relies on ComfyUI's bundled scipy/numpy; a normal install just works. On a stripped-down setup, if you hit ModuleNotFoundError: scipy, that's the missing piece:

    pip install scipy
    

    Where people get burned

    • Ascending sigmas. Set start_y below end_y and you hand the sampler a curve that goes up - most samplers will error or quietly produce garbage. Defaults are correct; just keep the range descending.
    • The graph is the node. If you click inside the graph area it eats the click for point editing, which is exactly what you want, but it surprises people who expect to drag the node by its middle.
    • No visible graph editor? The editor lives in the frontend JS, so a browser with a stale cache or an un-restarted ComfyUI will show a plain node with no drawing surface. Full restart usually fixes it.
    • Flow-matching models are a trap here. On Flux-type rectified-flow models the trajectory is nearly straight and aggressive schedule reshaping costs more than it helps - Karras already underperforms on them, and your custom curve inherits that problem. Treat this as an SD 1.5 / SDXL / video-model tool, not a universal knob.
    Categoryimage/generator

    Inputs (4)

    NameTypeDefaultDescription
    stepsINT202–4096β€”
    start_yFLOAT1.000–20β€”
    end_yFLOAT0.000–20β€”
    curve_dataSTRINGβ€”

    Outputs (2)

    NameTypeDescription
    curve_dataSTRINGβ€”
    sigmasSIGMASβ€”