invoke-ai / InvokeAI

Invoke is a leading creative engine for Stable Diffusion models, empowering professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry leading WebUI, and serves as the foundation for multiple commercial products.
https://invoke-ai.github.io/InvokeAI/
Apache License 2.0
23.79k stars 2.45k forks source link

[enhancement]: Configurable dropdown menu with aspect ratio options #6402

Open Svyaga opened 6 months ago

Svyaga commented 6 months ago

Is there an existing issue for this?

Contact Details

svyaga

What should this feature add?

The goal is to implement control over default aspect ratio dropdown menu: chrome_AI1HaDZOHv It consists of two parts.

  1. Add config file for aspect ratios. For example, "invokeai-root\configs\aspect-ratio.cfg" (or any other format that can be edited in text editor). If the config file is empty, then InvokeAI loads up the default aspect ratio dropdown menu. But if it's edited like this:
    
    SDXL
    1:1 1536 1536
    Portrait 832 1216
    Wide 1216 832

SD 1.5 1:1 1024 1024 Portrait 512 768


Then InvokeAI will load parameters from the config file, and dropdown menu will look like this (assuming we load SDXL model):
![chrome_dnmnL5zPla](https://github.com/invoke-ai/InvokeAI/assets/143509676/d719fdb6-7df3-4abf-ac02-6bb4f7e36cdd)
2. Second part is changing "Optimize size for model" button behavior:
![chrome_6DXy5ZfS1S](https://github.com/invoke-ai/InvokeAI/assets/143509676/30333660-713b-4eb4-9ed5-de7e3744d933)
If the aspect ratio config is not default, then clicking this button will set width/height to the currently selected option in dropdown menu. For example, if currently selected option is "Portrait" and model is SDXL, then clicking this button will change width/height to 823x1216.

### Alternatives

Add "Aspect ratio configuration" button (1) or "Settings" option in dropdown menu (2) to change aspect ratio config in InvokeAI's UI instead of config file:
![Photoshop_qEm3myrF0S](https://github.com/invoke-ai/InvokeAI/assets/143509676/1ca71536-6e8d-40a5-a4a7-77b5cc1d5916)
Clicking this button/option will open an additional window with aspect ratio settings.

### Additional Content

_No response_
ufuksarp commented 6 months ago

Maybe the database could be used for storing presets instead?

clsn commented 6 months ago

could be part of the model manager, storing for each model. Which brings up the same issue as storing prompts that work for all models, or for all XL models, etc... you want to have some kind of "pseudo-models" that can be used as the "parents" of models and inherit things you want models to have in common.