Skip to content
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

Request to bring a custom resolution box #38

Closed
Aamir3d opened this issue Aug 30, 2023 · 8 comments
Closed

Request to bring a custom resolution box #38

Aamir3d opened this issue Aug 30, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@Aamir3d
Copy link

Aamir3d commented Aug 30, 2023

@MoonRide303 I know you closed the toggle issue, but not a big deal.
I'm trying to work with F-MRE, but that long dropdown of resolutions is way too long. I showed this to a GUI/UX person who felt the same way, in what is otherwise a very very usable and clean interface.

A 'nice to have' : A custom resolution box be implemented for X / Y (Width, Height) resolution, and this will allow people to simply type in their required resolution and start working rather than scroll through the list each time they want a different res.

@Ptbird1
Copy link

Ptbird1 commented Aug 30, 2023

2nd this, I'm lucky enough to have a beefy PC and like making 1920x1200 images, mostly for paintings and landscapes but SDXL can handle the beefier resolutions, maybe hide it in advanced so people don't start complaining about how their 512x4000 image looks bad, while also being easier than having to edit the settings in notepad and have the users add them themselves as I've been doin

@barepixels
Copy link

barepixels commented Aug 30, 2023

Forgot the link to the original paper but for SDXL one should use these dimensions (all numbers are divided by 64 evenly)
For best quality, MoonRise303 insists you use one of the below dimensions. I agree.
aspect ratio
For now, I have a reference sheet that I must open and look at when I want to change resolutions, Kinda pain in the butt

896 x 1152 for 3:4 or 4:5 crop
1152 x 896 for 4:3 or 5:4 crop

832 x 1216 for 2:3 crop
1216 x 832 for 3:2 crop

1344 x 768 for 16:9 crop

1408 x 704 spherical 360 pano

1536 x 640 anamorphic movie format

they are the ideal size to generate with minimal crop loss to match common industry ratios. Yes you will have to crop some off before you go to print

@Ptbird1
Copy link

Ptbird1 commented Aug 30, 2023

That reference sheet is super helpful! Definitely gonna be saving that :)

@barepixels
Copy link

barepixels commented Aug 30, 2023

In an ideal world, we would be able to make our own list for the pull-down and save as a josn file. This will shorten the list:

  1. not having to see resolutions we would never use
  2. change the wording in the pull-down, such as "1408 x 704 spherical 360 pano"
  3. no scrolling madness
  4. short and elegant
  5. even add (not recommended) not sdxl friendly sizes such as 1920 x 1200, but hey if you like the results it should be your choice.

@barepixels
Copy link

check this out
SDXL Aspect Ratio

@MoonRide303
Copy link
Owner

@barepixels

  1. Those aspect ratio values are not correct (I use math to calculate correct AR for given resolution in MRE).
  2. I'd rather stick to official SDXL resolution list by default.
  3. I will look into customising resolution list (via resolutions.json, or something like that), so people who would like to use fewer resolutions could adjust that list to their needs in simple way.

@barepixels
Copy link

barepixels commented Sep 2, 2023

possible solution?

@MoonRide303 please provide 2 versions: original "resolutions.py" and "alternative-resolutions.py"

The "alternative-resolutions.py" displays the pull-down menu that read like this. This way we can opt for the shorter version with (ideal size for industry crop), by duplicating and changing the file name to "resolutions.py" when Fooocus gets an update

SDXL Aspect Ratio

Case example of industry crop

  1. Instagram only shows images as 1x1, 4x5, and 16x9 If your upload has the wrong ratio Instagram will auto-crop for you. Well, it may crop off an area you do not want. But if you prepare the image before you upload, you have control over how it gets cropped, how it will be displayed

  2. 8x10 inches is a very very common print resolution.

  3. 16x9 is common in wide-screen video. If you want to include your images with other footage you will have to crop.

The key here is to quickly identify the nearest SDXL resolution to actually cropping for traditional size with minimal loss

@MoonRide303 MoonRide303 added the enhancement New feature or request label Sep 3, 2023
@MoonRide303
Copy link
Owner

MoonRide303 commented Sep 3, 2023

Done. I've added support for custom resolutions list (you can define your own in resolutions.json), and also for custom resolutions (you can just type something like "1280x640" in Resolution field, now). Commit d2942a0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants