Automatically reusing components
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- huggingface, python
調査の方向性
Read the ComponentsManager guide and the Pika H3 Flex example linked in the issue to understand how components are currently shared. The proposal is to discuss opt-in reuse based on checkpoint weight hashes; this issue explicitly asks for feedback and use cases rather than a code change. Share a concrete concern, alternative, or experience with manual component reuse.
索引モデルが issue の本文から書いたものです。
説明
Diffusers pipelines often share components: the same text encoder or VAE across model families, a finetune reusing its base model's components, a LoRA-based model reusing the base transformer entirely. Loading each of them twice wastes time, and worse, it keeps two copies of the same model in memory. So we want to reuse the same components as much as possible.
What we have today
In Modular Diffusers, ComponentsManager manages components across pipelines. Load one pipeline through it, and a second pipeline can pick up what it needs from the manager instead of loading its own copy:
pika.update_components(transformer=manager.get_one(name="transformer", collection="minimax-h3"))
See the ComponentsManager guide and the Pika H3 Flex example, where a second pipeline is assembled from a loaded MiniMax-H3.
The reuse itself is still manual: you decide which components are shared and pass them over. What the manager gives you is bookkeeping so you can keep track of it. Each component is listed once with the pipelines that use it (when you register under a collection), offloading works across all of them, and the manager warns when two components were loaded from the same repo and subfolder. That warning is as far as duplicate detection goes today, and it comes after the second copy is already loaded.
The Hub now dedups on disk
With huggingface_hub>=1.32.0, identical Xet-backed files share one cached payload across repositories, shard by shard. Download the same text encoder from two repos and it lands on disk once. We could take advantage of that and go one step further: dedup the models we load into memory too.
Proposal
An opt-in setting on the manager. When a pipeline is about to load a component, the manager checks whether the same weights are already loaded, using the same idea the Hub uses to dedup: a content hash of the weights, stored with the checkpoint and compared before loading. If there is a match, the pipeline reuses the loaded component instead of loading again. No download, no second copy.
How to contribute
This issue carries the new idea-contribution-welcome label. For issues with this label we are not looking for a PR. We are looking for discussion: feedback on the proposal, alternatives, use cases we have not thought of, problems you ran into with the current manual way. We will write the PR ourselves, and anyone whose feedback shaped it will be added as a co-author.
Posted by Claude on behalf of @yiyixuxu. The text was drafted together and approved by yiyixuxu.
- 主要言語
- Python
- スター
- 34.9k
- フォーク
- 7.5k
- 平均マージ
- 3日 16時間
- マージ済み PR(30日)
- 65
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
huggingface/diffusers のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
huggingface/diffusers#15363 ·
メンテナーはふだん 1 日以内に返信
-
`ZImageImg2ImgPipeline` / `ZImageInpaintPipeline`: explicit height/width different from the input image raises RuntimeError対応中かも @chessing234 が 1 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
huggingface/diffusers#15337 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Multi-vector textual inversion uses only the first vector when the token has uppercase letters (transformers v5)対応中かも @sunhouy が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
huggingface/diffusers#15313 ·
メンテナーはふだん 1 日以内に返信
-
TCDScheduler advances the generator on the final step of a strength-truncated custom schedule対応中かも @SIDDARTHAREDDY8 が 5 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
huggingface/diffusers#15288 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
unload_textual_inversion(token) leaves the extra tokens of a multi-vector embedding behind, so it can't be loaded again対応中かも @sohailshk が 11 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
huggingface/diffusers#15211 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
huggingface/diffusers の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
Unused loot bag group names left in dreamcraft en_US.lang対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンStatus: Triage Suggestion
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
GTNewHorizons/GT-New-Horizons-Modpack#27789 ·
メンテナーはふだん 1 日以内に返信
-
bug frontend sev-5
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
-
core good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
b4b code health next
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信