ファンサイトに戻る

PROMPT GUIDE

How to Run Stable Diffusion on a Computer with Little VRAM (Settings to Lighten It)

Stable Diffusion uses a lot of the graphics card's memory (VRAM). On a computer with little VRAM, it may not run, may be slow, or may show an error partway through. This guide lines up what to try when VRAM is short, in order of how much each helps. How to fix an error once it appears is covered in a separate guide.

Last updated: approx. 2 min read

The short answer

When VRAM is short, the most effective step is to make the image at a small size and enlarge it afterward. Next, set the number of images made at once (batch size) to 1, choose a lighter model family, and use memory-saving startup settings. How much VRAM you need changes with the model and settings, so when it is not possible, you can use a browser-based service.

What goes wrong when VRAM is low?

One of three things happens: you cannot make images, it stops with an error, or it becomes extremely slow.

VRAM is the dedicated memory the graphics card uses while it makes an image. The larger the image size and the larger the model, the more it needs. When it runs short, it stops with an error, or it spills over into the computer's ordinary memory and becomes extremely slow. The amount needed changes a lot with the type of model (SD1.5 models are relatively light, while SDXL and larger models tend to be heavy), the image size and the extensions you use. Check the actual numbers in the guide for the tool you use.

What is the most effective way to save VRAM?

Making the image at a small size and enlarging it afterward is the most effective.

MeasureEffectCaution
Make it at a small size and enlarge it afterwardLargeThe enlarging method (Hires.fix, an upscaler) also uses VRAM
Set the batch size to 1LargeFewer images are made at once (make up for it with the batch count)
Choose a lighter model familyLargeThe tendency and strengths of the pictures change
Use a model in a lightened formatMediumAccuracy may drop a little. Check that it is supported
Use memory-saving startup settingsMediumGeneration may become slower
Process the VAE in tilesMediumThe setting name differs by tool. Seams may appear
Close other appsSmallBrowsers and video apps use VRAM too
Example of a startup setting (startup argument for AUTOMATIC1111-style tools): --medvram
Example of a startup setting (when you want to save even more; it gets slower): --lowvram

Rinka's tips

  • The names of startup arguments change between versions and tools. Many tools such as Forge and ComfyUI manage memory automatically, so first run them as they are
  • First try a size of around 512 to 768, and raise it little by little once it runs

Illustration usage rules

How do you make it small and enlarge it?

Decide the composition at a small size, and enlarge only the pictures you like with high-resolution finishing.

Steps for finishing while saving VRAM

  1. Set the batch size to 1 and make a few pictures at a small size (for example, around 512 by 768 for vertical)
  2. Fix the seed of a picture with a good composition
  3. With the same settings, enlarge it little by little with Hires.fix or an upscaler
  4. If VRAM runs short during enlarging, lower the scale or use the setting that processes in tiles
  5. Lighten it at the end and save it

For the settings for finishing a small picture with high-resolution enlargement, see Hires.fix Settings (Upscale Ratio, Denoising Strength, Upscaler) →

For a list of recommended sizes that fit the model you use, see SDXL Resolutions (Recommended Sizes) and How to Pick a Ratio →

For tips on enlarging images with AI, see How to Upscale Images with AI (Enlarging Anime Art Cleanly) →

What if it still does not run? (Common failures and fixes)

If it does not run even after lightening the settings, change the model family or consider a browser-based service.

Common failureCauseFix
It starts but stops while generatingVRAM is short because of the size, batch or extensionsLower the size, set the batch to 1, and turn off extensions you are not using
It runs but is extremely slowVRAM overflowed and ordinary memory is being usedLower the size. Use the saving settings only when needed
Only large pictures failVRAM is short during the enlarging processLower the enlarging scale, or use tile processing
SDXL models do not runThe model is too largeUse a model of a lighter family, or look for a lightened format

For how to fix it when a memory shortage error appears, see How to Fix CUDA Out of Memory (When Image Generation Runs Out of Memory) →

For how to choose a model (family and size), see How to Choose a Stable Diffusion Model (Checkpoint) →

FAQ

Frequently Asked Questions

How much VRAM do I need to run it?

It changes a lot with the model and settings, so I cannot give a fixed number. SD1.5 models are relatively light and SDXL models tend to be heavy. Check the system requirements in the guide for the tool you use.

What is the difference between --medvram and --lowvram?

Both are startup settings that save memory. --lowvram saves even more but makes generation slower. Names and effects change between tools and versions, so check the explanation for the tool you use.

Will adding more computer memory solve it?

No. What runs short in image generation is the graphics card's VRAM. The computer's ordinary memory is a different thing.

Is there another way when my specs are not enough?

With a browser-based service, you can make images regardless of your own computer's performance. Pricing and conditions differ by service, so check the official guide.

RINKA WORLD

Play in Rinka World

MORE

You may also like