azula.guidance.tds

Twisted Posterior Sampling (TDS) internals.

References

Practical and Asymptotically Exact Conditional Sampling in Diffusion Models (Wu et al., 2023)

Classes

TDSSampler

Creates a TDS sampler.

Descriptions

class azula.guidance.tds.TDSSampler(denoiser, twist, **kwargs)[source]

Creates a TDS sampler.

Parameters:
__call__(x, **kwargs)[source]

Simulates the reverse process from \(t_T\) to \(t_0\).

Parameters:
  • x (Tensor) – A set of \(K\) noisy tensors \(x_{t_T}\), with shape \((K, *)\).

  • kwargs – Optional keyword arguments.

Returns:

The clean(er) tensors \(x_{t_0}\), with shape \((K, *)\).

Return type:

Tensor