Fix KSamplerAdvanced with add_noise disabled on nested latents (#15447)

This commit is contained in:
Jukka Seppänen
2026-08-12 00:58:00 +03:00
committed by GitHub
parent c2bcbecd82
commit 27bca654eb
3 changed files with 7 additions and 10 deletions

View File

@@ -1570,7 +1570,7 @@ def common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive,
latent_image = comfy.sample.fix_empty_latent_channels(model, latent_image, latent.get("downscale_ratio_spacial", None), latent.get("downscale_ratio_temporal", None))
if disable_noise:
noise = torch.zeros(latent_image.size(), dtype=latent_image.dtype, layout=latent_image.layout, device="cpu")
noise = comfy.sample.prepare_empty_noise(latent_image)
else:
batch_inds = latent["batch_index"] if "batch_index" in latent else None
noise = comfy.sample.prepare_noise(latent_image, seed, batch_inds)