MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / get_ancestral_step

Function get_ancestral_step

sat/sgm/modules/diffusionmodules/sampling_utils.py:135–143  ·  view source on GitHub ↗
(sigma_from, sigma_to, eta=1.0)

Source from the content-addressed store, hash-verified

133
134
135def get_ancestral_step(sigma_from, sigma_to, eta=1.0):
136 if not eta:
137 return sigma_to, 0.0
138 sigma_up = torch.minimum(
139 sigma_to,
140 eta * (sigma_to**2 * (sigma_from**2 - sigma_to**2) / sigma_from**2) ** 0.5,
141 )
142 sigma_down = (sigma_to**2 - sigma_up**2) ** 0.5
143 return sigma_down, sigma_up
144
145
146def to_d(x, sigma, denoised):

Callers 2

sampler_stepMethod · 0.85
sampler_stepMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected