MCPcopy Index your code
hub / github.com/Extraltodeus/DistanceSampler / internal_step

Function internal_step

custom_samplers.py:88–96  ·  view source on GitHub ↗
(x, d, dt, sigma, sigma_next, sigma_up, x_coeff, noise_sampler)

Source from the content-addressed store, hash-verified

86 return sigma_down, sigma_up, x_coeff
87
88def 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
98def fix_step_range(steps, start, end):
99 if start < 0:

Callers 1

sample_distance_advancedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected