lucidrains / DALLE2-pytorch

Implementation of DALL-E 2, OpenAI's updated text-to-image synthesis neural network, in Pytorch
MIT License
11.03k stars 1.07k forks source link

ema errors in the latest version #161

Closed 1073521013 closed 2 years ago

1073521013 commented 2 years ago

There seems to be a problem with the recently updated code about EMA with RuntimeError: Subtraction, the - operator, with two bool tensors is not supported. Use the ^ or logical_xor() operator instead in the line below

for current_buffer, ma_buffer in zip(list(current_model.buffers()), list(ma_model.buffers())):
            difference = ma_buffer - current_buffer
            difference.mul_(1.0 - current_decay)
            ma_buffer.sub_(difference)
lucidrains commented 2 years ago

@1073521013 do you know which buffer of which module it is hitting that result in that error? the diffusion prior and the unets should not contain any buffers with boolean tensors

lucidrains commented 2 years ago

@1073521013 ohh this was my fault, should be fixed in 0.11.4! https://github.com/lucidrains/DALLE2-pytorch/commit/c8422ffd5db5a32a4f26e81f392898526696943f

1073521013 commented 2 years ago

@1073521013 ohh this was my fault, should be fixed in 0.11.4! c8422ff

Thank you very much for your work!