Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in RePaint implementation: p_sample input args and resample loop #319

Closed
AlejandroSantorum opened this issue May 22, 2024 · 1 comment · Fixed by #320
Closed

Bug in RePaint implementation: p_sample input args and resample loop #319

AlejandroSantorum opened this issue May 22, 2024 · 1 comment · Fixed by #320

Comments

@AlejandroSantorum
Copy link
Contributor

Dear @lucidrains,

Thank you for your outstanding work! I really appreciate all the effort put in this project.

I have been working with the inpaint.py implementation, which has been recently added to this repository, and I have found a couple of issues with the current implementation:

  1. When calling the method p_sample in the resample loop the input argument names are not used, and then the input parameters are incorrectly placed, causing the variable gt be fed into x_self_cond and mask into gt.
  2. When comparing the code of the method p_sample_loop with the algorithm 1 of the original paper (https://arxiv.org/pdf/2201.09865), it's clear than the resample loop should be inside the normal sampling loop and not after it at the same level.

I think @nilsleh has already realized some of these issues and he has kindly fixed some of them. I am creating a new PR to address some of the remaining imperfections.

Again, thank you for your work!

@lucidrains
Copy link
Owner

no problem! thank you for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants