Skip to content

Commit 712e983

Browse files
committed
Without height sharding
1 parent 09970fe commit 712e983

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/maxdiffusion/models/wan/autoencoder_kl_wan.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,7 @@ def __call__(self, x: jax.Array, cache_x: Optional[jax.Array] = None, idx=-1) ->
137137
if self.mesh is not None:
138138
# (B, D, H, W, C)
139139
if x_padded.shape[0] % self.mesh.shape['data'] == 0:
140-
x_padded = with_sharding_constraint(x_padded, PartitionSpec('data', None, 'fsdp', None, None))
141-
else:
142-
x_padded = with_sharding_constraint(x_padded, PartitionSpec(None, None, 'fsdp', None, None))
140+
x_padded = with_sharding_constraint(x_padded, PartitionSpec('data', None, None, None, None))
143141

144142
out = self.conv(x_padded)
145143
return out

0 commit comments

Comments
 (0)