(x, d, dt, sigma, sigma_next, sigma_up, x_coeff, noise_sampler)
| 86 | return sigma_down, sigma_up, x_coeff |
| 87 | |
| 88 | def internal_step(x, d, dt, sigma, sigma_next, sigma_up, x_coeff, noise_sampler): |
| 89 | x = x + d * dt |
| 90 | if sigma_up == 0 or noise_sampler is None: |
| 91 | return x |
| 92 | noise = noise_sampler(sigma, sigma_next).mul_(sigma_up) |
| 93 | if x_coeff != 1: |
| 94 | # x gets scaled for flow models. |
| 95 | x *= x_coeff |
| 96 | return x.add_(noise) |
| 97 | |
| 98 | def fix_step_range(steps, start, end): |
| 99 | if start < 0: |
no outgoing calls
no test coverage detected