Nodes/was-node-suite-comfyui/Shifted Tangent Scheduler
ComfyUI Node Runs on cloud

Shifted Tangent Scheduler

The bong_tangent curve that actually obeys your flow shift

By WASasquatch·Created 4 years ago·Updated about 9 hours ago· 1,884
Shifted Tangent Scheduler
  • model
  • sigmas
◄steps20►
◄denoise1.00►
◄start1.00►
◄middle0.50►
◄end0.00►
◄pivot_10.60►
◄pivot_20.60►
◄slope_10.20►
◄slope_20.20►

If you've spent any time in the community sampler menus, you've met bong_tangent from RES4LYF: a two-stage arctangent noise curve with a reputation for looking great on the right image and behaving oddly on shift. This node rebuilds that shape in the model's own time, so your flow shift actually moves where the steps land - and then hands the result over as plain SIGMAS.

Why it exists

The known trap with bong_tangent is that it applies its own sigma shift and ignores the shift sitting in your workflow. So you nudge shift in a ModelSamplingFlux node or a Flow Shift node, see nothing change, and conclude the setting is broken. It isn't - the scheduler never asked.

Shifted Tangent inverts that. It builds the arctangent shape as fractions of the model's time, then reads those fractions through the model's actual sampling curve. On a flow model that means fraction 1.0 is full noise and 0 is clean, and wherever your shift puts the steps is where they land. A flow shift now means something when this schedule is driving.

The small print: it's also registered as shifted_tangent in every KSampler's scheduler dropdown, at exactly these defaults. So most of the time you don't need the node at all - pick it in the menu. The node earns its keep when you want the curve's internals, or when you're driving SamplerCustom and building sigmas by hand.

The mechanism

Two arctangent stages, joined at middle. Each stage has a pivot (where it turns) and a slope (how sharply). Step counts are handled internally: the curve is generated over steps + 2 points and the slopes are normalised against that total, so a slope of 0.2 means the same shape at 12 steps as at 40 - you're not re-tuning every time you change step count. The output is steps + 1 sigmas ending at 0 for a clean finish.

denoise below 1 is the odd one worth understanding: it computes the curve as if you wanted steps / denoise total steps and then keeps only the last steps + 1 of them. At 0.5 with 20 steps you're getting steps 20–40 of a 40-step curve, which is what you want for a second pass over an existing image.

What you set

model decides the curve's time mapping - wire the model you're about to sample, not a bare loader output you then patch differently downstream.

steps and denoise are the two you'll touch. Keep steps matched to the sampler's step count or the schedule simply won't line up with the sampler's loop.

The rest are marked advanced and you should treat them as such: start, middle, end place the curve in the model's time; pivot_1, pivot_2 move where each stage turns (0.6 default); slope_1, slope_2 set steepness - 0.2 is gentle, 1 steep. Steep stages concentrate steps in a small span, which is how you get "most of my steps at high noise" or the reverse.

Output is sigmas, type SIGMAS, and it goes into SamplerCustom's sigmas socket (with a sampler and the same model).

Installing it

ComfyUI Manager, search WAS Node Suite v3, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui.git

ComfyUI 0.14.0+, Python 3.10+, nothing pip-installed, no downloads. RES4LYF itself is not required - the curve is reimplemented here. Worth noting because the pack's reputation from 2024 (installs everything, breaks on updates) predates this version entirely; v3 ships zero default requirements.

Where it goes wrong

Steps out of sync. SIGMAS carry their own step count. If the node says 20 and SamplerCustom says 30, the sampler runs 30 steps over a 20-step curve - usually not what you meant.

Setting denoise and expecting an img2img-style result. This only trims the schedule. The latent still has to arrive partially noised, from a sampler or an image encode.

Slope too steep. Slopes near 1 with few steps give you long stretches of nothing followed by a cluster of steps. If output looks like it's half-finished or suddenly over-cooked, wind them back towards 0.2.

Blaming the shift again. With this node and the shifted_tangent menu entry, shift works. If it still feels inert, check you're not reading a cached run - change a value on the model side so ComfyUI re-executes the branch.

CategoryWAS Suite/Sampling

Inputs (10)

NameTypeDefaultDescription
modelMODELThe model the schedule is read through; MODEL.
stepsINT201–10000Sampling steps, as `20`.
denoiseFLOAT1.000–1Share of the schedule run. 1 = from pure noise; 0.5 = the second half only, for a picture already made.
startFLOAT1.000–1Share of the model's time the first step starts from. 1 = full noise.
middleFLOAT0.500–1Share of the model's time where the second stage takes over, as `0.5`.
endFLOAT0.000–1Share of the model's time the last step ends at. 0 = clean.
pivot_1FLOAT0.600–1Share of the steps where the first stage turns, as `0.6`.
pivot_2FLOAT0.600–1Share of the steps where the second stage turns, as `0.6`.
slope_1FLOAT0.200.01–10Steepness of the first stage. 0.2 = gentle; 1 = abrupt.
slope_2FLOAT0.200.01–10Steepness of the second stage. 0.2 = gentle; 1 = abrupt.

Outputs (1)

NameTypeDescription
sigmasSIGMASThe schedule, steps + 1 values ending at 0, for SamplerCustom; SIGMAS.