support extensions of image files with uppercases

This commit is contained in:
Kohya S
2023-03-21 21:10:34 +09:00
parent 6d9f3bc0b2
commit 7b324bcc3b

View File

@@ -73,8 +73,7 @@ DEFAULT_LAST_OUTPUT_NAME = "last"
# region dataset
IMAGE_EXTENSIONS = [".png", ".jpg", ".jpeg", ".webp", ".bmp"]
# , ".PNG", ".JPG", ".JPEG", ".WEBP", ".BMP"] # Linux?
IMAGE_EXTENSIONS = [".png", ".jpg", ".jpeg", ".webp", ".bmp", ".PNG", ".JPG", ".JPEG", ".WEBP", ".BMP"]
class ImageInfo:
@@ -679,7 +678,7 @@ class BaseDataset(torch.utils.data.Dataset):
# ちょっと速くした
print("caching latents.")
image_infos= list(self.image_data.values())
image_infos = list(self.image_data.values())
# sort by resolution
image_infos.sort(key=lambda info: info.bucket_reso[0] * info.bucket_reso[1])