This commit is contained in:
Phil Wang
2022-04-13 18:23:24 -07:00
parent 0692f1699f
commit 14ddbc159c
3 changed files with 2 additions and 3 deletions

View File

@@ -199,7 +199,7 @@ dalle2 = DALLE2(
decoder = decoder decoder = decoder
) )
# send the text as a string if you want to use the simple tokenizer from DALL-E1 # send the text as a string if you want to use the simple tokenizer from DALLE v1
# or you can do it as token ids, if you have your own tokenizer # or you can do it as token ids, if you have your own tokenizer
texts = ['glistening morning dew on a flower petal'] texts = ['glistening morning dew on a flower petal']

View File

@@ -877,7 +877,6 @@ class DALLE2(nn.Module):
text = [text] if not isinstance(text, (list, tuple)) else text text = [text] if not isinstance(text, (list, tuple)) else text
text = tokenizer.tokenize(text).to(device) text = tokenizer.tokenize(text).to(device)
print(text.shape, type(text))
image_embed = self.prior.sample(text, num_samples_per_batch = self.prior_num_samples) image_embed = self.prior.sample(text, num_samples_per_batch = self.prior_num_samples)
images = self.decoder.sample(image_embed) images = self.decoder.sample(image_embed)
return images return images

View File

@@ -10,7 +10,7 @@ setup(
'dream = dalle2_pytorch.cli:dream' 'dream = dalle2_pytorch.cli:dream'
], ],
}, },
version = '0.0.5', version = '0.0.6',
license='MIT', license='MIT',
description = 'DALL-E 2', description = 'DALL-E 2',
author = 'Phil Wang', author = 'Phil Wang',