lucidrains / DALLE2-pytorch

Implementation of DALL-E 2, OpenAI's updated text-to-image synthesis neural network, in Pytorch
MIT License
11.17k stars 1.09k forks source link

AssertionError: Torch not compiled with CUDA enabled #233

Open KathyGCY opened 2 years ago

KathyGCY commented 2 years ago

This is the code I'm running in jupyter notebook on a mac

import torch from dalle2_pytorch import DALLE2, DiffusionPriorNetwork, DiffusionPrior, Unet, Decoder, CLIP

clip = CLIP( dim_text = 512, dim_image = 512, dim_latent = 512, num_text_tokens = 49408, text_enc_depth = 6, text_seq_len = 256, text_heads = 8, visual_enc_depth = 6, visual_image_size = 256, visual_patch_size = 32, visual_heads = 8 ).cuda()

And this happened:

Screen Shot 2022-08-19 at 2 46 48 PM
antonioortegajr commented 2 years ago

Removing All the .cuda() from the code should get the code going and not trying to get GPU involved as that isn't supported on Mac.

Jorginthesage commented 1 year ago

Can confirm this works on Windows 10 and MacOS Catalina.