Skip to content

Commit 12cbc6f

Browse files
Revert "Fix the order of width and height of original size in SDXL training script (#5382)"
This reverts commit 45db049.
1 parent 29cf163 commit 12cbc6f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/text_to_image/train_text_to_image_lora_sdxl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ def preprocess_train(examples):
840840
all_images = []
841841
crop_top_lefts = []
842842
for image in images:
843-
original_sizes.append((image.width, image.height))
843+
original_sizes.append((image.height, image.width))
844844
image = train_resize(image)
845845
if args.center_crop:
846846
y1 = max(0, int(round((image.height - args.resolution) / 2.0)))

examples/text_to_image/train_text_to_image_sdxl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ def preprocess_train(examples):
825825
all_images = []
826826
crop_top_lefts = []
827827
for image in images:
828-
original_sizes.append((image.width, image.height))
828+
original_sizes.append((image.height, image.width))
829829
image = train_resize(image)
830830
if args.center_crop:
831831
y1 = max(0, int(round((image.height - args.resolution) / 2.0)))

0 commit comments

Comments
 (0)