Nodes/Radiance/Sampler
ComfyUI Node

Sampler

The sampler that replaces your KSampler, CFG++ hacks, and video samplers in one node

By FXTD-Studios·Created 9 months ago·Updated 3 days ago· 249
Sampler
  • model
  • positive
  • negative
  • latent_image
  • refiner_model
  • noise_override
  • sigmas_override
  • custom_ays_anchors
  • restart_schedule
  • sdr_reference
  • sdr_vae
  • latent
  • sigmas
  • sigmas_remaining
  • sigma_plot
◄presetAuto►
◄steps20►
◄start_step0►
◄end_step0►
◄cfg1.0►
◄audio_cfg0.0►
◄sampler▾►
◄sampler_modeStandard►
◄phase_split0.40►
◄scheduler▾►
◄scheduler_modeManual►
◄denoise1.00►
◄flux_shift1.0►
◄flux_guidance3.5►
◄flux_guidance_profileStatic►
◄seed1►
◄pag_scale0.0►
◄model_typeauto►
◄sigma_blend_steps0►
◄guidance_rescale_phi0.00►
◄preview_methodNone►
◄noise_typeGaussian►
◄conditioning_clip_targetAuto►
◄add_noisetrue►
◄return_with_leftover_noisefalse►
◄ays_schedulefalse►
◄tile_modefalse►
◄tile_size128►
◄tile_overlap16►
◄tile_blendfeather►
◄terminal_sigma_to_zerofalse►
◄force_exact_stepsfalse►
◄refiner_start_step20►
◄_js_export_btn►
◄_js_import_btn►
◄_js_preset_info►
◄restart_count0►
◄noise_alpha_start1.00►
◄noise_alpha_end1.00►
◄sdr_blend0.35►
◄sdr_inject_steps6►
◄sdr_decay0.65►
◄model_meta►
◄temporal_window0►
◄temporal_overlap4►

The default KSampler is fine until you need any of the things it can't do: phase-shift sampling, Align Your Steps schedules, perturbation attention (PAG), tiled sampling on a big latent, or sampling a WAN video with the right sigma schedule. ◎ Radiance Sampler Pro is the pack's one-sampler-to-rule-them-all: it auto-detects the model architecture (Flux, SD3, SDXL, WAN, LTX, HunyuanVideo, Lumina2, and friends), then exposes everything the modern sampler toolbox has, in one node.

If you only ever generate with a stock KSampler, this is overkill and you should keep your simple workflow. If you've ever stacked a second sampler for a phase shift, or wished your sampler understood your Flux shift, or wanted tiled sampling without a separate patch node - this is the consolidation. It also pairs with the rest of the pack: wire latent_format from Radiance Resolution / VAE Encode in and it validates channels before you waste a run.

How it works

Under the hood it wraps ComfyUI's core sampling machinery (it uses the stock KSampler.SAMPLERS and SCHEDULERS lists, so every sampler/scheduler you know is here) and layers on production features. The headline is sampler_mode:

  • Standard - a normal sample with your chosen sampler/scheduler.
  • Phase-Shift (Euler→DPM) / Phase-Shift (Euler→SGM) - start with one sampler and hand off to another at phase_split (0–1), with optional sigma_blend_steps to smooth the transition. This is the community's "detail then smooth" trick, baked in.
  • CFG++ (Perpendicular) - the CFG++ variant that separates the score direction; helps at higher CFG.

Then the per-architecture dials. For Flux-style models there's flux_shift and flux_guidance (with a Dynamic (Creative Start/End) profile option). For video there are normalization factors. ays_schedule uses the Align Your Steps research-optimized sigma schedule (best at 8–15 steps). noise_type swaps the initial noise - Gaussian, Perlin (coherent structure), Spectral (pink/1f), Brownian (video-correlated), Uniform. pag_scale adds perturbation attention for prompt adherence (0 = off). guidance_rescale_phi applies Imagen-style guidance rescale (0.7 recommended for SDXL to stop oversaturation at high CFG).

