Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Make t2i adapter work with any latent resolution.

comfyanonymousc6e34963e412
diff --git a/comfy/t2i_adapter/adapter.py b/comfy/t2i_adapter/adapter.py
index 0221fff83..87e3d859e 100644
--- a/comfy/t2i_adapter/adapter.py
+++ b/comfy/t2i_adapter/adapter.py
@@ -56,7 +56,12 @@ class Downsample(nn.Module):
def forward(self, x):
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):