Skip to content

Commit 9ae2f30

Browse files
committed
typo act_fn -> time_embedding_act_fn
1 parent df4eb1b commit 9ae2f30

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/diffusers/models/unet_2d_condition.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,13 @@ def __init__(
267267
self.class_embedding = None
268268

269269
if time_embedding_act_fn is not None:
270-
if act_fn == "swish":
270+
if time_embedding_act_fn == "swish":
271271
self.time_embed_act = lambda x: F.silu(x)
272-
elif act_fn == "mish":
272+
elif time_embedding_act_fn == "mish":
273273
self.time_embed_act = nn.Mish()
274-
elif act_fn == "silu":
274+
elif time_embedding_act_fn == "silu":
275275
self.time_embed_act = nn.SiLU()
276-
elif act_fn == "gelu":
276+
elif time_embedding_act_fn == "gelu":
277277
self.time_embed_act = nn.GELU()
278278
else:
279279
raise ValueError(f"Unsupported activation function: {time_embedding_act_fn}")

0 commit comments

Comments
 (0)