Merge 40e7284ab3ed07c816ac03b3d50218851514153e into b20ba1f27cbd4e1c84cf8ec72b345723de9e7c80

This commit is contained in:
Ivan R. 2025-08-28 01:05:17 +07:00 committed by GitHub
commit 1bd59a7e2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -158,6 +158,11 @@ class Flux(nn.Module):
if i < len(control_i):
add = control_i[i]
if add is not None:
if img.shape[1] != add.shape[1]:
padding_size = img.shape[1] - add.shape[1]
if padding_size > 0:
padding = torch.zeros(add.shape[0], padding_size, add.shape[2], device=add.device, dtype=add.dtype)
add = torch.cat([add, padding], dim=1)
img += add
if img.dtype == torch.float16: