Nodes/RES4LYF/Sigmas Recast
ComfyUI Node Runs on cloud

Sigmas Recast

Change a sigma schedule's floating-point precision

By ClownsharkBatwing·Created 2 years ago·Updated 18 days ago· 1,222
Sigmas Recast
  • sigmas
  • passthrough
precision
set_defaultfalse

Every number in a ComfyUI graph is stored at some floating-point precision - fp16, fp32, or fp64 - and that choice is a genuine trade-off, not just an implementation detail. Lower precision is faster and lighter on memory; higher precision has more room before rounding error turns into visible artifacts or outright NaNs. Sigmas Recast lets you force a schedule to a specific precision explicitly, instead of leaving it wherever it happened to land.

This matters more with RES4LYF than with a stock ComfyUI graph, because a lot of what the pack offers - SDE noise modes, implicit and diagonally-implicit solvers, eta values pushed well above what a standard sampler would accept - is numerically sensitive by nature. The pack's own documentation notes that with most SDE noise modes, an eta at or above 1.0 triggers internal scaling specifically to head off NaN errors; that's the same category of problem Recast exists to give you a manual lever over.

The inputs and outputs that matter

sigmas is the schedule to recast. precision picks the target: 16, 32, or 64 - there's no default, you choose one. set_default (off by default) does what its name suggests: as well as recasting this particular schedule, it appears to set that precision as the working default for sigma operations that follow, so you don't have to insert a Recast node at every step of a long chain. The single output, named passthrough, is the same schedule at the new precision.

Installing it

ComfyUI Manager: search RES4LYF, install, restart. Manual install:

cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF/
cd RES4LYF
pip install -r requirements.txt

Portable builds should use the embedded pip.exe. Restart and hard-refresh the browser afterward.

Where people get tripped up

If you're chasing NaNs or visibly broken output with an aggressive SDE noise mode, a high eta, or an implicit sampler, bumping precision up to 32 or 64 with this node is one of the cheaper things to try before assuming your settings are simply incompatible - it buys numerical headroom without changing anything about what you're actually sampling. The cost is memory and speed, which is exactly why the pack doesn't just run everything at 64 by default.

Separately, if a shift value elsewhere in your graph seems to have no effect and you're chasing that through precision changes, stop - that's very likely unrelated. Some RES4LYF schedulers, bong_tangent among them, apply their own internal sigma shift and ignore whatever you've set in the workflow. Check the scheduler before assuming it's a numerical issue Recast can fix.

CategoryRES4LYF/precision

Inputs (3)

NameTypeDefaultDescription
sigmasSIGMAS
precisionCOMBO3 options: 16, 32, 64
set_defaultBOOLEANfalse

Outputs (1)

NameTypeDescription
passthroughSIGMAS