mlc-ai / mlc-ai/web-stable-diffusion

Loading models from disk

Open
#8 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
3.7k
Forks
238
PR merge metrics
No merged PRs in 30d

Description

First, this is extremely cool.

Second: I note that there are an absolute ton of models derived from Stable Diffusion around. Depending on your device, you might be able to fit a few of them in the cache TVM uses, but it requires duplicating the entire model, which is a waste of disk space if you have a local copy. (This matters a lot when you have dozens of models i.e. hundreds of GBs' worth.) And if it gets evicted from the cache, or try to run it in another browser or an incognito window or whatever, you have to download it again.

It would be nice if you could keep your model files on disk and load them into memory without making a copy (either using the file system API or drag-and-drop). Is that something that could happen? Poking around a bit, it seems like maybe that would require a change to TVM, but I don't know for sure.

(Someday I'd like to get to a place where whole fancy UIs for stable diffusion, including all of the computation, can be hosted on Github Pages, ideally multiple such UIs. And for multiple UIs to be practical, they'll need to be able to load models from disk, since they can't share the cache.)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining TVM's model-loading support and the browser File System Access and drag-and-drop APIs mentioned in the issue. The issue names no repository files or tests; done would mean loading local Stable Diffusion model files into memory without duplicating them into the browser cache.

Written by the indexing model from the issue text.

Assessment

Domain
machine-learning, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.