Buckets:

hf-doc-build/doc-dev / diffusers /pr_12229 /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_12229/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_12229/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_12229/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:
794ed85592fc9a37253f7f4b87235e353d7a3d8a966b7f707f4fbb7d7731123e

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