MCPcopy Create free account
hub / github.com/openai/point-e / get_ancestral_step

Function get_ancestral_step

point_e/diffusion/k_diffusion.py:208–213  ·  view source on GitHub ↗

Calculates the noise level (sigma_down) to step down to and the amount of noise to add (sigma_up) when doing an ancestral sampling step.

(sigma_from, sigma_to)

Source from the content-addressed store, hash-verified

206
207
208def get_ancestral_step(sigma_from, sigma_to):
209 """Calculates the noise level (sigma_down) to step down to and the amount
210 of noise to add (sigma_up) when doing an ancestral sampling step."""
211 sigma_up = (sigma_to**2 * (sigma_from**2 - sigma_to**2) / sigma_from**2) ** 0.5
212 sigma_down = (sigma_to**2 - sigma_up**2) ** 0.5
213 return sigma_down, sigma_up
214
215
216@th.no_grad()

Callers 1

sample_euler_ancestralFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected