Skip to content

Add size option to choose size with pixels - #31

Draft
bfirsh wants to merge 1 commit into
mainfrom
add-size-option
Draft

Add size option to choose size with pixels#31
bfirsh wants to merge 1 commit into
mainfrom
add-size-option

Conversation

@bfirsh

@bfirsh bfirsh commented Oct 9, 2024

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread predict.py
# 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
Copy Markdown
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.

Comment thread predict.py
if aspect_ratio is not None or megapixels is not None:
# set defaults
if aspect_ratio is None:
aspect_ratio = "1024x1024"

Copy link
Copy Markdown
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.

2 participants