{
  "id": 665000,
  "title": "can't read dinov3 with timm",
  "url": "/competitions/csiro-biomass/discussion/665000",
  "author_name": "",
  "post_date": "2025-12-29T13:31:44.307025Z",
  "votes": 2,
  "comment_count": 11,
  "views": 0,
  "content": "<p>I have the following error when i submit my notebook.\n<code>'(MaxRetryError('HTTPSConnectionPool(host=\\'huggingface.co\\', port=443): Max retries exceeded with url: /timm/vit_large/resolve/main/model.safetensors (Caused by NameResolutionError(\"HTTPSConnection(host=\\'huggingface.co\\', port=443): Failed to resolve \\'huggingface.co\\' ([Errno -3] Temporary failure in name resolution)\"))'), '(Request ID: 3831ee92-0242-4dca-bd13-db5f87909a2f)')' thrown while requesting HEAD https://huggingface.co/timm/vit_large/resolve/main/model.safetensors\nRetrying in 1s [Retry 1/5].</code></p>\n<p>I create the model with the following code snippet:</p>\n<p><code>model = timm.create_model(\n        Config.BACKBONE_NAME, pretrained=True, num_classes=0, global_pool='avg'\n    ).to(device).eval()\n</code></p>\n<p>if Internet is disabled, how are we supposed to download the pretrained weights?</p>",
  "messages": [
    {
      "id": "3383141",
      "postDate": "12/29/2025 13:31:44",
      "content": "<p>I have the following error when i submit my notebook.\n<code>'(MaxRetryError('HTTPSConnectionPool(host=\\'huggingface.co\\', port=443): Max retries exceeded with url: /timm/vit_large/resolve/main/model.safetensors (Caused by NameResolutionError(\"HTTPSConnection(host=\\'huggingface.co\\', port=443): Failed to resolve \\'huggingface.co\\' ([Errno -3] Temporary failure in name resolution)\"))'), '(Request ID: 3831ee92-0242-4dca-bd13-db5f87909a2f)')' thrown while requesting HEAD https://huggingface.co/timm/vit_large/resolve/main/model.safetensors\nRetrying in 1s [Retry 1/5].</code></p>\n<p>I create the model with the following code snippet:</p>\n<p><code>model = timm.create_model(\n        Config.BACKBONE_NAME, pretrained=True, num_classes=0, global_pool='avg'\n    ).to(device).eval()\n</code></p>\n<p>if Internet is disabled, how are we supposed to download the pretrained weights?</p>",
      "rawMarkdown": "I have the following error when i submit my notebook.\n`'(MaxRetryError('HTTPSConnectionPool(host=\\'huggingface.co\\', port=443): Max retries exceeded with url: /timm/vit_large/resolve/main/model.safetensors (Caused by NameResolutionError(\"HTTPSConnection(host=\\'huggingface.co\\', port=443): Failed to resolve \\'huggingface.co\\' ([Errno -3] Temporary failure in name resolution)\"))'), '(Request ID: 3831ee92-0242-4dca-bd13-db5f87909a2f)')' thrown while requesting HEAD https://huggingface.co/timm/vit_large/resolve/main/model.safetensors\nRetrying in 1s [Retry 1/5].`\n\n\nI create the model with the following code snippet:\n\n\n`model = timm.create_model(\n        Config.BACKBONE_NAME, pretrained=True, num_classes=0, global_pool='avg'\n    ).to(device).eval()\n`\n\n\nif Internet is disabled, how are we supposed to download the pretrained weights?",
      "votes": null
    },
    {
      "id": "3383146",
      "postDate": "12/29/2025 13:35:57",
      "content": "<p>Use this utility script:\n<a href=\"https://www.kaggle.com/code/gauravbrills/timm-wheels\" target=\"_blank\">https://www.kaggle.com/code/gauravbrills/timm-wheels</a></p>",
      "rawMarkdown": "Use this utility script:\nhttps://www.kaggle.com/code/gauravbrills/timm-wheels",
      "votes": null
    },
    {
      "id": "3383149",
      "postDate": "12/29/2025 13:49:16",
      "content": "<p>i ran it, but timm.create_model still tries to download it from internet, how can i make it create from local timm?</p>",
      "rawMarkdown": "i ran it, but timm.create_model still tries to download it from internet, how can i make it create from local timm?",
      "votes": null
    },
    {
      "id": "3383151",
      "postDate": "12/29/2025 14:02:53",
      "content": "<p>Use the notebook I shared as a utility script and remove the pretrained=True flag if you are using it</p>",
      "rawMarkdown": "Use the notebook I shared as a utility script and remove the pretrained=True flag if you are using it",
      "votes": null
    },
    {
      "id": "3383165",
      "postDate": "12/29/2025 14:53:42",
      "content": "<p>How can I use it as a utility script?</p>",
      "rawMarkdown": "How can I use it as a utility script?",
      "votes": null
    },
    {
      "id": "3383206",
      "postDate": "12/29/2025 16:18:36",
      "content": "<p>To use timm.create_model, you'll have to set pretrained=False and load the weights (torch.save/load with model.state_dict() is a typical method) from either the public models or a private dataset you upload yourself.</p>",
      "rawMarkdown": "To use timm.create_model, you'll have to set pretrained=False and load the weights (torch.save/load with model.state_dict() is a typical method) from either the public models or a private dataset you upload yourself.",
      "votes": null
    },
    {
      "id": "3383228",
      "postDate": "12/29/2025 16:57:07",
      "content": "<p>as far as i understand, dinov3 requires a newer version of timm than the default one, how can the latest timm be added when internet is disabled?</p>",
      "rawMarkdown": "as far as i understand, dinov3 requires a newer version of timm than the default one, how can the latest timm be added when internet is disabled?",
      "votes": null
    },
    {
      "id": "3383244",
      "postDate": "12/29/2025 17:16:29",
      "content": "<p>Sample\n<a href=\"https://www.kaggle.com/code/motono0223/load-dinov3-model-without-internet\" target=\"_blank\">https://www.kaggle.com/code/motono0223/load-dinov3-model-without-internet</a></p>",
      "rawMarkdown": "Sample\nhttps://www.kaggle.com/code/motono0223/load-dinov3-model-without-internet",
      "votes": null
    },
    {
      "id": "3383257",
      "postDate": "12/29/2025 17:41:51",
      "content": "<p>Why don't you just install the latest timm using the Dependency Manager?  (Add-Ons/ Install Dependencies)</p>\n<p>Not sure when they added this capability but it's worked every time I have tried it.</p>\n<p>In this case\n<code>pip install timm -U --no-deps</code></p>",
      "rawMarkdown": "Why don't you just install the latest timm using the Dependency Manager?  (Add-Ons/ Install Dependencies)\n\nNot sure when they added this capability but it's worked every time I have tried it.\n\nIn this case\n`pip install timm -U --no-deps`",
      "votes": null
    },
    {
      "id": "3383260",
      "postDate": "12/29/2025 17:48:17",
      "content": "<p>Here's a <a href=\"https://www.kaggle.com/code/pcjimmmy/install-timm\" target=\"_blank\">notebook</a> -  I added a tiny little discussion on the simple steps to add the dependency.</p>\n<p>Using this method Kaggle creates the correct script and it's included in your notebook.  You can see it added in the panel on the right.</p>",
      "rawMarkdown": "Here's a [notebook](https://www.kaggle.com/code/pcjimmmy/install-timm) -  I added a tiny little discussion on the simple steps to add the dependency.\n\nUsing this method Kaggle creates the correct script and it's included in your notebook.  You can see it added in the panel on the right.",
      "votes": null
    },
    {
      "id": "3383269",
      "postDate": "12/29/2025 18:17:11",
      "content": "<p>Hmmm - this seems to be a clue that 8th place uses V3 ?????   😉</p>",
      "rawMarkdown": "Hmmm - this seems to be a clue that 8th place uses V3 ?????   😉",
      "votes": null
    },
    {
      "id": "3383873",
      "postDate": "12/31/2025 02:41:26",
      "content": "<p>you can add input dataset from  <code>https://www.kaggle.com/datasets/haogebob/timm-1-0-22</code>\nand run:</p>\n<p><code>!pip install /kaggle/input/timm-1-0-22/timm-1.0.22-py3-none-any.whl --no-deps</code></p>\n<p>For pre-trained weights, you need to download them locally and then upload them to Kaggle. If you only intend to perform inference, you should set <code>pretrained</code> to <code>False</code> in <code>model = timm.create_model(Config.BACKBONE_NAME, pretrained=True, num_classes=0, global_pool='avg').to(device).eval()</code>.</p>",
      "rawMarkdown": "you can add input dataset from  `https://www.kaggle.com/datasets/haogebob/timm-1-0-22 `\nand run:\n\n `!pip install /kaggle/input/timm-1-0-22/timm-1.0.22-py3-none-any.whl --no-deps `\n\nFor pre-trained weights, you need to download them locally and then upload them to Kaggle. If you only intend to perform inference, you should set `pretrained` to `False` in `model = timm.create_model(Config.BACKBONE_NAME, pretrained=True, num_classes=0, global_pool='avg').to(device).eval()`.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3383146,
      "author_name": "medali1992",
      "author_url": "",
      "post_date": "12/29/2025 13:35:57",
      "content": "<p>Use this utility script:\n<a href=\"https://www.kaggle.com/code/gauravbrills/timm-wheels\" target=\"_blank\">https://www.kaggle.com/code/gauravbrills/timm-wheels</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 3383149,
          "author_name": "flyingmadden",
          "author_url": "",
          "post_date": "12/29/2025 13:49:16",
          "content": "<p>i ran it, but timm.create_model still tries to download it from internet, how can i make it create from local timm?</p>",
          "votes": null,
          "replies": [
            {
              "id": 3383151,
              "author_name": "medali1992",
              "author_url": "",
              "post_date": "12/29/2025 14:02:53",
              "content": "<p>Use the notebook I shared as a utility script and remove the pretrained=True flag if you are using it</p>",
              "votes": null,
              "replies": [
                {
                  "id": 3383165,
                  "author_name": "flyingmadden",
                  "author_url": "",
                  "post_date": "12/29/2025 14:53:42",
                  "content": "<p>How can I use it as a utility script?</p>",
                  "votes": null,
                  "replies": []
                },
                {
                  "id": 3383269,
                  "author_name": "pcjimmmy",
                  "author_url": "",
                  "post_date": "12/29/2025 18:17:11",
                  "content": "<p>Hmmm - this seems to be a clue that 8th place uses V3 ?????   😉</p>",
                  "votes": null,
                  "replies": []
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "id": 3383206,
      "author_name": "frederickvlee",
      "author_url": "",
      "post_date": "12/29/2025 16:18:36",
      "content": "<p>To use timm.create_model, you'll have to set pretrained=False and load the weights (torch.save/load with model.state_dict() is a typical method) from either the public models or a private dataset you upload yourself.</p>",
      "votes": null,
      "replies": [
        {
          "id": 3383228,
          "author_name": "flyingmadden",
          "author_url": "",
          "post_date": "12/29/2025 16:57:07",
          "content": "<p>as far as i understand, dinov3 requires a newer version of timm than the default one, how can the latest timm be added when internet is disabled?</p>",
          "votes": null,
          "replies": [
            {
              "id": 3383244,
              "author_name": "motono0223",
              "author_url": "",
              "post_date": "12/29/2025 17:16:29",
              "content": "<p>Sample\n<a href=\"https://www.kaggle.com/code/motono0223/load-dinov3-model-without-internet\" target=\"_blank\">https://www.kaggle.com/code/motono0223/load-dinov3-model-without-internet</a></p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3383257,
      "author_name": "pcjimmmy",
      "author_url": "",
      "post_date": "12/29/2025 17:41:51",
      "content": "<p>Why don't you just install the latest timm using the Dependency Manager?  (Add-Ons/ Install Dependencies)</p>\n<p>Not sure when they added this capability but it's worked every time I have tried it.</p>\n<p>In this case\n<code>pip install timm -U --no-deps</code></p>",
      "votes": null,
      "replies": [
        {
          "id": 3383260,
          "author_name": "pcjimmmy",
          "author_url": "",
          "post_date": "12/29/2025 17:48:17",
          "content": "<p>Here's a <a href=\"https://www.kaggle.com/code/pcjimmmy/install-timm\" target=\"_blank\">notebook</a> -  I added a tiny little discussion on the simple steps to add the dependency.</p>\n<p>Using this method Kaggle creates the correct script and it's included in your notebook.  You can see it added in the panel on the right.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 3383873,
      "author_name": "chenbaoying",
      "author_url": "",
      "post_date": "12/31/2025 02:41:26",
      "content": "<p>you can add input dataset from  <code>https://www.kaggle.com/datasets/haogebob/timm-1-0-22</code>\nand run:</p>\n<p><code>!pip install /kaggle/input/timm-1-0-22/timm-1.0.22-py3-none-any.whl --no-deps</code></p>\n<p>For pre-trained weights, you need to download them locally and then upload them to Kaggle. If you only intend to perform inference, you should set <code>pretrained</code> to <code>False</code> in <code>model = timm.create_model(Config.BACKBONE_NAME, pretrained=True, num_classes=0, global_pool='avg').to(device).eval()</code>.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3383141": "I have the following error when i submit my notebook.\n`'(MaxRetryError('HTTPSConnectionPool(host=\\'huggingface.co\\', port=443): Max retries exceeded with url: /timm/vit_large/resolve/main/model.safetensors (Caused by NameResolutionError(\"HTTPSConnection(host=\\'huggingface.co\\', port=443): Failed to resolve \\'huggingface.co\\' ([Errno -3] Temporary failure in name resolution)\"))'), '(Request ID: 3831ee92-0242-4dca-bd13-db5f87909a2f)')' thrown while requesting HEAD https://huggingface.co/timm/vit_large/resolve/main/model.safetensors\nRetrying in 1s [Retry 1/5].`\n\n\nI create the model with the following code snippet:\n\n\n`model = timm.create_model(\n        Config.BACKBONE_NAME, pretrained=True, num_classes=0, global_pool='avg'\n    ).to(device).eval()\n`\n\n\nif Internet is disabled, how are we supposed to download the pretrained weights?",
    "3383146": "Use this utility script:\nhttps://www.kaggle.com/code/gauravbrills/timm-wheels",
    "3383149": "i ran it, but timm.create_model still tries to download it from internet, how can i make it create from local timm?",
    "3383151": "Use the notebook I shared as a utility script and remove the pretrained=True flag if you are using it",
    "3383165": "How can I use it as a utility script?",
    "3383206": "To use timm.create_model, you'll have to set pretrained=False and load the weights (torch.save/load with model.state_dict() is a typical method) from either the public models or a private dataset you upload yourself.",
    "3383228": "as far as i understand, dinov3 requires a newer version of timm than the default one, how can the latest timm be added when internet is disabled?",
    "3383244": "Sample\nhttps://www.kaggle.com/code/motono0223/load-dinov3-model-without-internet",
    "3383257": "Why don't you just install the latest timm using the Dependency Manager?  (Add-Ons/ Install Dependencies)\n\nNot sure when they added this capability but it's worked every time I have tried it.\n\nIn this case\n`pip install timm -U --no-deps`",
    "3383260": "Here's a [notebook](https://www.kaggle.com/code/pcjimmmy/install-timm) -  I added a tiny little discussion on the simple steps to add the dependency.\n\nUsing this method Kaggle creates the correct script and it's included in your notebook.  You can see it added in the panel on the right.",
    "3383269": "Hmmm - this seems to be a clue that 8th place uses V3 ?????   😉",
    "3383873": "you can add input dataset from  `https://www.kaggle.com/datasets/haogebob/timm-1-0-22 `\nand run:\n\n `!pip install /kaggle/input/timm-1-0-22/timm-1.0.22-py3-none-any.whl --no-deps `\n\nFor pre-trained weights, you need to download them locally and then upload them to Kaggle. If you only intend to perform inference, you should set `pretrained` to `False` in `model = timm.create_model(Config.BACKBONE_NAME, pretrained=True, num_classes=0, global_pool='avg').to(device).eval()`."
  },
  "source": "meta"
}