Comments (19)
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.
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.
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.
Can you post your engine config and the hires.fix settings you have used?
from stable-diffusion-webui-tensorrt.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Can you post your engine config and the hires.fix settings you have used?
from stable-diffusion-webui-tensorrt.
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.
Closing as this is expected behaviour. Feel free to reopen if you encounter further issues.
from stable-diffusion-webui-tensorrt.
Related Issues (20)
- ModuleNotFoundError: No module named 'launch' HOT 2
- after install tensorRT, loading with this error。。。json.decoder.JSONDecodeError: Expecting value: line 2875 column 36 (char 193761)
- [E] 1: Myelin (Myelin error from unknown graph) [E] 4: The timing cache will not be used! HOT 2
- TensorRT does not load automatically after startup
- Trying to load models throws OutofMemoryError on Ubuntu
- TensorRT gives a Runtime Error when Positive prompt value is 150 and Negative prompt value is 75.
- Does tensorRT support direct use of apis, and what are the parameters? HOT 1
- how to generate json config file in the LoRA tab. HOT 1
- [branch: Controlnet_V2] ONNX IR model version conflict, how do i downgrade?
- [E] 3: getPluginCreator could not find plugin: InstanceNormalization_TRT version: 1 when building engine with latest TRT_VERSION="10.0.0b6"
- No config file found for You can generate it in the LoRA tab. HOT 3
- Advise to add promt token check in warning report
- [Feature Request] Add a Command Line Interface for the exporter process.
- AttributeError: 'tensorrt_bindings.tensorrt.ICudaEngine' object has no attribute 'get_profile_shape' HOT 2
- How to process a batch of images with ControlNet TensorRT in img2img ?
- Latest version of automatic1111 wont start with this extension installed. HOT 2
- AttributeError: 'NoneType' object has no attribute 'device_memory' HOT 8
- Error Code 3: API Usage Error (Parameter check failed
- Export LoRA to onnx depending on cyberrealistic_v31 can't fit to v1-5-pruned-emaonly_cnet_1846e6c3c239531e.trt
- TensorRT doesn't install on fresh A1111 install on Ubuntu, stuck at install after copy/paste de git link HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stable-diffusion-webui-tensorrt.