ml-stable-diffusion icon indicating copy to clipboard operation
ml-stable-diffusion copied to clipboard

Support more aspect ratios

Open sindresorhus opened this issue 3 years ago • 6 comments

Other Stable Diffusion interfaces like https://dreamlike.art/create support aspect ratios like 4:3, 3:4, etc.

sindresorhus avatar Jan 16 '23 08:01 sindresorhus

+1 I'd love to output 9:16 for mobile uses.

pj4533 avatar Feb 01 '23 16:02 pj4533

Yup, single-model multi-resolution should be high on the list

Zabriskije avatar Feb 01 '23 23:02 Zabriskije

Yup, single-model multi-resolution should be high on the list

Are other resolutions possible using other models with this repo? I was looking on HuggingFace for a 9:16 model but didn't find anything (kinda new to SD, would love any help getting a 9:16 image)

pj4533 avatar Feb 02 '23 15:02 pj4533

Are other resolutions possible using other models with this repo? I was looking on HuggingFace for a 9:16 model but didn't find anything (kinda new to SD, would love any help getting a 9:16 image)

Right now it's not possible to select the preferred resolution via GUI, you'll have to hard code the resolution when converting a model, and it only works for original (CPU+GPU). But check out Core ML Models community on Hugging Face, we're uploading some models in 512x768. Check out also Mochi Diffusion, the best GUI right now imho.

Zabriskije avatar Feb 02 '23 17:02 Zabriskije

I was able to achieve 512x768 images for Diffusion Wallpaper by modifying the torch2coreml.py as described here: https://github.com/apple/ml-stable-diffusion/issues/64#issuecomment-1375013357

mwmeyer avatar Feb 02 '23 18:02 mwmeyer

Are other resolutions possible using other models with this repo? I was looking on HuggingFace for a 9:16 model but didn't find anything (kinda new to SD, would love any help getting a 9:16 image)

Right now it's not possible to select the preferred resolution via GUI, you'll have to hard code the resolution when converting a model, and it only works for original (CPU+GPU). But check out Core ML Models community on Hugging Face, we're uploading some models in 512x768. Check out also Mochi Diffusion, the best GUI right now imho.

Hmmmmm, I have mostly been using the image2image PR, with my own custom CLI. So I think I'd need to recompile the model using that torch2coreml patch, hard coding the image sizes? (otherwise I wouldn't have the VAEEncoder?) Not really sure tho...prob should just wait till that PR is merged.

pj4533 avatar Feb 05 '23 15:02 pj4533