# gizai:flow

the schedules of flow-matching samplers: the noise level (sigma) of each step, from 1 to 0, moved by a shift toward the noisy end. Each model's schedule rounds as its reference does, so the same seed gives its image.

```gizlang
import * as Flow from "gizai:flow";
```

## Functions

### `shifted`

```gizlang
function shifted(sigma: f64, shift: f64): f64
```

sigma of a flow schedule moved by `shift` (s / (s + (1 / shift - 1)(1 - s))), in f32.

Effects: fail.

### `stepShifted`

```gizlang
function stepShifted(t: f64, shift: f64): f64
```

t moved by `shift` (s t / (1 - (1 - s) t)) with each product, sum and quotient rounded to f32, as a reference
that computes the schedule in float32 tensors does it.

Effects: fail.

### `sigmas`

```gizlang
function sigmas(steps: i64, shift: f64): Vec<f64>
```

The sigmas of H3's flow schedule for `steps` passes: linspace(1, 0, steps + 1) shifted by `shift`
(s σ / (1 + (s - 1) σ)), in f32 as the reference, without repeats.

Effects: fail.

### `fluxSigmas`

```gizlang
function fluxSigmas(steps: i64, shift: f64): Vec<f64>
```

FLUX.3's sigmas for `steps` steps: 1 to 1 / steps evenly, each shifted by `shift` (s σ / (1 + (s - 1) σ)), then 0.

Effects: fail.

### `zImageSigmas`

```gizlang
function zImageSigmas(steps: i64, shift: f64): Vec<f64>
```

Z-Image's sigmas for `steps` steps, as ComfyUI's simple scheduler takes them from ModelSamplingAuraFlow's table of
1000 (multiplier 1): step k at t = (1000 - floor(k 1000 / steps)) / 1000 shifted by `shift`, then 0.

Effects: fail.

