# HeliosDMDScheduler

`HeliosDMDScheduler` 基于 [Helios](https://huggingface.co/papers) 中引入的金字塔流匹配采样。

## HeliosDMDScheduler[[diffusers.HeliosDMDScheduler]]

#### diffusers.HeliosDMDScheduler[[diffusers.HeliosDMDScheduler]]

```python
diffusers.HeliosDMDScheduler(num_train_timesteps: int = 1000, shift: float = 1.0, stages: int = 3, stage_range: list = [0, 0.3333333333333333, 0.6666666666666666, 1], gamma: float = 0.3333333333333333, prediction_type: str = 'flow_prediction', use_flow_sigmas: bool = True, use_dynamic_shifting: bool = False, time_shift_type: typing.Literal['exponential', 'linear'] = 'linear')
```

[源代码](https://github.com/huggingface/diffusers/blob/v0.43.0/src/diffusers/schedulers/scheduling_helios_dmd.py#L35)

#### init_sigmas[[diffusers.HeliosDMDScheduler.init_sigmas]]

```python
init_sigmas()
```

[源代码](https://github.com/huggingface/diffusers/blob/v0.43.0/src/diffusers/schedulers/scheduling_helios_dmd.py#L69)

初始化全局时间步和 sigma

#### init_sigmas_for_each_stage[[diffusers.HeliosDMDScheduler.init_sigmas_for_each_stage]]

```python
init_sigmas_for_each_stage()
```

[源代码](https://github.com/huggingface/diffusers/blob/v0.43.0/src/diffusers/schedulers/scheduling_helios_dmd.py#L87)

初始化每个阶段的 timesteps

#### set_begin_index[[diffusers.HeliosDMDScheduler.set_begin_index]]

```python
set_begin_index(begin_index: int = 0)
```

[源代码](https://github.com/huggingface/diffusers/blob/v0.43.0/src/diffusers/schedulers/scheduling_helios_dmd.py#L161)

**参数：**

begin_index (`int`) : 调度器的起始索引。

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

#### set_timesteps[[diffusers.HeliosDMDScheduler.set_timesteps]]

```python
set_timesteps(num_inference_steps: int, stage_index: int | None = None, device: typing.Union[str, torch.device] = None, sigmas: bool | None = None, mu: bool | None = None, is_amplify_first_chunk: bool = False)
```

[源代码](https://github.com/huggingface/diffusers/blob/v0.43.0/src/diffusers/schedulers/scheduling_helios_dmd.py#L174)

为每个阶段设置 timesteps 和 sigmas

#### time_shift[[diffusers.HeliosDMDScheduler.time_shift]]

```python
time_shift(mu: float, sigma: float, t: Tensor)
```

[源代码](https://github.com/huggingface/diffusers/blob/v0.43.0/src/diffusers/schedulers/scheduling_helios_dmd.py#L236)

**参数：**

mu (`float`) : 时间偏移的 mu 参数。

sigma (`float`) : 时间偏移的 sigma 参数。

t (`torch.Tensor`) : 输入的时间步。

**返回：** `torch.Tensor`

时间偏移的时间步。

对 sigmas 应用时间偏移。

scheduling_helios_dmd

