invoke-ai/InvokeAI · error · ValueError
The requested denoising range does not contain any…
Error message
The requested denoising range does not contain any effective denoising steps at the configured step count. Increase denoising_end, decrease denoising_start, or increase steps.
What it means
`_validate_effective_schedule` checks that the computed denoising step window [start_idx, end_idx) contains at least one step. When the start/end fractions are so close together (or steps so few) that both indices round to the same value, no effective denoising occurs and this ValueError is raised.
Solutions
- Increase denoising_end so the range spans at least one timestep at the current step count.
- Decrease denoising_start to widen the effective window.
- Increase `steps` so the fractional range maps to at least one discrete step.
Example fix
// before: range rounds to zero steps at steps=10 denoising_start=0.50; denoising_end=0.505; steps=10 // after: widen the range or add steps denoising_start=0.50; denoising_end=0.60; steps=10
Defensive patterns
Strategy: validation
Validate before calling
def effective_steps(start: float, end: float, steps: int) -> int:
s = int(round(start * (steps - 1)))
e = int(round(end * (steps - 1)))
return max(0, e - s)
# guard: if effective_steps(start, end, steps) < 1: widen range or raise steps Type guard
def denoise_range_yields_steps(start: float, end: float, steps: int) -> bool:
return int(round(end * (steps - 1))) > int(round(start * (steps - 1))) Try / catch
try:
out = invoke_krea2_denoise(denoising_start=start, denoising_end=end, steps=steps)
except ValueError as e:
if "does not contain any effective denoising steps" in str(e):
end = min(1.0, start + max(1 / steps, 0.1))
out = invoke_krea2_denoise(denoising_start=start, denoising_end=end, steps=steps)
else:
raise Prevention
- Keep the start/end window at least ~1/steps wide.
- Recheck denoise ranges after lowering the steps value.
- Clamp UI slider minimum width programmatically.
When it happens
Trigger: denoising_start and denoising_end very close together (e.g. 0.50 to 0.505) with a small steps count, so both map to the same timestep index; end_idx computed <= start_idx after rounding.
Common situations: Img2img/refiner workflows with a narrow denoise window; users lowering steps to speed up runs after setting a fine-grained start/end range; UI sliders producing nearly identical values.
Related errors
- denoising_start must be less than denoising_end.
- denoising_start should be 0 when initial latents are not…
- At least one Krea-2 conditioning is required.
- cfg_scale list has values but the model is configured for…
- cfg_scale values must be finite.
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/4a92d38bfffb5a95.
Report an issue: GitHub.
Appendix: source
Thrown at invokeai/app/invocations/krea2_denoise.py:224
if isinstance(self.cfg_scale, float):
return [self.cfg_scale] * num_timesteps
if isinstance(self.cfg_scale, list):
if len(self.cfg_scale) != num_timesteps:
raise ValueError(
f"cfg_scale list has {len(self.cfg_scale)} values but the model is configured for "
f"{num_timesteps} steps. Provide one CFG value per configured step (or a single float)."
)
return self.cfg_scale
raise ValueError(f"Invalid CFG scale type: {type(self.cfg_scale)}")
@staticmethod
def _should_apply_cfg_for_step(cfg_scale: float, *, has_negative_conditioning: bool) -> bool:
return has_negative_conditioning and cfg_scale > 1.0
@staticmethod
def _validate_effective_schedule(*, start_idx: int, end_idx: int) -> None:
if end_idx <= start_idx:
raise ValueError(
"The requested denoising range does not contain any effective denoising steps at the configured "
"step count. Increase denoising_end, decrease denoising_start, or increase steps."
)
def _validate_inputs(self) -> None:
if self.denoising_start >= self.denoising_end:
raise ValueError("denoising_start must be less than denoising_end.")
if self.denoise_mask is not None and self.latents is None:
raise ValueError("Initial latents are required when a denoise mask is provided.")
def _is_distilled(self, context: InvocationContext) -> bool:
"""Whether the transformer is the distilled Turbo checkpoint (fixed mu) vs. Raw (dynamic mu).
Prefer the classified variant (works for diffusers, single-file and GGUF alike); fall back to
the pipeline-level ``is_distilled`` flag in model_index.json, then default to distilled.
A failed config lookup is a real error and is allowed to propagate — silently defaulting to the
Turbo shift would apply the wrong sampling schedule to a Raw model.View on GitHub (pinned to 0b6a024f2f)