Set Precision Universal
Force fp16/fp32/fp64 through your sampling graph
- cond_pos
- cond_neg
- sigmas
- latent_image
- cond_pos
- cond_neg
- sigmas
- latent_image
Set Precision Universal does one focused thing: it forces the numeric precision of the data flowing through your sampling graph - conditioning, sigmas, the latent - to a type you choose. bf16, fp16, fp32, fp64, or passthrough to leave it alone. It's a utility node, but it's a meaningful one in RES4LYF, because the pack cares about precision more than most.
Here's the context. A lot of RES4LYF's high-order solvers do genuinely delicate math, and small rounding errors can compound over a schedule - which is why the pack's samplers even offer fp64 (double-precision) outputs. Higher precision means more numerically stable sampling and fewer subtle artifacts; the cost is speed and memory. This node lets you set the precision deliberately at a point in the graph instead of hoping the defaults are right. Most people never need to touch it - but if you're chasing the last bit of stability out of a fussy solver, or debugging why a high-order sampler is misbehaving, this is the knob.
How it works
It's a pass-through: whatever you plug into its inputs comes out the matching output, recast to the chosen precision. You insert it in the line between, say, your conditioning and your sampler.
The inputs and outputs that matter
Inputs and outputs are paired - each optional input has a matching output, so you route only what you need:
precision(defaultfp32) - the target type.fp32is the safe general default;fp64for maximum stability at a speed/memory cost;fp16/bf16to go lighter;passthroughto leave precision untouched.cond_pos/cond_neg(CONDITIONING) in and out - recast your positive/negative conditioning.sigmas(SIGMAS) in and out - recast the schedule, which is where high precision matters most for touchy solvers.latent_image(LATENT) in and out - recast the latent.set_default(default false) - when on, sets the chosen precision as the process-wide default rather than only for what passes through this node.
How to install it
ComfyUI Manager: search RES4LYF, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF
cd RES4LYF
pip install -r requirements.txt
then restart and hard-refresh (F5). Nothing to download.
Common issues & troubleshooting
fp64 slowed everything to a crawl (or OOM'd). Double precision is expensive - that's the trade. Use it only on the piece that needs it (usually sigmas), not the whole graph, and drop back to fp32 once you've confirmed the stability gain is real.
fp16 introduced artifacts or NaNs. Going down in precision on RES4LYF's higher-order solvers can make the very instability the pack works to avoid. If a low precision breaks a solver, step back up to fp32.
It seemed to do nothing. Check you actually routed data through it - an input left unconnected has nothing to recast. And passthrough is a real setting that deliberately changes nothing; make sure precision is set to what you intend.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| precision | COMBO | fp32 | 5 options: bf16, fp16, fp32, fp64, passthrough |
| set_default | BOOLEAN | false | — |
| cond_posopt | CONDITIONING | — | |
| cond_negopt | CONDITIONING | — | |
| sigmasopt | SIGMAS | — | |
| latent_imageopt | LATENT | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| cond_pos | CONDITIONING | — |
| cond_neg | CONDITIONING | — |
| sigmas | SIGMAS | — |
| latent_image | LATENT | — |