Closed iaa2005 closed 2 years ago
@iaa2005 Hi Ivanov! I've put in a fix in 0.0.55 (although you'd probably still want to use GPU most of the time)
Ok, it works. I changed cuda in your code to cpu. And I have one question: how to convert images(type: tensor) to png image and save it in the directory?:
dalle2 = DALLE2(
prior = diffusion_prior,
decoder = decoder
)
images = dalle2(
['cute puppy chasing after a squirrel'],
cond_scale = 2. # classifier free guidance strength (> 1 would strengthen the condition)
)
# save your image (in this example, of size 256x256)
And what about "# do above for many steps"? What should I do in my code for many steps? Which parts I need to repeat several times in code after "Let's see the whole script below ..( this code)" in README?
?
Hey @iaa2005 , what are you trying to build?
This repo currently contains only the model code. You will need to write a training loop, get a dataset and use a high end GPU for training for a few days to get results.
There is no pretrained model to use yet.
You may be interested by #23 and #27
Ok, it works. I changed cuda in your code to cpu. And I have one question: how to convert images(type: tensor) to png image and save it in the directory?:
dalle2 = DALLE2( prior = diffusion_prior, decoder = decoder ) images = dalle2( ['cute puppy chasing after a squirrel'], cond_scale = 2. # classifier free guidance strength (> 1 would strengthen the condition) ) # save your image (in this example, of size 256x256)
i've addressed this in the latest version, you'll simply have to do dalle([<prompt>], return_pil_images = True)
to get it back as pillow images, which you can then just do a .save('/path/to/<prompt>.png')
AssertionError: Torch not compiled with CUDA enabled
---> 94 images = dalle2( 95 ['cute puppy chasing after a squirrel'], 96 cond_scale = 2. # classifier free guidance strength (> 1 would strengthen the condition) 97 ) 99 images