1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 15:04:50 +08:00

Reshape the empty latent image to the right amount of channels if needed.

This commit is contained in:
comfyanonymous
2024-06-08 02:16:55 -04:00
parent 56333d4850
commit 6cd8ffc465
5 changed files with 17 additions and 5 deletions

View File

@@ -1299,6 +1299,8 @@ class SetLatentNoiseMask:
def common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent, denoise=1.0, disable_noise=False, start_step=None, last_step=None, force_full_denoise=False):
latent_image = latent["samples"]
latent_image = comfy.sample.fix_empty_latent_channels(model, latent_image)
if disable_noise:
noise = torch.zeros(latent_image.size(), dtype=latent_image.dtype, layout=latent_image.layout, device="cpu")
else: