Skip to content

Commit

Permalink
Fix flux training with batch size (#1135)
Browse files Browse the repository at this point in the history
Co-authored-by: Angelos Katharopoulos <a_katharopoulos@apple.com>
  • Loading branch information
hehua2008 and angeloskath authored Dec 9, 2024
1 parent 2211b27 commit 1fd6aae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions flux/flux/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def add_noise(self, x, t, noise=None, key=None):
if noise is not None
else mx.random.normal(x.shape, dtype=x.dtype, key=key)
)
t = t.reshape([-1] + [1] * (x.ndim - 1))
return x * (1 - t) + t * noise

def step(self, pred, x_t, t, t_prev):
Expand Down

0 comments on commit 1fd6aae

Please sign in to comment.