Skip to content

Commit 8ab3abe

Browse files
committed
switched to dot product for audio
1 parent 13abb65 commit 8ab3abe

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/maxdiffusion/models/ltx2/transformer_ltx2.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def __init__(
159159
eps=norm_eps,
160160
dtype=dtype,
161161
mesh=mesh,
162-
attention_kernel=self.attention_kernel,
162+
attention_kernel="dot_product",
163163
rope_type=rope_type,
164164
flash_block_sizes=flash_block_sizes,
165165
)
@@ -212,7 +212,7 @@ def __init__(
212212
eps=norm_eps,
213213
dtype=dtype,
214214
mesh=mesh,
215-
attention_kernel=self.attention_kernel,
215+
attention_kernel="dot_product",
216216
rope_type=rope_type,
217217
flash_block_sizes=flash_block_sizes,
218218
)
@@ -239,7 +239,7 @@ def __init__(
239239
eps=norm_eps,
240240
dtype=dtype,
241241
mesh=mesh,
242-
attention_kernel=self.attention_kernel,
242+
attention_kernel="dot_product",
243243
rope_type=rope_type,
244244
flash_block_sizes=flash_block_sizes,
245245
)
@@ -265,7 +265,7 @@ def __init__(
265265
eps=norm_eps,
266266
dtype=dtype,
267267
mesh=mesh,
268-
attention_kernel=self.attention_kernel,
268+
attention_kernel="dot_product",
269269
rope_type=rope_type,
270270
flash_block_sizes=flash_block_sizes,
271271
)
@@ -350,8 +350,7 @@ def __call__(
350350

351351
axis_names = nn.logical_to_mesh_axes(("activation_batch", "activation_length", "activation_embed"))
352352
hidden_states = jax.lax.with_sharding_constraint(hidden_states, axis_names)
353-
axis_names_audio = nn.logical_to_mesh_axes(("activation_batch", None, "activation_embed"))
354-
audio_hidden_states = jax.lax.with_sharding_constraint(audio_hidden_states, axis_names_audio)
353+
audio_hidden_states = jax.lax.with_sharding_constraint(audio_hidden_states, axis_names)
355354

356355
if encoder_hidden_states is not None:
357356
encoder_hidden_states = jax.lax.with_sharding_constraint(encoder_hidden_states, axis_names)

0 commit comments

Comments
 (0)