From 95d8713482fcb07017093ae01b9fe5162abe9bd8 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Wed, 27 Nov 2024 13:45:32 -0500 Subject: [PATCH] Missing parentheses. --- comfy/ldm/common_dit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy/ldm/common_dit.py b/comfy/ldm/common_dit.py index cb6b7414..a9139696 100644 --- a/comfy/ldm/common_dit.py +++ b/comfy/ldm/common_dit.py @@ -2,7 +2,7 @@ import torch import comfy.ops def pad_to_patch_size(img, patch_size=(2, 2), padding_mode="circular"): - 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()): padding_mode = "reflect" pad_h = (patch_size[0] - img.shape[-2] % patch_size[0]) % patch_size[0] pad_w = (patch_size[1] - img.shape[-1] % patch_size[1]) % patch_size[1]