-
Notifications
You must be signed in to change notification settings - Fork 145
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] Input shape must be divisible by 64 in both dimensions. Hires Fix error. #15
Comments
Currently, there is a limitation: the resolution needs to be a multiple of 64. Hires fix is something I wasn't aware of when I developed this. And probably requires some work to run performant. |
Yes it is. |
Can you post your engine config and the hires.fix settings you have used? |
Okay, but I can post only after 3pm GMT 0 |
Although, I remember the settings of my hires.fix: 768x512 base resolution, upscale by 1,65x, upscaler - 4XLSDIR, denoising strength- 0,5 |
I'm not sure how SD Webui handles decimals but using the info provided: 768x512 * 1.65 = 1267.2x844.8 |
As far as I remember, these values are rounded to 1267x845 (but I could be wrong, I’ll give more accurate information when I’m home) |
Ran into this as well even when highres fix was set to 1 (aka not to upscale) and using 712x712. Had to drop it down to 640x640. |
712 isn't divisible by 64, either. Can you try running 512 (low res) with a 1.5x scale factor? |
I know 712 isn't divisible by 64, but when you wrote:
I was under the impression that it only needed to be divisible when using the Highres fix. But it happens even when Highres fix isn't being used. If I try 640x640 it works fine when not using HighRes fix, but if I do use 2x it gives this error: |
Actually, the 640x640 + 2x scale error might be caused by max-width/height in the tensorrt engine not being set to 1280x1280. Give me a moment while I check that. |
That is most likely the case. I tried adding some more information in the readme on the hot_fix branch. If you don't mind I would appreciate it if you could take a look and let me know if that does a better job at explaining it. |
Yeah, that was the problem. Max height/width needs to account for whatever the output is, even if its being scaled after-the-fact. If we have to use resolutions divisible by 64 even without the highres fix/scaler, then the default profiles should probably be updated to resolutions that are divisible by 64 (dynamic profile could be 512 -1024 or 512 - 640 for instance. I like the readme change, just think a note about requiring divisible by 64 resolutions would be good (or better yet, make the slider that sets the min/max res only be able to set to resolutions that are divisible by 64? |
Wait, isn't that the case? The steps size should be set to 64 in the UI. But good idea to add the 64x requirement to the readme. |
Sorry, you're right. If it could do the same for the res slider on the generation tab that would be neat. |
We cannot modify the behaviour in the main UI. Raising a ValueError is the best I can do at the moment. |
As mentioned earlier, using a scale factor of 1.65 will result in a non-mulitple-of 64 resolution. If you set it to 1.5x it should work just fine with your set-up |
Closing as this is expected behaviour. Feel free to reopen if you encounter further issues. |
Error when using hires fix.
The text was updated successfully, but these errors were encountered: