NVlabs / ODISE

Official PyTorch implementation of ODISE: Open-Vocabulary Panoptic Segmentation with Text-to-Image Diffusion Models [CVPR 2023 Highlight]
https://arxiv.org/abs/2303.04803
Other
845 stars 45 forks source link

System RAM crashes while loading model in Google Colab #9

Closed kaz12tech closed 1 year ago

kaz12tech commented 1 year ago

Thanks for the great Colab

I have a problems.

  1. System RAM out of memory When executing the code below, it overflows the system RAM and crashes. I installed xformers, but I couldn't avoid it. Is there any solution?

    model = instantiate_odise(cfg.model)

shalinidemello commented 1 year ago

Are you running inference or training?

How much GPU memory do you have available on your system?

kaz12tech commented 1 year ago

I'm running demo.ipynb. image

GPU is T4

kaz12tech commented 1 year ago

I was able to get around this by placing and garbage collecting the backbone immediately after instantiating it on the GPU and then instantiating the model.

tejassp2002 commented 1 year ago

Hi @kaz12tech, I am facing the same issue. Can you please send the code of garbage collecting you used.

@shalinidemello, any help on this would be appreciated. I am using default version of Colab, which has 12.7 GB of system RAM and T4 GPU. The session gets killed every time I try instantiating the model. One more thing, as a first step, I am only interested in semantic segmentation. So, any lead on that would also be helpful.

I am trying to do inference. Thanks.