Skip to content

Commit b01f23e

Browse files
committed
Add mixed rotary module to leaf modules, reorg imports for related
1 parent 598f322 commit b01f23e

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

timm/models/_features_fx.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,26 @@
1717
has_fx_feature_extraction = False
1818

1919
# Layers we went to treat as leaf modules
20-
from timm.layers import Conv2dSame, ScaledStdConv2dSame, CondConv2d, StdConv2dSame, Format
21-
from timm.layers import resample_abs_pos_embed, resample_abs_pos_embed_nhwc, maybe_add_mask
22-
from timm.layers.non_local_attn import BilinearAttnTransform
23-
from timm.layers.pool2d_same import MaxPool2dSame, AvgPool2dSame
24-
from timm.layers.norm_act import (
20+
from timm.layers import (
21+
Conv2dSame,
22+
ScaledStdConv2dSame,
23+
CondConv2d,
24+
StdConv2dSame,
25+
Format,
26+
resample_abs_pos_embed,
27+
resample_abs_pos_embed_nhwc,
28+
maybe_add_mask,
2529
BatchNormAct2d,
2630
SyncBatchNormAct,
2731
FrozenBatchNormAct2d,
2832
GroupNormAct,
2933
GroupNorm1Act,
3034
LayerNormAct,
31-
LayerNormAct2d
35+
LayerNormAct2d,
36+
RotaryEmbeddingMixed,
3237
)
38+
from timm.layers.non_local_attn import BilinearAttnTransform
39+
from timm.layers.pool2d_same import MaxPool2dSame, AvgPool2dSame
3340

3441
__all__ = ['register_notrace_module', 'is_notrace_module', 'get_notrace_modules',
3542
'register_notrace_function', 'is_notrace_function', 'get_notrace_functions',
@@ -50,6 +57,7 @@
5057
GroupNorm1Act,
5158
LayerNormAct,
5259
LayerNormAct2d,
60+
RotaryEmbeddingMixed,
5361
}
5462

5563
try:

0 commit comments

Comments
 (0)