Nodes/WAS Affine/Affine Schedule Options
ComfyUI Node

Affine Schedule Options

When the affine fires is half the effect

By WASasquatch·Created about a year ago·Updated 4 months ago· 5
Affine Schedule Options
    • affine_schedule
    • plot
    start0.20
    end0.80
    bias0.50
    exponent1.00
    start_offset0.00
    end_offset0.00
    curveeaseInOutSine
    plot_steps100
    plot_width640
    plot_height320
    show_gridtrue
    show_pointsfalse

    In the integrated affine samplers, the affine doesn't fire at full strength the whole run - it follows a curve. Affine Schedule Options is the node that builds that curve and hands it to the sampler as an affine_schedule DICT. And because it also outputs a plot image of the curve, it's the rare options node you can actually see working before you spend a generation on it.

    The inputs

    • start / end - where in the sampling the affine is active, as fractions of total steps. Defaults 0.2 → 0.8, i.e. the middle chunk. The author's comparison workflow uses 0.1 → 0.3, which is "hit the early structure, then get out of the way."
    • bias (default 0.5) - shifts the curve's emphasis toward the start or end.
    • exponent (default 1) - power-curve shaping; crank it to push the peak toward one end.
    • start_offset / end_offset - nudge the schedule's value at the endpoints.
    • curve - the easing function: linear, the whole sine/quad/cubic/quart/quint/expo/circ family, plus cubicBezier. Default easeInOutSine, which ramps up and down gently - a sensible place to start.

    The optional plot inputs (plot_steps, plot_width, plot_height, show_grid, show_points) only affect the visualization, not the schedule. If matplotlib isn't installed the plot falls back to a simple raster rendering, so the node never hard-fails.

    How it feeds the samplers

    The sampler takes your DICT, evaluates the curve across total steps to get a per-step value in [0,1], and turns that into scale = 1 + (max_scale - 1) * t and bias = max_bias * t. So the schedule shape is the envelope of your enhancement. Start/end answer "when," curve and exponent answer "how sharply," and max_scale/max_bias on the sampler answer "how much." Two outputs: affine_schedule (DICT → the affine_schedule input of any affine sampler) and plot (IMAGE → any preview node).

    Installing

    Part of WAS Affine by WASasquatch. ComfyUI Manager → Install Custom Nodes → search "WAS Affine" → install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/WASasquatch/was_affine
    

    Restart ComfyUI. Requires ComfyUI 1.0.0+. The schedule DICT works without matplotlib; install it separately if you want the pretty plots (this pack lists it as a dependency).

    Common issues

    Two recurring mistakes. First, forgetting to actually connect the DICT - the affine samplers accept no schedule and run with internal defaults, so your carefully tuned curve silently does nothing. Second, misreading start/end as step numbers: they're fractions of total steps, so 0.1 means "10% through," not "step 10." And if you set start > end, you get an inverted window - sometimes useful, usually not, and worth knowing before you chase it as a bug.

    Categorysampling/custom_sampling/options

    Inputs (12)

    NameTypeDefaultDescription
    startFLOAT0.200–1
    endFLOAT0.800–1
    biasFLOAT0.500–1
    exponentFLOAT1.000–10
    start_offsetFLOAT0.00-1–1
    end_offsetFLOAT0.00-1–1
    curveCOMBOeaseInOutSineEasing curve that shapes the schedule between start and end.
    plot_stepsoptINT10010–2000Number of points to sample across 0..steps for plotting the schedule.
    plot_widthoptINT640160–4096Output plot image width in pixels.
    plot_heightoptINT320120–2048Output plot image height in pixels.
    show_gridoptBOOLEANtrueOverlay a light grid on the plot if matplotlib is available.
    show_pointsoptBOOLEANfalseDraw point markers on the curve if matplotlib is available.

    Outputs (2)

    NameTypeDescription
    affine_scheduleDICT
    plotIMAGE