Buckets:

hf-doc-build/doc-dev / diffusers /pr_12595 /en /api /schedulers /consistency_decoder.md
rtrm's picture
|
download
raw
3.66 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]]

class diffusers.schedulers.ConsistencyDecoderSchedulerdiffusers.schedulers.ConsistencyDecoderSchedulerhttps://github.com/huggingface/diffusers/blob/vr_12595/src/diffusers/schedulers/scheduling_consistency_decoder.py#L72[{"name": "num_train_timesteps", "val": ": int = 1024"}, {"name": "sigma_data", "val": ": float = 0.5"}]

scale_model_inputdiffusers.schedulers.ConsistencyDecoderScheduler.scale_model_inputhttps://github.com/huggingface/diffusers/blob/vr_12595/src/diffusers/schedulers/scheduling_consistency_decoder.py#L116[{"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.

stepdiffusers.schedulers.ConsistencyDecoderScheduler.stephttps://github.com/huggingface/diffusers/blob/vr_12595/src/diffusers/schedulers/scheduling_consistency_decoder.py#L133[{"name": "model_output", "val": ": Tensor"}, {"name": "timestep", "val": ": typing.Union[float, torch.Tensor]"}, {"name": "sample", "val": ": Tensor"}, {"name": "generator", "val": ": typing.Optional[torch._C.Generator] = None"}, {"name": "return_dict", "val": ": bool = True"}]- 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.0~schedulers.scheduling_consistency_models.ConsistencyDecoderSchedulerOutput or tupleIf 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).

Xet Storage Details

Size:
3.66 kB
·
Xet hash:
18adc0eb6b70c719b28ca9b9276c0a76718e3544f00321f6c8ea11dfaea3480c

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