Git Product home page Git Product logo

Comments (19)

contentis avatar contentis commented on July 30, 2024 1

We cannot modify the behaviour in the main UI. Raising a ValueError is the best I can do at the moment.

from stable-diffusion-webui-tensorrt.

contentis avatar contentis commented on July 30, 2024

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.
From the error, I assume that both the low-res and high-res resolutions need to be divisible by 64. Is that the case?

from stable-diffusion-webui-tensorrt.

AndreyRGW avatar AndreyRGW commented on July 30, 2024

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.
From the error, I assume that both the low-res and high-res resolutions need to be divisible by 64. Is that the case?

Yes it is.

from stable-diffusion-webui-tensorrt.

contentis avatar contentis commented on July 30, 2024

Can you post your engine config and the hires.fix settings you have used?

from stable-diffusion-webui-tensorrt.

AndreyRGW avatar AndreyRGW commented on July 30, 2024

Can you post your engine config and the hires.fix settings you have used?

Okay, but I can post only after 3pm GMT 0

from stable-diffusion-webui-tensorrt.

AndreyRGW avatar AndreyRGW commented on July 30, 2024

Can you post your engine config and the hires.fix settings you have used?

Although, I remember the settings of my hires.fix: 768x512 base resolution, upscale by 1,65x, upscaler - 4XLSDIR, denoising strength- 0,5

from stable-diffusion-webui-tensorrt.

contentis avatar contentis commented on July 30, 2024

I'm not sure how SD Webui handles decimals but using the info provided: 768x512 * 1.65 = 1267.2x844.8
No matter how this will be rounded, the upscaled resolution is not divisible by 64.

from stable-diffusion-webui-tensorrt.

AndreyRGW avatar AndreyRGW commented on July 30, 2024

I'm not sure how SD Webui handles decimals but using the info provided: 768x512 * 1.65 = 1267.2x844.8
No matter how this will be rounded, the upscaled resolution is not divisible by 64.

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)

from stable-diffusion-webui-tensorrt.

Asinin3 avatar Asinin3 commented on July 30, 2024

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.

from stable-diffusion-webui-tensorrt.

contentis avatar contentis commented on July 30, 2024

712 isn't divisible by 64, either. Can you try running 512 (low res) with a 1.5x scale factor?

from stable-diffusion-webui-tensorrt.

Asinin3 avatar Asinin3 commented on July 30, 2024

I know 712 isn't divisible by 64, but when you wrote:

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

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:
ValueError: No valid profile found. Please go to the TensorRT tab and generate an engine with the necessary profile. If using hires.fix, you need an engine for both the base and upscaled resolutions. Otherwise, use the default (torch) U-Net.
If I try 512x512 with 1.5x scale though.. it works.

from stable-diffusion-webui-tensorrt.

Asinin3 avatar Asinin3 commented on July 30, 2024

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.

from stable-diffusion-webui-tensorrt.

contentis avatar contentis commented on July 30, 2024

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.

from stable-diffusion-webui-tensorrt.

Asinin3 avatar Asinin3 commented on July 30, 2024

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.

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?

from stable-diffusion-webui-tensorrt.

contentis avatar contentis commented on July 30, 2024

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.

from stable-diffusion-webui-tensorrt.

Asinin3 avatar Asinin3 commented on July 30, 2024

Wait, isn't that the case? The steps size should be set to 64 in the UI

Sorry, you're right. If it could do the same for the res slider on the generation tab that would be neat.

from stable-diffusion-webui-tensorrt.

AndreyRGW avatar AndreyRGW commented on July 30, 2024

Can you post your engine config and the hires.fix settings you have used?

image image

from stable-diffusion-webui-tensorrt.

contentis avatar contentis commented on July 30, 2024

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

from stable-diffusion-webui-tensorrt.

contentis avatar contentis commented on July 30, 2024

Closing as this is expected behaviour. Feel free to reopen if you encounter further issues.

from stable-diffusion-webui-tensorrt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.