-
-
Notifications
You must be signed in to change notification settings - Fork 805
Description
In experimenting with adding native qwen resolutions to the bucket sizes I discovered that the function get_bucket_sizes is adding new and incorrect resolutions to the buckets list. I believe this is due to a unintended type promotion. Basically the mod operations that check for matching width and height will rarely equal 0 because it is resulting in a float value. So, the comparison should instead use a very small value close to zero or the int type should be explicit.
The result is that this function adds new resolution buckets with often wildly different aspect ratios than the input image. Images that should in fact match an existing resolution will end up in a bucket for the newly added resolution.
I am assuming this may have some affect on training quality.
Line 59 in ee206cf
| def get_bucket_sizes(resolution: int = 512, divisibility: int = 8) -> List[BucketResolution]: |
Edit:
In other words, if I create a dataset where all the images conform to a standard SDXL width and height, they will still get put in random buckets and resized.