“Package‐style” Dependency Management for Models (npm/Pip‑style) #11586
JoeGaffney
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
so we are going to have a ModularLoader that I think should support what you're asking |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, this may have been discussed before or diffusers might not be the correct place to discuss. (let me know) I am coming from the point of view of purely being a consumer of models and noticing the large amount of potential copies and re-downloads.
🚀 Concept
Many Hugging Face model variants—whether fine‑tunes, adapters, or language‑specific forks—share large portions of their weights with a common base checkpoint. Similarly, tasks like diffusion often reuse the same T5 text encoder across multiple pipelines. Yet today, every variant or pipeline bundles the full encoder + decoder (or diffusion U‑Net), leading to redundant uploads and downloads.
A lightweight “package manager” layer would let you:
[email protected]
[email protected]
)🎯 Why It Matters
~/.cache/huggingface
) track components by content hash, preventing duplicate copies of popular encoders or U‑Nets.hf-lock.json
) pins exact versions of all referenced packages and deltas, similar topackage-lock.json
orPipfile.lock
.🤝 Analogy to npm / pip
package.json
and fetch only missing modules.requirements.txt
orPipfile
pins exact versions; wheels avoid rebuilding the same code.from_pretrained("my-diffusion-pipeline")
behaves likenpm install
—reusing existing parts and pulling only what’s new.Beta Was this translation helpful? Give feedback.
All reactions