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 (init_latents) are supplied, the denoise run starts from pure noise, which corresponds to sigma step 0. If denoising_start > 1e-5 the schedule would pretend some steps already ran, so InvokeAI raises this ValueError.
Source
Thrown at invokeai/app/invocations/anima_denoise.py:628
# Prepare input latents
if init_latents is not None:
if self.add_noise:
assert noise is not None
# Noise the init latents using the first sigma from the clipped
# InvokeAI schedule.
#
# Known limitation: if the selected scheduler later starts from a
# different first effective sigma/timestep than sigmas[0], the
# img2img preblend below may not match that scheduler exactly.
# This is an existing pipeline limitation and affects both
# internally generated noise and externally supplied noise.
s_0 = sigmas[0]
latents = s_0 * noise + (1.0 - s_0) * init_latents
else:
latents = init_latents
else:
if self.denoising_start > 1e-5:
raise ValueError("denoising_start should be 0 when initial latents are not provided.")
assert noise is not None
latents = noise
if total_steps <= 0:
return latents.squeeze(2)
# Prepare inpaint extension
inpaint_mask = self._prep_inpaint_mask(context, latents.squeeze(2))
inpaint_extension: AnimaInpaintExtension | None = None
if inpaint_mask is not None:
if init_latents is None:
raise ValueError("Initial latents are required when using an inpaint mask (image-to-image inpainting)")
assert noise is not None
inpaint_extension = AnimaInpaintExtension(
init_latents=init_latents.squeeze(2),
inpaint_mask=inpaint_mask,
noise=noise.squeeze(2),
shift=ANIMA_SHIFT,View on GitHub (pinned to 0b6a024f2f)
Solutions
- Set denoising_start to 0 when running without initial latents.
- Connect an init image/latents input if you intend to do img2img with a nonzero denoising_start.
- Validate the combination in workflow-building code before invoking.
Example fix
// before denoise.denoising_start = 0.4 # no init latents connected // after denoise.denoising_start = 0.0 # or provide init_latents
Defensive patterns
Strategy: validation
Validate before calling
if init_latents is None and denoise.denoising_start > 1e-5:
denoise.denoising_start = 0.0 # or supply init latents Try / catch
try:
output = invoker.invoke(denoise_invocation)
except ValueError as e:
if "initial latents are not provided" in str(e):
denoise.denoising_start = 0.0
output = invoker.invoke(denoise_invocation)
else:
raise Prevention
- Tie denoising_start=0 to txt2img mode in your workflow builder
- Check that image/init inputs are actually connected before setting a start fraction
- Log the start value alongside presence of init_latents
When it happens
Trigger: Running Anima denoise in pure txt2img mode (no init_latents input connected) while denoising_start is set to a positive value greater than 1e-5.
Common situations: A txt2img workflow where a leftover img2img denoise fraction was left on the node; an img2img image input got disconnected so init_latents became None but the start value stayed; script automation that sets denoising_start without checking whether init image is provided.
Related errors
- denoising_start ({self.denoising_start}) must be less than d
- Initial latents are required when using an inpaint mask (ima
- denoising_start must be 0 when no initial latents are provid
- denoising_start should be 0 when initial latents are not pro
- denoising_start should be 0 when initial latents are not pro
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/135806a40665e3e6.
Report an issue: GitHub.