invoke-ai/InvokeAI · error · ValueError
denoising_start should be 0 when initial latents are not pro
Error message
denoising_start should be 0 when initial latents are not provided.
What it means
When no initial latents are supplied, FLUX denoising starts from pure noise, so denoising_start must be 0 — there is nothing to partially skip. A denoising_start greater than 1e-5 in a txt2img run is contradictory and raises this ValueError.
Source
Thrown at invokeai/app/invocations/flux_denoise.py:334
if self.add_noise:
assert noise is not None
# Noise the orig_latents by the appropriate amount for the first
# timestep in InvokeAI's clipped schedule.
#
# Known limitation: if the selected scheduler later replaces this
# schedule with its own first effective timestep/sigma (for example
# Heun internal expansion or LCM's scheduler-defined schedule), the
# img2img preblend below may not match that scheduler's true first
# step exactly. This is an existing pipeline limitation and affects
# both internally generated noise and externally supplied noise.
t_0 = timesteps[0]
x = t_0 * noise + (1.0 - t_0) * init_latents
else:
x = init_latents
else:
# init_latents are not provided, so we are not doing image-to-image (i.e. we are starting from pure noise).
if self.denoising_start > 1e-5:
raise ValueError("denoising_start should be 0 when initial latents are not provided.")
assert noise is not None
x = noise
# If len(timesteps) == 1, then short-circuit. We are just noising the input latents, but not taking any
# denoising steps.
if len(timesteps) <= 1:
return x
if is_schnell and self.control_lora:
raise ValueError("Control LoRAs cannot be used with FLUX Schnell")
# Prepare the extra image conditioning tensor (img_cond) for either FLUX structural control or FLUX Fill.
img_cond: torch.Tensor | None = None
is_flux_fill = transformer_config.variant is FluxVariantType.DevFill
if is_flux_fill:
img_cond = self._prep_flux_fill_img_cond(context, device=device, dtype=inference_dtype)
else:View on GitHub (pinned to 0b6a024f2f)
Solutions
- Set denoising_start to 0 when no initial latents are provided
- If you intend img2img, supply the initial latents input to the denoise node
- Check upstream denoising_start/scheduler param nodes for leftover nonzero values
Example fix
// before: txt2img with img2img setting FluxDenoiseInvocation(noise=noise, denoising_start=0.5) // after FluxDenoiseInvocation(noise=noise, denoising_start=0.0)
Defensive patterns
Strategy: validation
Validate before calling
if initial_latents is None and denoising_start > 1e-5:
raise ValueError('Set denoising_start=0 for txt2img, or provide initial latents for img2img') Try / catch
try:
result = flux_denoise.invoke(context)
except ValueError as e:
if 'denoising_start should be 0' in str(e):
flux_denoise.denoising_start = 0.0
result = flux_denoise.invoke(context)
else:
raise Prevention
- Reset denoising_start to 0 when switching img2img graphs to txt2img
- Ensure the initial latents input is connected whenever denoising_start > 0
- Audit scheduler param nodes for stale nonzero start values
When it happens
Trigger: _run_diffusion takes the init_latents-is-None branch while self.denoising_start > 1e-5; running a text-to-image graph where a denoising_start value intended for img2img was left set.
Common situations: Reusing an img2img graph for txt2img without resetting denoising_start; a scheduler/denoise param node still feeding a nonzero start; saving denoising_start in a preset and switching modes.
Related errors
- denoising_start ({self.denoising_start}) must be less than d
- denoising_start should be 0 when initial latents are not pro
- No external provider config fields provided
- str(e)
- str(e) (ValueError from user service update, e.g. LastAdmini
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/1aa65cfefb8f4466.
Report an issue: GitHub.