mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-20 03:13:30 +00:00
Make t2i adapter work with any latent resolution.
This commit is contained in:
parent
a8705dbfe2
commit
c6e34963e4
@ -56,7 +56,12 @@ class Downsample(nn.Module):
|
|||||||
|
|
||||||
def forward(self, x):
|
def forward(self, x):
|
||||||
assert x.shape[1] == self.channels
|
assert x.shape[1] == self.channels
|
||||||
return self.op(x)
|
if not self.use_conv:
|
||||||
|
padding = [x.shape[2] % 2, x.shape[3] % 2]
|
||||||
|
self.op.padding = padding
|
||||||
|
|
||||||
|
x = self.op(x)
|
||||||
|
return x
|
||||||
|
|
||||||
|
|
||||||
class ResnetBlock(nn.Module):
|
class ResnetBlock(nn.Module):
|
||||||
|
Loading…
Reference in New Issue
Block a user