diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

[Feature] Add Langevin Dynamics Sampler

Open natolambert opened this issue 3 years ago • 5 comments

The score-based generative models sometimes us a Langevin Dynamics step to de-noise samples; see NCSN. In the diffusion model for generating molecule conformations, GeoDiff, this step function had the best results (even though it is simpler than the score-based schedulers currently in the repo).

It could be worth adding to the repo, likely after the branch #54 is added.

cc @MinkaiXu

natolambert avatar Jul 12 '22 21:07 natolambert

@natolambert would you like to implement it, if still relevant to GeoDiff?

anton-l avatar Oct 27 '22 11:10 anton-l

@anton-l I got GeoDiff working without it (good enough results for colab). Let me see if this is easy to implement now that I know more.

natolambert avatar Oct 27 '22 17:10 natolambert

Okay, found some pointers. This seems like it would be one of the simplest Schedulers.

  • Seems like the NSCN paper was the one to popularize this.
  • The implementation in GeoDiff is here (a little different due to the modality).

natolambert avatar Oct 27 '22 17:10 natolambert

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.

github-actions[bot] avatar Nov 21 '22 15:11 github-actions[bot]

Initial progress on this is done in #1032.

The things that need to be done are:

  • integration tests (there is a sketch in the PR)
  • changing the API to index discrete sigmas rather than the list of sigmas (like SDE VE)
  • make timesteps continuous (not 100% sure on this)
  • showcase examples in a colab / another form to verify functionality.

Maybe @MinkaiXu -- expressed interest.

natolambert avatar Nov 30 '22 17:11 natolambert

Yes, glad to contribute @natolambert. Maybe we can find time to chat about this later next week.

MinkaiXu avatar Dec 01 '22 01:12 MinkaiXu