Commit Graph

68 Commits

Author SHA1 Message Date
Lincoln Stein
14c8738a71 fix dangling reference to _model_to_cpu and missing variable model_description 2023-03-09 21:41:45 -05:00
Kevin Turner
1a829bb998 pipeline: remove code for legacy model 2023-03-09 18:15:12 -08:00
Kevin Turner
9d339e94f2 backend..conditioning: remove code for legacy model 2023-03-09 18:15:12 -08:00
Kevin Turner
ad7b1fa6fb model_manager: model to/from CPU methods are implemented on the Pipeline 2023-03-09 18:15:12 -08:00
Kevin Turner
42355b70c2 fix(Pipeline.debug_latents): fix import for moved utility function 2023-03-09 18:15:12 -08:00
Kevin Turner
faa2558e2f chore: add new argument to overridden method to match new signature upstream 2023-03-09 18:15:12 -08:00
Kevin Turner
081397737b typo: docstring spelling fixes
looks like they've already been corrected in the upstream copy
2023-03-09 18:15:12 -08:00
Kevin Turner
55d36eaf4f fix: image_resized_to_grid_as_tensor: reconnect dropped multiple_of argument 2023-03-09 18:15:12 -08:00
Damian Stewart
9ee648e0c3
Merge branch 'main' into feat_longer_prompts 2023-03-09 00:13:01 +01:00
Jonathan
2db180d909
Make img2img strength 1 behave the same as txt2img (#2895)
* Fix img2img and inpainting code so a strength of 1 behaves the same as txt2img.

* Make generated images identical to their txt2img counterparts when strength is 1.
2023-03-08 22:50:16 +01:00
damian
69e2dc0404 update for compel changes 2023-03-08 20:45:01 +01:00
Damian Stewart
a38b75572f don't log excess tokens as truncated 2023-03-08 20:00:18 +01:00
damian
768e969c90 cleanup and fix kwarg 2023-03-08 18:00:54 +01:00
Damian Stewart
57db66634d longer prompts wip 2023-03-08 14:25:48 +01:00
Jonathan
c3ff9e6be8
Fixed startup issues with the web UI. (#2876) 2023-03-06 18:29:28 -05:00
Lincoln Stein
7c60068388
Merge branch 'main' into bugfix/fix-convert-sd-to-diffusers-error 2023-03-06 08:20:29 -05:00
Lincoln Stein
94daaa4abf fix call signature of import_diffuser_model() 2023-03-05 23:37:59 -05:00
Lincoln Stein
2f9dcd7906 support both epsilon and v-prediction v2 inference
There are actually two Stable Diffusion v2 legacy checkpoint
configurations:

1) "epsilon" prediction type for Stable Diffusion v2 Base
2) "v-prediction" type for Stable Diffusion v2-768

This commit adds the configuration file needed for epsilon prediction
type models as well as the UI that prompts the user to select the
appropriate configuration file when the code can't do so
automatically.
2023-03-05 22:51:40 -05:00
blessedcoolant
e537b5d8e1 Revert "Merge branch 'main' into bugfix/reenable-ckpt-conversion-to-ram"
This reverts commit e0e70c9222, reversing
changes made to 0b184913b9.
2023-03-06 14:29:39 +13:00
blessedcoolant
e0e70c9222 Merge branch 'main' into bugfix/reenable-ckpt-conversion-to-ram 2023-03-06 14:27:30 +13:00
Lincoln Stein
0b184913b9
Merge branch 'main' into bugfix/reenable-ckpt-conversion-to-ram 2023-03-05 12:37:43 -05:00
Lincoln Stein
92d012a92d
Merge branch 'main' into enhance/use-new-diffusers-path 2023-03-05 12:30:24 -05:00
Lincoln Stein
fc187f263e deal with non-directories in diffusers/ 2023-03-05 12:29:52 -05:00
Lincoln Stein
4e9e1b660d respect HF_HOME setting when migrating 2023-03-05 12:08:29 -05:00
Lincoln Stein
d01adedff5 give user chance to back out before migration 2023-03-05 12:04:31 -05:00
Lincoln Stein
b33655b0d6 restore automatic conversion of legacy files to diffusers pipelines 2023-03-05 11:45:25 -05:00
Lincoln Stein
81dee04dc9 during migration do not overwrite symlinks 2023-03-05 08:40:12 -05:00
Jonathan
114018e3e6
Unified spelling of Hugging Face 2023-03-05 07:30:35 -06:00
Lincoln Stein
ef8cf83b28 migrate to new HF diffusers cache location 2023-03-05 08:20:24 -05:00
Kevin Turner
c703b60986 remove legacy ldm code 2023-03-04 18:16:59 -08:00
Jonathan
9efeb1b2ec
Merge branch 'main' into bugfix/fix-scripts 2023-03-03 20:36:29 -06:00
mickr777
53c2c0f91d
Update txt2img2img.py 2023-03-04 12:58:33 +11:00
Lincoln Stein
bdc7b8b75a fix broken scripts
This PR fixes the following scripts:

