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

Function logsnr_schedule_cosine_shifted

k_diffusion/utils.py:363–365  ·  view source on GitHub ↗
(t, image_d, noise_d, logsnr_min, logsnr_max)

Source from the content-addressed store, hash-verified

361 return -2 * torch.log(torch.tan(t_min + t * (t_max - t_min)))
362
363 def logsnr_schedule_cosine_shifted(t, image_d, noise_d, logsnr_min, logsnr_max):
364 shift = 2 * math.log(noise_d / image_d)
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)

Callers 1

Calls 1

logsnr_schedule_cosineFunction · 0.85

Tested by

no test coverage detected