Skip to content

Conversation

@DavidBert
Copy link
Contributor

@DavidBert DavidBert commented Nov 16, 2025

What does this PR do?

Add 1024 resolution aspect ratio bins to PRX pipeline

This PR adds support for 1024 resolution aspect ratio binning in the PRX pipeline.

Changes

  • Added ASPECT_RATIO_1024_BIN with 24 aspect ratios ranging from 0.49 (704x1440) to 2.05 (1440x704)
  • Created ASPECT_RATIO_BINS dictionary mapping resolutions (256, 512, 1024) to their respective aspect ratio bins
  • Simplified resolution binning logic to use dictionary lookup instead of comparisons
  • Added validation at generation time to provide clear error message when using unsupported resolutions with use_resolution_binning=True

This enables the pipeline to properly handle 1024 resolution models while maintaining backward compatibility with 256 and 512 resolution models.

Before submitting

Who can review?

@yiyixuxu, @asomoza and @sayakpaul

@DavidBert DavidBert changed the title add 1024 ratio bins [PRX pipeline]: add 1024 resolution ratio bins Nov 16, 2025
Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Sweet! Thank you.

@HuggingFaceDocBuilderDev

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.

@sayakpaul sayakpaul merged commit 0c35b58 into huggingface:main Nov 17, 2025
7 of 11 checks passed
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