GithubHelp home page GithubHelp logo

Out of memory error about shap-e HOT 6 OPEN

openai avatar openai commented on September 25, 2024
Out of memory error

from shap-e.

Comments (6)

MethodJiao avatar MethodJiao commented on September 25, 2024 4

Annotate or delete this code:
render_mode = 'nerf' # you can change this to 'stf'
size = 64 # this is the size of the renders; higher values take longer to render.
cameras = create_pan_cameras(size, device)
for i, latent in enumerate(latents):
images = decode_latent_images(xm, latent, cameras, rendering_mode=render_mode)
display(gif_widget(images))

from shap-e.

Kabanosk avatar Kabanosk commented on September 25, 2024 2

I ran the model on google colab, and the memory needed to run it was around 7.6GB. I don't think there is an option now to reduce it to 4GB. If you want to try this model, this is link to my Google colab where I tested it

from shap-e.

Kabanosk avatar Kabanosk commented on September 25, 2024

You can try lowering the batch_size parameter, eg.

batch_size = 1

from shap-e.

Kirillspec avatar Kirillspec commented on September 25, 2024

unfortunately it doesnt helps:
OutOfMemoryError: CUDA out of memory. Tried to allocate 768.00 MiB (GPU 0; 8.00 GiB total capacity; 6.14 GiB already allocated; 0 bytes free; 6.91 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 shap-e.

Kirillspec avatar Kirillspec commented on September 25, 2024

Annotate or delete this code: render_mode = 'nerf' # you can change this to 'stf' size = 64 # this is the size of the renders; higher values take longer to render. cameras = create_pan_cameras(size, device) for i, latent in enumerate(latents): images = decode_latent_images(xm, latent, cameras, rendering_mode=render_mode) display(gif_widget(images))

Thank you very much, it works!

from shap-e.

DenisIsDenis avatar DenisIsDenis commented on September 25, 2024

Hello! I have NVIDIA GeForce GTX 1650 with 4 GB of video memory.

I have this error:

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 4.00 GiB total capacity; 3.47 GiB already allocated; 0 bytes free; 3.47 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 have tried this:

  1. decrease the value of max_split_size_mb;
  2. reduce the value of batch_size to one`;
  3. remove the code proposed by MethodJiao;

But none of the above helped solve the problem.

Just in case:

  • Processor: HexaCore AMD Ryzen 5 3600, 3600 MHz (36 x 100)
  • RAM: 32 GB
  • OS: Windows 10

from shap-e.

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.