Open Proquror opened 1 year ago
Oh okay, I reckon we should pull the maximum/minimum from the options, and use defaults if undefined:
const _MAXIMUM_DIMENSION = window.opts['txt2img/Width/maximum'] || 2048;
const _MINIMUM_DIMENSION = window.opts['txt2img/Width/minimum'] || 64;
Should also probably have a txt2img/img2img specific dimensions, rather than shared.
Step should also probably be configurable, since it seems like it's a valid option.
Also need to consider race conditions, as I think window.opts
isn't immediately populated.
Apologies as I've not actually been keeping much up to date on the a1111 changes, but I'll try to implement these changes when I have a chance, open to pull requests if others want to give it a go though.
I can confirm the bug is present on my system also. This line alone does not fix the issue, as the options are not always populated as you just mentioned :
const _MAXIMUM_DIMENSION = window.opts['txt2img/Width/maximum'] || 2048;
As a temporary fix I simply adjusted the line according to my needs :
const _MAXIMUM_DIMENSION = 2560;
Watching this issue for a more permanent fix.
Thanks for your extension !
Can you tell me in which file did u change than line?
Can you tell me in which file did u change than line?
Sorry, it was just an example to show what the eventual code may look like. I don't know if that line would just work. I've not found the time to implement this, but anyone else is free to give it ago, there is only 1 js file in the repo!
The extension breaks the resolution selection. My resolution selectors are limited to 512 and 2560. With this extension I somehow can set it less than 512, but it warps back to 512. And I can't select higher that 2048.
There are no errors in the console log.
How it shouldn't work:![Q6dvSbS](https://github.com/thomasasfk/sd-webui-aspect-ratio-helper/assets/66637826/39fbe5a3-5aad-4e3c-b971-a73f4a0c7eaa)
How it should work:![fea3383f-915d-498a-b995-5963ea5ab963](https://github.com/thomasasfk/sd-webui-aspect-ratio-helper/assets/66637826/fb94455b-0343-42d3-bdea-7f7158516b2a)