-
Notifications
You must be signed in to change notification settings - Fork 6.1k
[LoRA training] add aspect ratio bucketing #11438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice effort. WDYT about making methods like parse_buckets_string()
, find_nearest_bucket()
a part of training_utils.py
?
@bot /style |
Style fixes have been applied. View the workflow run here. |
repeats=args.repeats, | ||
center_crop=args.center_crop, | ||
) | ||
|
||
batch_sampler = BucketBatchSampler(train_dataset, batch_size=args.train_batch_size, drop_last=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious, why is the drop_last
not True
here? in this other PR this is set to True
so it doesn't error when the batch size is > 1 and the last batch does not have enough images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank for pointing it out! replied in #11921
support multi-aspect training