Stability-AI / stablediffusion

High-Resolution Image Synthesis with Latent Diffusion Models
MIT License
38.83k stars 5.01k forks source link

Update depth2img.py #300

Open mzamini92 opened 1 year ago

mzamini92 commented 1 year ago

In the paint() function, you are using the torch.autocast() function to cast the batch tensor to the cuda device. However, the batch tensor is already on the cuda device, so there is no need to cast it again. This can be fixed by removing the torch.autocast() call from the paint() function. Am I right?