diff --git a/mmagic/models/editors/fastcomposer/fastcomposer_util.py b/mmagic/models/editors/fastcomposer/fastcomposer_util.py index 501a24770..55d9b62a0 100644 --- a/mmagic/models/editors/fastcomposer/fastcomposer_util.py +++ b/mmagic/models/editors/fastcomposer/fastcomposer_util.py @@ -13,10 +13,12 @@ CLIPVisionConfig, CLIPVisionModel) from transformers.modeling_outputs import BaseModelOutputWithPooling -from mmagic.utils import try_import +from mmagic.utils import try_import + _expand_mask = try_import('transformers.models.clip.modeling_clip') -if _expand_mask is None: - _expand_mask = try_import('ransformers.models.clip.modeling_clip._prepare_4d_attention_mask') +if _expand_mask is None: + _expand_mask = try_import( + 'ransformers.models.clip.modeling_clip._prepare_4d_attention_mask') class FastComposerModel(nn.Module):