rinongal / textual_inversion

MIT License
2.87k stars 278 forks source link

Memory Error in Colab #127

Closed Bammargiela closed 1 year ago

Bammargiela commented 1 year ago

https://imgur.com/q7eTJE2

It says this when I hover over

OutOfMemoryError: CUDA out of memory. Tried to allocate 3.16 GiB (GPU 0; 14.76 GiB total capacity; 10.28 GiB already allocated; 287.75 MiB free; 13.21 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

I've tried doing less images, running with the default images, running with and without xformers. I even bought Colab Pro thinking that might be the issue. It seems to be working for plenty of people so I'm unsure why it would be different for me. I'm about a week into AI art and 2 days into SD with no coding knowledge so any help is greatly appreciated. Thanks

rinongal commented 1 year ago

Hey - whose Colab is this? Diffusers? We don't have an official Colab implementation.

Would need more details to help.

Bammargiela commented 1 year ago

Ah I understand. Yes it is the diffusers Colab.

Bammargiela commented 1 year ago

I am running it now and it seems to have made it pass the part where I was getting the error. Turns out I needed to change my GPU class to premium in Runtime > Change Runtime. That way I actually use the premium Colab I paid for lol.

rinongal commented 1 year ago

Great! I'm not entirely familiar with the diffusers code, but if you get stuck let me know and I'll try to have a look. If this is resolved, please close the issue.

Bammargiela commented 1 year ago

Appreciate that!