Buckets:

hf-doc-build/doc-dev / diffusers /pr_12762 /en /api /schedulers /consistency_decoder.md
rtrm's picture
|
download
raw
2.57 kB

ConsistencyDecoderScheduler

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.

ConsistencyDecoderScheduler[[diffusers.schedulers.ConsistencyDecoderScheduler]]

diffusers.schedulers.ConsistencyDecoderScheduler[[diffusers.schedulers.ConsistencyDecoderScheduler]]

Source

scale_model_inputdiffusers.schedulers.ConsistencyDecoderScheduler.scale_model_inputhttps://github.com/huggingface/diffusers/blob/vr_12762/src/diffusers/schedulers/scheduling_consistency_decoder.py#L117[{"name": "sample", "val": ": Tensor"}, {"name": "timestep", "val": ": typing.Optional[int] = None"}]- sample (torch.Tensor) -- The input sample.

  • timestep (int, optional) -- The current timestep in the diffusion chain.0torch.TensorA scaled input sample.

Ensures interchangeability with schedulers that need to scale the denoising model input depending on the current timestep.

Parameters:

sample (torch.Tensor) : The input sample.

timestep (int, optional) : The current timestep in the diffusion chain.

Returns:

torch.Tensor

A scaled input sample.

step[[diffusers.schedulers.ConsistencyDecoderScheduler.step]]

Source

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).

Parameters:

model_output (torch.Tensor) : The direct output from the learned diffusion model.

timestep (float) : The current timestep in the diffusion chain.

sample (torch.Tensor) : A current instance of a sample created by the diffusion process.

generator (torch.Generator, optional) : A random number generator.

return_dict (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.

Xet Storage Details

Size:
2.57 kB
·
Xet hash:
fb4bb90d55e79b95e286bc7fa45ae7f0a7d41981c10893e9411bdcb537d1346a

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.