{"id":28607762,"url":"https://github.com/p1atdev/comfyui-timm-backbone","last_synced_at":"2025-12-30T07:29:48.033Z","repository":{"id":296493346,"uuid":"990104102","full_name":"p1atdev/comfyui-timm-backbone","owner":"p1atdev","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-31T04:03:07.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-31T15:45:57.763Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p1atdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-25T14:10:27.000Z","updated_at":"2025-05-31T04:03:11.000Z","dependencies_parsed_at":"2025-05-31T15:46:23.901Z","dependency_job_id":"4f646f9c-f7b9-4b27-929a-d0a36e8e96a7","html_url":"https://github.com/p1atdev/comfyui-timm-backbone","commit_stats":null,"previous_names":["p1atdev/comfyui-timm-backbone"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/p1atdev/comfyui-timm-backbone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p1atdev%2Fcomfyui-timm-backbone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p1atdev%2Fcomfyui-timm-backbone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p1atdev%2Fcomfyui-timm-backbone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p1atdev%2Fcomfyui-timm-backbone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p1atdev","download_url":"https://codeload.github.com/p1atdev/comfyui-timm-backbone/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p1atdev%2Fcomfyui-timm-backbone/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259340324,"owners_count":22842973,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-11T21:01:40.364Z","updated_at":"2025-12-30T07:29:47.969Z","avatar_url":"https://github.com/p1atdev.png","language":"Python","funding_links":[],"categories":["Workflows (3395) sorted by GitHub Stars","All Workflows Sorted by GitHub Stars"],"sub_categories":[],"readme":"# ComfyUI Timm Backbone Nodes\n\n[English](#english) | [日本語](#japanese)\n\n## English\n\n### Overview\n\nComfyUI Timm Backbone Nodes is a custom node set that enables you to load and use pre-trained models from the [timm](https://github.com/huggingface/pytorch-image-models) library within ComfyUI workflows.\n\nSince the output is provided as a `TENSOR` datatype, you can handle timm outputs by aligning with this when creating your own custom nodes.\n\n### Features\n\nLoad timm models from Hugging Face Hub and encode images.\n\nYou can choose between two types of output: `pooler_output` and `hidden_state`. When selecting `hidden_state`, you can specify which layer to extract (final layer, second-to-last, etc.).\n\n### Installation\n1. Clone this repository into your ComfyUI `custom_nodes` directory:\n\n```bash\ncd ComfyUI/custom_nodes\ngit clone https://github.com/p1atdev/comfyui-timm-backbone\n```\n\n2. Install required dependencies:\n\n```bash\n# Activate comfyui environment\ncd comfyui-timm-backbone\npip install -r requirements.txt \n# or\npip install timm \n```\n\n### Available Nodes\n\n#### Timm Backbone Loader\n\nLoads a pre-trained model from the timm library.\n\n- Inputs:\n  - `model`: Model name (e.g., `timm/vit_huge_patch14_clip_224.laion2b`)\n- Outputs: \n  - `MODEL`: timm model\n\n#### Timm Backbone Image Encode\n\nEncodes images using the loaded model and extracts features.\n\n- Inputs:\n  - `model`: The loaded timm model\n  - `image`: Input image to encode (requires preprocessing to match the model beforehand)\n  - `feature_type`: `pooler_output` or `hidden_state`\n  - `hidden_state_index`: Which layer to extract (only applies to `hidden_state`)\n- Outputs:\n  - `TENSOR`: `torch.Tensor` containing extracted features\n\n#### Timm Embeds Print\n\nA node that `print`s the shape and contents of input `torch.Tensor`. For debugging purposes.\n\n- Inputs: \n  - tensor: `torch.Tensor` to `print`\n- Outputs: None (prints to console)\n\n---\n\n## Japanese\n\n### 概要\n\nComfyUI Timm Backbone Nodes は、[timm](https://github.com/huggingface/pytorch-image-models) ライブラリの事前学習済みモデルを ComfyUI ワークフロー内で読み込み、使用できるようにするカスタムノードセットです。\n\n`TENSOR` の Datatype として出力されるので、自前でカスタムノードを作る時にこれに合わせると、`timm` の出力を扱えます。\n\n\n### 機能\n\nHuggingFace Hub 上の Timm モデルを読み込んで画像をエンコードできます。\n\n出力を `poooler_output` と `hidden_state` の2種類から選択でき、`hidden_state` を選択した場合は、抽出する層を指定できます。(最終層、最後から2番目など)\n\n### インストール\n1. ComfyUI の `custom_nodes` ディレクトリにこのリポジトリをクローン:\n \n```bash\ncd ComfyUI/custom_nodes\ngit clone https://github.com/p1atdev/comfyui-timm-backbone\n```\n\n2. 必要な依存関係をインストール:\n\n```bash\n# comfyui 環境をアクティベート\ncd comfyui-timm-backbone\npip install -r requirements.txt \n# or\npip install timm \n```\n\n\n### 利用可能なノード\n\n#### Timm Backbone Loader\n\ntimmライブラリから事前学習済みモデルを読み込みます。\n\n- Inputs:\n  - `model`: モデル名（例：`timm/vit_huge_patch14_clip_224.laion2b`）\n- Outputs: \n  - `MODEL`: timm モデル\n\n#### Timm Backbone Image Encode\n\n読み込まれたモデルを使用して画像をエンコードし、特徴を抽出します。\n\n- Inputs:\n  - `model`: 読み込まれた timm モデル\n  - `image`: エンコードする入力画像 (事前にモデルごとに合うように前処理する必要がある)\n  - `feature_type`: `pooler_output` または `hidden_state`\n  - `hidden_state_index`: 抽出する層（`hidden_state` のみ適用）\n- Outputs:\n  - `TENSOR`: 抽出された特徴を含む `torch.Tensor`\n\n#### Timm Embeds Print\n\n入力された `torch.Tensor` の形状と中身を `print` するノード。デバッグ用。\n\n- Inputs: \n  - tensor: `print` したい `torch.Tensor`\n- Outputs: なし（コンソールに出力）\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp1atdev%2Fcomfyui-timm-backbone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp1atdev%2Fcomfyui-timm-backbone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp1atdev%2Fcomfyui-timm-backbone/lists"}