using dynamic shift Scheduler in flux2

This commit is contained in:
lzws
2025-11-27 19:50:15 +08:00
parent 0b527c460f
commit fb892bd860
2 changed files with 23 additions and 3 deletions

View File

@@ -122,3 +122,20 @@ class FlowMatchScheduler():
b = base_shift - m * base_seq_len
mu = image_seq_len * m + b
return mu
def compute_empirical_mu(self, image_seq_len: int, num_steps: int) -> float:
a1, b1 = 8.73809524e-05, 1.89833333
a2, b2 = 0.00016927, 0.45666666
if image_seq_len > 4300:
mu = a2 * image_seq_len + b2
return float(mu)
m_200 = a2 * image_seq_len + b2
m_10 = a1 * image_seq_len + b1
a = (m_200 - m_10) / 190.0
b = m_200 - 200.0 * a
mu = a * num_steps + b
return float(mu)