yuanzhi-zhu/DiffPIR

A few questions

Closed this issue · 1 comments

Congrats on the fantastic work. I was looking into your code to understand it and had a few questions.

  1. In some of the steps I noticed that the data is divided by 2 and then 0.5 was added. What was the reason for that?
  2. I was wondering exactly in which step the data consistency is performed. Is it in the sr.data_solution function? Also how is it different than the model_fn function in utils_model?
  1. some modules in the code require the image to be in the range of [0,1], and the pre-trained diffusion models are trained with image data in the range of [-1,1]. These conversions are necessary for our code.
  2. the data subproblem is solved here
    x0_p = sr.data_solution(x0_p.float(), FB, FBC, F2B, FBFy, tau, sf)
    ; the model_fn function is a wrapper for the unconditional diffusion models and used to solve the prior subproblem (unconditional generation).

Please let me know if this answers your questions :]