Skip to content

Commit

Permalink
feat: allow sharding for auraflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
sayakpaul committed Jul 12, 2024
1 parent 9f963e7 commit 436ba9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ class AuraFlowTransformer2DModel(ModelMixin, ConfigMixin):
pos_embed_max_size (`int`, defaults to 4096): Maximum positions to embed from the image latents.
"""

_no_split_modules = ["AuraFlowJointTransformerBlock", "AuraFlowSingleTransformerBlock", "AuraFlowPatchEmbed"]
_supports_gradient_checkpointing = True

@register_to_config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
class SD3TransformerTests(ModelTesterMixin, unittest.TestCase):
model_class = AuraFlowTransformer2DModel
main_input_name = "hidden_states"
# We override the items here because the transformer under consideration is small.
model_split_percents = [0.7, 0.6, 0.6]

@property
def dummy_input(self):
Expand Down

0 comments on commit 436ba9b

Please sign in to comment.