ComfyUI Extension
ComfyUI-SelfRefiningSamplerPlus
Enhanced Self-Refining Video/Image Sampler (arXiv:2601.18577) with interactive per-step substeps and perturbation strength editors plus pluggable base sampler.
Alex240z/ComfyUI-SelfRefiningSamplerPlus
Nodes—
On cloudLocal install
Stars22
Updateda day ago
Readme
ComfyUI-SelfRefiningSamplerPlus
Enhanced Self-Refining Video/Image Sampler for ComfyUI based on Self-Refining Video Sampling (arXiv:2601.18577) and KJNodes' SamplerSelfRefineVideo.
Improvements
-
Interactive 2D Per-Step Curve Editors
stepsinput: sets the X-axis step grid (0 .. steps-1) and discrete per-step bar/dot previews on both curves (runtime automatically adapts to the actualsigmaslength).- Substeps Ratio Curve (
0.0to1.0ratio ofmax_substeps): visually shape how many Predict-and-Perturb (P&P) iterations run at each step, with shaded integer bars per step. IncludesPaper,Early,Mid, andFlatpresets. - Perturb Strength Curve (
0.0toperturb_strength_scale, up to3.0):0.0: identity (skips refinement).0.0 – 1.0: variance-preserving noise mixing at fixed $\sigma$ ($\sqrt{1 - p^2},\epsilon_{\text{cur}} + p,\epsilon_{\text{rand}}$).1.0: exact paper full noise resampling at $\sigma$.> 1.0: Restart-style sigma boost — resamples at $\sigma_{\text{eff}} = \min(\sigma_{\max}, \sigma \cdot p)$, denoises at $\sigma_{\text{eff}}$, and deterministically re-projects back to $\sigma$ along the ODE path.- Includes
Full,Decay,Bell, andRamppresets and a dashed1.0reference line when scale> 1.0.
-
Pluggable Base
SAMPLERInput (Defaults to Euler)- Connect any ComfyUI
KSAMPLER(e.g.euler,heun,euler_ancestral,dpmpp_2m,dpmpp_2m_sde,res_multistep,er_sde) to the optionalsamplerinput. - Zero wasted NFEs: the first model evaluation of the base sampler on a refined step reuses the already-computed refined
denoisedprediction. - Multistep history preservation: contiguous unrefined spans (where substeps = 0 or perturb strength = 0) are executed as a single call to the base sampler so multistep solvers keep their full derivative history.
- Connect any ComfyUI
-
Paper-Faithful Uncertainty Masking & Broad Model Compatibility
- Supports both
l1_mean(Paper Eq. 10) andl2_norm(KJNodes) uncertainty metrics. - Auto-detects Flow Matching (
CONST) vs standard diffusion (EPS/V_PREDICTION/EDM) noise scaling. - Supports
NestedTensorlatents as well as flat 3D joint audio/video latents (via optionallatentinput).
- Supports both