invoke-ai / invoke-ai/InvokeAI

[enhancement]: Configurable dropdown menu with aspect ratio options

Open
#6,402 2 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
28.2k
Forks
3k
Avg merge
6d 5h
Merged PRs (30d)
19

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Contact Details

svyaga

### What should this feature add?

The goal is to implement control over default aspect ratio dropdown menu:
![chrome_AI1HaDZOHv](https://github.com/invoke-ai/InvokeAI/assets/143509676/74d6fc3c-99db-4047-8fbc-b1807b3a8483)
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_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.