(self)
| 31 | return torch.linspace(beta_start ** 0.5, beta_end ** 0.5, timesteps) ** 2 |
| 32 | |
| 33 | def sigmoid_beta_schedule(self): |
| 34 | timesteps = self.timesteps |
| 35 | scale = 1000 / timesteps |
| 36 | beta_start = 1e-6 * scale |
| 37 | beta_end = 0.02 * scale |
| 38 | betas = torch.linspace(-6, 6, timesteps) |
| 39 | return torch.sigmoid(betas) * (beta_end - beta_start) + beta_start |
| 40 | |
| 41 | def get_betas(self): |
| 42 | if self.schedule == "linear": |
nothing calls this directly
no outgoing calls
no test coverage detected