This scheduler is a part of the ConsistencyDecoderPipeline
and was introduced in DALL-E 3.
The original codebase can be found at openai/consistency_models.
( num_train_timesteps: int = 1024 sigma_data: float = 0.5 )
( sample: FloatTensor timestep: Optional = None ) → torch.FloatTensor
Ensures interchangeability with schedulers that need to scale the denoising model input depending on the current timestep.
( model_output: FloatTensor timestep: Union sample: FloatTensor generator: Optional = None return_dict: bool = True ) → ~schedulers.scheduling_consistency_models.ConsistencyDecoderSchedulerOutput
or tuple
Parameters
torch.FloatTensor
) —
The direct output from the learned diffusion model. float
) —
The current timestep in the diffusion chain. torch.FloatTensor
) —
A current instance of a sample created by the diffusion process. torch.Generator
, optional) —
A random number generator. bool
, optional, defaults to True
) —
Whether or not to return a
~schedulers.scheduling_consistency_models.ConsistencyDecoderSchedulerOutput
or tuple
. Returns
~schedulers.scheduling_consistency_models.ConsistencyDecoderSchedulerOutput
or tuple
If return_dict is True
,
~schedulers.scheduling_consistency_models.ConsistencyDecoderSchedulerOutput
is returned, otherwise
a tuple is returned where the first element is the sample tensor.
Predict the sample from the previous timestep by reversing the SDE. This function propagates the diffusion process from the learned model outputs (most often the predicted noise).