openai / CLIP

CLIP (Contrastive Language-Image Pretraining), Predict the most relevant text snippet given an image
MIT License
24.55k stars 3.2k forks source link

Jupyter Keeps crashing when trying to initialize CLIP #448

Open SSdevelop opened 3 months ago

SSdevelop commented 3 months ago

I have the following code in a jupyter cell:

device = "cuda" if torch.cuda.is_available() else "cpu"
model, preprocess = clip.load("ViT-L/14", device=device)

My kernel keeps crashing. I have tried to run the same cell on Google Colab as well (Using T4 GPU with high RAM). Has anyone faced the same issue? Message from local Jupyter Lab: Screenshot 2024-06-02 233022 Message from Google Colab: Screenshot 2024-06-02 233055 App Logs from Google Colab: Screenshot 2024-06-02 233123

SSdevelop commented 3 months ago

Turns out if I remove decord, it works perfectly fine. Anyone knows why?

rakhon9 commented 2 months ago

Not really a solution, but I have come accross this issue before. My kernel kept dying. It turned out it was because of conda environment. I accidentally installed some library versions that crash with each other. I have solved the problem by creating a brand new conda environment and only installing required libraries for CLIP running. I hope it helps.