Missing parentheses.

This commit is contained in:
comfyanonymous 2024-11-27 13:45:32 -05:00
parent 0d4e29f13f
commit 95d8713482
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@ import torch
import comfy.ops import comfy.ops
def pad_to_patch_size(img, patch_size=(2, 2), padding_mode="circular"): 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" padding_mode = "reflect"
pad_h = (patch_size[0] - img.shape[-2] % patch_size[0]) % patch_size[0] 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] pad_w = (patch_size[1] - img.shape[-1] % patch_size[1]) % patch_size[1]