mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-22 15:07:28 +08:00
Merge 0a5f6e15bc into 38ecad8f8a
This commit is contained in:
commit
b3488bf7d5
@ -86,6 +86,6 @@ def image_alpha_fix(destination, source):
|
|||||||
if destination.shape[-1] < source.shape[-1]:
|
if destination.shape[-1] < source.shape[-1]:
|
||||||
source = source[...,:destination.shape[-1]]
|
source = source[...,:destination.shape[-1]]
|
||||||
elif destination.shape[-1] > source.shape[-1]:
|
elif destination.shape[-1] > source.shape[-1]:
|
||||||
destination = torch.nn.functional.pad(destination, (0, 1))
|
source = torch.nn.functional.pad(source, (0, 1))
|
||||||
destination[..., -1] = 1.0
|
source[..., -1] = 1.0
|
||||||
return destination, source
|
return destination, source
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user