mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-08-15 22:56:49 +08:00
Merge 40e7284ab3ed07c816ac03b3d50218851514153e into b20ba1f27cbd4e1c84cf8ec72b345723de9e7c80
This commit is contained in:
commit
1bd59a7e2f
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user