latent-diffusion icon indicating copy to clipboard operation
latent-diffusion copied to clipboard

[Help] Question about reverse sampling back to noisy latent map

Open Karbo123 opened this issue 3 years ago • 1 comments

Thanks for this great work! I believe performing denoising in the latent space would definitely be of great help to reconstruct high-quality image. And I'm recently interested in reversing the sampling procedure, so as to obtain some noisy latent map from the given clear image instead. But however, I encountered some problems when trying to modify the codes to perform reverse sampling.

Following the idea from here, I thought that reverse sampling is to simply invert the two params t and index from the p_sample_plms() function. image But I found that this was not the case.

Beyond these two params t and index, is there anything else I should modify as well? I can post my codes here if you need. Could you give any suggestions on this? Thanks you very much!!

Karbo123 avatar Apr 28 '22 10:04 Karbo123

Hi @Karbo123 ! I'm also trying to implement the inversion (but on DDIM) and am also a bit confused about the indexing. Did you manage to find a simple workaround ?

andreabosisio avatar Jan 30 '25 17:01 andreabosisio