Skip to content

Commit 0660fe0

Browse files
committed
typo act_fn -> time_embedding_act_fn
1 parent 32da529 commit 0660fe0

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
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}")

src/diffusers/pipelines/versatile_diffusion/modeling_text_unet.py

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

361361
if time_embedding_act_fn is not None:
362-
if act_fn == "swish":
362+
if time_embedding_act_fn == "swish":
363363
self.time_embed_act = lambda x: F.silu(x)
364-
elif act_fn == "mish":
364+
elif time_embedding_act_fn == "mish":
365365
self.time_embed_act = nn.Mish()
366-
elif act_fn == "silu":
366+
elif time_embedding_act_fn == "silu":
367367
self.time_embed_act = nn.SiLU()
368-
elif act_fn == "gelu":
368+
elif time_embedding_act_fn == "gelu":
369369
self.time_embed_act = nn.GELU()
370370
else:
371371
raise ValueError(f"Unsupported activation function: {time_embedding_act_fn}")

0 commit comments

Comments
 (0)