Nodes/ComfyUI/ModelSamplingContinuousEDM
ComfyUI Node Runs on cloud

ModelSamplingContinuousEDM

Swap the whole noise model to EDM, v-pred, or flow

By Comfy-Org·Created 4 years ago·Updated about 23 hours ago· 129,495
ModelSamplingContinuousEDM
  • model
  • MODEL
sampling
sigma_max120.000
sigma_min0.002

ModelSamplingContinuousEDM is the patch that swaps which "language" your model's noise schedule speaks. Most model-sampling patches bend one number on the existing schedule; this one replaces the schedule class entirely - from the classic discrete timesteps into a continuous EDM-style sigma schedule, and with it the prediction type (eps, v-prediction, EDM, playground-v2.5, or Cosmos rectified flow). If that sentence lost you, the practical version is: this is a power-user node for rescuing or resurrecting a checkpoint whose native sampling setup your pipeline doesn't have.

Its classic job is making an EDM or v-prediction checkpoint sample correctly in ComfyUI when the loader's default assumption is wrong - the "model renders as noise without this node" fix. It's also the node you use to run an SDXL-era v-pred fine-tune (like the old Playground v2.5 family, which has its own dedicated preset here) or to force a Cosmos-style rectified-flow model onto the schedule it expects.

How it works

Under the hood it builds a ModelSamplingContinuousEDM sampling object with the sigma bounds you give it and the prediction class you pick, then installs it on a clone of the model. The sampling choice picks the prediction type:

  • edm - the Karras/EDM formulation (sigma_data 0.5), for EDM-trained models.
  • edm_playground_v2.5 - the same EDM math but with Playground 2.5's latent format bolted on. Use it for Playground-style v-pred checkpoints.
  • v_prediction - classic v-prediction (sigma_data 1.0), for SD2-era v-pred fine-tunes.
  • eps - the plain epsilon-prediction style.
  • cosmos_rflow - Cosmos rectified-flow sampling, for the flow-matching Cosmos family.

sigma_max (default 120) and sigma_min (default 0.002) set the endpoints of the continuous noise range. For an EDM model those are usually the values the checkpoint was trained with; for a rescued v-pred model you might keep the defaults. Both are marked advanced - you'll rarely touch them.

Inputs and what to set

  • model - the model to repatch.
  • sampling - the prediction type. This is the decision. Match it to what the checkpoint actually is - check the model card or the workflow that came with the model rather than guessing.
  • sigma_max / sigma_min - schedule endpoints, advanced, defaults fine to start.

Output: the patched MODEL. Part of ComfyUI core.

Common issues & troubleshooting

Wrong prediction type = garbage output. Pick edm for a v-pred model (or vice versa) and you'll get noise or burned images, not a hint. The sampling field is not a style choice - it's a statement of fact about the checkpoint. The model card is the source of truth.

The community Karras lesson applies here. On flow-matching models, forcing an EDM/v-pred schedule is how people get those "why is my render broken" results - modern flow models were trained on their own rectified schedules and don't want a Karras-style curve imposed on them. Use cosmos_rflow (or no patch at all) on flow models; reserve EDM/v-pred for the models that genuinely need it.

Pair with the right sampler. This patch sets the sigma schedule; it doesn't control the sampler algorithm. An EDM-scheduled model still wants a sampler that respects that schedule (Karras-style samplers pair naturally), so if output looks off after the patch, check the sampler node before blaming the schedule.

Categorymodel/patch

Inputs (4)

NameTypeDefaultDescription
modelMODEL
samplingCOMBO5 options: v_prediction, edm, edm_playground_v2.5, eps, cosmos_rflow
sigma_maxFLOAT120.0000–1000
sigma_minFLOAT0.0020–1000

Outputs (1)

NameTypeDescription
MODELMODEL