{"record":{"id":"4a92d38bfffb5a95","repo":"invoke-ai/InvokeAI","slug":"the-requested-denoising-range-does-not-contain-any","errorCode":null,"errorMessage":"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.","messagePattern":"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\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/krea2_denoise.py","lineNumber":224,"sourceCode":"        if isinstance(self.cfg_scale, float):\n            return [self.cfg_scale] * num_timesteps\n        if isinstance(self.cfg_scale, list):\n            if len(self.cfg_scale) != num_timesteps:\n                raise ValueError(\n                    f\"cfg_scale list has {len(self.cfg_scale)} values but the model is configured for \"\n                    f\"{num_timesteps} steps. Provide one CFG value per configured step (or a single float).\"\n                )\n            return self.cfg_scale\n        raise ValueError(f\"Invalid CFG scale type: {type(self.cfg_scale)}\")\n\n    @staticmethod\n    def _should_apply_cfg_for_step(cfg_scale: float, *, has_negative_conditioning: bool) -> bool:\n        return has_negative_conditioning and cfg_scale > 1.0\n\n    @staticmethod\n    def _validate_effective_schedule(*, start_idx: int, end_idx: int) -> None:\n        if end_idx <= start_idx:\n            raise ValueError(\n                \"The requested denoising range does not contain any effective denoising steps at the configured \"\n                \"step count. Increase denoising_end, decrease denoising_start, or increase steps.\"\n            )\n\n    def _validate_inputs(self) -> None:\n        if self.denoising_start >= self.denoising_end:\n            raise ValueError(\"denoising_start must be less than denoising_end.\")\n        if self.denoise_mask is not None and self.latents is None:\n            raise ValueError(\"Initial latents are required when a denoise mask is provided.\")\n\n    def _is_distilled(self, context: InvocationContext) -> bool:\n        \"\"\"Whether the transformer is the distilled Turbo checkpoint (fixed mu) vs. Raw (dynamic mu).\n\n        Prefer the classified variant (works for diffusers, single-file and GGUF alike); fall back to\n        the pipeline-level ``is_distilled`` flag in model_index.json, then default to distilled.\n\n        A failed config lookup is a real error and is allowed to propagate — silently defaulting to the\n        Turbo shift would apply the wrong sampling schedule to a Raw model.","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/krea2_denoise.py#L206-L242","documentation":"`_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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before: range rounds to zero steps at steps=10\ndenoising_start=0.50; denoising_end=0.505; steps=10\n// after: widen the range or add steps\ndenoising_start=0.50; denoising_end=0.60; steps=10","handlingStrategy":"validation","validationCode":"def effective_steps(start: float, end: float, steps: int) -> int:\n    s = int(round(start * (steps - 1)))\n    e = int(round(end * (steps - 1)))\n    return max(0, e - s)\n# guard: if effective_steps(start, end, steps) < 1: widen range or raise steps","typeGuard":"def denoise_range_yields_steps(start: float, end: float, steps: int) -> bool:\n    return int(round(end * (steps - 1))) > int(round(start * (steps - 1)))","tryCatchPattern":"try:\n    out = invoke_krea2_denoise(denoising_start=start, denoising_end=end, steps=steps)\nexcept ValueError as e:\n    if \"does not contain any effective denoising steps\" in str(e):\n        end = min(1.0, start + max(1 / steps, 0.1))\n        out = invoke_krea2_denoise(denoising_start=start, denoising_end=end, steps=steps)\n    else:\n        raise","preventionTips":["Keep the start/end window at least ~1/steps wide.","Recheck denoise ranges after lowering the steps value.","Clamp UI slider minimum width programmatically."],"tags":["invokeai","krea2","denoising-range","validation"],"backgroundTag":"empty-denoising-range","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}