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

Question about the second stage #23

Open
NwTbbetter opened this issue Mar 13, 2024 · 1 comment
Open

Question about the second stage #23

NwTbbetter opened this issue Mar 13, 2024 · 1 comment

Comments

@NwTbbetter
Copy link

Hi, thank you for your contribution and sharing.
I would like to ask, why does sqrt_alphas_cumprod_prev need append 1? And how should we solve the problem when the time step matched in the second stage is 0?

@NwTbbetter NwTbbetter changed the title Question about the second state Question about the second stage Mar 14, 2024
@tiangexiang
Copy link
Collaborator

Thanks for your interests in our work!

  1. During training, at time stamp t, noise are uniformly sampled based on the interval sqrt_alphas_cumprod_prev[t] and sqrt_alphas_cumprod_prev[t-1] (see https://github.com/StanfordMIMI/DDM2/blob/main/model/mri_modules/diffusion.py#L358). For a total number of N time stamps, we need N+1 sqrt_alphas_cumprod_prev values to define N intervals to sample from. Based on the cumprod nature of the variable, the last value to be appended must be 1.
  2. Normally speaking, it is very unlikely the matched state is 0 (this indicates a noise model with very small variance). This can only be possible if Stage1 failed or input MRI volumes are noiseless already. However, if you still want to run Phase3 even if the matched step is 0, you can manually clip the value to be higher. In this case, the Stage3 model will begin to hallucinate unreal information to the data, rather than 'denoise' the data.

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

No branches or pull requests

2 participants