MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / get_smooth_dynamic_cfg_scale_list

Function get_smooth_dynamic_cfg_scale_list

trainer/scheduler.py:119–127  ·  view source on GitHub ↗
(cfg_scale, num_inference_steps)

Source from the content-addressed store, hash-verified

117
118
119def get_smooth_dynamic_cfg_scale_list(cfg_scale, num_inference_steps):
120
121 cfg_list = [
122 1 + cfg_scale * ((1 - math.cos(math.pi * (
123 (num_inference_steps - idx) / num_inference_steps)**5.0)) / 2)
124 for idx in range(0, int(num_inference_steps))
125 ]
126
127 return cfg_list
128
129
130def get_cogvideo_dynamic_cfg_scale_list(cfg_scale, num_inference_steps,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected