"...en/git@developer.sourcefind.cn:OpenDAS/diffusers.git" did not exist on "78afb844365d1d6bac679f1b0ca9f53fbeb648b2"
Unverified Commit 45db0499 authored by linjiapro's avatar linjiapro Committed by GitHub
Browse files

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



* wip

* wip

---------
Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
parent a68f5062
...@@ -839,7 +839,7 @@ def main(args): ...@@ -839,7 +839,7 @@ def main(args):
all_images = [] all_images = []
crop_top_lefts = [] crop_top_lefts = []
for image in images: for image in images:
original_sizes.append((image.height, image.width)) original_sizes.append((image.width, image.height))
image = train_resize(image) image = train_resize(image)
if args.center_crop: if args.center_crop:
y1 = max(0, int(round((image.height - args.resolution) / 2.0))) y1 = max(0, int(round((image.height - args.resolution) / 2.0)))
......
...@@ -825,7 +825,7 @@ def main(args): ...@@ -825,7 +825,7 @@ def main(args):
all_images = [] all_images = []
crop_top_lefts = [] crop_top_lefts = []
for image in images: for image in images:
original_sizes.append((image.height, image.width)) original_sizes.append((image.width, image.height))
image = train_resize(image) image = train_resize(image)
if args.center_crop: if args.center_crop:
y1 = max(0, int(round((image.height - args.resolution) / 2.0))) y1 = max(0, int(round((image.height - args.resolution) / 2.0)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment