Skip to content

Conversation

@parlance-zz
Copy link
Contributor

The example train_text_to_image* scripts incorrectly passed a tuple with the specified resolution in both width and height, which causes TorchVision resize transform to resize directly to the target size instead of properly preserving the aspect ratio.

This would have also caused the subsequent CenterCrop transform to be redundant.

https://pytorch.org/vision/main/generated/torchvision.transforms.functional.resize.html

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 22, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Contributor

@patil-suraj patil-suraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks a lot for fixing this!

@patil-suraj patil-suraj merged commit b693aff into huggingface:main Dec 27, 2022
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

Successfully merging this pull request may close these issues.

3 participants