ComfyUI Node

OCS ModelSetMaxSigma

Force a schedule to start where you want it to

By blepping·Created 2 years ago·Updated about a month ago· 30
OCS ModelSetMaxSigma
  • model
  • MODEL
mode
sigma_max-1.00
fake_sigma_min0.00

Every diffusion model carries a built-in sigma_max and sigma_min - the noise levels its schedule is allowed to span - and normally you never touch them. This node is the exception: it patches a model so that its maximum (and optionally minimum) sigma is whatever you say it is. The README literally files it under "hacks," and the node's own description warns you where not to connect it, so read this before wiring anything.

What it is

A model patcher. You give it a MODEL, a target sigma_max, and optionally a fake sigma_min, and it returns a patched MODEL whose model_sampling reports your chosen range. The patched model isn't meant to be sampled with directly - the output tooltip says so plainly. It's meant to be connected to a scheduler node (a BasicScheduler or similar), so the scheduler generates sigmas that start from your forced maximum instead of the model's native one.

The inputs that matter

  • model (required) - the model to patch.
  • mode (required) - recalculate (generally more accurate, recomputes the sigma schedule) or simple_multiply (just scales the existing sigmas).
  • sigma_max (required, default -1) - the interesting one. A positive value is an absolute sigma; a negative value is a percentage of the current max, so -1 means "leave it alone" and -0.5 means "halve it." Schedules generated with the patched model start from (or near) this value.
  • fake_sigma_min (required, default 0) - a minimum-sigma override, disabled at 0. The tooltip's advice is worth quoting: leave it at 0 unless you know you need it, and even then it may not work with some schedulers.

The single MODEL output goes to your scheduler.

Why you'd use it

The main real-world use is controlling where a schedule starts. If you're doing img2img or a custom denoise pass and you want the schedule to begin from a specific noise level rather than the model's native max, patching the model before the scheduler gives you a clean way to force it. You can also shrink the sigma range to prevent a model from being sampled at its most chaotic (noisiest) end. It's a surgical tool with one job - if you don't have a concrete reason to change the sigma range, skip it.

Installing and gotchas

Installed as part of the pack via ComfyUI Manager ("Overly Complicated Sampling") or git clone https://github.com/blepping/comfyui_overly_complicated_sampling into ComfyUI/custom_nodes and restart. No models or extra dependencies.

The biggest gotcha is in the node's own description: you generally do not want to connect this to a sampler node - connect it to a scheduler. Second, recalculate mode only handles linear beta schedules; a non-linear one raises a NotImplementedError. And there are validation errors hiding in there: sigma_max: 0 is rejected, and if your fake minimum ends up >= your maximum, you get an explicit error. The node also prints a console line telling you the old and new sigma values, which is the easiest way to confirm the patch actually applied.

Categoryhacks

Inputs (4)

NameTypeDefaultDescription
modelMODELModel to patch with the min/max sigmas.
modeCOMBOMode to use when setting sigmas in the patched model. Recalculate should generally be more accurate.
sigma_maxFLOAT-1.00-10000–10000You can set the maximum sigma here. If you use a positive value, it will be interpreted as the absolute value for the max sigma. If you use a negative value it will be interpreted as a percentage of the current value (where 1.0 signifies 100%). Schedules generated with the patched model should start from sigma_max (or close to it).
fake_sigma_minFLOAT0.000–1000You can set the minimum sigma here. Disabled if set to 0. If you use a positive value, it will be interpreted as the absolute value for the max sigma. If you use a negative value it will be interpreted as a percentage of the current value (where 1.0 signifies 100%). Schedules generated with the patched model should end with [sigma_min, 0]. NOTE: May not work with some schedulers. I recommend leaving this at 0 unless you know you need it (and even then it may not work).

Outputs (1)

NameTypeDescription
MODELMODELPatched model. Can be connected to a scheduler node (i.e. BasicScheduler). Generally NOT recommended to connect to an actual sampler, the main use case is only for generating sigmas.