starling.data.schedulers.cosine_beta_schedule

cosine_beta_schedule(timesteps: int, s: float = 0.008) Tensor[source]

The beta values are generated using a cosine function. The beta values are clipped between 0.0001 and 0.9999.

Parameters:
  • timesteps (int) – The number of timesteps which will be used to generate the beta values.

  • s (float, optional) – Adjusts the smoothness of the beta schedule’s initial portion, influencing how quickly the values change over the first few timesteps. By default 0.008.

Returns:

A tensor containing the beta values.

Return type:

torch.Tensor