ermongroup / SDEdit

PyTorch implementation for SDEdit: Image Synthesis and Editing with Stochastic Differential Equations
https://sde-image-editing.github.io/
MIT License
985 stars 91 forks source link

Input image&mask shape and dtype. #24

Open dt990pro opened 1 year ago

dt990pro commented 1 year ago

Thanks for sharing the implementtion.

Just want to ask how do you prepare the input images?

[mask, img] = torch.load("colab_demo/{}.pth".format(name))

Since "colab_demo" url is out of date, I prepare a single image and draw a mask, and read by PIL.Image. However, it has err when run into this line: tvu.save_image(x0, os.path.join(self.args.image_folder, f'original_input.png'))

I am wondering what is correct shape of x0? Or how do you prepare these .pth files? torch.hub.download_url_to_file('https://image-editing-test-12345.s3-us-west-2.amazonaws.com/colab_examples/lsun_church.pth', os.path.join(path, 'lsun_church.pth'))

It should be very easy to prepare them, I guess.