Skip to content

Commit

Permalink
Make compatible with torch 2.2.2+
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei committed May 4, 2024
1 parent f9b2aee commit d850909
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/preprocessor_evaclip.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from typing import NamedTuple
from pathlib import Path
from einops import rearrange
from torchvision.transforms import InterpolationMode
from torchvision.transforms.functional import normalize, resize
from PIL import Image

from eva_clip.factory import create_model_and_transforms
from eva_clip.constants import OPENAI_DATASET_MEAN, OPENAI_DATASET_STD
Expand Down Expand Up @@ -82,7 +82,7 @@ def __call__(
face_features_image = resize(
input_image,
resize_target,
InterpolationMode.BICUBIC,
Image.BICUBIC,
)
face_features_image = normalize(
face_features_image, self.eva_transform_mean, self.eva_transform_std
Expand Down

0 comments on commit d850909

Please sign in to comment.