-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Training to predict x0 in training example #1031
Conversation
…0 (instead of eps), changed DDPM pipeline accordingly
…edicts x0 (instead of eps), changed DDPM pipeline accordingly" This reverts commit c5efb52.
…0 (instead of eps), changed DDPM pipeline accordingly
The documentation is not available anymore as the PR was closed or merged. |
@patil-suraj @anton-l could you take a look here? :-) |
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.
Thanks a lot @lukovnikov ! The PR looks good. Out of curiosity, what does SNR weighting do ? And is it only used when predicting x0 ?
@patil-suraj I'm not sure it's the best name for it, but it's the weighting that is equivalent to having equal weights for all time steps in eps-prediction mode, after you transform the equations to x0-prediction mode. I followed https://arxiv.org/pdf/2202.00512v2.pdf but maybe it's older. |
Btw, do you have any FID numbers to check how good the model gets? I ran a quick training in x0-prediction mode and generated 8k images, and against the 8k original images (after cropping), it gives me a FID of around 50. The images look ok but could be much better. I haven't had time to generate for the eps-prediction model yet so wanted to ask. |
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.
Nice addition @lukovnikov, thank you!
Before merging, the PR needs to pass the codestyle checks: just run pip install diffusers[quality]
and make style
from the repository root to reformat everything :)
Regarding FID: we don't have the numbers yet, and the metric PR in our evaluate
library is still pending: huggingface/evaluate#276 If you want to implement it, that would be awesome!
@anton-l |
@lukovnikov yes, saving the eval predictions at the end of training a good option too! Let's do it in a follow-up PR 🚀 The style checks pass now, merging 🤗 |
Huh, i was looking but some pytorch checks were failing although it looked like it was something about stable diffusion. |
I currently have a small script to save the flowers dataset in the form it's being trained with in a folder, and I'm writing a separate script to sample from a model (DDPM works but I'm still working on DDIM sampling). |
Yeah, those failing tests were the Apple M1 issues in our testing setup, all good now :) |
* changed training example to add option to train model that predicts x0 (instead of eps), changed DDPM pipeline accordingly * Revert "changed training example to add option to train model that predicts x0 (instead of eps), changed DDPM pipeline accordingly" This reverts commit c5efb52. * changed training example to add option to train model that predicts x0 (instead of eps), changed DDPM pipeline accordingly * fixed code style Co-authored-by: lukovnikov <lukovnikov@users.noreply.github.com>
changed training example to add option to train model that predicts x0 (instead of eps), changed DDPM pipeline accordingly