ermongroup / SDEdit

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

fix some minor bugs with the masks #10

Open lmxyy opened 2 years ago

lmxyy commented 2 years ago

Just change

x = x0 * a[i].sqrt() + e * (1.0 - a[i]).sqrt()

to

if i > 0:
    x = x0 * a[i - 1].sqrt() + e * (1.0 - a[i - 1]).sqrt()
else:
    x = x0

Otherwise, the generated images have some small dots.