Code Monkey home page Code Monkey logo

Comments (11)

litevxx avatar litevxx commented on July 18, 2024

Having the same problem
RuntimeError: CUDA out of memory. Tried to allocate 114.00 MiB (GPU 0; 8.00 GiB total capacity; 7.14 GiB already allocated; 0 bytes free; 7.24 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

from stable-diffusion.

litevxx avatar litevxx commented on July 18, 2024

The same model (latent diffusion 1.6B) does run on 8 GB when using Jack000/glid-3-xl, so it is supposed to work.

from stable-diffusion.

num421337 avatar num421337 commented on July 18, 2024

I'm having the same problem it allocates tons of memory and then fails

from stable-diffusion.

litevxx avatar litevxx commented on July 18, 2024

Also runs out of VRAM on a 16 GB P100, so something is definitely wrong. This did not happen with the same model on the latent-diffusion repo
RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 15.90 GiB total capacity; 15.07 GiB already allocated; 21.75 MiB free; 15.25 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

from stable-diffusion.

litevxx avatar litevxx commented on July 18, 2024

It appears I did have the problem on the latent-diffusion repo as well, but I fixed my problem on both by adding os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "max_split_size_mb:4096" near the start of text2img.py

from stable-diffusion.

num421337 avatar num421337 commented on July 18, 2024

It appears I did have the problem on the latent-diffusion repo as well, but I fixed my problem on both by adding os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "max_split_size_mb:4096" near the start of text2img.py

where exactly should I put it? I tried pasting it in and still got the error granted I have less gpu memory

from stable-diffusion.

litevxx avatar litevxx commented on July 18, 2024

It appears I did have the problem on the latent-diffusion repo as well, but I fixed my problem on both by adding os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "max_split_size_mb:4096" near the start of text2img.py

where exactly should I put it? I tried pasting it in and still got the error granted I have less gpu memory

What GPU are you using? Maybe it doesn't have enough VRAM

from stable-diffusion.

num421337 avatar num421337 commented on July 18, 2024

entirely possible it's a 6gb GTX 1060. not horrible but not new or anything

from stable-diffusion.

litevxx avatar litevxx commented on July 18, 2024

entirely possible it's a 6gb GTX 1060. not horrible but not new or anything

6 GB isn't enough for the large latent diffusion model (which isn't the actual stable diffusion model) . It might be enough for the stable diffusion model once it releases which is half the size.

from stable-diffusion.

Bleyddyn avatar Bleyddyn commented on July 18, 2024

I'm still getting the error, even with PYTORCH_CUDA_ALLOC_CONF set.

RuntimeError: CUDA out of memory. Tried to allocate 1.50 GiB (GPU 0; 11.77 GiB total capacity; 8.62 GiB already allocated; 678.19 MiB free; 8.74 GiB reserved in total by PyTorch)

GeForce RTX 3060, 12GB of VRAM

from stable-diffusion.

Bleyddyn avatar Bleyddyn commented on July 18, 2024

I solved this by setting --n_samples to 1 and using --n_iter if I wanted more than one output.
Found at: https://www.assemblyai.com/blog/how-to-run-stable-diffusion-locally-to-generate-images/

from stable-diffusion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.