1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

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

* wip

* wip

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
This commit is contained in:
linjiapro
2023-10-18 13:38:52 -07:00
committed by GitHub
parent a68f5062fb
commit 45db049973
2 changed files with 2 additions and 2 deletions

View File

@@ -839,7 +839,7 @@ def main(args):
all_images = []
crop_top_lefts = []
for image in images:
original_sizes.append((image.height, image.width))
original_sizes.append((image.width, image.height))
image = train_resize(image)
if args.center_crop:
y1 = max(0, int(round((image.height - args.resolution) / 2.0)))

View File

@@ -825,7 +825,7 @@ def main(args):
all_images = []
crop_top_lefts = []
for image in images:
original_sizes.append((image.height, image.width))
original_sizes.append((image.width, image.height))
image = train_resize(image)
if args.center_crop:
y1 = max(0, int(round((image.height - args.resolution) / 2.0)))