ls_mlkit.diffusion.base_diffuser module¶
- class ls_mlkit.diffusion.base_diffuser.BaseDiffuser(config: BaseDiffuserConfig, time_scheduler: DiffusionTimeScheduler)[source]¶
Bases:
BaseGenerativeModelabstract method:
- abstractmethod forward_process(x_0: Tensor, discrete_t: Tensor, mask: Tensor, *args: list[Any], **kwargs: dict[Any, Any]) dict[source]¶
Forward process, from \(x_0\) to \(x_t\)
- Parameters:
x_0 (
Tensor) – \(x_0\)discrete_t (
Tensor) – the discrete time steps \(t\)mask (
Tensor) – the mask of the sample
- Returns:
a dictionary that must contain the key “x_t”
- Return type:
dict
- class ls_mlkit.diffusion.base_diffuser.BaseDiffuserConfig(ndim_micro_shape: int, n_discretization_steps: int, n_inference_steps: int = None, use_batch_flattening: bool = False, *args: list[Any], **kwargs: dict[Any, Any])[source]¶
Bases:
BaseGenerativeModelConfig