-
Notifications
You must be signed in to change notification settings - Fork 6k
[WIP] Add UFOGen Pipeline and Scheduler #6133
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
base: main
Are you sure you want to change the base?
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
The original UFOGen paper doesn't explicitly give an algorithm for multistep sampling (and there is no official implementation currently available AFAIK); the current multistep sampling implementation is my current best guess at what the right algorithm should be. Right now, for sampling steps which are not the final sampling step, we get the For the final sampling step, or for one-step sampling, we simply return the |
…ameterization than DDPM.
…mmy expected sums/means).
…cheduler (using a dummy expected slice).
Since UFOGen models typically use the same architecture and initial weights as a pretrained diffusion model (and in particular Stable Diffusion v1.5, see sections 4.2 and 5.1 of the paper), I think it probably makes sense to not have a separate (I have preliminarily added a test in |
Assuming the multistep sampling strategy described in #6133 (comment) is correct, the at the next scheduled timestep diffusers/src/diffusers/schedulers/scheduling_lcm.py Lines 554 to 558 in 1d686ba
So it could be the case that a separate
diffusers/src/diffusers/schedulers/scheduling_lcm.py Lines 548 to 549 in 1d686ba
whereas UFOGen models do not need to be parameterized in this way (and so
|
@dg845 is this ready for a review? |
Yes (although as far as I know there is no official implementation to compare the PR to, and I'm not sure if there are any publicly available UFOGen checkpoints to use with |
I have one question. Do you have any plans for UFOGen training code yet? |
Hi @importnumpy, @patil-suraj and I are working on a UFOGen training script, but it is not ready yet. |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
Should we maybe instead add this pipeline to the community folder |
Sounds good to me. I think the main blocker for the PR is that AFAIK there are no strong UFOGen checkpoints to test the pipeline and scheduler with. |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
I don’t think this is stale. |
@dg845 |
Hi @yiyixuxu, sorry for the late reply. I am not actively working on this but I think it makes sense to keep this PR around in case an open source UFOGen code repository/checkpoint comes out. In that case, we could test this PR against the reference code/checkpoint with |
Hi @dg845, Would you please share the link to the open-source UFOGen repository for further testing? |
Hi @weleen, to the best of my knowledge there are no (official or unofficial) open source UFOGen implementations currently available. |
@dg845 Thanks! |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
What does this PR do?
This PR adds a pipeline and scheduler for the UFOGen model. The UFOGen model is based on the denoising diffusion GAN (DDGAN) model with modifications to enable one-step sampling.
The GAN discriminator used for adversarial training of a UFOGen model is not included in this PR.
Partially addresses #5905. See also #5979.
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@patrickvonplaten
@patil-suraj
@JunbongJang