From de6266010d21fdbf30c3221e808301072725d14d Mon Sep 17 00:00:00 2001 From: Pierre Chapuis Date: Fri, 19 Jan 2024 14:33:56 +0100 Subject: [PATCH] fix typo (sinuosoidal -> sinusoidal) --- src/refiners/foundationals/latent_diffusion/range_adapter.py | 4 ++-- .../latent_diffusion/stable_diffusion_xl/unet.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/refiners/foundationals/latent_diffusion/range_adapter.py b/src/refiners/foundationals/latent_diffusion/range_adapter.py index ce24232..fc1da00 100644 --- a/src/refiners/foundationals/latent_diffusion/range_adapter.py +++ b/src/refiners/foundationals/latent_diffusion/range_adapter.py @@ -32,14 +32,14 @@ class RangeEncoder(fl.Chain): self.sinusoidal_embedding_dim = sinusoidal_embedding_dim self.embedding_dim = embedding_dim super().__init__( - fl.Lambda(self.compute_sinuosoidal_embedding), + fl.Lambda(self.compute_sinusoidal_embedding), fl.Converter(set_device=False, set_dtype=True), fl.Linear(in_features=sinusoidal_embedding_dim, out_features=embedding_dim, device=device, dtype=dtype), fl.SiLU(), fl.Linear(in_features=embedding_dim, out_features=embedding_dim, device=device, dtype=dtype), ) - def compute_sinuosoidal_embedding(self, x: Int[Tensor, "*batch 1"]) -> Float[Tensor, "*batch 1 embedding_dim"]: + def compute_sinusoidal_embedding(self, x: Int[Tensor, "*batch 1"]) -> Float[Tensor, "*batch 1 embedding_dim"]: return compute_sinusoidal_embedding(x, embedding_dim=self.sinusoidal_embedding_dim) diff --git a/src/refiners/foundationals/latent_diffusion/stable_diffusion_xl/unet.py b/src/refiners/foundationals/latent_diffusion/stable_diffusion_xl/unet.py index efa4bc9..afab21a 100644 --- a/src/refiners/foundationals/latent_diffusion/stable_diffusion_xl/unet.py +++ b/src/refiners/foundationals/latent_diffusion/stable_diffusion_xl/unet.py @@ -28,7 +28,7 @@ class TextTimeEmbedding(fl.Chain): fl.Chain( fl.UseContext(context="diffusion", key="time_ids"), fl.Unsqueeze(dim=-1), - fl.Lambda(func=self.compute_sinuosoidal_embedding), + fl.Lambda(func=self.compute_sinusoidal_embedding), fl.Reshape(-1), ), dim=1, @@ -49,7 +49,7 @@ class TextTimeEmbedding(fl.Chain): ), ) - def compute_sinuosoidal_embedding(self, x: Tensor) -> Tensor: + def compute_sinusoidal_embedding(self, x: Tensor) -> Tensor: return compute_sinusoidal_embedding(x=x, embedding_dim=self.time_ids_embedding_dim)