Nodes/FunUI/FunUI Sampler
ComfyUI Node

FunUI Sampler

The Sampler With One Dial That Actually Matters

By digital-garbage·Created about a year ago·Updated about 10 hours ago· 21
FunUI Sampler
  • model
  • positive
  • negative
  • latent
  • settings
  • sigmas
  • latent
  • status
◄seed0►
◄steps20►
◄cfg7.0►
◄sampler_nameeuler►
◄schedulernormal►
◄denoise1.00►

FunUI v4's sampler was 8,183 lines with about seventy optional inputs, and its own source says so with the tone of a man describing a scar. This one samples and owns nothing else: pick an algorithm, pick a schedule, run it. The tricks live on the model where they can't grow the signature.

The dial that actually matters is the one almost nobody understands - denoise - and the way this node computes it is worth more than the rest of the page.

What it actually does

It builds sigmas with ComfyUI's own calculate_sigmas and then, if denoise is below 1, it computes the schedule over the full step count and trims from the end. That's the whole trick: denoise 0.5 at 20 steps means the second half of a 20-step schedule, not a 10-step schedule. Those are different curves, and the second one is what a lot of people are unknowingly running. The math is total = int(steps / denoise), then take the last steps + 1 sigmas.

Before sampling it hands the latent to fix_empty_latent_channels using the ratios FunUI Empty Latent reported (downscale_ratio_spacial, downscale_ratio_temporal). That's why this sampler and that latent node are a pair: the latent declares what ratios it was built at, and a model that wants different ones gets it rescaled here. Skip it and you sample a latent of the wrong size with nothing to tell you.

Then it's a CFGGuider with your positive and negative, cfg set from the widget, sampling from Noise_RandomNoise(seed), with previews and progress coming from ComfyUI's own machinery rather than a reimplementation. The noise mask on the latent is respected, so a pinned frame stays pinned.

Inputs and outputs

The required set is unremarkable - model, positive, negative, latent, seed, steps, cfg (default 7, 1.0 turns guidance off, which some models want), sampler_name, scheduler. The sampler and scheduler lists are read from ComfyUI's registries, so anything you install that adds a sampler shows up here without the pack being updated.

Three optional inputs do the real work:

  • denoise - as above. Default 1.0.
  • settings - a FUNUI_SETTINGS object; this is how sampler-side modifiers are handed over. The node declares which hook points it offers and core gives it only modifiers that fit, so it never names a technique.
  • sigmas - wire a schedule and it's run exactly as written: steps, scheduler and denoise are all ignored. It must run high to low and have at least two values, and the node refuses otherwise. For a second pass, the first value is your strength: ~0.4 polishes, ~0.8 reworks the shot.

Outputs: latent, and status - a multi-line report with the headline (sampler, schedule, step count, cfg) plus whatever the chain had to say about dropped or incompatible modifiers.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/digital-garbage/FunUI
cd FunUI && pip install -r requirements.txt

ComfyUI Manager: FunUI. Restart. (Pack page says olivv-cs/ComfyUI-FunPack; the repo is digital-garbage/FunUI. Rename, same code.)

requirements.txt floors comfy-kitchen>=0.2.32 for the compiled sol-attn kernel that some attention modules need, and adds gguf. It will not upgrade torch - if pip offers, refuse.

Where people get burned

A wired sigma schedule and a confusing step count. With sigmas connected, steps does nothing. People tune steps for ten minutes and conclude the node ignores them. It does - read the tooltip.

denoise as a percentage of steps. It isn't. It's a point in the schedule, and the schedule is computed over steps / denoise steps first. Trust the curve, not the intuition.

Cancelling looks like a crash. Interrupting is logged as "was cancelled part way through" and then re-raised so ComfyUI ends the queue item properly. That's correct behaviour, not a bug.

Device mismatches from custom chains. The sampler explicitly moves its result back to the intermediate device, because leaving it on the GPU works until something downstream is on the CPU. If you're mixing a hand-rolled sampler with this one in one graph, expect that class of error from whatever ignored the convention.

Blaming the sampler for the model. At CFG 1 on a guidance-distilled model your negative prompt is not being computed at all - ComfyUI skips the unconditional pass entirely. That's not this node being odd; it's the architecture, and no sampler can bring your negative back. Write constraints as presence instead, or reach for attention-level guidance.

CategoryFunUI/Sampling

Inputs (12)

NameTypeDefaultDescription
modelMODEL—
positiveCONDITIONING—
negativeCONDITIONING—
latentLATENT—
seedINT00–18446744073709550000—
stepsINT201–1000—
cfgFLOAT7.00–1001.0 turns guidance off, which some models want.
sampler_nameCOMBOeuler47 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +41
schedulerCOMBOnormal9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
denoiseoptFLOAT1.000–1Below 1 starts partway through the schedule.
settingsoptFUNUI_SETTINGS—
sigmasoptSIGMASA schedule to run exactly as written. When wired, steps, scheduler and denoise are not used. For a second pass its first value is the strength: 0.4 polishes, 0.8 reworks the shot.

Outputs (2)

NameTypeDescription
latentLATENT—
statusSTRING—