MCPcopy Create free account
hub / github.com/UVA-Computer-Vision-Lab/FrameINO / linear_decay

Function linear_decay

train_code/train_wan_motion.py:549–555  ·  view source on GitHub ↗
(initial_value, final_value, total_steps, current_step)

Source from the content-addressed store, hash-verified

547
548
549def linear_decay(initial_value, final_value, total_steps, current_step):
550 if current_step >= total_steps:
551 return final_value
552 current_step = max(0, current_step)
553 step_size = (final_value - initial_value) / total_steps
554 current_value = initial_value + step_size * current_step
555 return current_value
556
557
558def traj_tensor_to_vae_latent(traj_tensor, vae, device):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected