Nodes/raylight/ModelSamplingContinuousV (Ray)
ComfyUI Node

ModelSamplingContinuousV (Ray)

Patch Your Ray Workers to Continuous v-Prediction Sampling

By komikndr·Created about a year ago·Updated 2 days ago· 409
ModelSamplingContinuousV (Ray)
  • ray_actors
  • ray_actors
sampling
sigma_max500.000
sigma_min0.030

If you've ever hit a checkpoint that refuses to behave - colors come out washed out, or the denoiser clearly started from the wrong noise level - the usual culprit is that the model's sampling was patched to match its training, and nobody patched it for you. On single-GPU ComfyUI you fix that with the stock ModelSamplingContinuousV node. This is the Raylight version: it does the same thing, but instead of taking a MODEL in and out, it takes the ray_actors stream from a Ray Init Actor, patches the copy of the model that's loaded on the Ray workers, and hands the stream back.

The whole point of this node is that you get to set your own noise floor and ceiling. It's a continuous-time v-prediction sampler, which is the sampling flavor where the model predicts velocity rather than raw noise. You pick v_prediction from the single-choice dropdown (yes, one choice - the node exists so the range is tunable, not the prediction type), then set sigma_max and sigma_min. The defaults are 500 and 0.03, which is a huge range; that's normal for continuous sampling. Lower sigma_max if you're getting strange oversaturated starts, and think of sigma_min as the "how clean is the final step" knob - too high and images look soft, too low and you can get noise grain that never gets cleaned up.

Worth knowing: sigma_max here runs up to 1000, which is well past what most schedulers ever touch. Don't assume bigger is better. These are the brackets your scheduler interpolates inside, and the defaults are sane for most v-prediction models. Only touch them when you have a model card or a known-good workflow telling you to.

What it's for, in a Raylight workflow

The Raylight pack splits the sequence across GPUs with xDiT (USP) and can shard weights with FSDP, but it doesn't change what the model predicts. If your model needs continuous v-prediction sampling, that patch has to land on every worker - which is exactly what the @ray_patch decorator on this node does. So the shape is always the same: Ray Init Actor → this node → your Ray KSampler.

Install

Same as every Raylight node - this isn't a separate install.

cd ComfyUI/custom_nodes
git clone https://github.com/komikndr/raylight
cd raylight
pip install -r requirements.txt
# only if you use FP8 + FSDP on Nvidia:
pip install nvidia-nccl-cu12==2.28.9

Then restart ComfyUI. Or just find "raylight" in ComfyUI Manager and let it do the work.

The gotchas that will bite

None of the "Ray" model-sampling nodes do anything outside a Raylight workflow. No Ray Init Actor upstream means the input wire is just disconnected - and since the node takes ray_actors instead of a MODEL, it's easy to mistake it for something you can bolt onto a normal graph. You can't. It's a distributed patch, full stop. If you're on a single GPU and just want continuous v-prediction, use ComfyUI's built-in node instead and skip the Ray overhead entirely.

CategoryRaylight/extra

Inputs (4)

NameTypeDefaultDescription
ray_actorsRAY_ACTORS
samplingCOMBO1 options: v_prediction
sigma_maxFLOAT500.0000–1000
sigma_minFLOAT0.0300–1000

Outputs (1)

NameTypeDescription
ray_actorsRAY_ACTORS