carson-katri / dream-textures

Stable Diffusion built-in to Blender
GNU General Public License v3.0
7.83k stars 427 forks source link

How to use on Nvidia GPU with 2GB VRAM? #629

Closed Mohammad9760 closed 1 year ago

Mohammad9760 commented 1 year ago

Description

I installed the latest version of the addon yesterday and I downloaded the stable-diffusion-2-1-base and when I press the Generate button in the addons menu in the Image Editor it freezes for a while then says out of CUDA memory. here's the error: `An error occurred while generating. Check the issues tab on GitHub to see if this has been reported before:

RuntimeError("OutOfMemoryError('CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 2.00 GiB total capacity; 1.70 GiB already allocated; 0 bytes free; 1.75 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF')") `

so can I or can I not use this with only 2GB of VRAM?

Steps to Reproduce

  1. install the addon
  2. press the generate button

Expected Behavior

generate an image

Addon Version

Windows (CUDA)

GPU

NVIDIA

Mohammad9760 commented 1 year ago

also where does the downloaded stable diffusion models go? I tried disabling then enabling the addon and the models are gone and it tells me to 'download' again :(

carson-katri commented 1 year ago

You probably won’t be able to use it on 2GB.

models are at \Users\youruser\.cache\huggingface

Mohammad9760 commented 1 year ago

okay thanks for answering :(