InvokeAI/ldm/invoke
Lincoln Stein fc3378bb74
Load legacy ckpt files as diffusers models (#2468)
* refactor ckpt_to_diffuser to allow converted pipeline to remain in memory

- This idea was introduced by Damian
- Note that although I attempted to use the updated HuggingFace module
  pipelines/stable_diffusion/convert_from_ckpt.py, it was unable to
  convert safetensors files for reasons I didn't dig into.
- Default is to extract EMA weights.

* add --ckpt_convert option to load legacy ckpt files as diffusers models

- not quite working - I'm getting artifacts and glitches in the
  converted diffuser models
- leave as draft for time being

* do not include safety checker in converted files

* add ability to control which vae is used

API now allows the caller to pass an external VAE model to the
checkpoint conversion process. In this way, if an external VAE is
specified in the checkpoint's config stanza, this VAE will be used
when constructing the diffusers model.

Tested with both regular and inpainting 1.X models.

Not tested with SD 2.X models!

---------

Co-authored-by: Jonathan <34005131+JPPhoto@users.noreply.github.com>
Co-authored-by: Damian Stewart <null@damianstewart.com>
2023-02-02 20:15:44 +00:00
..
ckpt_generator Ensure free_gpu_mem option is passed into the generator (#2326) 2023-01-19 09:57:03 +07:00
generator fix(img2img): do not attempt to do a zero-step img2img when strength is low 2023-02-01 18:42:54 -08:00
restoration fix codeformer facexlib files being downloaded into .venv 2023-01-04 00:13:33 -05:00
__init__.py use 🧨diffusers model (#1583) 2023-01-15 09:22:46 -05:00
_version.py use 🧨diffusers model (#1583) 2023-01-15 09:22:46 -05:00
args.py Load legacy ckpt files as diffusers models (#2468) 2023-02-02 20:15:44 +00:00
ckpt_to_diffuser.py Load legacy ckpt files as diffusers models (#2468) 2023-02-02 20:15:44 +00:00
CLI.py Load legacy ckpt files as diffusers models (#2468) 2023-02-02 20:15:44 +00:00
concepts_lib.py improve embed trigger token not found error 2023-01-19 15:46:58 -05:00
conditioning.py Restore ldm/invoke/conditioning.py 2023-01-17 11:37:14 -08:00
configure_invokeai.py remove dependency on original clipseg library 2023-01-26 09:35:16 -05:00
devices.py do not use autocast for diffusers 2023-01-16 19:32:06 -05:00
globals.py Load legacy ckpt files as diffusers models (#2468) 2023-02-02 20:15:44 +00:00
image_util.py Global replace [ \t]+$, add "GB" (#1751) 2022-12-19 16:36:39 +00:00
log.py rename all modules from ldm.dream to ldm.invoke 2022-10-08 11:37:23 -04:00
merge_diffusers.py clean up merge_models 2023-01-26 15:10:16 -05:00
model_manager.py Load legacy ckpt files as diffusers models (#2468) 2023-02-02 20:15:44 +00:00
patchmatch.py defer patchmatch loading (#2039) 2022-12-20 15:32:35 -08:00
pngwriter.py correct bug when trying to enhance JPG images (#1928) 2022-12-11 13:48:47 -05:00
prompt_parser.py for cac make t_start=0.1 the default 2023-01-30 15:30:01 +01:00
readline.py use 🧨diffusers model (#1583) 2023-01-15 09:22:46 -05:00
seamless.py use 🧨diffusers model (#1583) 2023-01-15 09:22:46 -05:00
server_legacy.py Global replace [ \t]+$, add "GB" (#1751) 2022-12-19 16:36:39 +00:00
server.py Global replace [ \t]+$, add "GB" (#1751) 2022-12-19 16:36:39 +00:00
textual_inversion_training.py clean up merge_models 2023-01-26 15:10:16 -05:00
textual_inversion.py clean up tab/cursor behavior in textual inversion txt gui 2023-01-26 15:18:28 -05:00
txt2mask.py simplified code a bit 2023-01-26 09:46:34 -05:00