Nodes/raylight/XFuser SamplerCustom Advanced
ComfyUI Node

XFuser SamplerCustom Advanced

The guider-driven custom sampler

By komikndr·Created about a year ago·Updated 2 days ago· 409
XFuser SamplerCustom Advanced
  • guider
  • sampler
  • sigmas
  • latent_image
  • output
  • denoised_output
  • ray_actors
add_noisetrue
noise_seed0

In the native ComfyUI custom-sampling stack, "Advanced" means the guider version - the node where CFG stops being a plain cfg float and becomes a guider object that can hold Basic, CFG, or even Dual-CFG logic. XFuser SamplerCustom Advanced is Raylight's distributed port of exactly that: you hand it a RAY_GUIDER (from Raylight's guider nodes), a SAMPLER, SIGMAS, and a latent, and it runs the whole thing across your Ray workers.

Raylight is Komikndr's multi-GPU pack - the "two 5070s instead of a 5090" crowd. This node lives under Raylight/extra/custom_sampling/samplers and is the sibling of XFuser SamplerCustom: same idea, but the CFG handling is delegated to a guider object instead of inline positive/negative/cfg inputs.

How it works

The inputs are add_noise (boolean), noise_seed, guider, sampler, sigmas, and latent_image. Notice there's no ray_actors input here - the guider carries it. The RAY_GUIDER comes from Raylight's guider nodes under Raylight/extra/custom_sampling/guiders: Ray Basic Guider (conditioning only), Ray CFG Guider (positive/negative/cfg), or Ray DualCFG Guider (two conditionings at separate scales). The node extracts the workers from the guider, pushes a custom_sampler_advanced remote call to each, and collects output (the sampled latent) and denoised_output (the model's denoised prediction, useful for things like noise-injection or guidance tricks) plus the ray_actors passthrough.

The DualCFG guider is the interesting one if you're working with video or ref-based models: you can run one conditioning at CFG 8 and a second at CFG 3 in a single pass, in either "regular" or "nested" style. That's the kind of thing this node exists for.

What to watch

  • guider - the whole CFG story lives here. Ray CFG Guider with cfg 1 is effectively the distilled-model default; at 1 the negative pass is skipped, which is the free speed win ComfyUI's CFG machinery gives you.
  • sigmas / sampler - same as any custom-sampling chain: build them with scheduler and sampler-selector nodes. The SIGMAS have to be a proper schedule, or the workers will fail.

Install

Standard raylight install:

cd ComfyUI/custom_nodes
git clone https://github.com/komikndr/raylight
cd raylight
<your_python> -m pip install -r requirements.txt

or ComfyUI Manager → search raylight. Restart and the guider nodes plus this sampler show up under Raylight → extra → custom_sampling.

Common issues

The most common failure is wiring a native ComfyUI guider (or no guider at all) into a node that expects RAY_GUIDER - the type won't match and the graph won't run. If you don't need DualCFG, the plain XFuser SamplerCustom with its ray_actors + cfg inputs is simpler and easier to debug. And remember the guider carries the model chain: re-init the actors and rebuild the guider, or the sampler silently talks to a stale cluster.

CategoryRaylight/extra/custom_sampling/samplers

Inputs (6)

NameTypeDefaultDescription
add_noiseBOOLEANtrue
noise_seedINT00–18446744073709550000
guiderRAY_GUIDER
samplerSAMPLER
sigmasSIGMAS
latent_imageLATENT

Outputs (3)

NameTypeDescription
outputLATENT
denoised_outputLATENT
ray_actorsRAY_ACTORS