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

TypeError: __init__() got an unexpected keyword argument 'sample_timesteps' #224

Closed SMFLZeng closed 2 years ago

SMFLZeng commented 2 years ago

Testing the pretrained DEMO on README, got the issue in Decoder init function.

decoder = Decoder(
    unet = (unet1, unet2),
    image_sizes = (128, 256),
    clip = clip,
    timesteps = 1000,
    sample_timesteps = (250, 27),
    image_cond_drop_prob = 0.1,
    text_cond_drop_prob = 0.5
).cuda()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-16-fd223da17879> in <module>
     24     sample_timesteps = (250, 27),
     25     image_cond_drop_prob = 0.1,
---> 26     text_cond_drop_prob = 0.5
     27 ).cuda()
     28 

TypeError: __init__() got an unexpected keyword argument 'sample_timesteps'
lucidrains commented 2 years ago

@SMFLZeng the pretrained demo was done on an older version of DALLE2-pytorch that does not have the DDIM feature (it should have printed a warning to let you know which version)