Compare commits

...

2 Commits

Author SHA1 Message Date
Alexis Rolland
b3488bf7d5
Merge 0a5f6e15bc into 38ecad8f8a 2026-04-30 22:31:38 +08:00
Alexis Rolland
0a5f6e15bc Fix issue blend images with alpha 2026-04-29 17:18:17 +08:00

View File

@ -86,6 +86,6 @@ def image_alpha_fix(destination, source):
if destination.shape[-1] < source.shape[-1]:
source = source[...,:destination.shape[-1]]
elif destination.shape[-1] > source.shape[-1]:
destination = torch.nn.functional.pad(destination, (0, 1))
destination[..., -1] = 1.0
source = torch.nn.functional.pad(source, (0, 1))
source[..., -1] = 1.0
return destination, source