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

Consistency Model: Fix JIT compilation #224

Merged
merged 2 commits into from
Oct 25, 2024

Conversation

vpratz
Copy link
Collaborator

@vpratz vpratz commented Oct 25, 2024

The current consistency model implementation did not take JIT compilation into account.
This PR contains changes to correctly track the current step and apply the discretization step schedule.

To make this work with JAX, which only allows arrays with known size, we calculate the schedule in advance.

Fixes #223

Adjusting the schedule requires special care to work with JIT
compilation.
With this commit, we pre-calculate the schedule, so that setting
`current_step` works in all backends.
@stefanradev93
Copy link
Contributor

Thanks, nice spot, Valentin!

@stefanradev93 stefanradev93 merged commit 0854460 into bayesflow-org:dev Oct 25, 2024
13 checks passed
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

Successfully merging this pull request may close these issues.

2 participants