AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
140.94k stars 26.66k forks source link

Image generation outputs the picture very slow while watching a youtube video #14611

Open TheHeimZocker opened 9 months ago

TheHeimZocker commented 9 months ago

Checklist

What happened?

As said in the title, the actual output is very slow, the generation of it not. So example: I start the generation, it goes all the way to the 5th step and it just keeps loading for minutes. (while i have a youtube video running on 1080p) I tried lowering the resolution and the problem still occurs. Once i stop the video, it runs completely fine and outputs the picture really fast.

Screenshot_43

Steps to reproduce the problem

Have a youtube video running - start the generation of the picture

What should have happened?

Not slow down the output of the picture

What browsers do you use to access the UI ?

Mozilla Firefox

Sysinfo

sysinfo-2024-01-10-18-08.json

Console logs

venv "G:\stable-diffusion\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.7.0
Commit hash: cf2772fab0af5573da775e7437e6acdca424f26e
Launching Web UI with arguments: --api --xformers --api-server-stop
Style database not found: G:\stable-diffusion\stable-diffusion-webui\styles.csv
Loading weights [e686128cf0] from G:\stable-diffusion\stable-diffusion-webui\models\Stable-diffusion\pixelwaveturboExcellent_02.safetensors
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Creating model from config: G:\stable-diffusion\stable-diffusion-webui\repositories\generative-models\configs\inference\sd_xl_base.yaml
Startup time: 19.6s (prepare environment: 5.0s, import torch: 4.8s, import gradio: 2.0s, setup paths: 2.4s, initialize shared: 0.2s, other imports: 1.5s, setup codeformer: 0.2s, list SD models: 0.2s, load scripts: 1.6s, create ui: 0.6s, gradio launch: 1.2s).
Applying attention optimization: xformers... done.
Model loaded in 10.4s (load weights from disk: 1.4s, create model: 0.7s, apply weights to model: 7.6s, move model to device: 0.1s, load textual inversion embeddings: 0.1s, calculate empty prompt: 0.4s).
100%|████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:07<00:00,  1.52s/it]
========================================================================================== 5/5 [00:06<00:00,  1.38s/it]
A tensor with all NaNs was produced in VAE.
Web UI will now convert VAE into 32-bit float and retry.
To disable this behavior, disable the 'Automatically revert VAE to 32-bit floats' setting.
To always start with 32-bit VAE, use --no-half-vae commandline flag.
==========================================================================================
Total progress: 100%|████████████████████████████████████████████████████████████████████| 5/5 [00:14<00:00,  2.99s/it]
100%|████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:07<00:00,  1.41s/it]
Total progress: 100%|████████████████████████████████████████████████████████████████████| 5/5 [00:11<00:00,  2.29s/it]
100%|████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:07<00:00,  1.48s/it]
Total progress: 100%|████████████████████████████████████████████████████████████████████| 5/5 [00:12<00:00,  2.41s/it]
100%|████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:07<00:00,  1.46s/it]
Total progress: 100%|████████████████████████████████████████████████████████████████████| 5/5 [00:16<00:00,  3.30s/it]
100%|████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:07<00:00,  1.48s/it]
Total progress: 100%|████████████████████████████████████████████████████████████████████| 5/5 [00:11<00:00,  2.39s/it]
100%|████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:07<00:00,  1.48s/it]
Total progress: 100%|████████████████████████████████████████████████████████████████████| 5/5 [00:22<00:00,  4.50s/it]
100%|████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:07<00:00,  1.48s/it]
Total progress: 100%|████████████████████████████████████████████████████████████████████| 5/5 [00:12<00:00,  2.40s/it]
100%|████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:07<00:00,  1.47s/it]
Total progress: 100%|████████████████████████████████████████████████████████████████████| 5/5 [00:14<00:00,  2.83s/it]
100%|████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:07<00:00,  1.47s/it]
Total progress: 100%|████████████████████████████████████████████████████████████████████| 5/5 [00:11<00:00,  2.39s/it]
100%|████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:07<00:00,  1.53s/it]
Total progress: 100%|████████████████████████████████████████████████████████████████████| 5/5 [04:04<00:00, 48.98s/it]
Total progress: 100%|████████████████████████████████████████████████████████████████████| 5/5 [04:04<00:00,  1.49s/it]

Additional information

No response

EclipsedStar0 commented 9 months ago

I (think) this might have to do with the fact that to watch a YouTube video, you're diverting resources from your GPU to watching the video instead of generating the image.

Woisek commented 9 months ago

@TheHeimZocker Guess what is used when watching a video ,,, ? Or playing a game ... ? Or any video output related usage ... ?

TheHeimZocker commented 9 months ago

@EclipsedStar0 @Woisek Once again, the generating of the image itself is going fast. It's the output that takes long, like, the last push if i where to call it. Also, @Woisek thanks for the input, but a video is using video decoding mostly in my experience.

BrickMissle commented 9 months ago

watch youtube on your phone while generating

ipinz commented 9 months ago

Try to disable hardware acceleration in setting Screenshot 2024-01-11 072857

Woisek commented 9 months ago

@EclipsedStar0 @Woisek Once again, the generating of the image itself is going fast. It's the output that takes long, like, the last push if i where to call it.

The last thing is applying the VAE ... the heaviest of this process. What do you expect?

Also, @Woisek thanks for the input, but a video is using video decoding mostly in my experience.

And where do you think does this happen, hm? Hint: It starts with V and ends with RAM ...