Skip to content

Commit

Permalink
Fix regular empty latent image not working with SD3 and custom sampler.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jun 12, 2024
1 parent 321e509 commit 0eaa34e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions comfy_extras/nodes_custom_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,10 @@ def INPUT_TYPES(s):
def sample(self, model, add_noise, noise_seed, cfg, positive, negative, sampler, sigmas, latent_image):
latent = latent_image
latent_image = latent["samples"]
latent = latent.copy()
latent_image = comfy.sample.fix_empty_latent_channels(model, latent_image)
latent["samples"] = latent_image

if not add_noise:
noise = Noise_EmptyNoise().generate_noise(latent)
else:
Expand Down Expand Up @@ -539,7 +542,9 @@ def INPUT_TYPES(s):
def sample(self, noise, guider, sampler, sigmas, latent_image):
latent = latent_image
latent_image = latent["samples"]
latent = latent.copy()
latent_image = comfy.sample.fix_empty_latent_channels(guider.model_patcher, latent_image)
latent["samples"] = latent_image

noise_mask = None
if "noise_mask" in latent:
Expand Down

0 comments on commit 0eaa34e

Please sign in to comment.