FunPack Distilled Flow Sampler
The sampler for distilled few-step video — where plain Euler falls apart
- sigmas
- sampler
- sigmas
Distilled video models (think LTX2.3 with a distilled LoRA) are trained to hit their target in very few steps, and they're picky about how you sample them. Run them with a generic sampler and you get exactly the kind of artifacts that make few-step models look cheap. FunPack Distilled Flow Sampler is the ODE sampler built for that job: Adams-Bashforth 2-step for better trajectory accuracy across the big sigma jumps a distilled schedule throws at you, a Heun predictor-corrector on the final steps for detail, and a pile of experimental extras bolted on.
The inputs a beginner actually sets
Out of a very long list, three controls do the work:
- order (default 2) - 1 is plain Euler; 2 is Adams-Bashforth 2-step, which extrapolates the denoised direction from two consecutive steps for better accuracy at no extra model-call cost. Leave it at 2.
- final_correction_steps (default 1) - the last few steps get a Heun predictor-corrector pass. Each costs one extra model call but noticeably improves final detail. 1 is usually enough on an 8-step run.
- s_noise (default 0) - optional stochastic noise for diversity. The tooltip's advice is worth quoting: 0 is fully deterministic and recommended; small values (0.05–0.15) add variation without wrecking the distilled trajectory. If you want reproducibility, leave it at 0.
Outputs are sampler and sigmas, wired into a SamplerCustomAdvanced-style node: feed your base scheduler's sigmas into this node's optional sigmas input, then take both outputs into the sampler.
The rest, honestly labeled
Everything else is either helpful or experimental, and the tooltips say which is which. ab2_ramp is a genuinely useful freebie: instead of full 2nd-order on every step it ramps the AB2 contribution 0→1 across the schedule, keeping the noisy early steps close to 1st-order to avoid overshoot - no extra model calls. normalize_strength is anti-overbake (latent normalization against oversaturation and color drift), video-only, near-zero overhead.
Then the experimental tier: velocity_bias_* captures/applys an averaged early model velocity as a creative action-injection tool (strength 2–3 approaches full action replacement - the tooltip literally says "creative tool, not for consistency"), rescue_mode steers in-flight toward trajectories you rated good and away from ones you rated Awful (a no-op until you've rated a few gens for the key), alg_enabled is Adaptive Low-Pass Guidance (blur the i2v anchor during early steps so the model doesn't shortcut to a near-static video), and mg_enabled is Momentum Guidance for the fine-motion window. These are the "self-improving engine" features - skip them on your first runs and come back once the baseline looks right.
Install
It's part of ComfyUI-FunPack:
cd ComfyUI/custom_nodes
git clone https://github.com/olivv-cs/ComfyUI-FunPack
pip install -r requirements.txt
or ComfyUI Manager → search "ComfyUI-FunPack". No extra dependencies.
The honest take
For distilled few-step models this is genuinely the right tool - a distilled schedule's giant jumps are exactly where a 2nd-order method earns its keep. The experimental knobs are where the pack's personality lives, and they're marked experimental for a reason: mg_decay above ~0.5 is documented to produce garbage on the default 8-step schedule, so read the tooltips before turning anything on. Start with order=2, one final correction step, s_noise=0, and nothing else.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| order | INT | 21–2 | Multistep order. 1 = standard Euler ODE. 2 = Adams-Bashforth 2-step: extrapolates the denoised direction from two consecutive steps for better accuracy at no extra model-call cost. |
| final_correction_steps | INT | 00–3 | Number of correctable steps that use a Heun predictor-corrector pass. EACH COSTS ONE EXTRA MODEL CALL (on a 7-step run, 1 = ~14% more time). Counted over the steps that CAN be corrected: the terminal step lands on sigma 0, where the corrector has nothing to evaluate, so it is never one of them. Was 1 by default and did nothing — the window used to start on that terminal step, which returns before the corrector runs — so 0 is what every run has actually been doing. Set it to 1 to get the correction the knob always advertised, on the last real step. quality_sharpness shares this window and needs this above 0. |
| s_noise | FLOAT | 0.000–1 | Ancestral noise: the fraction of each step that is taken stochastically rather than deterministically (comfy calls this eta). 0 = fully deterministic ODE. 1.0 on a rectified-flow model (MiniMax H3, LTXAV) is exactly euler_ancestral. Free — no extra model calls. BEHAVIOUR CHANGED: this used to step the full distance and then add sqrt(sigma^2-sigma_next^2) of noise ON TOP, which is the VP variance formula and leaves the latent noisier than the schedule says — it never matched euler_ancestral at any value. It now lands short (sigma_down) and renoises with the alpha rescaling flow matching needs. A value carried over from before does NOT mean what it used to: re-tune it. If you liked euler_ancestral, start at 1.0. |
| velocity_bias_mode | COMBO | off | Experimental: capture/apply averaged early model velocity around normalized sigma 0.9/0.72/0.42. Off preserves the plain distilled ODE. Note: few-step schedules may only land on a target or two, so it fires less often than on an 8-step run. |
| velocity_bias_strength | FLOAT | 0.000–3 | Strength of the remembered velocity (action) injected at the structure sigma. 0 disables. ~0.15 = subtle spice; 0.3-1.0 = clear action crossover; 2-3 approaches full action replacement (capped so the current gen isn't wiped). Creative tool, not for consistency. |
| velocity_bias_source | COMBO | mean | How velocity bias / rescue pick a good direction. 'mean' = prompt-blind global average. 'nearest' = single best-matching prompt cluster — preserves one real good gen's detail instead of a washed-out average. Affects both apply and rescue. |
| velocity_refinement_key | STRING | default | Memory key used to capture/apply early velocity bias and rescue trajectories. |
| rescue_mode | BOOLEAN | false | Reactive in-flight rescue, rating-gated. Steers each eligible step toward trajectories you rated good and away from ones you rated Awful (matched to the current prompt). A no-op until you've rated a few gens for this prompt/key. |
| rescue_threshold | FLOAT | 0.150–1 | Fires when the step has diverged from the good trajectory by more than this (1 - cosine) OR aligned with a bad trajectory by more than this (cosine). Lower = corrects more eagerly. 0.10-0.20 typical. |
| rescue_strength | FLOAT | 0.200–0.5 | How hard to pull toward good / push away from bad when triggered (magnitude preserved, no energy injected). Keep moderate; 0.5 is a strong correction. |
| sigmasopt | SIGMAS | — | |
| ab2_rampopt | BOOLEAN | false | Graduated 2nd order (free). Instead of full AB2 on every step, ramp the AB2 contribution linearly 0->1 across the schedule: early/noisy steps stay near 1st-order euler (less overshoot), late/detail steps get full AB2. No extra model calls. Helps low-step distilled runs. No effect at order=1. |
| normalize_strengthopt | FLOAT | 0.000–1 | Video-only latent normalization (anti-overbake / oversaturation / colour drift) stacked on this ODE. 0 = off. 0.5 = gentle. Audio is never touched. ~zero overhead. |
| normalize_start_sigmaopt | FLOAT | 0.9000–1 | Sigma at/below which latent normalization activates and anchors its reference (above it the x0 estimate is meaningless). Only used when normalize_strength > 0. |
| alg_enabledopt | BOOLEAN | false | EXPERIMENTAL: Adaptive Low-Pass Guidance (arXiv:2506.08456). Blurs the i2v anchor frame while sigma is above alg_sigma_threshold, then swaps back to the sharp anchor — counters the model's tendency to shortcut to a near-static video that just matches the reference image. No-op without an i2v anchor. |
| alg_strengthopt | FLOAT | 2.01–4 | Downsample factor for the anchor blur (paper default 2.5, but 2.0 held character/i2v consistency noticeably better in testing here). Higher = blurrier anchor during the affected steps. Only used when alg_enabled; guide-frame blur has its own controls on the Scene Chain Sampler (alg_blur_guides + alg_guide_blur_*). |
| alg_sigma_thresholdopt | FLOAT | 0.9750.5–0.999 | Anchor stays blurred while sigma is above this value (the near-pure-noise steps), then swaps to sharp. Higher = narrower blurred window. Only used when alg_enabled; guide-frame blur has its own controls on the Scene Chain Sampler (alg_blur_guides + alg_guide_blur_*). |
| mg_enabledopt | BOOLEAN | false | EXPERIMENTAL: Momentum Guidance (arXiv:2602.20360). Keeps a running average of the per-step direction and blends the current step toward it once sigma drops below mg_sigma_threshold — the complementary window to ALG's blur. Smooths the fine-motion/refinement steps; may damp motion as a side effect, untested for video. |
| mg_strengthopt | FLOAT | 0.500–1 | Blend weight toward the momentum average when active (0 = no effect, 1 = fully replace the step's direction with the average). Only used when mg_enabled. |
| mg_decayopt | FLOAT | 0.500–0.99 | EMA decay for the momentum average (higher = longer memory of past steps' directions). On our 8-step schedule, high decay (e.g. 0.9) keeps the EMA anchored to the very first, near-pure-noise step's direction for nearly the whole run — wrong scale, produces garbage regardless of mg_strength. Tested safe (and good) at 0.5 even at mg_strength=1.0. Only used when mg_enabled. |
| mg_sigma_thresholdopt | FLOAT | 0.9750.5–0.999 | Momentum guidance applies while sigma is BELOW this value (the opposite window from alg_sigma_threshold) — defaults to the same boundary as ALG for a clean handoff. Only used when mg_enabled. |
| quality_sharpnessopt | FLOAT | 0.000–1 | Restores fine detail via temporal-average unsharp on the x0 prediction, applied only during the final Heun-correction steps (final_correction_steps > 0 required to have any effect). 0 disables. 0.2-0.4 typical. Free (no extra model eval), video-only. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| sampler | SAMPLER | — |
| sigmas | SIGMAS | — |