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

Super-resolution conditional training #29

Open
CallShaul opened this issue May 8, 2023 · 3 comments
Open

Super-resolution conditional training #29

CallShaul opened this issue May 8, 2023 · 3 comments

Comments

@CallShaul
Copy link

Hi,

How can I use the provided repository for image-conditional training and evaluation (super-resolution)?
And which approach is recommended for such a task? consistency-distillation? or consistency-training?

(Assuming the base model for the consistency-distillation originates from: "Image Super-Resolution via Iterative Refinement" )

Thanks!

@nekoshadow1
Copy link

Hi Shaul,

You can use consistency-distillation if you have a well-trained teacher model. However, keep in mind that the performance of consistency distillation depends on the performance of your teacher model. On the other hand, you can go ahead with consistency training. However, consistency training converges slower than consistency distillation.

Notice that your choice of teacher model is super resolution, a non-DDM model. However, in this repo, the author uses a DDM as the default teacher model in consistency distillation. And it is class-conditional, not image-conditional. Therefore, to make it work in your case, you need to modify the inputs of the consistency training and/or consistency distillation to accept image as condition instead of class. Then replace the DDM teacher with your choice of teacher model, it should work. It took me a while to make it work in my image-to-image task, but it's feasible. Hope this helps!

@aarontan-git
Copy link

@nekoshadow1 could you share your image-to-image code?

@CallShaul
Copy link
Author

Hi @nekoshadow1
I have adjusted K-diffusion to support img2img ()
So now I want to move on to distill this img2img model to fit fast inference using this Consistency model repo.

Note that img2img / super-resolution is practically the same img2img architecture, only trained differently,
so why you've said that it is "non-DDM model" ?

Any tips for that next stage, or even sharing your code would be highly appreciated. Thanks !

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

3 participants