Skip to content

Commit

Permalink
Revert "Fix the order of width and height of original size in SDXL tr…
Browse files Browse the repository at this point in the history
…aining script" (huggingface#5614)

Revert "Fix the order of width and height of original size in SDXL training script (huggingface#5382)"

This reverts commit 45db049.
  • Loading branch information
patrickvonplaten authored and Jimmy committed Apr 26, 2024
1 parent 61b6743 commit 52f0af7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/text_to_image/train_text_to_image_lora_sdxl.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ def preprocess_train(examples):
all_images = []
crop_top_lefts = []
for image in images:
original_sizes.append((image.width, image.height))
original_sizes.append((image.height, image.width))
image = train_resize(image)
if args.center_crop:
y1 = max(0, int(round((image.height - args.resolution) / 2.0)))
Expand Down
2 changes: 1 addition & 1 deletion examples/text_to_image/train_text_to_image_sdxl.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ def preprocess_train(examples):
all_images = []
crop_top_lefts = []
for image in images:
original_sizes.append((image.width, image.height))
original_sizes.append((image.height, image.width))
image = train_resize(image)
if args.center_crop:
y1 = max(0, int(round((image.height - args.resolution) / 2.0)))
Expand Down

0 comments on commit 52f0af7

Please sign in to comment.