mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-08 22:35:09 +00:00
update comment
This commit is contained in:
@@ -1404,7 +1404,7 @@ class BaseDataset(torch.utils.data.Dataset):
|
|||||||
# return imagesize.get(image_path)
|
# return imagesize.get(image_path)
|
||||||
image_size = imagesize.get(image_path)
|
image_size = imagesize.get(image_path)
|
||||||
if image_size[0] <= 0:
|
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:
|
try:
|
||||||
with Image.open(image_path) as img:
|
with Image.open(image_path) as img:
|
||||||
image_size = img.size
|
image_size = img.size
|
||||||
|
|||||||
Reference in New Issue
Block a user