openai / DALL-E

PyTorch package for the discrete VAE used for DALL·E.
Other
10.77k stars 1.94k forks source link

Google collab? #5

Open shadowzoom opened 3 years ago

shadowzoom commented 3 years ago

Pls somebody make a google collab version

collinarnett commented 3 years ago

https://github.com/openai/DALL-E/blob/master/notebooks/usage.ipynb

laksh9950 commented 3 years ago

https://colab.research.google.com/drive/1VdirQQxZFPmpiktWYvZxS7lJJTHqJYdA?usp=sharing

NaxAlpha commented 3 years ago

https://colab.research.google.com/github/openai/DALL-E/blob/master/notebooks/usage.ipynb

tcgumus commented 3 years ago

https://colab.research.google.com/drive/1KA2w8bA9Q1HDiZf5Ow_VNOrTaWW4lXXG?usp=sharing

woctezuma commented 3 years ago

First, Open In Colab

Then, optionally, toggle ON the GPU support in the notebook settings, and edit two lines of code:

1) From:

# This can be changed to a GPU, e.g. 'cuda:0'.
dev = torch.device('cpu')

to:

dev = torch.device('cuda:0')

2) From:

z_logits = enc(x)

to:

z_logits = enc(x.cuda())

Finally, create a new cell and install DALL-E:

%pip install git+https://github.com/openai/DALL-E.git

Restart the runtime if needed, and you are set to play with the notebook now. Typically, <Ctrl+F9> to run everything.

ink1 commented 3 years ago

crucially dev = torch.device('cuda:0') is not enough for GPU support. z_logits = enc(x.cuda()) does the trick though.

airsplay commented 3 years ago

crucially dev = torch.device('cuda:0') is not enough for GPU support. z_logits = enc(x.cuda()) does the trick though.

Using x.to(dev) might be a more compatible way.

seocwen commented 3 years ago

Is there a sample for actually using text? It isn't obvious from the example how this is handled.

woctezuma commented 3 years ago

Is there a sample for actually using text? It isn't obvious from the example how this is handled.

https://github.com/openai/DALL-E/issues/13#issuecomment-792569253

kPatch commented 3 years ago

Lol I came from the "Papers with Code" website, thinking there would "code". @woctezuma Now I have to read the paper to see if it's not another OpenAI pump 🤡😭 https://github.com/openai/DALL-E/issues/13#issuecomment-792569253

digiguru commented 2 years ago

Check out this article - it has 3 very interesting implementations (the last one is DALL-E) that should show you how.

burhancabiroglu commented 2 years ago

how can we use this package "dall e" in colab to image generation by text sampling. is there code sample or tutorial ?

metaphorz commented 2 years ago

I think OpenAI is gradually rolling out access to Dalle version 2 via a waiting list

woctezuma commented 2 years ago

how can we use this package "dall e" in colab to image generation by text sampling. is there code sample or tutorial ?

I believe it is better to use other repositories though. For instance: https://github.com/Jack000/glid-3-xl