Skip to content

added --size and --aspect-ratio argument #725

New issue

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

Closed
wants to merge 1 commit into from

Conversation

kuesji
Copy link

@kuesji kuesji commented Jul 7, 2025

No description provided.

@stduhpf
Copy link
Contributor

stduhpf commented Jul 7, 2025

You should probably add a way to ensure the dimensions are multiples of 64 (with the aspect ratio).

@kuesji
Copy link
Author

kuesji commented Jul 7, 2025

i thought leaving size check to that part of code makes more sense.

https://github.com/leejet/stable-diffusion.cpp/blob/dafc32d0dd0922272f970c93f961834af460f013/examples/cli/main.cpp#L716C1-L724C6

@leejet
Copy link
Owner

leejet commented Jul 7, 2025

Thank you for your contribution, but I don't think these two arguments are helpful.

@wbruna
Copy link
Contributor

wbruna commented Jul 7, 2025

Since the user isn't specifying one of the dimensions, a calculation that approximates better the missing dimension for a multiple of 64 could be more useful, especially for preserving image ratio on img2img runs.

I did something similar on Koboldcpp, in LostRuins/koboldcpp#1586 : in that case, it adapts the ratio to a desired image area, but getting a single dimension from the other + ratio wouldn't be much different.

@kuesji kuesji closed this Jul 8, 2025
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.

4 participants