haofanwang/Lora-for-Diffusers

TypeError: to() received an invalid combination of arguments - got (torch.dtype, NoneType), but expected one of:

nwangfw opened this issue · 1 comments

Hi there,

I got the following error when I tried to use the script provided.

TypeError: to() received an invalid combination of arguments - got (torch.dtype,
NoneType), but expected one of:

  • (torch.device device, torch.dtype dtype, bool non_blocking, bool copy, *,
    torch.memory_format memory_format)
  • (torch.dtype dtype, bool non_blocking, bool copy, *, torch.memory_format
    memory_format)
  • (Tensor tensor, bool non_blocking, bool copy, *, torch.memory_format
    memory_format)

You can reproduce it with the following Colab link,
https://colab.research.google.com/drive/1BXOY6kjhU4qeRDfAM70GMDaqidqs-Jrg?usp=sharing

Any suggestions will be appreciated!

Hi @nwangfw

There is a typo in the code. I have fixed it. Thanks for pointing out!