Diffusers documentation

HeliosDMDScheduler

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

HeliosDMDScheduler

HeliosDMDScheduler 基于 Helios 中引入的金字塔流匹配采样。

HeliosDMDScheduler

class diffusers.HeliosDMDScheduler

< >

( num_train_timesteps: int = 1000shift: float = 1.0stages: int = 3stage_range: list = [0, 0.3333333333333333, 0.6666666666666666, 1]gamma: float = 0.3333333333333333prediction_type: str = 'flow_prediction'use_flow_sigmas: bool = Trueuse_dynamic_shifting: bool = Falsetime_shift_type: typing.Literal['exponential', 'linear'] = 'linear' )

init_sigmas

< >

( )

初始化全局时间步和 sigma

init_sigmas_for_each_stage

< >

( )

初始化每个阶段的 timesteps

set_begin_index

< >

( begin_index: int = 0 )

参数

  • begin_index (int) — 调度器的起始索引。

设置调度器的起始索引。此函数应在推理之前从流水线中运行。

set_timesteps

< >

( num_inference_steps: intstage_index: int | None = Nonedevice: typing.Union[str, torch.device] = Nonesigmas: bool | None = Nonemu: bool | None = Noneis_amplify_first_chunk: bool = False )

为每个阶段设置 timesteps 和 sigmas

time_shift

< >

( mu: floatsigma: floatt: Tensor ) → torch.Tensor

参数

  • mu (float) — 用于时间偏移的 mu 参数。
  • sigma (float) — 用于时间偏移的 sigma 参数。
  • t (torch.Tensor) — 输入的时间步。

返回值

torch.Tensor

时间偏移的时间步。

对 sigmas 应用时间偏移。

scheduling_helios_dmd

Update on GitHub