mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-16 08:33:29 +00:00
Merge branch 'master' of https://github.com/comfyanonymous/ComfyUI
This commit is contained in:
commit
01087a97b7
@ -1000,7 +1000,6 @@ class WAN21(BaseModel):
|
|||||||
device = kwargs["device"]
|
device = kwargs["device"]
|
||||||
|
|
||||||
if image is None:
|
if image is None:
|
||||||
image = torch.zeros_like(noise)
|
|
||||||
shape_image = list(noise.shape)
|
shape_image = list(noise.shape)
|
||||||
shape_image[1] = extra_channels
|
shape_image[1] = extra_channels
|
||||||
image = torch.zeros(shape_image, dtype=noise.dtype, layout=noise.layout, device=noise.device)
|
image = torch.zeros(shape_image, dtype=noise.dtype, layout=noise.layout, device=noise.device)
|
||||||
|
@ -446,10 +446,9 @@ class LTXVPreprocess:
|
|||||||
CATEGORY = "image"
|
CATEGORY = "image"
|
||||||
|
|
||||||
def preprocess(self, image, img_compression):
|
def preprocess(self, image, img_compression):
|
||||||
if img_compression > 0:
|
output_images = []
|
||||||
output_images = []
|
for i in range(image.shape[0]):
|
||||||
for i in range(image.shape[0]):
|
output_images.append(preprocess(image[i], img_compression))
|
||||||
output_images.append(preprocess(image[i], img_compression))
|
|
||||||
return (torch.stack(output_images),)
|
return (torch.stack(output_images),)
|
||||||
|
|
||||||
|
|
||||||
|
@ -87,6 +87,8 @@ class ImageCompositeMasked:
|
|||||||
CATEGORY = "image"
|
CATEGORY = "image"
|
||||||
|
|
||||||
def composite(self, destination, source, x, y, resize_source, mask = None):
|
def composite(self, destination, source, x, y, resize_source, mask = None):
|
||||||
|
if destination.shape[-1] < source.shape[-1]:
|
||||||
|
source = source[...,:destination.shape[-1]]
|
||||||
destination = destination.clone().movedim(-1, 1)
|
destination = destination.clone().movedim(-1, 1)
|
||||||
output = composite(destination, source.movedim(-1, 1), x, y, mask, 1, resize_source).movedim(1, -1)
|
output = composite(destination, source.movedim(-1, 1), x, y, mask, 1, resize_source).movedim(1, -1)
|
||||||
return (output,)
|
return (output,)
|
||||||
|
Loading…
Reference in New Issue
Block a user