Skip to content
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

Does ai-toolkit support training non-square images? ai-toolkit支持训练非正方形图片吗 #180

Open
BigPeng opened this issue Sep 18, 2024 · 1 comment

Comments

@BigPeng
Copy link

BigPeng commented Sep 18, 2024

Does ai-toolkit support training non-square images? I don't want to crop and scale the images.

I am training flux with 7681024 images. On an A100-40G machine, 3000 steps take 2.5 hours. I set buckets=False and resolution=1024, and found that it takes the same time as training with 10241024 images. Is there any logic in the training code that will adjust the rectangular image to a square image?

ai-toolkit支持训练非正方形图片吗,我不想要裁剪和缩放图片。

我在用7681024的图片训练flux,A100-40G的机器,3000步需要2个半小时,设置了buckets=False,resolution=1024,发现跟训练输入10241024的图片需要一样的时间,是不是训练代码有什么逻辑会把长方形图片调整成正方形图片。

@tetsuoo-online
Copy link

tetsuoo-online commented Sep 23, 2024

yes I just did it, I had no issue. But I made my dataset images with resolutions similar to Flux or SDXL, like 768x1024, 1024x1024, 832x1216 etc, just to be safe. Maybe it's not necessary I don't know. Go to Birme website to help with that task (it's a free tool).
I would put Buckets=True, as this option is especially what you need to handle non-squared images in training x)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants