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

@@ -380,6 +380,7 @@ class SamplerCustom:
def sample(self, model, add_noise, noise_seed, cfg, positive, negative, sampler, sigmas, latent_image):
latent = latent_image
latent_image = latent["samples"]
latent_image = comfy.sample.fix_empty_latent_channels(model, latent_image)
if not add_noise:
noise = Noise_EmptyNoise().generate_noise(latent)
else:
@@ -538,6 +539,7 @@ class SamplerCustomAdvanced:
def sample(self, noise, guider, sampler, sigmas, latent_image):
latent = latent_image
latent_image = latent["samples"]
latent_image = comfy.sample.fix_empty_latent_channels(guider.model_patcher, latent_image)
noise_mask = None
if "noise_mask" in latent: