AUTOMATIC1111 / stable-diffusion-webui

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

[Feature Request]: What if I modify the parameters in the configuration file so that the program can render images through the CPU? #15917

Open cyberxsboy opened 3 months ago

cyberxsboy commented 3 months ago

Is there an existing issue for this?

What would your feature do ?

I deployed Stable Diffusion on Windows 11. My graphics card has a small memory of 6GB, which makes it unable to render large images. I want it to use the CPU to render large images, but I don't remember how to modify the configuration parameters to let the CPU render images. Let the experts who know this method tell me.

Proposed workflow

  1. By modifying the configuration file, it can render images through the CPU.

Additional information

No response

thijsi123 commented 3 months ago

Running on CPU Running with only your CPU is possible, but not recommended. It is very slow and there is no fp16 implementation.

To run, you must have all these flags enabled: --use-cpu all --precision full --no-half --skip-torch-cuda-test

Though this is a questionable way to run webui, due to the very slow generation speeds; using the various AI upscalers and captioning tools may be useful to some people.

Source - https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings

w-e-w commented 3 months ago

My graphics card has a small memory of 6GB, which makes it unable to render large images

Generating large images on CPU takes ages to the point that it's impractical

3090 is at least 60 times faster then i7-13700k (sd1.5 512x512 DMP++ 2M)

try Tiled VAE, I recall it's able to drastically decrease the VRAM requirements https://github.com/pkuliyi2015/multidiffusion-upscaler-for-automatic1111 https://github.com/pkuliyi2015/multidiffusion-upscaler-for-automatic1111/wiki/Tiled-VAE