Skip to content

build(deps): bump timm from 1.0.19 to 1.0.31 - #2881

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/timm-1.0.31
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/timm-1.0.31

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 25, 2026

Copy link
Copy Markdown
Contributor

Bumps timm from 1.0.19 to 1.0.31.

Release notes

Sourced from timm's releases.

Release v1.0.31

November 3, 2026

  • reset_classifier() and checkpoint reconstruction: fixes across ViT, EVA, BEiT, NaFlexViT, RepViT and iFormer preserve normalization placement and distillation settings when exporting / reloading models after changing the classifier or pooling. Also fix unpooled PiT export and EfficientFormerV2 with distillation disabled.
  • NaFlex: fix ViT / EVA norm placement during conversion, support SwiGLU alignment for DINOv3 / Lingbot checkpoints, and preserve grayscale / non-RGB input channels in data loaders.
  • Fix layer-wise LR decay grouping for RepViT, HGNet, MViTv2 and pre-norm ViTs, and InceptionNeXt feature sizes with output_stride=8/16.
  • Release 1.0.31.

October 24, 2026

  • forward_intermediates() and prune_intermediate_layers() are now supported by every model. Newly added for CSPNet, NFNet, DLA, DenseNet (#2870, thanks ghaith-mq), CoaT, ConViT, ConvMixer, CrossViT, HRNet, Inception-v3, Inception-ResNet-v2, NASNet, PNASNet, SelecSLS, SENet, Sequencer2d, VGG, Visformer, Xception and Aligned Xception, with prune_intermediate_layers() for NaFlexViT and MobileNetV5 encoders. CoaT, ConViT, ConvMixer, CrossViT and Visformer gain features_only support.
  • prune_intermediate_layers() fixes
    • prune_head=True removes the whole head (head norm, pre-logits layers, attention pooling) so the pruned model leaves no unused params (DDP w/o find_unused_parameters), except CoaT, CrossViT and HRNet when only some of their parallel scales / branches are taken. Pass prune_head=False to keep it.
    • Pruning a hierarchical model to an earlier stage removes the final norm and head sized for the last stage, forward_features() ends at the last kept feature and num_features / head_hidden_size match it. Pruning to the stem feature removes the stem pooling after it.
    • Fixes for grad checkpointing, stop_early, class token / post network removal, and TorchScript of pruned / feature_cls='getter' models across many families.
  • head_hidden_size is the actual pre-logits (pooled) width in all models, including concat pooling (catavgmax) and after reset_classifier(). Pool types a model can't apply now raise at creation / reset instead of being silently ignored or failing in forward.
  • Other fixes: VOLO num_classes=0 output is the class token embedding (matching forward_head(pre_logits=True)), vit_pe_core reset_classifier() w/ a non map pool removes the attention pool, pool type export via save_for_hf reads the head's current pooling, and headless (num_classes=0) Swin, SwinV2, DaViT and NextViT checkpoints reload correctly.

October 13, 2026

  • Hyperparameter sweeps via a new sweep.py: grid / random search over any train.py argument, one effective --config per job, run on a pool of local GPUs and resumable. WSD sweeps train one stable trunk per hyperparameter combination and branch independent cooldowns from its milestone checkpoints, comparing annealing at several budgets for a fraction of the cost of full runs. See the training docs.
  • train.py: --resume auto resumes in place from the experiment's own last.pth.tar (checkpoint history, model_best and summary.csv stay consistent), --stop-epoch N stops without changing the schedule, --save-epochs N [N ...] keeps milestone-N.pth.tar snapshots, and YAML --config values are validated against the script's arguments.
  • Deprecate PlateauLRScheduler (--sched plateau). timm schedulers are stateless functions of the epoch or update count, the metric-driven plateau schedule never fit that and its state is not checkpointed, so resume was never exact. Use cosine or wsd.
  • Docs: new Model API page, generated model family pages for every model module replacing the old per-model pages, and expanded data / loss / models reference pages.
  • Model API consistency fixes: reset_classifier() keeps the current pooling in all models, unknown constructor args raise TypeError everywhere, Swin family dynamic_img_size, LeViT layer-wise lr decay, no_weight_decay names that matched no params (NesT, SwinV2, XCiT, FocalNet), resize state recorded for all set_input_size families.
  • Fixes: GCViT global query mixed images within a batch, gradient checkpointing for RDNet and MobileNetV5, save_for_hf stale test input size, EfficientViT (MSRA) rectangular resize, ImageDataset image conversion errors (#2846). reparameterize_model moved to timm.models.

October 9, 2026

  • Add CSPNeXt (RTMDet backbone) cspnext_{tiny,s,m,l,x} with ImageNet-1k classification weights converted from OpenMMLab. Thanks Munehiro Kobayashi.
  • Optimizer improvements
    • Foreach (multi-tensor) impls for RMSpropTF, LaProp, LAMB, LARS, AdaBelief. Foreach steps are chunked by device L2 cache size (TIMM_FOREACH_CHUNK_SIZE to override).
    • RMS update clipping (clipping_threshold) for AdamWLegacy / NAdamW, new decoupled / corrected weight decay NovoGrad variants (novogradw, novogradc).
    • Correctness fixes across many optimizers, including corrected weight decay w/ in-place updated tensor lr, FP16 update stalls at small lr, low precision state handling (Kron, AdaBelief, NovoGrad), and no more in-place p.grad modification.
    • torch.compile / CUDA graph fixes for Adopt, SGDW, AdafactorBV.
    • New optimizer docs covering usage, naming conventions, and families.
  • Add WSD (warmup-stable-decay) LR scheduler (--sched wsd, --lr-decay-fn, --lr-stable-timescale).
  • Model EMA fixes for bfloat16 / float16 models. ModelEmaV3 bfloat16 EMAs use stochastic rounding by default, float16 models keep a float32 EMA.
  • Model resizing via set_input_size()
    • Expanded support for windowed models (MaxViT, CoAtNet, BEiT, EfficientViT-MSRA, relpos ViT, Swin family).
    • Swin / SwinV2 / SwinV2-CR keep each stage's window to grid ratio on resize, a call at the current size is now a no-op. Per-stage window_size / window_ratio supported. Fixes Swin S3 and SwinV2 window16 / window12 models changing outputs on a same-size call.
    • Fix SwinV2 NaN w/ a window size of 1, odd stage feature sizes, and hybrid ViT resize on CUDA / low precision.
  • Fix grad accumulation remainder handling (#2821), distributed sampling / repeated augmentation on small datasets, pretrained source overrides and distillation teacher setup, train.py w/ --sched none, and eval center crop interpolation for non-square inputs.

... (truncated)

Commits
  • 43b549b Release 1.0.31
  • b51ed3d Slim test coverage to two python - pytorch pairings
  • dd18623 Prep for release 1.0.31
  • 03b76b6 Bump the actions group across 1 directory with 5 updates
  • 9b206d2 Place channels argument next to mean/std in create_naflex_loader
  • a117c73 Preserve input channels in NaFlex data loaders
  • 302803d Merge pull request #2884 from mishig25/doc-builder-machine-translation
  • 65592e3 Pin pytest<9.2 until pytest-forked supports pytest 9.2 reports
  • 5a236d2 Bump doc-builder to get the docs machine-translated
  • beabdc3 Merge pull request #2881 from huggingface/fix-reset-classifier-export
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [timm](https://github.com/huggingface/pytorch-image-models) from 1.0.19 to 1.0.31.
- [Release notes](https://github.com/huggingface/pytorch-image-models/releases)
- [Commits](huggingface/pytorch-image-models@v1.0.19...v1.0.31)

---
updated-dependencies:
- dependency-name: timm
  dependency-version: 1.0.31
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Nov 25, 2026
@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.22%. Comparing base (691f253) to head (5d795fc).

❌ Your project check has failed because the head coverage (77.22%) is below the target coverage (83.00%). You can increase the head coverage or adjust the target coverage.

❗ There is a different number of reports uploaded between BASE (691f253) and HEAD (5d795fc). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (691f253) HEAD (5d795fc)
18 17
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2881      +/-   ##
==========================================
- Coverage   84.18%   77.22%   -6.97%     
==========================================
  Files         328      328              
  Lines       29149    29149              
  Branches     4701     4701              
==========================================
- Hits        24538    22509    -2029     
- Misses       3192     5329    +2137     
+ Partials     1419     1311     -108     

see 54 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant