MCPcopy Create free account
hub / github.com/evilsocket/cake / time_schedule

Method time_schedule

cake-core/src/models/luxtts/euler_solver.rs:25–37  ·  view source on GitHub ↗

Generate the time schedule: linspace(0, 1, num_steps+1) with t_shift applied.

(&self)

Source from the content-addressed store, hash-verified

23
24 /// Generate the time schedule: linspace(0, 1, num_steps+1) with t_shift applied.
25 pub fn time_schedule(&self) -> Vec<f32> {
26 let mut times = Vec::with_capacity(self.num_steps + 1);
27 for i in 0..=self.num_steps {
28 let t = i as f32 / self.num_steps as f32;
29 let t_shifted = if (self.t_shift - 1.0).abs() > 1e-6 {
30 self.t_shift * t / (1.0 + (self.t_shift - 1.0) * t)
31 } else {
32 t
33 };
34 times.push(t_shifted);
35 }
36 times
37 }
38
39 /// Perform one flow matching Euler step.
40 /// Returns updated x for the next timestep.

Callers 4

generate_speechMethod · 0.80

Calls 1

pushMethod · 0.45

Tested by 3