Skip to content

Conversation

@bfirsh
Copy link
Member

@bfirsh bfirsh commented Oct 9, 2024

No description provided.

# 1 megapixel sizes
SIZES = {f"{x}x{y}": (x, y) for x, y in ASPECT_RATIOS.values()}
# 0.25 megapixel sizes
SIZES.update({f"{x / 2}x{y / 2}": (x / 2, y / 2) for x, y in ASPECT_RATIOS.values()})
Copy link
Contributor

Choose a reason for hiding this comment

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

minor thing - this should be integer division {x // 2}. if it's {x / 2} then we'll have a trailing .0 on all the strings, e.g. 512.0 instead of 512.

if aspect_ratio is not None or megapixels is not None:
# set defaults
if aspect_ratio is None:
aspect_ratio = "1024x1024"
Copy link
Contributor

Choose a reason for hiding this comment

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

this is off, aspect_ratio should default to 1:1 not 1024x1024

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