1) Scripts that can be executed within the repo's scripts directory.
   Note that these are for development testing and are not intended
   to be exposed to the user.

   configure_invokeai.py - configuration
   dream.py              - the legacy CLI
   images2prompt.py      - legacy "dream prompt" retriever
   invoke-new.py         - new nodes-based CLI
   invoke.py             - the legacy CLI under another name
   make_models_markdown_table.py - a utility used during the release/doc process
   pypi_helper.py        - another utility used during the release process
   sd-metadata.py        - retrieve JSON-formatted metadata from a PNG file

2) Scripts that are installed by pip install. They get placed into the venv's
   PATH and are intended to be the official entry points:

   invokeai-node-cli      - new nodes-based CLI
   invokeai-node-web      - new nodes-based web server
   invokeai               - legacy CLI
   invokeai-configure     - install time configuration script
   invokeai-merge         - model merging script
   invokeai-ti            - textual inversion script
   invokeai-model-install - model installer
   invokeai-update        - update script
   invokeai-metadata"     - retrieve JSON-formatted metadata from PNG files
2023-03-03 20:19:37 -05:00
mickr777
1bfdd54810
Update txt2img2img.py 2023-03-04 11:23:21 +11:00
Lincoln Stein
3f53f1186d move diagnostic message to stderr; was confusing CI 2023-03-03 01:54:48 -05:00
Lincoln Stein
44400d2a66 fix incorrect import of merge code 2023-03-03 01:07:31 -05:00
Lincoln Stein
60a98cacef all vestiges of ldm.invoke removed 2023-03-03 01:02:00 -05:00
Lincoln Stein
6a990565ff all files migrated; tweaks needed 2023-03-03 00:02:15 -05:00
Lincoln Stein
3f0b0f3250 almost all of backend migrated; restoration next 2023-03-02 13:28:17 -05:00
Lincoln Stein
1a7371ea17 remove unused embeddings code 2023-03-01 21:09:22 -05:00
Lincoln Stein
850d1ee984 move models and modules under invokeai/backend/ldm 2023-03-01 18:24:18 -05:00
Lincoln Stein
2c7928b163 remove pycaches from repo 2023-02-28 23:25:35 -05:00
Lincoln Stein
5b6c61fc75 move models and generator into backend 2023-02-28 08:32:11 -05:00
Lincoln Stein
8c9764476c first phase of source tree restructure
This is the first phase of a big shifting of files and directories
in the source tree.

You will need to run `pip install -e .` before the code will work again!

Here's what's in the current commit:

1) Remove a lot of dead code that dealt with checkpoint and safetensor loading.
2) Entire ckpt_generator hierarchy is now gone!
3) ldm.invoke.generator.*   => invokeai.generator.*
4) ldm.model.*              => invokeai.model.*
5) ldm.invoke.model_manager => invokeai.model.model_manager

6) In addition, a number of frequently-accessed classes can be imported
   from the invokeai.model and invokeai.generator modules:

   from invokeai.generator import ( Generator, PipelineIntermediateState,
                                    StableDiffusionGeneratorPipeline, infill_methods)

   from invokeai.models import ( ModelManager, SDLegacyType
                                 InvokeAIDiffuserComponent, AttentionMapSaver,
                                 DDIMSampler, KSampler, PLMSSampler,
                                 PostprocessingSettings )
2023-02-27 23:52:46 -05:00
Kevin Turner
a3076cf951 perf(invoke_ai_web_server): encode intermediate result previews as jpeg
For size savings of about 80%, and jpeg encoding is still plenty fast.
2023-02-25 21:23:25 -08:00
Kevin Turner
17b039e85d doc(invoke_ai_web_server): put docstrings inside their functions
Documentation strings are the first thing inside the function body.
https://docs.python.org/3/tutorial/controlflow.html#defining-functions
2023-02-25 20:21:47 -08:00
blessedcoolant
7b7b31637c
Merge branch 'main' into refactor_use_compel 2023-02-23 07:43:30 +13:00
psychedelicious
7ffaa17551 fix(ui): use prompt bug when prompt has colon
This bug is related to the format in which we stored prompts for some time: an array of weighted subprompts.

This caused some strife when recalling a prompt if the prompt had colons in it, due to our recently introduced handling of negative prompts.

Currently there is no need to store a prompt as anything other than a string, so we revert to doing that.

Compatibility with structured prompts is maintained via helper hook.
2023-02-22 20:33:58 +11:00
Damian Stewart
97eac58a50 fix blend tokenizaiton reporting; fix LDM checkpoint support 2023-02-22 10:29:42 +01:00
Damian Stewart
cedbe8fcd7 fix .blend 2023-02-22 09:04:23 +01:00