There's also multi_cond_mode (average/weighted/sequential blending of a second positive via positive_2), tile_mode with tile_size/tile_overlap/tile_blend for memory-efficient high-res sampling, a preview_method (TAESD/Latent2RGB) for mid-run previews, and a preset dropdown that pre-configures whole recipes (Flux txt2img, Flux Fast 12-step, Flux Schnell 4-step, SD3.5 Turbo, WAN txt2vid, and ~24 more).

The inputs that matter

For a beginner, honestly: model, positive, negative, latent_image, then steps, cfg, sampler, scheduler, seed. That's a KSampler's worth of familiarity. Then add, in order of payoff:

  • preset - pick a model recipe and skip the rest of the thinking.
  • model_type (default auto) - set it when auto-detect gets an exotic architecture wrong.
  • sampler_mode / phase_split - the phase-shift upgrade.
  • flux_shift / flux_guidance - the Flux-specific dials.
  • denoise - for img2img; 1.0 is full denoise.

Outputs: latent (→ VAE decode), sigmas (the schedule used, chainable), sigma_report (human-readable timing/schedule), and latent_meta (JSON telemetry: arch, steps, scheduler, noise type, tile mode, seed, time - wire it to Radiance Show Text for debugging).

How to install it

It's in the radiance pack. ComfyUI Manager → "Radiance", or:

cd ComfyUI/custom_nodes
git clone https://github.com/fxtdstudios/radiance.git
cd radiance
pip install -r requirements_windows.txt

Restart, and it's under FXTD Studios/Radiance/Generate.

Common issues

The realistic gotchas: (1) force_exact_steps and force_full_denoise_steps are blank-tooltip power switches - leave them alone unless you're chasing a specific schedule behavior, they exist for edge reproducibility. (2) Phase-shift with sigma_blend_steps can add a visible hitch if you pick wildly different samplers; start with the two built-in phase-shift presets. (3) tile_mode at small tile_size with aggressive overlap will noticeably slow sampling - it's a VRAM saver, not a speed boost. (4) Because it auto-detects model_type, an unusual checkpoint can sample with subtly wrong defaults; latent_meta shows you what it chose, and the manual model_type override is right there.

One sampler to replace several, and the presets mean you can be productive before you understand half of it. That's a good deal for a node this deep.

CategoryFXTD STUDIOS/Radiance/Generate

Inputs (56)

