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

Function get_cogvideo_dynamic_cfg_scale_list

trainer/scheduler.py:130–139  ·  view source on GitHub ↗
(cfg_scale, num_inference_steps,
                                        timesteps)

Source from the content-addressed store, hash-verified

128
129
130def get_cogvideo_dynamic_cfg_scale_list(cfg_scale, num_inference_steps,
131 timesteps):
132
133 cfg_list = [
134 1 + cfg_scale * ((1 - math.cos(math.pi * (
135 (num_inference_steps - t.item()) / num_inference_steps)**5.0)) / 2)
136 for t in timesteps
137 ]
138
139 return cfg_list
140
141
142# https://arxiv.org/pdf/2404.07724 Applying Guidance in a Limited Interval Improves Sample and Distribution Quality in Diffusion Models

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected