(cfg_scale, num_inference_steps,
timesteps)
| 128 | |
| 129 | |
| 130 | def 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 |
nothing calls this directly
no outgoing calls
no test coverage detected