NameTypeDefaultDescription
modelMODELDiffusion model to sample with. It is cloned before any patch (PAG, guidance rescale, SDR anchor, windowing), so the loader's model is not modified.
positiveCONDITIONINGPrompt conditioning to steer toward. For guidance-embedded models (Flux, Flux.2, LTXV, LongCat) flux_guidance is written into it.
negativeCONDITIONINGConditioning to steer away from. Only evaluated when cfg is above 1.0; at 1.0 ComfyUI skips the negative pass.
latent_imageLATENTStarting latent: empty for text-to-image, VAE-encoded for img2img (lower denoise). A noise_mask on it limits sampling to the masked area.
presetCOMBOAutoAuto and Custom let the node replace cfg, flux_guidance, steps and sampler with the detected model's defaults while they sit at their widget defaults. A named preset only fills the widgets in the UI; at run time the widget values are used as-is.
stepsINT201–200Total denoising steps. More steps = higher quality but slower. 20–30 is typical for most samplers.
start_stepINT00–200Start step (0 = beginning)
end_stepINT00–200End step (0 = use total steps)
cfgFLOAT1.00–20Classifier-free guidance scale. 1.0 runs one model pass per step and ignores the negative; above 1.0 adds a negative pass (about twice the time). Keep 1.0 for Flux and distilled or turbo models and use flux_guidance instead.
audio_cfgFLOAT0.00–100LTX-AV only (e.g. LTX 2.5): separate CFG scale for the audio half of the latent. 0 = same as cfg (single-CFG, pre-2.5 behavior).
samplerCOMBOComfyUI sampling algorithm. With preset Auto or Custom, 'euler' is replaced by the detected model's recommended sampler, if it has one.
sampler_modeCOMBOStandardStandard: one sampler throughout. Phase-Shift: switch at phase_split to dpmpp_2m (DPM) or to the same sampler on the sgm_uniform schedule (SGM); not used for video models. CFG++: scales cfg toward 1.0 by a cosine of each stage's starting sigma, so a plain single-stage run keeps cfg unchanged.
phase_splitFLOAT0.400–1Phase-Shift modes only: fraction of the total steps at which the second sampler takes over (0.4 of 20 steps = step 8).
schedulerCOMBOComfyUI noise schedule used to build the sigmas. Ignored when ays_schedule, sigmas_override or the SD/SDXL Turbo schedule is in use.
scheduler_modeCOMBOManualManual uses the scheduler widget. Auto replaces it with the detected model's default scheduler (it does not depend on the step count).
denoiseFLOAT1.000–1Fraction of the noise schedule to run. 1.0 starts from pure noise; lower values skip the noisiest steps and keep more of latent_image (img2img). Fewer steps run unless force_exact_steps is on.
flux_shiftFLOAT1.00.01–10Extra time-shift applied to the sigma schedule, shift*s / (1 + (shift-1)*s), on top of the model's own shift. 1.0 = off; higher spends more steps at high noise. Intended for flow-matching models (sigmas 0-1). Auto/Custom preserve this value.
flux_guidanceFLOAT3.50–20Embedded guidance written into the positive conditioning for Flux, Flux.2, LTXV and LongCat; ignored by other models. Auto/Custom replace 3.5 with the model default (for example 0 for Schnell).
flux_guidance_profileCOMBOStaticStatic: one value for the whole run. Dynamic: splits the run into stages; guidance-embedded models start at 0.6x flux_guidance and end slightly lower, CFG models start at 1.2x cfg and end at 0.7x (cfg above 1.0 only). Stage boundaries include ramp ends so the middle reaches 1.0x when the step range includes it. Short or partial runs may omit phases. Ignored in tile_mode.
seedINT10–18446744073709550000Random seed for reproducible results. Use the control below it (randomize / increment / fixed) to vary the seed between runs.
pag_scaleFLOAT0.00–5Perturbed-attention guidance strength (0 = off). It perturbs the unconditional pass, so it only works with cfg above 1.0.
model_typeCOMBOautoModel family used for defaults, guidance handling and schedules. auto detects it from the model (or from model_meta when connected); set it by hand if detection is wrong.
sigma_blend_stepsINT00–10Smooth sigma transition steps at phase-shift boundary
guidance_rescale_phiFLOAT0.000–1Guidance rescale (Imagen). 0=off, 0.7=recommended for SDXL. Prevents oversaturation at high CFG.
preview_methodCOMBONoneLive preview during sampling. TAESD needs the taesd weights in models/vae_approx and falls back to Latent2RGB without them. None sends no Radiance preview, only ComfyUI's progress bar.
noise_typeCOMBOGaussianNoise generation algorithm. Perlin=coherent structure, Spectral=pink/1f noise, Brownian=video-correlated, Uniform=flat distribution.
conditioning_clip_targetCOMBOAutoHas no effect. Kept so saved workflows load; any value other than Auto only logs a warning. Choose the text encoder at encode time instead (e.g. CLIPTextEncodeSDXL).
add_noiseBOOLEANtrueInject fresh noise at the start of sampling. Disable for img2img-style passes that should preserve structure.
return_with_leftover_noiseBOOLEANfalseReturn the latent with residual noise un-removed. Useful for multi-pass workflows.
ays_scheduleBOOLEANfalseUse AYS (Align Your Steps) research-optimized sigma schedule. Best at 8-15 steps.
tile_modeBOOLEANfalseEnable tiled sampling for memory-efficient high-resolution generation.
tile_sizeINT12832–1024Tile size in latent pixels (128 latent ≈ 1024px output with VAE factor 8).
tile_overlapINT160–256Overlap between adjacent tiles to reduce seam artifacts.
tile_blendCOMBOfeatherSeam blending method. feather=cosine fade, gaussian=bell curve, average=uniform.
terminal_sigma_to_zeroBOOLEANfalseEnsure terminal step reaches zero noise even on truncated image-to-image runs. Vital for Flow Matching models.
force_exact_stepsBOOLEANfalseEnsure precise step count in image-to-image runs, adjusting calculations rather than purely truncating stages.
refiner_modeloptMODELOptional second model that takes over from refiner_start_step with the same conditioning, so it must accept the same text-encoder width. PAG, guidance rescale and the SDR anchor are not applied to it. Ignored in tile_mode.
refiner_start_stepoptINT200–200Step index (0-based, out of steps) where refiner_model takes over. At or above the last step being run, the refiner never runs.
noise_overrideoptLATENTUse this latent's samples as the initial noise instead of generating it from seed and noise_type. Its shape must match latent_image exactly.
sigmas_overrideoptSIGMASInject a pre-computed sigma schedule. Bypasses all internal sigma computation.
_js_export_btnoptSTRINGJS serialization placeholder (not user-editable).
_js_import_btnoptSTRINGJS serialization placeholder (not user-editable).
_js_preset_infooptSTRINGJS serialization placeholder (not user-editable).
restart_countoptINT00–4Number of restart iterations at each restart_schedule sigma. 0 = disabled. 1–2 restarts add ~5% extra steps but measurably improve high-frequency detail on Flux and WAN.
noise_alpha_startoptFLOAT1.000–1Weight of the selected noise_type against Gaussian at step 0 (1.0 = pure noise_type; no effect with Gaussian). The noise is injected once, so the start/end cosine ramp is read only at start_step: on a run from step 0 only this value matters.
noise_alpha_endoptFLOAT1.000–1Weight of the selected noise_type at the final step of the ramp. The noise is injected once, at start_step, so this only has an effect when start_step is above 0 (partial or multi-pass runs).
custom_ays_anchorsoptSIGMASOptional model-specific AYS anchor schedule. Overrides the built-in AYS tables when ays_schedule=True. Must be a monotonically decreasing tensor ending at 0.
restart_scheduleoptSIGMASOptional list of sigma levels at which to re-inject noise and re-denoise (Restart / IRES style). Improves fine detail at fixed step count. Requires restart_count > 0.
sdr_referenceoptIMAGEOptional structure reference: a display-referred 0-1 image, VAE-encoded with sdr_vae and resized to the latent. Needs sdr_vae connected and sdr_blend above 0.
sdr_vaeoptVAEVAE used to encode sdr_reference. Use the VAE that matches the model.
sdr_blendoptFLOAT0.350–1Weight of the encoded reference: it is mixed into the starting latent at this weight, and is the starting weight of the per-step anchor. 0 disables SDR conditioning.
sdr_inject_stepsoptINT60–100Number of model evaluations after CFG in which the denoised result is pulled toward the reference (0 = only the starting-latent mix). Multi-evaluation samplers use these up faster than one per step.
sdr_decayoptFLOAT0.650–1Per-evaluation falloff of the anchor: weight = sdr_blend x sdr_decay^n. Lower fades faster; 1.0 holds it constant.
model_metaoptSTRINGOptional: connect the Loader's model_meta output. Only used when preset='Auto'/'Custom' and model_type='auto'. Refines cfg/guidance/steps beyond what the loaded model's architecture alone can tell -- e.g. distinguishing Flux.2 Klein Base from Klein distilled, which are architecturally identical.
temporal_windowoptINT00–512Experimental long-video windowing; may produce ghosting or scene changes at joins. Use 0 for production work. ControlNet requires 0 or a window covering the whole clip. 0 = off (whole clip denoised at once, the previous behaviour). Above 0, this many LATENT frames are denoised per window, with the windows blended at every step, so peak VRAM follows the window size instead of the clip length. Only applies to 5D video latents longer than the window. 16-32 is a usual range; smaller windows save more memory and give the model less temporal context.
temporal_overlapoptINT40–256Latent frames shared between neighbouring windows, used to cross-fade them at every denoising step. Clamped to half of temporal_window. More overlap increases compute but does not guarantee coherent joins; 0 means hard cuts between windows. Ignored when temporal_window is 0.

Outputs (4)

NameTypeDescription
latentLATENTDenoised latent ready for VAE decode.
sigmasSIGMASThe full sigma schedule used — chain to another sampler or inspect.
sigmas_remainingSIGMASUnused tail of the sigma schedule after end_step. Chain directly to a refiner or upscaler sampler.
sigma_plotIMAGEVisual plot of the sigma schedule as an IMAGE. Blank if matplotlib is unavailable.