fc4-pytorch icon indicating copy to clipboard operation
fc4-pytorch copied to clipboard

[img2npy.py] Expected all tensors to be on the same device, but found at least two devices.

Open Hurricane-k opened this issue 5 months ago • 2 comments

Hello thank you for ur support of reproducing FC4 on pytorch.

there is some errors I encountered when running img2npy.py in VSCode

My PC configuration includes CPU and GPU. I used torch==2.4.1 supporting GPU

in utils.py line 52 correction = illuminant.unsqueeze(2).unsqueeze(3) * torch.sqrt(Tensor([3])).to(DEVICE) showing the error in the title.

I changed this line to correction = illuminant.unsqueeze(2).unsqueeze(3).to(DEVICE) * torch.sqrt(Tensor([3])).to(DEVICE)

no idea if you upload the version with only cpu.

Best Regards, Carry

Hurricane-k avatar Sep 07 '24 06:09 Hurricane-k