DALL-E icon indicating copy to clipboard operation
DALL-E copied to clipboard

Google collab?

Open shadowzoom opened this issue 3 years ago • 14 comments

Pls somebody make a google collab version

shadowzoom avatar Feb 25 '21 03:02 shadowzoom

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

collinarnett avatar Feb 25 '21 03:02 collinarnett

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

laksh9950 avatar Feb 25 '21 03:02 laksh9950

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

NaxAlpha avatar Feb 25 '21 04:02 NaxAlpha

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

tcgumus avatar Feb 25 '21 08:02 tcgumus

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')
  1. 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.

woctezuma avatar Feb 25 '21 09:02 woctezuma

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

ink1 avatar Feb 25 '21 20:02 ink1

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.

airsplay avatar Feb 25 '21 20:02 airsplay

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

seocwen avatar Apr 09 '21 05:04 seocwen

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

woctezuma avatar Apr 09 '21 05:04 woctezuma

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

kPatch avatar May 22 '21 05:05 kPatch

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

digiguru avatar Mar 11 '22 17:03 digiguru

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

burhancabiroglu avatar May 02 '22 23:05 burhancabiroglu

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

metaphorz avatar May 03 '22 00:05 metaphorz

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

  • https://github.com/openai/DALL-E/issues/17

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

woctezuma avatar May 03 '22 06:05 woctezuma