diff --git a/library/train_util.py b/library/train_util.py index 7f396d36e..a5d6fdd21 100644 --- a/library/train_util.py +++ b/library/train_util.py @@ -1404,7 +1404,7 @@ def get_image_size(self, image_path): # 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