We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df4eb1b commit 9ae2f30Copy full SHA for 9ae2f30
src/diffusers/models/unet_2d_condition.py
@@ -267,13 +267,13 @@ def __init__(
267
self.class_embedding = None
268
269
if time_embedding_act_fn is not None:
270
- if act_fn == "swish":
+ if time_embedding_act_fn == "swish":
271
self.time_embed_act = lambda x: F.silu(x)
272
- elif act_fn == "mish":
+ elif time_embedding_act_fn == "mish":
273
self.time_embed_act = nn.Mish()
274
- elif act_fn == "silu":
+ elif time_embedding_act_fn == "silu":
275
self.time_embed_act = nn.SiLU()
276
- elif act_fn == "gelu":
+ elif time_embedding_act_fn == "gelu":
277
self.time_embed_act = nn.GELU()
278
else:
279
raise ValueError(f"Unsupported activation function: {time_embedding_act_fn}")
0 commit comments