danielroich / PTI

Official Implementation for "Pivotal Tuning for Latent-based editing of Real Images" (ACM TOG 2022) https://arxiv.org/abs/2106.05744
MIT License
897 stars 112 forks source link

Is noise optimized in the first step? #34

Open caopulan opened 2 years ago

caopulan commented 2 years ago

https://github.com/danielroich/PTI/blob/fb1c4856270f8a421d5e9af32a00fdaa3e8ddd06/training/projectors/w_projector.py#L47 Although 'noise constant' is updated at the end of optizimation, G is a deepcopy version and deleted. So does optimized noise work in inference?

rardz commented 2 years ago

From the code, it seems the optimized 'noise constant' in the first step will be abandoned, and in the next pti step, the model just use another irrelevant constant noise. However it was a little strange why the authors choose to keep the pti step noise constant. Especially in the multi image pti case, how will different images should share a same set of constant noise? I also think there must be something wrong here.