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

[Bug]: The Default Aspect Ratio in Config.py is Overriding Both the Default Preset & Config.txt #98

Open
4 of 5 tasks
DavidDragonsage opened this issue Feb 24, 2025 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@DavidDragonsage
Copy link
Owner

Checklist

  • The issue has not been resolved by following the troubleshooting guide
  • The issue exists on a clean installation of Fooocus
  • The issue exists in the current version of Fooocus
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

The aspect ratio specified in the Default preset or in config.txt is not overriding the default value in config.py as it should.

Once the UI is running, other presets do override config.py, which is the expected behaviour.

Steps to reproduce the problem

  1. The default aspect ratio in config.py is 1024x1024. If you select a different value in the Default preset it should override this value, but it does not.
  2. Similarly, if the Default preset does not specify an aspect ratio, the value specified in config.txt should override the value in config.py, but it does not.

What should have happened?

The aspect ratio in the Default preset or in config.txt should be override whatever is specified in config.py, which should be just a fallback value.

What browsers do you use to access Fooocus?

Mozilla Firefox

Where are you running Fooocus?

Locally

What operating system are you using?

Windows 10

Console logs

Not applicable

Additional information

No response

@iwr-redmond
Copy link
Collaborator

This could be resolved by adding the HiDiffusion node to the FooocusPlus custom nodes library, and then updating the SD1.5 workflow to incorporate the nodes listed in the sample workflow. SD1.5 generations would then use the same resolutions as SDXL and Flux, eliminating the need for resolution adjustments.

@DavidDragonsage
Copy link
Owner Author

So this uses automatic upscaling to boost SD1.5 to SDXL sizes? I do think we should respect SD1.5 resolutions as they are, but of course this upscaling could be an option. Anyway, it was not difficult at all to include an aspect ratio table for SD1.5 - most of the time was just testing out each of the ones that I provided with a couple of different models.

But the override of default aspect ratio by config.py - overriding both the preset and config.txt - is the actual issue in this item, although it is a minor one. I will not be looking at it until after the production release.

@iwr-redmond
Copy link
Collaborator

iwr-redmond commented Mar 1, 2025

So this uses automatic upscaling to boost SD1.5 to SDXL sizes?

No, it natively generates at SDXL resolutions using SD1.5 models, with a speed boost as well. No upscaling required. See a sample here, albeit without the speed boost which appears to be Comfy-only.

@iwr-redmond
Copy link
Collaborator

But the override of default aspect ratio by config.py - overriding both the preset and config.txt - is the actual issue in this item, although it is a minor one.

If all models (SD1.5, SDXL, Flux) generate at the same resolutions, you could revert to the original Fooocus resolutions code and make this bug irrelevant.

@DavidDragonsage
Copy link
Owner Author

So this uses automatic upscaling to boost SD1.5 to SDXL sizes?

No, it natively generates at SDXL resolutions using SD1.5 models, with a speed boost as well. No upscaling required. See a sample here, albeit without the speed boost which appears to be Comfy-only.

Well that is interesting! It sounds too good to be true. 🙂

@iwr-redmond
Copy link
Collaborator

You may recall I wrote this up as part of Stable Diffusion o1.

@DavidDragonsage
Copy link
Owner Author

But the override of default aspect ratio by config.py - overriding both the preset and config.txt - is the actual issue in this item, although it is a minor one.

If all models (SD1.5, SDXL, Flux) generate at the same resolutions, you could revert to the original Fooocus resolutions code and make this bug irrelevant.

It is not really a resolutions code problem, there is just a prioritizing problem going on in config.py. Its probably not that difficult to fix but I just don't want to bother with it at this point. The user just has to select the resolution that they want from the table because you cannot rely on the default preset or config.text to do it. But all the other presets select resolution properly. The default preset is treated in a special way by mainline Fooocus and Simple built on this. It should not really have been given special coding.

@DavidDragonsage
Copy link
Owner Author

You may recall I wrote this up as part of Stable Diffusion o1.

Yes, I remember that now after looking at the link. There's a lot to keep track of isn't there?

@iwr-redmond
Copy link
Collaborator

I reckon you can add this issue to the FooocusPlus UX project and return to it when resources permit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants