-
Notifications
You must be signed in to change notification settings - Fork 6.5k
DDPM changes to support v diffusion #1121
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
DDPM changes to support v diffusion #1121
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
| generator: Optional[torch.Generator] = None, | ||
| output_type: Optional[str] = "pil", | ||
| return_dict: bool = True, | ||
| prediction_type: Literal["epsilon", "sample", "v"] = "epsilon", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be retrieved from the config of the scheduler / model IMO - I don't think this is something that the user would ever change during runtime.
| model_output: torch.FloatTensor, | ||
| timestep: int, | ||
| sample: torch.FloatTensor, | ||
| prediction_type: str = "epsilon", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think we should deprecate this argument and just have it in the config instead - I don't it's something that differs for every scheduler call. @anton-l what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense! That means the pipeline doesn’t have to change at all either
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, the prediction type doesn't need to change during sampling

Trying to keep this a small PR that just adds necessary changes in DDPM scheduler to support v diffusion. I have a supporting example script using the butterflies dataset I can add either here or as a separate PR