hkproj / pytorch-stable-diffusion

Stable Diffusion implemented from scratch in PyTorch
https://www.youtube.com/watch?v=ZBKpAp_6TGI
MIT License
608 stars 138 forks source link

Update pipeline.py #9

Closed nick8592 closed 9 months ago

nick8592 commented 9 months ago

Specify the device for the input_image_tensor to avoid encountering the following error code when employing GPU for image-to-image operations.

RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor