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 (pure text-to-video/image), the Wan denoise run must start from pure noise, so denoising_start must be 0. A non-zero denoising_start implies img2img where sampling begins partway along the sigma schedule using init latents; without them it is contradictory, so the node raises. This prevents silently ignoring denoising_start.
Source
Thrown at invokeai/app/invocations/wan_denoise.py:588
latent_channels=latent_channels,
height=self.height,
width=self.width,
spatial_scale_factor=spatial_scale,
device=device,
dtype=latent_dtype,
seed=self.seed,
)
# Combine init latents + noise per the schedule's starting sigma.
if init_latents_5d is not None:
if self.add_noise:
s_0 = float(sigmas[0])
latents = s_0 * noise + (1.0 - s_0) * init_latents_5d
else:
latents = init_latents_5d
else:
if self.denoising_start > 1e-5:
raise ValueError("denoising_start should be 0 when initial latents are not provided.")
latents = noise
if total_steps <= 0:
return latents.squeeze(2)
# Inpaint extension (4D space — the existing extension is shape-agnostic
# but operates on the squeezed-T shape we use for masks).
inpaint_mask = self._prep_inpaint_mask(context, latents.squeeze(2))
inpaint_extension: RectifiedFlowInpaintExtension | None = None
if inpaint_mask is not None:
if init_latents_5d is None:
raise ValueError("Initial latents are required when using an inpaint mask (img2img inpainting).")
inpaint_extension = RectifiedFlowInpaintExtension(
init_latents=init_latents_5d.squeeze(2),
inpaint_mask=inpaint_mask,
noise=noise.squeeze(2),
)
View on GitHub (pinned to 0b6a024f2f)
Solutions
- Set denoising_start to 0 (or its default) since no initial latents are provided
- Or connect an image via Wan Image to Latents so initial latents exist and denoising_start > 0 is meaningful
Example fix
// before wanDenoise: denoising_start=0.7, no image input // after wanDenoise: denoising_start=0.0 // txt2img // or: connect image -> wanImageToLatents -> denoise with denoising_start=0.7
Defensive patterns
Strategy: validation
Validate before calling
if init_latents is None and denoising_start > 0:
raise ValueError("denoising_start requires initial latents; set it to 0 for txt2img") Try / catch
try:
result = wan_denoise.invoke(context)
except ValueError as e:
if 'denoising_start should be 0' in str(e):
wan_denoise.denoising_start = 0.0
else:
raise Prevention
- Only set denoising_start > 0 in img2img workflows
- Reset denoising_start to 0 when removing the image input
- Use img2img workflow templates rather than editing txt2img ones
When it happens
Trigger: Setting denoising_start > 0 on a WanDenoise node that has no image (and hence no ImageToLatents/initial latents) connected; copying an img2img workflow and disconnecting the image input while leaving denoising_start set.
Common situations: Converting an img2img workflow to txt2img by removing the image input; users experimenting with denoising_start for partial redenoising without realizing it requires init latents.
Related errors
- Wan image denoise expects initial latent dimensions {expecte
- Initial latents are required when using an inpaint mask (img
- Source dimensions must be positive.
- Source longer side ({long_side}px) is smaller than the Wan p
- Expected AutoencoderKLWan for Wan VAE, got {type(vae_info.mo
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/3e9e663f1f5c8c06.
Report an issue: GitHub.