k-diffusion
k-diffusion copied to clipboard
model-wrappers, discretization of sigma_hat
Note: for a cleaner diff: merge-base of this PR is set to an unrelated branch in my repository, rather than upstreaming to crowsonkb/k-diffusion. because this branch is downstream of my Mac fixes and miscellany.
I made the model wrapper generic, so that you get auto-completion from inner_model
:
somewhat worried about this:
sigma_hat = model.discretize_sigma(sigma_hat)
since using quantize=True
and churn=0.
: we should expect this to be a no-op.
yet, there's a slight difference (see nose) when we apply this roundtrip to the sigma (left = usual, right = discretization):
when churn>0, the difference is, uh, more dramatic (left = discretized, churn=0; right = discretized, churn = 0.1):
churn>0 does work if I remove the discretization (left = non-discretized, churn=0; right = non-discretized, churn = 0.1):