Unverified Commit 08a6dc8a authored by Pedro Cuenca's avatar Pedro Cuenca Committed by GitHub
Browse files

Flax: Flip sin to cos in time embeddings (#1149)

Flip sin to cos in t embeddings.

This was assumed in the previous implementation, but now the default is
the opposite.

Fixes #1145.
parent 9d8943b7
...@@ -88,4 +88,6 @@ class FlaxTimesteps(nn.Module): ...@@ -88,4 +88,6 @@ class FlaxTimesteps(nn.Module):
@nn.compact @nn.compact
def __call__(self, timesteps): def __call__(self, timesteps):
return get_sinusoidal_embeddings(timesteps, embedding_dim=self.dim, freq_shift=self.freq_shift) return get_sinusoidal_embeddings(
timesteps, embedding_dim=self.dim, freq_shift=self.freq_shift, flip_sin_to_cos=True
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment