update comment

This commit is contained in:
Kohya S
2024-11-12 08:09:07 +09:00
parent 92482c7a07
commit 3fe94b058a

View File

@@ -1404,7 +1404,7 @@ class BaseDataset(torch.utils.data.Dataset):
# return imagesize.get(image_path)
image_size = imagesize.get(image_path)
if image_size[0] <= 0:
# imagesize doesn't work for some images, so use cv2
# imagesize doesn't work for some images, so use PIL as a fallback
try:
with Image.open(image_path) as img:
image_size = img.size