nerdyrodent/CLIP-Guided-Diffusion

Data conversion error on Apple silicon (e.g. M1, M2)

metaphorz opened this issue · 0 comments

I get the following error in Katherine Crowson's code and in running your code as specified in the README.
I started with the following after editing device = "mps" (rather than cuda).

% python generate_diffuse.py -p "A painting of an apple"
Device: mps
Size: 256
Setting up [LPIPS] perceptual loss: trunk [vgg], v[0.1], spatial [off]

....and then later down at the end......

TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.

Do you know of a solution? Note that gaussian_diffusion.py and resample.py contain 'float64' but when trying and editing KC's original notebook, this change to float32 did not solve the data type problem.