We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d4e29f commit 95d8713Copy full SHA for 95d8713
comfy/ldm/common_dit.py
@@ -2,7 +2,7 @@
2
import comfy.ops
3
4
def pad_to_patch_size(img, patch_size=(2, 2), padding_mode="circular"):
5
- if padding_mode == "circular" and torch.jit.is_tracing() or torch.jit.is_scripting():
+ if padding_mode == "circular" and (torch.jit.is_tracing() or torch.jit.is_scripting()):
6
padding_mode = "reflect"
7
pad_h = (patch_size[0] - img.shape[-2] % patch_size[0]) % patch_size[0]
8
pad_w = (patch_size[1] - img.shape[-1] % patch_size[1]) % patch_size[1]
0 commit comments