Skip to content

Commit

Permalink
jxl image size workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
feffy380 committed May 29, 2024
1 parent 5c8e2bd commit a7d2685
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/train_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,10 @@ def cache_text_encoder_outputs(
)

def get_image_size(self, image_path):
return imagesize.get(image_path)
if image_path.endswith(".jxl"):
return Image.open(image_path).size
else:
return imagesize.get(image_path)

def load_image_with_face_info(self, subset: BaseSubset, image_path: str):
img = load_image(image_path)
Expand Down

0 comments on commit a7d2685

Please sign in to comment.