NVIDIA / Stable-Diffusion-WebUI-TensorRT

TensorRT Extension for Stable Diffusion Web UI
MIT License
1.9k stars 145 forks source link

Should "Hardware Accelerated GPU Scheduling" be turned On or OFF? #107

Closed DeemChan closed 11 months ago

DeemChan commented 12 months ago

Should "Hardware Accelerated GPU Scheduling" be turned On or OFF? (on Windows based machine)

image

I heard different opinions on how turning it ON or OFF affects the performance. Does it even do? If yes, what would be the optimal "position" of the switch? On or Off?

MorkTheOrk commented 12 months ago

You can try both, it depends on what you use.

Zaazu commented 12 months ago

I get faster iterations with GPU scheduling disabled (Windows 11)

contentis commented 11 months ago

Turning it off is almost always better. The amount of acceleration you'll see heavily depends on the model and GPU and can range anywhere from <1% to 10%

DeemChan commented 11 months ago

Turning it OFF then! Thank you for sharing guys!

BurnZeZ commented 11 months ago

It would be nice to see some actual comparisons, if anyone is up to it.

J-Cott commented 9 months ago

I tried turning if off. But it actually made the generation slightly slower for me, by 1.1 Seconds for 4 images, (25 seconds vs 23.9 seconds with it turned on). I have a RTX 3090 and 11900K with 64 GB Ram. And use TensorRT.

Genzo9319 commented 8 months ago

I did a little testing

SD generation details: SD arguments: --opt-sdp-attention --lowvram --xformers SD Settings: No previews CKPT-epicrealism Txt2Img; prompt: cat Sampler: DPM++ 2M Karras Size 512x512 Steps: 20 Batch count: 2 CFG: 7

Results: Without Hardware Acceleration: 1 image 48s, 2.42s/it, total time: 1:37s With Hardware Acceleration: 1 image 45s, 2.30s/it, total time: 1:32s

Conclusion: When Hardware Accelerated GPU Scheduling was turned on, image generation was faster.

Laptop: OS - Windows 10 Pro N (19045) 22H2 Media Feature Pack for Windows 10/11 N (February 2023) GPU - Nvidia GTX 1050 ti - 4GB VRAM, Performance settings CPU - Intel Core i7 8750H @ 2.20GHz SSD - XPG GAMMIX S70 BLADE (SSD) 1 TB RAM - Samsung DDR4-2666 (1333 MHz) 16 Gb Browser: Google chrome Laptop was restarted before each generation batch. Upon restart, that was the first thing I did.