We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
colab dropdown, just turn it to html
# @param ["1:1", "4:1", "16:9", "5:2", "2:1", "7:4", "3:2", "8:7", "9:8", "8:9", "7:8", "2:3", "4:7", "1:2", "2:5", "1:3", "9:16"] {allow-input: true}
python code
aspect_ratio = "9:16" max_pixel = 1024*1024 w, h = (int(e) for e in aspect_ratio.split(':')) width, height = (round(math.sqrt(max_pixel * x / y) / 8) * 8 for x, y in ((w, h), (h, w)))
width and height can be the param of the param of the model
width
height
The text was updated successfully, but these errors were encountered:
Great idea! Do you mind giving us a PR for this?
Sorry, something went wrong.
No branches or pull requests
colab dropdown, just turn it to html
python code
width
andheight
can be the param of the param of the modelThe text was updated successfully, but these errors were encountered: