Merge branch 'comfyanonymous:master' into master

This commit is contained in:
patientx 2025-03-11 01:28:12 +03:00 committed by GitHub
commit cf490d92b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -973,11 +973,11 @@ class WAN21(BaseModel):
self.image_to_video = image_to_video
def concat_cond(self, **kwargs):
if not self.image_to_video:
noise = kwargs.get("noise", None)
if self.diffusion_model.patch_embedding.weight.shape[1] == noise.shape[1]:
return None
image = kwargs.get("concat_latent_image", None)
noise = kwargs.get("noise", None)
device = kwargs["device"]
if image is None:
@ -987,6 +987,9 @@ class WAN21(BaseModel):
image = self.process_latent_in(image)
image = utils.resize_to_batch_size(image, noise.shape[0])
if not self.image_to_video:
return image
mask = kwargs.get("concat_mask", kwargs.get("denoise_mask", None))
if mask is None:
mask = torch.zeros_like(noise)[:, :4]