Lincoln Stein
e971a7f35c
when migrating models.yaml, rename original models.yaml.orig
2023-05-16 22:37:53 -04:00
Lincoln Stein
8d75e50435
partial port of invokeai-configure
2023-05-16 01:50:01 -04:00
Lincoln Stein
cd16857f38
fix None in model_type
2023-05-16 00:13:44 -04:00
Lincoln Stein
1442f1cb8d
change model filter to None in second place
2023-05-16 00:03:57 -04:00
Lincoln Stein
4fe94a9315
list_models() now returns a dict of {type,{name: info}}
2023-05-15 23:44:08 -04:00
Lincoln Stein
7ef0d2aa35
merge with main
2023-05-15 09:07:17 -04: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
Eugene Brodsky
c8a98a9a22
Merge branch 'main' into lstein/bugfix/compel
2023-05-14 14:43:18 -04:00
blessedcoolant
c4681774a5
Merge branch 'main' into logging-facelift
2023-05-15 02:08:29 +12:00
Damian Stewart
050add58d2
fix getting conditionings
2023-05-14 12:20:54 +02:00
Eugene
b72c9787a9
Revert "comment out customer_attention_context"
...
This reverts commit 8f8cd90787
.
Due to NameError: name 'options' is not defined
2023-05-14 00:37:55 -04:00
Eugene Brodsky
2623941d91
Merge branch 'main' into lstein/bugfix/compel
2023-05-13 22:23:59 -04:00
Lincoln Stein
baf5451fa0
Merge branch 'main' into lstein/new-model-manager
2023-05-13 22:01:34 -04:00
blessedcoolant
026d3260b4
Add Heun Karras Scheduler
2023-05-14 11:45:08 +10:00
Lincoln Stein
1103ab2844
merge with main
2023-05-13 21:35:19 -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
blessedcoolant
691e1bf829
Make debug messages cyan/blue
2023-05-14 09:06:57 +12:00
Lincoln Stein
2204e47596
allow submodels to be fetched independent of parent pipeline
2023-05-13 16:54:47 -04: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
b23c9f1da5
get Tuple type hint syntax right
2023-05-13 14:59:21 -04:00
Lincoln Stein
72967bf118
convert add_model(), del_model(), list_models() etc to use bifurcated names
2023-05-13 14:44:44 -04:00
Sergey Borisov
3b2a054f7a
Add model loader node; unet, clip, vae fields; change compel node to clip field
2023-05-13 04:37:20 +03:00
Sergey Borisov
131145eab1
A big refactor of model manager(according to IMHO)
2023-05-12 23:13:34 +03:00
Kent Keirsey
8f8cd90787
comment out customer_attention_context
2023-05-12 13:59:00 -04:00
blessedcoolant
d796ea7bec
feat: Logging Improvements
2023-05-13 02:13:49 +12:00
Eugene Brodsky
af060188bd
Merge branch 'main' into lstein/bugfix/compel
2023-05-12 08:22:18 -04:00
Kevin Turner
4caa1f19b2
fix(model manager): fix string formatting error on model checksum timer
2023-05-11 19:06:02 -07:00
Lincoln Stein
df5b968954
model manager now running as a service
2023-05-11 21:24:29 -04:00
Lincoln Stein
95d4bd3012
Merge branch 'lstein/bugfix/compel' of github.com:invoke-ai/InvokeAI into lstein/bugfix/compel
2023-05-11 21:13:29 -04:00
Lincoln Stein
037078c8ad
make InvokeAIDiffuserComponent.custom_attention_control a classmethod
2023-05-11 21:13:18 -04:00
blessedcoolant
f7dc171c4f
Rename default schedulers across the app
2023-05-12 03:44:20 +12:00
blessedcoolant
4b957edfec
Add DDPM Scheduler
2023-05-12 03:18:34 +12:00
blessedcoolant
46ca7718d9
Add DEIS Scheduler
2023-05-12 03:10:30 +12:00
blessedcoolant
b928d7a6e6
Change scheduler names to be accurate
...
_a = Ancestral
_k = Karras
2023-05-12 02:59:43 +12:00
blessedcoolant
8a836247c8
Add DPMPP Single, Euler Karras and DPMPP2 Multi Karras Schedulers
2023-05-12 02:23:33 +12:00
blessedcoolant
9a383e456d
Codesplit SCHEDULER_MAP for reusage
2023-05-12 00:40:03 +12:00
blessedcoolant
3ffff023b2
Add missing key to scheduler_map
...
It was breaking coz the sampler was not being reset. So needs a key on each. Will simplify this later.
2023-05-12 00:08:50 +12:00
blessedcoolant
d1029138d2
Default to DDIM if scheduler is missing
2023-05-11 22:54:35 +12:00
blessedcoolant
06b5800d28
Add UniPC Scheduler
2023-05-11 22:43:18 +12:00
Eugene Brodsky
3baa230077
Merge branch 'main' into lstein/bugfix/compel
2023-05-11 00:50:45 -04:00
Eugene
9e594f9018
pad conditioning tensors to same length
...
fixes crash when prompt length is greater than 75 tokens
2023-05-11 00:34:15 -04:00
Lincoln Stein
8ad8c5c67a
resolve conflicts with main
2023-05-11 00:19:20 -04:00
Lincoln Stein
4627910c5d
added a wrapper model_manager_service and model events
2023-05-11 00:09:19 -04:00
psychedelicious
49db6f4fac
fix(nodes): fix trivial typing issues
2023-05-11 11:55:51 +10:00
psychedelicious
206e6b1730
feat(nodes): wip inpaint node
2023-05-11 11:55:51 +10:00
Lincoln Stein
5d5157fc65
make conditioning.py work with compel 1.1.5
2023-05-10 18:08:33 -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
647ffb2a0f
defined abstract baseclass for model manager service
2023-05-06 22:41:19 -04:00
Lincoln Stein
afd2e32092
Merge branch 'main' into lstein/global-configuration
2023-05-06 21:20:25 -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
d866dcb3d2
close #3343
2023-05-04 20:30:59 -04:00
Lincoln Stein
e4196bbe5b
adjust non-app modules to use new config system
2023-05-04 00:43:51 -04:00
Lincoln Stein
15ffb53e59
remove globals, args, generate and the legacy CLI
2023-05-03 23:36:51 -04:00
Lincoln Stein
90054ddf0d
use InvokeAISettings for app-wide configuration
2023-05-03 22:30:30 -04:00
Lincoln Stein
a273bdbdc1
Merge branch 'main' into lstein/new-model-manager
2023-05-03 18:09:29 -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
974841926d
logger is a interchangeable service
2023-04-29 10:48:50 -04:00
Lincoln Stein
8db20e0d95
rename log to logger throughout
2023-04-29 09:43:40 -04:00
Lincoln Stein
6b79e2b407
Merge branch 'main' into enhance/invokeai-logs
...
- resolve conflicts
- remove unused code identified by pyflakes
2023-04-28 10:09:46 -04:00
Lincoln Stein
956ad6bcf5
add redesigned model cache for diffusers & transformers
2023-04-28 00:41:52 -04:00
Lincoln Stein
31a904b903
Merge branch 'main' into bugfix/prevent-cli-crash
2023-04-25 03:28:45 +01:00
Lincoln Stein
4fa5c963a1
Merge branch 'main' into bugfix/prevent-cli-crash
2023-04-25 03:10:51 +01:00
Lincoln Stein
b164330e3c
replaced remaining print statements with log.*()
2023-04-18 20:49:00 -04:00
Lincoln Stein
69433c9f68
Merge branch 'main' into lstein/enhance/diffusers-0.15
2023-04-18 19:21:53 -04:00
Lincoln Stein
bd8ffd36bf
bump to diffusers 0.15.1, remove dangling module
2023-04-18 19:20:38 -04:00
Tim Cabbage
f6cdff2c5b
[bug] #3218 HuggingFace API off when --no-internet set
...
https://github.com/invoke-ai/InvokeAI/issues/3218
Huggingface API will not be queried if --no-internet flag is set
2023-04-17 16:53:31 +02:00
Lincoln Stein
aab262d991
Merge branch 'main' into bugfix/prevent-cli-crash
2023-04-14 20:12:38 -04:00
Lincoln Stein
47b9910b48
update to diffusers 0.15 and fix code for name changes
...
- This is a port of #3184 to the main branch
2023-04-14 15:35:03 -04:00
Lincoln Stein
0b0e6fe448
convert remainder of print() to log.info()
2023-04-14 15:15:14 -04:00
Lincoln Stein
c132dbdefa
change "ialog" to "log"
2023-04-11 18:48:20 -04:00
Lincoln Stein
f3081e7013
add module-level getLogger() method
2023-04-11 12:23:13 -04:00
Lincoln Stein
f904f14f9e
add missing module-level methods
2023-04-11 11:10:43 -04:00
Lincoln Stein
8917a6d99b
add logging support
...
This commit adds invokeai.backend.util.logging, which provides support
for formatted console and logfile messages that follow the status
reporting conventions of earlier InvokeAI versions.
Examples:
### A critical error (logging.CRITICAL)
*** A non-fatal error (logging.ERROR)
** A warning (logging.WARNING)
>> Informational message (logging.INFO)
| Debugging message (logging.DEBUG)
This style logs everything through a single logging object and is
identical to using Python's `logging` module. The commonly-used
module-level logging functions are implemented as simple pass-thrus
to logging:
import invokeai.backend.util.logging as ialog
ialog.debug('this is a debugging message')
ialog.info('this is a informational message')
ialog.log(level=logging.CRITICAL, 'get out of dodge')
ialog.disable(level=logging.INFO)
ialog.basicConfig(filename='/var/log/invokeai.log')
Internally, the invokeai logging module creates a new default logger
named "invokeai" so that its logging does not interfere with other
module's use of the vanilla logging module. So `logging.error("foo")`
will go through the regular logging path and not add the additional
message decorations.
For more control, the logging module's object-oriented logging style
is also supported. The API is identical to the vanilla logging
usage. In fact, the only thing that has changed is that the
getLogger() method adds a custom formatter to the log messages.
import logging
from invokeai.backend.util.logging import InvokeAILogger
logger = InvokeAILogger.getLogger(__name__)
fh = logging.FileHandler('/var/invokeai.log')
logger.addHandler(fh)
logger.critical('this will be logged to both the console and the log file')
2023-04-11 10:46:38 -04:00
Lincoln Stein
5a4765046e
add logging support
...
This commit adds invokeai.backend.util.logging, which provides support
for formatted console and logfile messages that follow the status
reporting conventions of earlier InvokeAI versions.
Examples:
### A critical error (logging.CRITICAL)
*** A non-fatal error (logging.ERROR)
** A warning (logging.WARNING)
>> Informational message (logging.INFO)
| Debugging message (logging.DEBUG)
2023-04-11 09:33:28 -04:00
AbdBarho
de189f2db6
Increase chunk size when computing SHAs
2023-04-09 21:53:59 +02:00
Lincoln Stein
8334757af9
Merge branch 'main' into bugfix/prevent-cli-crash
2023-04-07 18:55:54 -04:00
Lincoln Stein
d1b2b99226
Merge branch 'main' into bugfix/remove-autoimport-dead-code
2023-04-07 09:59:58 -04:00
Lincoln Stein
4c339dd4b0
refactor get_submodels() into individual methods
2023-04-06 17:08:23 -04:00
Lincoln Stein
d44151d6ff
add a new method to model_manager that retrieves individual pipeline parts
...
- New method is ModelManager.get_sub_model(model_name:str,model_part:SDModelComponent)
To use:
```
from invokeai.backend import ModelManager, SDModelComponent as sdmc
manager = ModelManager('/path/to/models.yaml')
vae = manager.get_sub_model('stable-diffusion-1.5', sdmc.vae)
```
2023-04-05 17:25:42 -04:00
Lincoln Stein
1f89cf3343
remove vestiges of non-functional autoimport code for legacy checkpoints
...
- Closes #3075
2023-03-31 04:27:03 -04:00
Lincoln Stein
b9df9e26f2
Merge branch 'main' into enhance/support-another-embedding-format-main
2023-03-30 07:51:23 -04:00
Lincoln Stein
e11c1d66ab
handle multiple tokens and embeddings in single file
2023-03-29 22:05:06 -04:00
Lincoln Stein
3c4b6d5735
Merge branch 'main' into enhance/heuristic-import-improvements
2023-03-29 16:54:43 -04:00