Sergey Borisov
2533209326
Rewrite cache to weak references
2023-05-23 03:48:22 +03:00
Lincoln Stein
259d6ec90d
fixup cachedir call
2023-05-18 14:52:16 -04:00
Lincoln Stein
d96175d127
resolve some undefined symbols in model_cache
2023-05-18 14:31:47 -04:00
Lincoln Stein
b1a99d772c
added method to convert vaes
2023-05-18 13:31:11 -04:00
Sergey Borisov
fd82763412
Model manager draft
2023-05-18 03:56:52 +03:00
Lincoln Stein
c8f765cc06
improve debugging messages
2023-05-14 18:29:55 -04:00
Lincoln Stein
b9e9087dbe
do not manage GPU for pipelines if sequential_offloading is True
2023-05-14 18:09:38 -04:00
Lincoln Stein
63e465eb5c
tweaks to get_model()
behavior
...
1. If an external VAE is specified in config file, then
get_model(submodel=vae) will return the external VAE, not the one
burnt into the parent diffusers pipeline.
2. The mechanism in (1) is generalized such that you can now have
"unet:", "text_encoder:" and similar stanzas in the config file.
Valid formats of these subsections:
unet:
repo_id: foo/bar
unet:
path: /path/to/local/folder
unet:
repo_id: foo/bar
subfolder: unet
In the near future, these will also be used to attach external
parts to the pipeline, generalizing VAE behavior.
3. Accommodate callers (i.e. the WebUI) that are passing the
model key ("diffusers/stable-diffusion-1.5") to get_model()
instead of the tuple of model_name and model_type.
4. Fixed bug in VAE model attaching code.
5. Rebuilt web front end.
2023-05-14 16:50:59 -04:00
Lincoln Stein
b31a6ff605
fix reversed args in _model_key() call
2023-05-13 21:11:06 -04:00
Sergey Borisov
1f602e6143
Fix - apply precision to text_encoder
2023-05-14 03:46:13 +03:00
Sergey Borisov
039fa73269
Change SDModelType enum to string, fixes(model unload negative locks count, scheduler load error, saftensors convert, wrong logic in del_model, wrong parse metadata in web)
2023-05-14 03:06:26 +03:00
Lincoln Stein
d8b1f29066
proxy SDModelInfo so that it can be used directly as context
2023-05-13 16:29:18 -04:00
Lincoln Stein
99c692f397
check that model name matches format
2023-05-09 23:46:59 -04:00
Lincoln Stein
3d85e769ce
clean up ckpt handling
...
- remove legacy ckpt loading code from model_cache
- added placeholders for lora and textual inversion model loading
2023-05-09 22:44:58 -04:00
Lincoln Stein
9cb962cad7
ckpt model conversion now done in ModelCache
2023-05-08 23:39:44 -04:00
Lincoln Stein
a108155544
added StALKeR779's great model size calculating routine
2023-05-08 21:47:03 -04:00
Lincoln Stein
c15b49c805
implement StALKeR7779 requested API for fetching submodels
2023-05-07 23:18:17 -04:00
Lincoln Stein
fd63e36822
optimize subfolder so that it returns submodel if parent is in RAM
2023-05-07 21:39:11 -04:00
Lincoln Stein
4649920074
adjust t2i to work with new model structure
2023-05-07 19:06:49 -04:00
Lincoln Stein
667171ed90
cap model cache size using bytes, not # models
2023-05-07 18:07:28 -04:00
Lincoln Stein
05a27bda5e
generalize model loading support, include loras/embeds
2023-05-06 15:58:44 -04:00
Lincoln Stein
e0214a32bc
mostly ported to new manager API; needs testing
2023-05-06 00:44:12 -04:00
Lincoln Stein
af8c7c7d29
model manager rewritten to use model_cache; API changed!
2023-05-05 19:32:28 -04:00
Lincoln Stein
a4e36bc02a
when model is forcibly moved into RAM update loaded_models set
2023-05-04 23:28:03 -04:00
Lincoln Stein
68bc0112fa
implement lazy GPU offloading and ref counting
2023-05-04 23:15:32 -04:00
Lincoln Stein
e1fed52c66
work on model cache and its regression test finished
2023-05-03 12:38:18 -04:00
Lincoln Stein
bb959448c1
implement hashing for local & remote models
2023-05-02 16:52:27 -04:00
Lincoln Stein
2e2abf6ea6
caching of subparts working
2023-05-01 22:57:30 -04:00
Lincoln Stein
956ad6bcf5
add redesigned model cache for diffusers & transformers
2023-04-28 00:41:52 -04:00