sbi icon indicating copy to clipboard operation
sbi copied to clipboard

refactoring noise_schedule and time schedule into base class

Open psteinb opened this issue 9 months ago • 2 comments

  • [x] created noise_schedule method to be overwritten by derivatives
  • [x] created times_schedules method to be overwritten by derivatives
  • [x] created test on times_schedule
  • [x] improvded docstrings
  • [x] created test on noise_schedule

This addresses #1437

psteinb avatar Mar 18 '25 15:03 psteinb

@manuelgloeckler So i've finished working on this.

  • times_schedule and noise_schedule are now member functions of the ConditionalScoreEstimator base class
  • I tried my luck in setting up something like the EDM paper [1], but failed. I found it too hard to map the current API to what is described in [1]
  • Taking this into account, if we like to have something like this, we would have to implement the complete forward pass as well as the training loop perhaps (perhaps in the wake of #1445)

If the commit history scares you, either squash them all or let me know. I can also close this draft and send another PR.

[1] https://arxiv.org/abs/2206.00364

psteinb avatar Mar 20 '25 17:03 psteinb

It's great to have it fixed! This PR will have merge conflicts with #1497 , so I decided to take a look. I have a question - as far as I understand, during inference the introduced time schedule is still ignored and the linear steps are generated here in score_posterior.py, is that correct? I am wondering whether it should be handled by the Diffuser object instead of the posterior. Currently, Diffuser.run just receives ts, but I think it would be great to save time_scheduler along with t_min and t_max in the constructor and then construct ts based on the provided num_steps.

StarostinV avatar Mar 21 '25 23:03 StarostinV