Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[PT FE] Fix timm model filter selecting huge models, update timm to 1.0.30, support aten.meshgrid in FX (#38443)

Maxim Vafin13c485695b77
diff --git a/.claude/skills/ov-update-pytorch-version/SKILL.md b/.claude/skills/ov-update-pytorch-version/SKILL.md
index 6dc9c86b320..423b720ee06 100644
--- a/.claude/skills/ov-update-pytorch-version/SKILL.md
+++ b/.claude/skills/ov-update-pytorch-version/SKILL.md
@@ -166,6 +166,23 @@ Model hub tests load real (downloaded) models and prepare inputs using torchvisi
**Where to look**: `tests/model_hub_tests/pytorch/test_torchvision_models.py` and similar files in that directory. Focus on `load_model()` — it typically contains model-specific input preparation branches.
+**How to run** (from the repository root; install `tests/model_hub_tests/pytorch/envs/<suite>.txt` first):
+
+```bash
+export PYTHONPATH=$PWD/tests/model_hub_tests:$PYTHONPATH
+export TEST_DEVICE=CPU # default is "CPU;GPU"
+export HF_HUB_CACHE=$HOME/.cache/ov_model_hub/hf HF_HOME=$HOME/.cache/ov_model_hub/hf_home
+export TORCH_HOME=$HOME/.cache/ov_model_hub/torch
+export USE_SYSTEM_CACHE=False # "True" makes some suites wipe HF_HUB_CACHE after each test
+python3 -m pytest tests/model_hub_tests/pytorch/test_timm.py -m precommit -n 4
+python3 -m pytest tests/model_hub_tests/pytorch/test_timm.py -m nightly -k "<model names>"
+```
+
+- Without `HF_HUB_CACHE`, models are downloaded to a temp directory. Set a persistent cache when re-running the same models.
+- Nightly lists (`timm_models`, `torchvision_models`, `hf_transformers_models`, ...) use `name,link[,mark,reason]` with marks `skip`, `xfail`, `xfail_trace`, `xfail_export`. The test IDs include mark and reason, so select cases with `-k <name>`, not by full node ID.
+- The timm list is generated by `filter_timm()` in `test_timm.py`, and `test_models_list_complete` checks it against the installed timm version. After a timm bump, regenerate it with `filter_timm(timm.list_pretrained())` (see `src/frontends/pytorch/README.md`), keep the existing marks, and validate only the new models.
+- CI runs the nightly timm/torchvision step with `-n 4` on a 64 GB runner. Do not add multi-GB models: several workers loading big models at the same time can run the runner out of memory.
+
**Common failure pattern**:
```
diff --git a/.github/agents-prototype/skills/conversion-issues/pytorch.md b/.github/agents-prototype/skills/conversion-issues/pytorch.md
index df5c56eb5fa..b36a35424bc 100644
--- a/.github/agents-prototype/skills/conversion-issues/pytorch.md
+++ b/.github/agents-prototype/skills/conversion-issues/pytorch.md
@@ -78,7 +78,7 @@ All paths are relative to the repository root.
|---|---|
| `tests/layer_tests/pytorch_tests/` | **Python layer tests** — one `test_<op>.py` file per operation. Primary test suite. |
| `tests/layer_tests/pytorch_tests/pytorch_layer_test_class.py` | `PytorchLayerTest` base class. |
-| `tests/model_hub_tests/pytorch/` | Model-level tests for HuggingFace Transformers, TorchVision, etc. |
+| `tests/model_hub_tests/pytorch/` | Model-level tests for HuggingFace Transformers, timm, TorchVision, etc. See "PyTorch Frontend Model Hub Tests" in `src/frontends/pytorch/README.md` for how to run them and set up the model cache. |
### Build Targets
diff --git a/.github/workflows/ubuntu_22.yml b/.github/workflows/ubuntu_22.yml
index 2bac36dbf42..c674f470e8c 100644
--- a/.github/workflows/ubuntu_22.yml
+++ b/.github/workflows/ubuntu_22.yml
@@ -12,6 +12,10 @@ on:
description: 'Target branch for the build; taken from event context by default'
type: string
required: false
+ pytorch-models-nightly:
+ description: 'Run nightly PyTorch model hub tests'
+ type: boolean
+ default: false
pull_request:
types:
- opened
@@ -45,12 +49,29 @@ jobs:
changed_components: "${{ steps.smart_ci.outputs.changed_components }}"
skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"
use_latest_onednn: "${{ steps.onednn_day.outputs.use_latest_onednn }}"
+ pytorch_models_nightly: "${{ steps.pytorch_models_nightly.outputs.changed }}"
steps:
- name: checkout action
uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
with:
sparse-checkout: .github/actions/smart-ci
+ # the PR merge commit and its base parent, to list changed files
+ fetch-depth: 2
+
+ - name: Check if nightly PyTorch model tests are changed
+ id: pytorch_models_nightly
+ if: ${{ github.event_name == 'pull_request' }}
+ # runs before smart-ci action, which re-fetches the repo with depth 1
+ shell: bash
+ run: |
+ if ! files=$(git diff --name-only --no-renames HEAD^1 HEAD); then
+ echo "::warning::Could not list changed files, nightly PyTorch model tests are not triggered"
+ exit 0
+ fi
+ if grep -qE '^(tests/model_hub_tests/(pytorch|models_hub_common)/|\.github/workflows/job_pytorch_models_tests\.yml$)' <<< "$files"; then
+ echo "changed=true" >> "$GITHUB_OUTPUT"
+ fi
- name: Get affected components
id: smart_ci
@@ -469,7 +490,8 @@ jobs:
PyTorch_Models_Tests_Nightly_Scope1:
name: PyTorch Models Nightly Scope1 tests
- if: ${{ github.event_name == 'schedule' }}
+ if: ${{ github.event_name == 'schedule' || inputs.pytorch-models-nightly ||
+ needs.smart_ci.outputs.pytorch_models_nightly == 'true' }}
needs: [ Docker, Build, Smart_CI, Openvino_tokenizers ]
uses: ./.github/workflows/job_pytorch_models_tests.yml
with:
@@ -479,7 +501,8 @@ jobs:
PyTorch_Models_Tests_Nightly_Scope2:
name: PyTorch Models Nightly Scope2 tests
- if: ${{ github.event_name == 'schedule' }}
+ if: ${{ github.event_name == 'schedule' || inputs.pytorch-models-nightly ||
+ needs.smart_ci.outputs.pytorch_models_nightly == 'true' }}
needs: [ Docker, Build, Smart_CI, Openvino_tokenizers ]
uses: ./.github/workflows/job_pytorch_models_tests.yml
with:
diff --git a/src/bindings/python/src/openvino/frontend/pytorch/fx_decoder.py b/src/bindings/python/src/openvino/frontend/pytorch/fx_decoder.py
index 04a9f25db5b..eeb4c73d436 100644
--- a/src/bindings/python/src/openvino/frontend/pytorch/fx_decoder.py
+++ b/src/bindings/python/src/openvino/frontend/pytorch/fx_decoder.py
@@ -221,7 +221,7 @@ class TorchFXPythonDecoder (BaseFXDecoder):
def __init__(self, pt_module, fx_gm=None, nodes=None,
mark_node_callback=None, input_shapes=None,
input_types=None, dynamic_shapes=False,
- op_type_mapping=None):
+ op_type_mapping=None, output_names=None):
super().__init__(mark_node_callback)
self.pt_module = pt_module
self.fx_gm = fx_gm if fx_gm is not None else pt_module
@@ -258,6 +258,8 @@ class TorchFXPythonDecoder (BaseFXDecoder):
elif value.op == "output":
# Instead of putting output index, refer to its target
uargs = self.unpack_containers(value.args)
+ if output_names is not None and len(output_names) == len(uargs):
+ uargs = [(name or arg[0], arg[1]) for name, arg in zip(output_names, uargs)]
self._outputs = [(arg[0], self._nodes.index(arg[1]))
for arg in uargs if arg[1] is not None]
@@ -339,7 +341,37 @@ class TorchFXPythonDecoder (BaseFXDecoder):
gm = exported_program.module()
logger.debug(gm.code)
return cls(gm, dynamic_shapes=dynamic_shapes,
- op_type_mapping=op_type_mapping)
+ op_type_mapping=op_type_mapping,
+ output_names=cls._output_names_from_spec(exported_program.call_spec.out_spec))
+
+ @staticmethod
+ def _output_names_from_spec(out_spec):
+ """Name flattened outputs by their dict keys, the graph output node has no containers."""
+ if out_spec is None:
+ return None
+ try:
+ from torch.utils._pytree import MappingKey, tree_flatten_with_path, tree_unflatten
+ except ImportError:
+ return None
+ paths, _ = tree_flatten_with_path(tree_unflatten(list(range(out_spec.num_leaves)), out_spec))
+ return [str(path[-1].key) if path and isinstance(path[-1], MappingKey) else ""
+ for path, _ in paths]
+
+ def _named_outputs(self):
+ """Map output node index to its name, skipping ambiguous names and names of other nodes."""
+ names_by_idx = {}
+ idxs_by_name = {}
+ for name, idx in self._outputs:
+ if name:
+ names_by_idx.setdefault(idx, set()).add(name)
+ idxs_by_name.setdefault(name, set()).add(idx)
+ node_idx_by_name = {node.name: i for i, node in enumerate(self._nodes)}
+ named = {}
+ for idx, names in names_by_idx.items():
+ name = next(iter(names))
+ if len(names) == 1 and len(idxs_by_name[name]) == 1 and node_idx_by_name.get(name, idx) == idx:
+ named[idx] = name
+ return named
@classmethod
def from_model(
@@ -590,6 +622,7 @@ class TorchFXPythonDecoder (BaseFXDecoder):
raise RuntimeError("This input is not a Node")
def visit_subgraph(self, node_visitor):
+ output_names = self._named_outputs()
# make sure topological order is satisfied
for node in self._nodes:
if node.op in {"placeholder", "output"}:
@@ -606,6 +639,10 @@ class TorchFXPythonDecoder (BaseFXDecoder):
node, self.fx_gm, self._nodes,
mark_node_callback=self.mark_node_callback,
op_type_mapping=self._module_extension_target_ops)
+ node_idx = decoder._outputs[0][1]
+ if node_idx in output_names:
+ # model output tensor gets its name, e.g. key of the returned dict
+ decoder._outputs = [(output_names[node_idx], node_idx)]
self.m_decoders.append(decoder)
node_visitor(decoder)
diff --git a/src/frontends/pytorch/README.md b/src/frontends/pytorch/README.md
index 82c2b148850..615015e1689 100644
--- a/src/frontends/pytorch/README.md
+++ b/src/frontends/pytorch/README.md
@@ -148,6 +148,56 @@ To test the entire suite of the PyTorch operation set support, run the following
python -m pytest layer_tests/pytorch_tests
```
+To run the layer tests with the `torch.export` (FX) conversion path, use:
+```bash
+PYTORCH_TRACING_MODE=EXPORT python -m pytest layer_tests/pytorch_tests -m precommit_torch_export
+```
+
+### PyTorch Frontend Model Hub Tests
+
+The model hub tests in [tests/model_hub_tests/pytorch](../../../tests/model_hub_tests/pytorch)
+download real models (timm, torchvision, HuggingFace, etc.), convert them, and compare
+inference results with PyTorch. Each test file has its own requirements in
+[envs](../../../tests/model_hub_tests/pytorch/envs), for example:
+```bash
+python -m pip install -r tests/requirements_pytorch -r tests/model_hub_tests/pytorch/envs/timm.txt
+```
+
+Tests are split into `precommit` (a few small models) and `nightly` (full model lists)
+scopes. Run them from the repository root with `tests/model_hub_tests` in `PYTHONPATH`:
+```bash
+export PYTHONPATH=$PWD/tests/model_hub_tests:$PYTHONPATH
+export TEST_DEVICE=CPU # default is "CPU;GPU"
+python -m pytest tests/model_hub_tests/pytorch/test_timm.py -m precommit
+python -m pytest tests/model_hub_tests/pytorch/test_timm.py -m nightly -k "convnext_atto or vit_tiny"
+```
+
+Model caches:
+- HuggingFace models (including timm weights) are stored in `HF_HUB_CACHE`, which
+ defaults to a directory under the system temp directory. Set `HF_HUB_CACHE` (and `HF_HOME`)
+ to a persistent directory to reuse downloaded models between runs.
+- Torch Hub models (torchvision) are stored in `TORCH_HOME`.
+- Some tests (for example `test_hf_transformers.py`) remove the content of `HF_HUB_CACHE`
+ after each test if `USE_SYSTEM_CACHE=True`. Keep `USE_SYSTEM_CACHE=False` (default) when
+ you want to reuse the cache.
+
+Nightly model lists (for example [timm_models](../../../tests/model_hub_tests/pytorch/timm_models))
+have the format `name,link[,mark,reason]`, where `mark` is one of `skip`, `xfail`,
+`xfail_trace` or `xfail_export`. The timm list is generated from `timm.list_pretrained()`
+by `filter_timm` in [test_timm.py](../../../tests/model_hub_tests/pytorch/test_timm.py),
+which keeps the smallest pretrained variant of each architecture;
+`test_models_list_complete` checks that the list matches the installed timm version.
+To regenerate it after a timm version update:
+```bash
+cd tests/model_hub_tests/pytorch
+python -c "import timm; from test_timm import filter_timm; print('\n'.join(f'{m},None' for m in filter_timm(timm.list_pretrained())))"
+```
+Then restore the marks for models that are still in the list.
+
+Nightly tests run in parallel in CI (`pytest -n 4`) on a limited-memory runner, so avoid
+adding very large models: each worker loads the PyTorch model, converts it, and runs both
+models at the same time.
+
### Investigation of accuracy issues
Accuracy issues can be caused by incorrect graph returned by `torch.jit.trace`
diff --git a/src/frontends/pytorch/src/op/meshgrid.cpp b/src/frontends/pytorch/src/op/meshgrid.cpp
index cf2a4fc3c1d..c471c6bf740 100644
--- a/src/frontends/pytorch/src/op/meshgrid.cpp
+++ b/src/frontends/pytorch/src/op/meshgrid.cpp
@@ -2,21 +2,57 @@
// SPDX-License-Identifier: Apache-2.0
//
+#include "helper_ops/internal_op.hpp"
#include "openvino/frontend/pytorch/node_context.hpp"
+#include "openvino/frontend/sequence_mark.hpp"
+#include "openvino/pass/node_registry.hpp"
#include "pt_framework_node.hpp"
+#include "utils.hpp"
namespace ov::frontend::pytorch::op {
OutputVector translate_meshgrid(const NodeContext& context) {
+ // aten::meshgrid(Tensor[] tensors, str? indexing) in TorchScript, indexing is kwarg-only in FX.
+ num_inputs_check(context, 1, 2);
std::string indexing = "ij";
if (!context.input_is_none(1)) {
indexing = context.const_input<std::string>(1);
+ } else if (context.has_attribute("indexing")) {
+ indexing = context.get_attribute<std::string>("indexing");
}
- auto node = std::make_shared<PtFrameworkNode>(context.get_decoder(), context.inputs(), context.get_output_size());
- auto attrs = node->get_attrs();
+ PYTORCH_OP_CONVERSION_CHECK(indexing == "ij" || indexing == "xy",
+ "aten::meshgrid: unsupported indexing mode: ",
+ indexing);
+ if (const auto list = ov::as_type_ptr<SequenceMark>(context.get_input(0).get_node_shared_ptr())) {
+ ov::pass::NodeRegistry rg;
+ const auto outputs = build_meshgrid(rg, list->get_sequence(), indexing);
+ context.mark_nodes(rg.get());
+ return {context.mark_node(make_list_construct(outputs))};
+ }
+
+ // Unresolved list input: defer to PrimListUnpackReplacer.
+ const bool is_fx = context.get_op_type() != "aten::meshgrid";
+ std::shared_ptr<PtFrameworkNode> meshgrid;
+ if (is_fx) {
+ meshgrid = std::make_shared<PtFrameworkNode>(std::make_shared<InternalOpDecoder>("aten::meshgrid", 1),
+ OutputVector{context.get_input(0)});
+ } else {
+ meshgrid =
+ std::make_shared<PtFrameworkNode>(context.get_decoder(), context.inputs(), context.get_output_size());
+ }
+ auto attrs = meshgrid->get_attrs();
attrs["indexing"] = indexing;
- node->set_attrs(attrs);
- return context.mark_node(node)->outputs();
+ meshgrid->set_attrs(attrs);
+ context.mark_node(meshgrid);
+ if (!is_fx) {
+ return meshgrid->outputs();
+ }
+ // FX has no prim::ListUnpack, so build the TorchScript pattern resolved by PrimListUnpackReplacer.
+ const auto count = context.get_decoder()->output_list_size();
+ auto unpack = context.mark_node(
+ std::make_shared<PtFrameworkNode>(std::make_shared<InternalOpDecoder>("prim::ListUnpack", count),
+ meshgrid->outputs()));
+ return {context.mark_node(make_list_construct(unpack->outputs()))};
};
} // namespace ov::frontend::pytorch::op
diff --git a/src/frontends/pytorch/src/op_table.cpp b/src/frontends/pytorch/src/op_table.cpp
index 28db6b42c73..c80dd622646 100644
--- a/src/frontends/pytorch/src/op_table.cpp
+++ b/src/frontends/pytorch/src/op_table.cpp
@@ -924,6 +924,8 @@ const std::unordered_map<std::string, CreatorFunction> get_supported_ops_fx() {
{"aten.log_sigmoid_forward.default", op::translate_log_sigmoid_fx},
{"aten.mean.default", op::translate_mean_fx},
{"aten.mean.dim", op::translate_mean_fx},
+ {"aten.meshgrid.default", op::translate_meshgrid},
+ {"aten.meshgrid.indexing", op::translate_meshgrid},
{"aten.native_batch_norm.default", op::translate_batch_norm_legit_fx},
{"aten.native_dropout.default", op::skip_node},
{"aten.native_group_norm.default", op::translate_group_norm_fx},
diff --git a/src/frontends/pytorch/src/transforms/prim_list_unpack_replacer.cpp b/src/frontends/pytorch/src/transforms/prim_list_unpack_replacer.cpp
index 47bf674503f..22232f960ab 100644
--- a/src/frontends/pytorch/src/transforms/prim_list_unpack_replacer.cpp
+++ b/src/frontends/pytorch/src/transforms/prim_list_unpack_replacer.cpp
@@ -264,34 +264,7 @@ PrimListUnpackReplacer::PrimListUnpackReplacer() {
return false;
}
- if (indexing == "xy" && meshgrid_inputs.size() >= 2) {
- std::swap(meshgrid_inputs[0], meshgrid_inputs[1]);
- }
- NodeVector cat_shapes{};
- NodeVector reshapes{};
- auto const_neg_1 = v0::Constant::create(element::i32, Shape{1}, {-1});
- auto const_1 = v0::Constant::create(element::i32, Shape{1}, {1});
- int input_idx = 0;
- for (auto& input : meshgrid_inputs) {
- auto reshaped_input = rg.make<v1::Reshape>(input, const_neg_1, false);
- auto shape = rg.make<v3::ShapeOf>(reshaped_input, element::i32);
- cat_shapes.push_back(shape);
- NodeVector cat_inputs(meshgrid_inputs.size(), const_1);
- cat_inputs[input_idx] = shape;
- input_idx++;
- auto input_cat = rg.make<v0::Concat>(cat_inputs, 0);
- auto reshape_cat = rg.make<v1::Reshape>(reshaped_input, input_cat, false);
- reshapes.push_back(reshape_cat);
- }
- auto cat = rg.make<v0::Concat>(cat_shapes, 0);
- OutputVector outputs{};
- for (auto& reshape : reshapes) {
- auto out = rg.make<v3::Broadcast>(reshape, cat, ov::op::BroadcastType::BIDIRECTIONAL);
- outputs.push_back(out);
- }
- if (indexing == "xy" && outputs.size() >= 2) {
- std::swap(outputs[0], outputs[1]);
- }
+ auto outputs = build_meshgrid(rg, meshgrid_inputs, indexing);
copy_runtime_info_and_name(list_unpack, rg.get(), {input_node, seq_mark_input});
replace_node(list_unpack, outputs);
return true;
diff --git a/src/frontends/pytorch/src/utils.cpp b/src/frontends/pytorch/src/utils.cpp
index 7bab2a5cd55..6813cd41f22 100644
--- a/src/frontends/pytorch/src/utils.cpp
+++ b/src/frontends/pytorch/src/utils.cpp
@@ -1033,6 +1033,35 @@ OutputVector build_static_max_pool(ov::pass::NodeRegistry& rg,
}
}
+OutputVector build_meshgrid(ov::pass::NodeRegistry& rg, OutputVector inputs, const std::string& indexing) {
+ const bool xy = indexing == "xy" && inputs.size() >= 2;
+ if (xy) {
+ std::swap(inputs[0], inputs[1]);
+ }
+ NodeVector cat_shapes;
+ NodeVector reshapes;
+ auto const_neg_1 = v0::Constant::create(element::i32, Shape{1}, {-1});
+ auto const_1 = v0::Constant::create(element::i32, Shape{1}, {1});
+ for (size_t i = 0; i < inputs.size(); ++i) {
+ auto reshaped_input = rg.make<v1::Reshape>(inputs[i], const_neg_1, false);
+ auto shape = rg.make<v3::ShapeOf>(reshaped_input, element::i32);
+ cat_shapes.push_back(shape);
+ NodeVector cat_inputs(inputs.size(), const_1);
+ cat_inputs[i] = shape;
+ auto input_cat = rg.make<v0::Concat>(cat_inputs, 0);
+ reshapes.push_back(rg.make<v1::Reshape>(reshaped_input, input_cat, false));
+ }
+ auto cat = rg.make<v0::Concat>(cat_shapes, 0);
+ OutputVector outputs;
+ for (const auto& reshape : reshapes) {
+ outputs.push_back(rg.make<v3::Broadcast>(reshape, cat, ov::op::BroadcastType::BIDIRECTIONAL));
+ }
+ if (xy) {
+ std::swap(outputs[0], outputs[1]);
+ }
+ return outputs;
+}
+
Output<Node> flatten(ov::pass::NodeRegistry& rg, const Output<Node>& value, size_t axis) {
// First dimension of output tensor is the product of [d_0, ... d_{axis-1}] dimensions of
// input tensor. The last dimension is the product of the rest of input tensor dimensions:
diff --git a/src/frontends/pytorch/src/utils.hpp b/src/frontends/pytorch/src/utils.hpp
index 8b18380c6dd..7f2278f9e3d 100644
--- a/src/frontends/pytorch/src/utils.hpp
+++ b/src/frontends/pytorch/src/utils.hpp
@@ -226,6 +226,9 @@ std::pair<Output<Node>, Output<Node>> build_multi_head_attention(const NodeConte
Output<Node> flatten(ov::pass::NodeRegistry& rg, const Output<Node>& value, size_t axis);
+// Decomposition of aten::meshgrid, indexing must be "ij" or "xy".
+OutputVector build_meshgrid(ov::pass::NodeRegistry& rg, OutputVector inputs, const std::string& indexing);
+
bool index_tensor_on_list(ov::pass::NodeRegistry& rg,
const Output<Node>& data,
const ov::OutputVector& indices,
diff --git a/tests/layer_tests/pytorch_tests/test_dict.py b/tests/layer_tests/pytorch_tests/test_dict.py
index e3dc08bd84d..74cf694071e 100644
--- a/tests/layer_tests/pytorch_tests/test_dict.py
+++ b/tests/layer_tests/pytorch_tests/test_dict.py
@@ -86,3 +86,63 @@ class TestDictParamMixed(PytorchLayerTest):
# Regression: ensure dict parameter resolution does not drop unrelated inputs
self._test(aten_dict_mixed_inputs(), "aten::__getitem__", ie_device, precision,
ir_version, trace_model=True, freeze_model=False)
+
+
+class dict_out_single(torch.nn.Module):
+ def forward(self, x):
+ return {"out": x.relu()}
+
+
+class dict_out_nested(torch.nn.Module):
+ def forward(self, x):
+ return {"a": x + 1, "inner": {"b": x * 2, "c": x - 1}}, x / 2
+
+
+class dict_out_duplicated(torch.nn.Module):
+ def forward(self, x):
+ y = x + 1
+ return {"a": y, "b": y, "c": x * 3}
+
+
+class dict_out_same_nested_key(torch.nn.Module):
+ def forward(self, x):
+ return {"p": {"k": x + 1}, "q": {"k": x + 2}}
+
+
+class dict_out_node_name_key(torch.nn.Module):
+ def forward(self, x):
+ # "mul" and "x" are also names of graph nodes
+ return {"mul": x * 2 + 1, "x": x - 1}
+
+
[email protected]_torch_export
[email protected]("model,keys,expected_names", [
+ (dict_out_single, {"out"}, ["out"]),
+ (dict_out_nested, {"a", "inner", "b", "c"}, ["a", "b", "c", None]),
+ # one tensor under several keys can't get a single name
+ (dict_out_duplicated, {"a", "b", "c"}, [None, None, "c"]),
+ (dict_out_same_nested_key, {"p", "q", "k"}, [None, None]),
+ (dict_out_node_name_key, {"mul", "x"}, [None, None]),
+], ids=["single", "nested", "duplicated", "same_nested_key", "node_name_key"])
+def test_dict_output_names_export(model, keys, expected_names, ie_device, precision):
+ import numpy as np
+ from openvino import compile_model, convert_model
+ from torch.utils._pytree import tree_leaves
+
+ x = torch.randn(2, 5, 3, 4)
+ m = model()
+ ov_model = convert_model(torch.export.export(m, (x,)))
+ fw_res = tree_leaves(m(x))
+ assert len(ov_model.outputs) == len(expected_names)
+ for ov_out, expected in zip(ov_model.outputs, expected_names):
+ names = ov_out.get_names()
+ if expected is None:
+ assert not names & keys, f"unexpected dict key in output names: {names}"
+ else:
+ assert expected in names, names
+ compiled = compile_model(ov_model, ie_device, {"INFERENCE_PRECISION_HINT": "f32"})
+ ov_res = compiled(x.numpy())
+ for i, expected in enumerate(expected_names):
+ out = compiled.output(expected) if expected else compiled.output(i)
+ np.testing.assert_allclose(ov_res[out], fw_res[i].numpy(), rtol=1e-5, atol=1e-5)
diff --git a/tests/layer_tests/pytorch_tests/test_listunpack.py b/tests/layer_tests/pytorch_tests/test_listunpack.py
index 61b66f2b19f..52624f05aeb 100644
--- a/tests/layer_tests/pytorch_tests/test_listunpack.py
+++ b/tests/layer_tests/pytorch_tests/test_listunpack.py
@@ -191,9 +191,10 @@ class TestMeshgridListUnpack(PytorchLayerTest):
@pytest.mark.parametrize("inp", [1, 2, 3, 4])
@pytest.mark.nightly
@pytest.mark.precommit
+ @pytest.mark.precommit_torch_export
def test_meshgrid_listunpack(self, idx, inp, ie_device, precision, ir_version):
func = getattr(self, f"create_model_meshgrid_listunpack_{inp}_in")
- self._test(*func(idx), ie_device, precision, ir_version)
+ self._test(*func(idx), ie_device, precision, ir_version, fx_kind="aten.meshgrid")
class TestMeshgridListUnpackStack(PytorchLayerTest):
@@ -215,8 +216,43 @@ class TestMeshgridListUnpackStack(PytorchLayerTest):
@pytest.mark.nightly
@pytest.mark.precommit
+ @pytest.mark.precommit_torch_export
def test_meshgrid_subgraph(self, ie_device, precision, ir_version):
- self._test(*self.create_model(), ie_device, precision, ir_version)
+ self._test(*self.create_model(), ie_device, precision, ir_version,
+ fx_kind=["aten.meshgrid", "aten.stack"],
+ dynamic_shapes_for_export={"x": (torch.export.Dim.DYNAMIC, torch.export.Dim.DYNAMIC)})
+
+
+class TestMeshgridListConsumers(PytorchLayerTest):
+ def _prepare_input(self):
+ return (self.random.randn(3), self.random.randn(5), self.random.randn(2))
+
+ def create_model(self, consumer, indexing):
+ class meshgrid_model(torch.nn.Module):
+ def __init__(self, consumer, indexing):
+ super().__init__()
+ self.consumer = consumer
+ self.indexing = indexing
+
+ def forward(self, x, y, z):
+ grids = torch.meshgrid([x, y, z], indexing=self.indexing)
+ if self.consumer == "stack":
+ return torch.stack(grids, dim=-1)
+ if self.consumer == "cat":
+ return torch.cat(grids, dim=0)
+ return grids[1] + 1
+
+ fx_kind = ["aten.meshgrid"] if consumer == "getitem" else ["aten.meshgrid", f"aten.{consumer}"]
+ return meshgrid_model(consumer, indexing), ["aten::meshgrid"], fx_kind
+
+ @pytest.mark.parametrize("consumer", ["stack", "cat", "getitem"])
+ @pytest.mark.parametrize("indexing", ["ij", "xy"])
+ @pytest.mark.nightly
+ @pytest.mark.precommit
+ @pytest.mark.precommit_torch_export
+ def test_meshgrid_list_consumers(self, consumer, indexing, ie_device, precision, ir_version):
+ model, kind, fx_kind = self.create_model(consumer, indexing)
+ self._test(model, kind, ie_device, precision, ir_version, fx_kind=fx_kind)
class TestListUnpackParameterSingle(PytorchLayerTest):
diff --git a/tests/model_hub_tests/pytorch/envs/timm.txt b/tests/model_hub_tests/pytorch/envs/timm.txt
index eb1601f1e6e..acd6a2abaf1 100644
--- a/tests/model_hub_tests/pytorch/envs/timm.txt
+++ b/tests/model_hub_tests/pytorch/envs/timm.txt
@@ -1,2 +1,2 @@
# Extra dependencies for test_timm.py
-timm==1.0.24
+timm==1.0.30
diff --git a/tests/model_hub_tests/pytorch/hf_transformers_models b/tests/model_hub_tests/pytorch/hf_transformers_models
index 602093344d6..5e1c5ce8274 100644
--- a/tests/model_hub_tests/pytorch/hf_transformers_models
+++ b/tests/model_hub_tests/pytorch/hf_transformers_models
@@ -56,7 +56,7 @@ distilbert,distilbert/distilbert-base-uncased-finetuned-sst-2-english
donut-swin,pasusarla/donut_encoder
dpr,facebook/dpr-question_encoder-single-nq-base
dpt,Intel/dpt-large
-efficientformer,DunnBC22/efficientformer-l3-300-Brain_Tumors_Image_Classification
+efficientformer,snap-research/efficientformer-l1-300
efficientnet,google/efficientnet-b7,xfail,Compile error: AvgPool: Kernel after dilation has size (dim: 2560) larger than the data shape after padding (dim: 19) at axis 0.
electra,google/electra-base-discriminator
encodec,facebook/encodec_24khz
diff --git a/tests/model_hub_tests/pytorch/test_llm.py b/tests/model_hub_tests/pytorch/test_llm.py
index be9d8be2a87..a8a348dcdc1 100644
--- a/tests/model_hub_tests/pytorch/test_llm.py
+++ b/tests/model_hub_tests/pytorch/test_llm.py
@@ -725,8 +725,12 @@ class TestLLMModel(TestTorchConvertModel):
("cohere_gptq", "shuyuej/aya-23-8B-GPTQ"),
("mbart_gptq", "Shivam098/opt-translation"),
("llama_awq", "TheBloke/open-llama-3b-v2-wizard-evol-instuct-v2-196k-AWQ"),
- ("qwen3_compressed_tensors",
- "cyankiwi/Qwen3.5-4B-AWQ-4bit"), # repo name is misleading; config has quant_method=compressed-tensors
+ # repo name is misleading; config has quant_method=compressed-tensors
+ pytest.param("qwen3_compressed_tensors", "cyankiwi/Qwen3.5-4B-AWQ-4bit",
+ marks=pytest.mark.xfail(
+ reason="Multimodal checkpoint: transformers<5.8 drops its quantization_config in "
+ "AutoModelForCausalLM (huggingface/transformers#45494); newer versions load it, "
+ "but ignore-list names don't match, so linear_attn.in_proj_a/b are initialized randomly")),
])
@pytest.mark.nightly
def test_convert_model_nightly(self, name, type, ie_device):
diff --git a/tests/model_hub_tests/pytorch/test_timm.py b/tests/model_hub_tests/pytorch/test_timm.py
index faac2930a80..23469a5570a 100644
--- a/tests/model_hub_tests/pytorch/test_timm.py
+++ b/tests/model_hub_tests/pytorch/test_timm.py
@@ -14,13 +14,17 @@ from torch_utils import TestTorchConvertModel
def filter_timm(timm_list: list) -> list:
- size_tokens = {
+ # ordered from smallest to largest
+ size_list = [
"zepto", "atto", "femto", "pico", "nano", "micro", "xxtiny", "xxsmall",
- "xxs", "xtiny", "xsmall", "xs", "tiny", "s", "mini", "small", "lite",
+ "xxs", "xtiny", "xsmall", "xs", "tiny", "t", "s", "mini", "small", "lite",
"medium", "m", "base", "big", "large", "l", "xlarge", "xl", "xxlarge",
- "huge", "gigantic", "giant", "enormous",
- }
- size_order = {token: idx for idx, token in enumerate(sorted(size_tokens))}
+ "huge", "h", "gigantic", "giant", "enormous",
+ ]
+ size_tokens = set(size_list)
+ # size only if the name has no other size token, e.g. "iformer_h" but not "regnetz_040_h"
+ contextual_size_tokens = {"t", "h"}
+ size_order = {token: idx for idx, token in enumerate(size_list)}
size_aliases = {
"mediumd": "medium",
"minimal": "mini",
@@ -28,14 +32,18 @@ def filter_timm(timm_list: list) -> list:
"xx": "xxs",
}
resolution_pattern = re.compile(r"^(?:r)?(\d{2,4})(?:p)?$")
- prefixed_size_pattern = re.compile(r"^([a-z]{1,3})(\d{1,3})$")
+ prefixed_size_pattern = re.compile(r"^([a-z]{1,3})(\d{1,3})(?:pt\d+)?$")
+ # parameter count, e.g. "300m", "7b", "so400m"
+ param_count_pattern = re.compile(r"^(?:so)?(\d+)([mb])$")
+ # depth/cardinality x width multiplier, e.g. "50x1", "152x4", "32x8d"
+ width_multiplier_pattern = re.compile(r"^(\d+)x(\d+)d?$")
operation_hint_substrings = (
"bias", "bn", "gn", "ln", "gap", "cls", "dw", "fused", "mlp",
"rope", "attn", "msa", "mha", "retro", "stem", "patch", "token",
"shift", "gated",
)
size_prefixes = {
- "b", "l", "m", "s", "t", "x", "n", "h", "w", "g", "p",
+ "b", "l", "m", "s", "t", "x", "n", "h", "w", "g", "p", "f", "e",
"xl", "xx", "xs", "xt",
}
@@ -45,13 +53,32 @@ def filter_timm(timm_list: list) -> list:
if not name:
continue
normalized = name.replace("xx_small", "xxsmall").replace("x_small", "xsmall")
+ normalized = normalized.replace("tiny_vit", "tinyvit")
+ # split width multiplier from depth, e.g. "resnet50x4_clip" -> "resnet50_x4_clip",
+ # "resnet50_clip" -> "resnet50_x1_clip"
+ normalized = re.sub(r"(resnet\d+)(?:x(\d+))?(?=_clip)",
+ lambda m: f"{m.group(1)}_x{m.group(2) or 1}", normalized)
normalized = normalized.replace('-', '_').replace('/', '_').lower()
tokens.extend(token for token in normalized.split("_") if token)
return tokens
- def is_size_like(token: str) -> bool:
+ def param_count_millions(token: str) -> float | None:
+ match = param_count_pattern.match(token)
+ if not match:
+ return None
+ return float(match.group(1)) * (1000.0 if match.group(2) == "b" else 1.0)
+
+ def width_multiplier(token: str) -> float | None:
+ match = width_multiplier_pattern.match(token)
+ return float(match.group(1)) * float(match.group(2)) if match else None
+
+ def is_size_like(token: str, allow_contextual: bool = True) -> bool:
token = size_aliases.get(token, token)
- if token in size_tokens:
+ if token in contextual_size_tokens:
+ return allow_contextual
+ if token in size_tokens or param_count_millions(token) is not None:
+ return True
+ if width_multiplier(token) is not None:
return True
if token.isdigit() or resolution_pattern.match(token):
return True
@@ -60,6 +87,9 @@ def filter_timm(timm_list: list) -> list:
return not any(hint in token for hint in operation_hint_substrings)
return False
+ def allows_contextual(tokens: list[str]) -> bool:
+ return not any(is_size_like(tok, allow_contextual=False) for tok in tokens)
+
def architecture_signature(cfg, model_name: str) -> str:
base_name = model_name.split(".")[0]
arch_tokens = split_tokens(
@@ -68,18 +98,31 @@ def filter_timm(timm_list: list) -> list:
(getattr(cfg, "meta", None) or {}).get("variant") if cfg else None,
)
fallback = arch_tokens or split_tokens(base_name)
- filtered = [size_aliases.get(tok, tok) for tok in arch_tokens if not is_size_like(tok)]
+ allow_contextual = allows_contextual(arch_tokens)
+ filtered = [size_aliases.get(tok, tok) for tok in arch_tokens if not is_size_like(tok, allow_contextual)]
canonical = filtered or fallback
unique = list(dict.fromkeys(canonical)) # preserve order
return "_".join(unique) if unique else base_name.lower()
def size_rank_from_name(model_name: str) -> tuple[float, float]:
rank = (2.0, float("inf"))
- for token in split_tokens(model_name.split(".")[0]):
+ tokens = split_tokens(model_name.split(".")[0])
+ allow_contextual = allows_contextual(tokens)
+ for token in tokens:
normalized = size_aliases.get(token, token)
+ if normalized in contextual_size_tokens and not allow_contextual:
+ continue
if normalized in size_order:
rank = min(rank, (0.0, float(size_order[normalized])))
continue
+ params = param_count_millions(normalized)
+ if params is not None:
+ rank = min(rank, (1.5, params))
+ continue
+ width = width_multiplier(normalized)
+ if width is not None:
+ rank = min(rank, (1.5, width))
+ continue
match = prefixed_size_pattern.match(normalized)
if match and match.group(1) in size_prefixes:
rank = min(rank, (1.0, float(match.group(2))))
@@ -126,6 +169,9 @@ class TestTimmConvertModel(TestTorchConvertModel):
# Use same batch as example because the FX decoder does not
# fully propagate symbolic batch through reshape ops yet.
self.inputs = (torch.randn([2] + shape),)
+ if model_name.startswith("convit"):
+ # convit caches rel_indices in the first forward, which makes tracing checks fail
+ m(*self.example)
return m
def infer_fw_model(self, model_obj, inputs):
diff --git a/tests/model_hub_tests/pytorch/test_torchbench.py b/tests/model_hub_tests/pytorch/test_torchbench.py
index 86700d817e1..9961e434d7c 100644
--- a/tests/model_hub_tests/pytorch/test_torchbench.py
+++ b/tests/model_hub_tests/pytorch/test_torchbench.py
@@ -31,10 +31,31 @@ class TestTorchbenchmarkConvertModel(TestTorchConvertModel):
f"git clone https://github.com/pytorch/benchmark.git {self.repo_dir.name}")
subprocess.check_call(
["git", "checkout", "364420aeca07d9519840a5b6e771035e4dff9d72"], cwd=self.repo_dir.name)
+ # torchaudio has no builds for recent torch and tested models don't need it
+ deps_file = os.path.join(self.repo_dir.name, "utils", "__init__.py")
+ with open(deps_file) as f:
+ deps = f.read()
+ with open(deps_file, "w") as f:
+ f.write(deps.replace('"torchvision", "torchaudio"]', '"torchvision"]'))
+ # some model deps (e.g. visdom) are sdists importing pkg_resources, removed in setuptools 81
+ build_constraints = os.path.join(self.repo_dir.name, "build_constraints.txt")
+ with open(build_constraints, "w") as f:
+ f.write("setuptools<81\n")
+ # pip>=25.3 uses PIP_BUILD_CONSTRAINT for isolated builds, older pip uses PIP_CONSTRAINT
+ os.environ["PIP_BUILD_CONSTRAINT"] = build_constraints
+ os.environ["PIP_CONSTRAINT"] = build_constraints
+ # build legacy setup.py packages in isolation, so setuptools plugins from the test env
+ # (e.g. kernels egg_info writer) are not loaded
+ os.environ["PIP_USE_PEP517"] = "1"
def load_model(self, model_name, model_link):
subprocess.check_call([sys.executable, "install.py"] + [model_name], cwd=self.repo_dir.name)
sys.path.append(self.repo_dir.name)
+ import numpy as np
+ if int(np.__version__.split(".")[0]) >= 2:
+ # maml inputs are pickled with numpy<2 path, which weights_only load doesn't map to numpy._core
+ torch.serialization.add_safe_globals(
+ [(np._core.multiarray._reconstruct, "numpy.core.multiarray._reconstruct")])
from torchbenchmark import load_model_by_name
try:
model_cls = load_model_by_name(
diff --git a/tests/model_hub_tests/pytorch/timm_models b/tests/model_hub_tests/pytorch/timm_models
index d5fea857fe0..62b820ad0cf 100644
--- a/tests/model_hub_tests/pytorch/timm_models
+++ b/tests/model_hub_tests/pytorch/timm_models
@@ -1,6 +1,4 @@
-aimv2_1b_patch14_224.apple_pt,None
-aimv2_3b_patch14_224.apple_pt,None
-aimv2_huge_patch14_224.apple_pt,None
+aimv2_large_patch14_224.apple_pt,None
bat_resnext26ts.ch_in1k,None
beit3_base_patch16_224.pt,None
beit_base_patch16_224.in22k_ft_in22k,None
@@ -10,14 +8,14 @@ caformer_s18.sail_in1k,None
cait_s24_224.fb_dist_in1k,None
cait_xxs24_224.fb_dist_in1k,None
cait_xxs36_224.fb_dist_in1k,None
-coat_lite_mini.in1k,None
+coat_tiny.in1k,None
coatnet_bn_0_rw_224.sw_in1k,None
coatnet_nano_rw_224.sw_in1k,None
coatnet_rmlp_1_rw2_224.sw_in12k,None
coatnet_rmlp_nano_rw_224.sw_in1k,None
coatnext_nano_rw_224.sw_in1k,None
convformer_s18.sail_in1k,None
-convit_base.fb_in1k,None
+convit_tiny.fb_in1k,None
convmixer_1024_20_ks9_p14.in1k,None
convmixer_768_32.in1k,None
convnext_atto.d2_in1k,None
@@ -27,28 +25,33 @@ convnext_tiny_hnf.a2h_in1k,None
convnext_zepto_rms.ra4_e3600_r224_in1k,None
convnext_zepto_rms_ols.ra4_e3600_r224_in1k,None
convnextv2_atto.fcmae,None
+cpubone_b0_bfrobust.r224_in1k,None
+cpubone_b1_dwnorm.timm_r256_in1k,None
+cpubone_nano.r224_in1k,None
crossvit_9_dagger_240.in1k,None
-crossvit_base_240.in1k,None
-cs3darknet_focus_l.c2ns_in1k,None
-cs3darknet_l.c2ns_in1k,None
+crossvit_tiny_240.in1k,None
+cs3darknet_focus_s.ra4_e3600_r256_in1k,None
+cs3darknet_m.c2ns_in1k,None
cs3darknet_x.c2ns_in1k,None
cs3edgenet_x.c2_in1k,None
cs3se_edgenet_x.c2ns_in1k,None
cs3sedarknet_l.c2ns_in1k,None
cs3sedarknet_x.c2ns_in1k,None
-csatv2.r512_in1k,None
csatv2_21m.sw_r512_in1k,None,xfail_export,CPU reshape failure during export inference
cspdarknet53.ra_in1k,None
cspresnet50.ra_in1k,None
cspresnext50.ra_in1k,None
darknet53.c2ns_in1k,None
darknetaa53.c2ns_in1k,None
-davit_base.msft_in1k,None
davit_base_fl.msft_florence2,None
-deit3_base_patch16_224.fb_in1k,None
+davit_tiny.msft_in1k,None
+deepseek_vit_412m.deepseek_v4_flash_vision_exp,None
+deepseek_vit_412m_align.deepseek_v4_flash_vision_exp,None
+deepseek_vit_412m_enc.deepseek_v4_flash_vision_exp,None
deit3_huge_patch14_224.fb_in1k,None
-deit_base_distilled_patch16_224.fb_in1k,None
-deit_base_patch16_224.fb_in1k,None
+deit3_small_patch16_224.fb_in1k,None
+deit_tiny_distilled_patch16_224.fb_in1k,None
+deit_tiny_patch16_224.fb_in1k,None
densenet121.ra_in1k,None
densenet161.tv_in1k,None
densenet169.tv_in1k,None
@@ -67,12 +70,6 @@ dla60_res2next.in1k,None
dla60x.in1k,None
dla60x_c.in1k,None
dm_nfnet_f0.dm_in1k,None
-dm_nfnet_f1.dm_in1k,None
-dm_nfnet_f2.dm_in1k,None
-dm_nfnet_f3.dm_in1k,None
-dm_nfnet_f4.dm_in1k,None
-dm_nfnet_f5.dm_in1k,None
-dm_nfnet_f6.dm_in1k,None
dpn107.mx_in1k,None
dpn131.mx_in1k,None
dpn68.mx_in1k,None
@@ -92,8 +89,8 @@ ecaresnet50d.miil_in1k,None
ecaresnet50d_pruned.miil_in1k,None
ecaresnet50t.a3_in1k,None
ecaresnetlight.miil_in1k,None
-edgenext_base.usi_in1k,None
edgenext_small_rw.sw_in1k,None
+edgenext_xx_small.in1k,None
efficientformer_l1.snap_dist_in1k,None
efficientformerv2_l.snap_dist_in1k,None
efficientnet_b0.ra_in1k,None
@@ -106,18 +103,19 @@ efficientnet_es_pruned.in1k,None
efficientnet_h_b5.sw_r448_e450_in1k,None
efficientnet_lite0.ra_in1k,None
efficientnet_x_b5.sw_r448_e450_in1k,None
-efficientnetv2_rw_m.agc_in1k,None
efficientnetv2_rw_t.ra2_in1k,None
+efficientvim_m1.e300_in1k,None
+efficientvim_m1_dist.in1k,None
efficientvit_b0.r224_in1k,None
ese_vovnet19b_dw.ra_in1k,None
ese_vovnet39b.ra_in1k,None
ese_vovnet57b.ra4_e3600_r256_in1k,None
-eva02_base_patch14_224.mim_in22k,None
eva02_base_patch16_clip_224.merged2b,None
-eva02_enormous_patch14_clip_224.laion2b,None
-eva_giant_patch14_224.clip_ft_in1k,None
+eva02_large_patch14_clip_224.merged2b,None
+eva02_tiny_patch14_224.mim_in22k,None
eva_giant_patch14_clip_224.merged2b,None
-fasternet_l.in1k,None
+eva_large_patch14_196.in22k_ft_in1k,None
+fasternet_s.in1k,None
fastvit_ma36.apple_in1k,None
fastvit_mci0.apple_mclip,None,xfail,Accuracy validation failed
fastvit_mci1.apple_mclip,None,xfail,Accuracy validation failed
@@ -132,18 +130,20 @@ fbnetc_100.rmsp_in1k,None
fbnetv3_b.ra2_in1k,None
fbnetv3_d.ra2_in1k,None
fbnetv3_g.ra2_in1k,None
-flexivit_base.300ep_in1k,None
-focalnet_base_lrf.ms_in1k,None
-focalnet_base_srf.ms_in1k,None
-focalnet_huge_fl3.ms_in22k,None
-focalnet_huge_fl4.ms_in22k,None
+flexivit_small.300ep_in1k,None
+focalnet_large_fl3.ms_in22k,None
+focalnet_large_fl4.ms_in22k,None
+focalnet_tiny_lrf.ms_in1k,None
+focalnet_tiny_srf.ms_in1k,None
gc_efficientnetv2_rw_t.agc_in1k,None
gcresnet33ts.ra2_in1k,None
gcresnet50t.ra2_in1k,None
gcresnext26ts.ch_in1k,None
gcresnext50ts.ch_in1k,None
-gcvit_base.in1k,None
-gernet_l.idstcv_in1k,None
+gcvit_xxtiny.in1k,None
+gemma4_vit_167m.gemma4_e4b_it,None,xfail_export,Data-dependent guard in torch.export (padding_positions.any())
+gemma4_vit_167m_enc.gemma4_e4b_it,None,xfail_export,Data-dependent guard in torch.export (padding_positions.any())
+gernet_s.idstcv_in1k,None
ghostnet_100.in1k,None
ghostnetv2_100.in1k,None
ghostnetv3_100.in1k,None
@@ -159,14 +159,16 @@ hardcorenas_c.miil_green_in1k,None
hardcorenas_d.miil_green_in1k,None
hardcorenas_e.miil_green_in1k,None
hardcorenas_f.miil_green_in1k,None
-hgnet_base.ssld_in1k,None
+hgnet_tiny.ssld_in1k,None
hgnetv2_b0.ssld_stage2_ft_in1k,None
-hiera_base_224.mae,None
hiera_base_plus_224.mae,None
hiera_small_abswin_256.sbb2_e200_in12k,None
+hiera_tiny_224.mae,None
hrnet_w18_small.ms_in1k,None
hrnet_w18_small_v2.ms_in1k,None
hrnet_w18_ssld.paddle_in1k,None
+iformer_m_distilled.in1k,None,xfail,timm fails to load checkpoint with numpy<2 (numpy._core.multiarray)
+iformer_t.in1k,None,xfail,timm fails to load checkpoint with numpy<2 (numpy._core.multiarray)
inception_next_atto.sail_in1k,None
inception_resnet_v2.tf_in1k,None
inception_v3.tf_in1k,None
@@ -176,6 +178,7 @@ lambda_resnet26t.c1_in1k,None
lambda_resnet50ts.a1h_in1k,None
lamhalobotnet50ts_256.a1h_in1k,None
lcnet_050.ra2_in1k,None
+lcnetv2_small.paddle_in1k,None
legacy_senet154.in1k,None
legacy_seresnet101.in1k,None
legacy_seresnet152.in1k,None
@@ -190,21 +193,22 @@ levit_128.fb_dist_in1k,None,xfail,Accuracy validation failed
levit_128s.fb_dist_in1k,None,xfail,Accuracy validation failed
levit_conv_128.fb_dist_in1k,None
levit_conv_128s.fb_dist_in1k,None
-mambaout_base.in1k,None
+lowformer_b0.in1k,None
mambaout_base_plus_rw.sw_e150_in12k,None
mambaout_base_short_rw.sw_e500_in1k,None
mambaout_base_tall_rw.sw_e500_in1k,None
mambaout_base_wide_rw.sw_e500_in1k,None
+mambaout_femto.in1k,None
mambaout_kobe.in1k,None
mambaout_small_rw.sw_e450_in1k,None
-maxvit_base_tf_224.in1k,None
maxvit_nano_rw_256.sw_in1k,None
-maxvit_rmlp_base_rw_224.sw_in12k,None
+maxvit_rmlp_pico_rw_256.sw_in1k,None
+maxvit_tiny_tf_224.in1k,None
maxxvit_rmlp_nano_rw_256.sw_in1k,None
maxxvitv2_nano_rw_256.sw_in1k,None
maxxvitv2_rmlp_base_rw_224.sw_in12k,None
mixer_b16_224.goog_in21k,None
-mixnet_l.ft_in1k,None
+mixnet_s.ft_in1k,None
mnasnet_small.lamb_in1k,None
mobilenet_edgetpu_v2_m.ra4_e3600_r224_in1k,None
mobilenetv1_100.ra4_e3600_r224_in1k,None
@@ -212,49 +216,50 @@ mobilenetv1_100h.ra4_e3600_r224_in1k,None
mobilenetv2_100.ra_in1k,None
mobilenetv2_110d.ra_in1k,None
mobilenetv2_120d.ra_in1k,None
-mobilenetv3_large_100.ra_in1k,None
mobilenetv3_large_150d.ra4_e3600_r256_in1k,None
mobilenetv3_rw.rmsp_in1k,None
+mobilenetv3_small_050.lamb_in1k,None
mobilenetv4_conv_aa_large.e600_r384_in1k,None
mobilenetv4_conv_blur_medium.e500_r224_in1k,None
-mobilenetv4_conv_large.e500_r256_in1k,None
-mobilenetv4_hybrid_large.e600_r384_in1k,None
+mobilenetv4_conv_small.e1200_r224_in1k,None
+mobilenetv4_hybrid_medium.e500_r224_in1k,None
mobilenetv5_300m.gemma3n,None,xfail_trace,PyTorch FE cannot lower dynamic avg_pool2d lists
mobileone_s0.apple_in1k,None
-mobilevit_s.cvnets_in1k,None
+mobilevit_xxs.cvnets_in1k,None
mobilevitv2_050.cvnets_in1k,None
-mvitv2_base.fb_in1k,None
mvitv2_base_cls.fb_inw21k,None
+mvitv2_tiny.fb_in1k,None
naflexvit_base_patch16_gap.e300_s576_in1k,None,xfail_export,Unsupported aten._upsample_bicubic2d_aa.default
naflexvit_base_patch16_par_gap.e300_s576_in1k,None,xfail_export,Unsupported aten._upsample_bicubic2d_aa.default
naflexvit_base_patch16_parfac_gap.e300_s576_in1k,None
naflexvit_base_patch16_siglip.v2_webli,None,xfail_export,Unsupported aten._upsample_bicubic2d_aa.default
-naflexvit_so400m_patch16_siglip.v2_webli,None,xfail_export,Unsupported aten._upsample_bicubic2d_aa.default
nasnetalarge.tf_in1k,None
-nest_base_jx.goog_in1k,None
-nextvit_base.bd_in1k,None
+nest_tiny_jx.goog_in1k,None
+nextvit_small.bd_in1k,None
nf_regnet_b1.ra2_in1k,None
nf_resnet50.ra2_in1k,None
nfnet_l0.ra2_in1k,None
pit_b_224.in1k,None
pit_b_distilled_224.in1k,None
-pit_s_224.in1k,None
-pit_s_distilled_224.in1k,None
pit_ti_224.in1k,None
pit_ti_distilled_224.in1k,None
+pit_xs_224.in1k,None
+pit_xs_distilled_224.in1k,None
pnasnet5large.tf_in1k,None
poolformer_s12.sail_in1k,None
poolformerv2_s12.sail_in1k,None
pvt_v2_b0.in1k,None
pvt_v2_b2_li.in1k,None
-rdnet_base.nv_in1k,None
+qwen3_vit_88m.qwen3_5_0_8b,None
+qwen3_vit_88m_enc.qwen3_5_0_8b,None
+qwen3_vit_88m_merge.qwen3_5_0_8b,None
+rdnet_tiny.nv_in1k,None
regnetv_040.ra3_in1k,None
regnetx_004_tv.tv2_in1k,None
regnetx_008.tv2_in1k,None
regnety_008_tv.tv2_in1k,None
regnety_320.seer,None
regnetz_040_h.ra3_in1k,None
-regnetz_b16.ra3_in1k,None
regnetz_c16.ra3_in1k,None
regnetz_c16_evos.ch_in1k,None
regnetz_d32.ra3_in1k,None
@@ -318,12 +323,6 @@ resnet50_gn.a1h_in1k,None
resnet50c.gluon_in1k,None
resnet50d.a3_in1k,None
resnet50s.gluon_in1k,None
-resnet50x16_clip.openai,None
-resnet50x16_clip_gap.openai,None
-resnet50x4_clip.openai,None
-resnet50x4_clip_gap.openai,None
-resnet50x64_clip.openai,None
-resnet50x64_clip_gap.openai,None
resnet51q.ra2_in1k,None
resnet61q.ra2_in1k,None
resnetaa101d.sw_in12k,None
@@ -337,29 +336,20 @@ resnetrs270.tf_in1k,None
resnetrs350.tf_in1k,None
resnetrs420.tf_in1k,None
resnetrs50.tf_in1k,None
-resnetv2_101x1_bit.goog_in21k,None
-resnetv2_101x3_bit.goog_in21k,None
-resnetv2_152x2_bit.goog_in21k,None
-resnetv2_152x4_bit.goog_in21k,None
resnetv2_18d.ra4_e3600_r224_in1k,None
resnetv2_34d.ra4_e3600_r224_in1k,None
resnetv2_50.a1h_in1k,None
resnetv2_50d_evos.ah_in1k,None
resnetv2_50d_gn.ah_in1k,None
resnetv2_50x1_bit.goog_in21k,None
-resnetv2_50x3_bit.goog_in21k,None
-resnext101_32x16d.fb_wsl_ig1b_ft_in1k,None
-resnext101_32x32d.fb_wsl_ig1b_ft_in1k,None
resnext101_32x4d.gluon_in1k,None
-resnext101_32x8d.tv2_in1k,None
-resnext101_64x4d.c1_in1k,None
resnext26ts.ra2_in1k,None
resnext50_32x4d.a3_in1k,None
resnext50d_32x4d.bt_in1k,None
rexnet_100.nav_in1k,None
rexnetr_200.sw_in12k,None
sam2_hiera_base_plus.fb_r896,None
-sam2_hiera_large.fb_r1024,None
+sam2_hiera_tiny.fb_r896,None
samvit_base_patch16.sa1b,None
sebotnet33ts_256.a1h_in1k,None
sehalonet33ts.ra2_in1k,None
@@ -368,13 +358,11 @@ selecsls60.in1k,None
selecsls60b.in1k,None
semnasnet_075.rmsp_in1k,None
senet154.gluon_in1k,None
-sequencer2d_l.in1k,None
+sequencer2d_s.in1k,None
seresnet152d.ra2_in1k,None
seresnet33ts.ra2_in1k,None
seresnet50.a3_in1k,None
seresnext101_32x4d.gluon_in1k,None
-seresnext101_32x8d.ah_in1k,None
-seresnext101_64x4d.gluon_in1k,None
seresnext101d_32x8d.ah_in1k,None
seresnext26d_32x4d.bt_in1k,None
seresnext26t_32x4d.bt_in1k,None
@@ -388,17 +376,17 @@ skresnet34.ra_in1k,None
skresnext50_32x4d.ra_in1k,None
spnasnet_100.rmsp_in1k,None
starnet_s1.in1k,None
-swiftformer_s.dist_in1k,None
+swiftformer_xs.dist_in1k,None
swin_base_patch4_window12_384.ms_in1k,None
-swin_base_patch4_window7_224.ms_in1k,None
-swin_s3_base_224.ms_in1k,None
+swin_s3_tiny_224.ms_in1k,None
+swin_tiny_patch4_window7_224.ms_in1k,None
swinv2_base_window12_192.ms_in22k,None
swinv2_base_window12to16_192to256.ms_in22k_ft_in1k,None
swinv2_base_window12to24_192to384.ms_in22k_ft_in1k,None
-swinv2_base_window16_256.ms_in1k,None
-swinv2_base_window8_256.ms_in1k,None
swinv2_cr_small_224.sw_in1k,None
-swinv2_cr_small_ns_224.sw_in1k,None
+swinv2_cr_tiny_ns_224.sw_in1k,None
+swinv2_tiny_window16_256.ms_in1k,None
+swinv2_tiny_window8_256.ms_in1k,None
test_byobnet.r160_in1k,None
test_convnext.r160_in1k,None
test_convnext2.r160_in1k,None
@@ -423,11 +411,9 @@ tf_efficientnet_lite1.in1k,None
tf_efficientnet_lite2.in1k,None
tf_efficientnet_lite3.in1k,None
tf_efficientnet_lite4.in1k,None
-tf_efficientnetv2_l.in1k,None
-tf_mixnet_l.in1k,None
-tf_mobilenetv3_large_075.in1k,None
-tiny_vit_11m_224.in1k,None
-tiny_vit_21m_224.in1k,None
+tf_efficientnetv2_s.in1k,None
+tf_mixnet_s.in1k,None
+tf_mobilenetv3_large_minimal_100.in1k,None
tiny_vit_5m_224.in1k,None
tinynet_a.in1k,None
tinynet_b.in1k,None
@@ -437,10 +423,10 @@ tinynet_e.in1k,None
tnt_b_patch16_224.in1k,None
tnt_s_legacy_patch16_224.in1k,None
tnt_s_patch16_224.in1k,None
-tresnet_l.miil_in1k,None
+tresnet_m.miil_in1k,None
tresnet_v2_l.miil_in21k,None
-twins_pcpvt_base.in1k,None
-twins_svt_base.in1k,None
+twins_pcpvt_small.in1k,None
+twins_svt_small.in1k,None
vgg11.tv_in1k,None
vgg11_bn.tv_in1k,None
vgg13.tv_in1k,None
@@ -449,33 +435,19 @@ vgg16.tv_in1k,None
vgg16_bn.tv_in1k,None
vgg19.tv_in1k,None
vgg19_bn.tv_in1k,None
-visformer_small.in1k,None
-vit_7b_patch16_dinov3.sat493m,None
+visformer_tiny.in1k,None
vit_base_mci_224.apple_mclip,None
-vit_base_patch14_dinov2.lvd142m,None
-vit_base_patch14_reg4_dinov2.lvd142m,None
-vit_base_patch16_224.mae,None
+vit_base_patch14_reg1_tipsv2.webli,None
vit_base_patch16_224_miil.in21k,None
-vit_base_patch16_clip_224.dfn2b,None
vit_base_patch16_clip_quickgelu_224.openai,None
-vit_base_patch16_dinov3.lvd1689m,None
-vit_base_patch16_dinov3_qkvb.lvd1689m,None
vit_base_patch16_plus_clip_240.laion400m_e32,None
-vit_base_patch16_rope_224.naver_in1k,None
-vit_base_patch16_rope_ape_224.naver_in1k,None
-vit_base_patch16_rope_mixed_224.naver_in1k,None
-vit_base_patch16_rope_mixed_ape_224.naver_in1k,None
-vit_base_patch16_rope_reg1_gap_256.sbb_in1k,None
vit_base_patch16_rpn_224.sw_in1k,None
+vit_base_patch16_sapiens2.fb,None
vit_base_patch16_siglip_224.webli,None
vit_base_patch16_siglip_gap_224.webli,None
-vit_base_patch32_224.sam_in1k,None
-vit_base_patch32_clip_224.openai,None
vit_base_patch32_clip_quickgelu_224.openai,None
vit_base_patch32_siglip_256.v2_webli,None
vit_base_patch32_siglip_gap_256.v2_webli,None
-vit_base_patch8_224.dino,None
-vit_base_r50_s16_224.orig_in21k,None
vit_betwixt_patch16_reg1_gap_256.sbb_in1k,None
vit_betwixt_patch16_reg4_gap_256.sbb_in1k,None
vit_betwixt_patch16_rope_reg4_gap_256.sbb_in1k,None
@@ -483,40 +455,53 @@ vit_betwixt_patch32_clip_224.tinyclip_laion400m,None
vit_dlittle_patch16_reg1_gap_256.sbb_nadamuon_in1k,None
vit_dpwee_patch16_reg1_gap_256.sbb_in1k,None
vit_dwee_patch16_reg1_gap_256.sbb_in1k,None
-vit_giant_patch14_clip_224.laion2b,None
-vit_giant_patch16_gap_224.in22k_ijepa,None
-vit_gigantic_patch14_clip_quickgelu_224.metaclip_2pt5b,None
vit_huge_patch14_224.mae,None
vit_huge_patch14_gap_224.in1k_ijepa,None
-vit_huge_plus_patch16_dinov3.lvd1689m,None
-vit_huge_plus_patch16_dinov3_qkvb.lvd1689m,None
vit_intern300m_patch14_448.ogvl_2pt5,None
+vit_large_patch14_clip_224.dfn2b,None
+vit_large_patch14_clip_quickgelu_224.dfn2b,None
vit_little_patch16_reg1_gap_256.sbb_in12k,None
vit_little_patch16_reg4_gap_256.sbb_in1k,None
+vit_medium_patch16_gap_240.sw_in12k,None
vit_medium_patch16_reg1_gap_256.sbb_in1k,None
vit_medium_patch16_reg4_gap_256.sbb_in1k,None
-vit_pe_core_base_patch16_224.fb,None
-vit_pe_core_gigantic_patch14_448.fb,None
-vit_pe_lang_gigantic_patch14_448.fb,None
-vit_pe_spatial_base_patch16_512.fb,None
-vit_pe_spatial_gigantic_patch14_448.fb,None
+vit_medium_patch16_rope_reg1_gap_256.sbb_in1k,None
+vit_medium_patch32_clip_224.tinyclip_laion400m,None
+vit_pe_core_large_patch14_336.fb,None
+vit_pe_core_tiny_patch16_384.fb,None
+vit_pe_lang_large_patch14_448.fb,None
+vit_pe_spatial_large_patch14_448.fb,None
+vit_pe_spatial_tiny_patch16_512.fb,None
vit_pwee_patch16_reg1_gap_256.sbb_in1k,None
-vit_relpos_base_patch16_224.sw_in1k,None
vit_relpos_base_patch16_clsgap_224.sw_in1k,None
vit_relpos_base_patch32_plus_rpn_256.sw_in1k,None
vit_relpos_medium_patch16_cls_224.sw_in1k,None
vit_relpos_medium_patch16_rpn_224.sw_in1k,None
+vit_relpos_small_patch16_224.sw_in1k,None
+vit_small_patch14_dinov2.lvd142m,None
+vit_small_patch14_reg4_dinov2.lvd142m,None
+vit_small_patch16_dinov3.lvd1689m,None
+vit_small_patch16_lingbot.robbyant,None
+vit_small_patch16_rope_224.naver_in1k,None
+vit_small_patch16_rope_ape_224.naver_in1k,None
+vit_small_patch16_rope_mixed_224.naver_in1k,None
+vit_small_patch16_rope_mixed_ape_224.naver_in1k,None
+vit_small_patch32_224.augreg_in21k,None
+vit_small_patch8_224.dino,None
+vit_small_plus_patch16_dinov3.lvd1689m,None
+vit_small_plus_patch16_dinov3_qkvb.lvd1689m,None
+vit_small_r26_s32_224.augreg_in21k,None
vit_so150m2_patch16_reg1_gap_256.sbb_e200_in12k,None
-vit_so150m_patch16_reg4_gap_256.sbb_e250_in12k,None
vit_so400m_patch14_siglip_224.webli,None
vit_so400m_patch14_siglip_gap_224.webli,None
-vit_so400m_patch16_siglip_256.v2_webli,None
-vit_so400m_patch16_siglip_gap_256.v2_webli,None
-vit_srelpos_medium_patch16_224.sw_in1k,None
+vit_srelpos_small_patch16_224.sw_in1k,None
+vit_tiny_patch16_224.augreg_in21k,None
+vit_tiny_patch16_dinov3_qkvb.eupe_lvd1689m,None
vit_tiny_r_s16_p8_224.augreg_in21k,None
vit_wee_patch16_reg1_gap_256.sbb_in1k,None
-vitamin_base_224.datacomp1b_clip,None
+vit_xsmall_patch16_clip_224.tinyclip_yfcc15m,None
vitamin_large2_224.datacomp1b_clip,None
+vitamin_small_224.datacomp1b_clip,None
volo_d1_224.sail_in1k,None
volo_d2_224.sail_in1k,None
volo_d3_224.sail_in1k,None
@@ -529,4 +514,4 @@ xception41p.ra3_in1k,None
xception65.tf_in1k,None
xception65p.ra3_in1k,None
xception71.tf_in1k,None
-xcit_large_24_p8_224.fb_in1k,None
+xcit_nano_12_p8_224.fb_in1k,None