tiny_diff.schedulers.ddpm.LatentDDPMScheduler
- class tiny_diff.schedulers.ddpm.LatentDDPMScheduler(num_train_steps: int = 1000, num_inference_steps: int | None = None, beta_start: float = 0.0001, beta_end: float = 0.02, clip_range: float | None = None, device: str | device | None = None)
Bases:
DDPMSchedulerDDPM scheduler with original latent diffusion beta scheduler.
- __init__(num_train_steps: int = 1000, num_inference_steps: int | None = None, beta_start: float = 0.0001, beta_end: float = 0.02, clip_range: float | None = None, device: str | device | None = None)
Methods
__init__([num_train_steps, ...])add_noise(original_samples, noise, timesteps)Adds noise in the forward diffusion process.
get_timesteps([n_steps, device])Sets the discrete timesteps.
set_betas(beta_start, beta_end, n_steps[, ...])Sets the beta schedule.
step(e, t, sample[, generator])Predict noise at time t-1 given time t.
to(device)Move to device.
Attributes
betasBeta schedule.
clip_sampleWhether to clip a sample or not.
num_inference_stepsDiffusion steps to use in inference.
num_train_stepsDiffusion steps to use in train.