MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / logsnr_schedule_cosine_interpolated

Function logsnr_schedule_cosine_interpolated

k_diffusion/utils.py:367–370  ·  view source on GitHub ↗
(t, image_d, noise_d_low, noise_d_high, logsnr_min, logsnr_max)

Source from the content-addressed store, hash-verified

365 return logsnr_schedule_cosine(t, logsnr_min - shift, logsnr_max - shift) + shift
366
367 def logsnr_schedule_cosine_interpolated(t, image_d, noise_d_low, noise_d_high, logsnr_min, logsnr_max):
368 logsnr_low = logsnr_schedule_cosine_shifted(t, image_d, noise_d_low, logsnr_min, logsnr_max)
369 logsnr_high = logsnr_schedule_cosine_shifted(t, image_d, noise_d_high, logsnr_min, logsnr_max)
370 return torch.lerp(logsnr_low, logsnr_high, t)
371
372 logsnr_min = -2 * math.log(min_value / sigma_data)
373 logsnr_max = -2 * math.log(max_value / sigma_data)

Callers 1

rand_cosine_interpolatedFunction · 0.85

Calls 1

Tested by

no test coverage detected