From fc57f874bf3ec779404999ab4dc50ee1c4f61122 Mon Sep 17 00:00:00 2001 From: Swarup Ghosh Date: Mon, 5 May 2025 16:21:23 +0530 Subject: [PATCH] Remove torch._six from utils.py torch._six is no longer available in recent PyTorch versions --- taming/data/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/taming/data/utils.py b/taming/data/utils.py index 2b3c3d53..6601c1be 100644 --- a/taming/data/utils.py +++ b/taming/data/utils.py @@ -8,10 +8,11 @@ import numpy as np import torch from taming.data.helper_types import Annotation -from torch._six import string_classes from torch.utils.data._utils.collate import np_str_obj_array_pattern, default_collate_err_msg_format from tqdm import tqdm +# alternative to deprecated torch._six.string_classes +string_classes = (str,) def unpack(path): if path.endswith("tar.gz"):