Commit Graph

5940 Commits

Author SHA1 Message Date
psychedelicious
7ca447ded1 fix(config): use new config setup in api_app.py 2024-03-19 09:24:28 +11:00
psychedelicious
4df28f1de6 fix(config): use yaml module instead of omegaconf when migrating models.yaml
Also use new paths.
2024-03-19 09:24:28 +11:00
psychedelicious
ebd0cb6113 fix(config): remove reference to internet_available
Nothing ever set this. Only a debug print statement referenced it.
2024-03-19 09:24:28 +11:00
psychedelicious
fbe3afa5e1 fix(config): fix nsfw_checker handling
This setting was hardcoded to True. Rework logic around it to not conditionally check the setting.
2024-03-19 09:24:28 +11:00
psychedelicious
3fb116155b refactor(config): simplified config
- Remove OmegaConf. It functioned as an intermediary data format, between YAML/argparse and pydantic. It's not necessary - we can parse YAML or CLI args directly with pydantic.

- Remove dynamic CLI args. Only `root` is explicitly supported. This greatly simplifies config handling. Configuration is done by editing the YAML file. Frequently-used args can be added if there is a demand.

- A separate arg parser is created to handle the slimmed-down CLI args. It's run immediately in the `invokeai-web` script to handle `--version` and `--help`. It is also used inside the singleton config getter (see below).

- Remove categories from the config. Our settings model is mostly flat. Handling categories adds complexity for both us and users - we have to handle transforming a flat config to categorized config (and vice-versa), while users have to be careful with indentation in their YAML file.

- Add a `meta` key to the config file. Currently, this holds the config schema version only. It is not a part of the config object itself.

- Remove legacy settings that are no longer referenced, or were effectively no-op settings when referenced in code.

- Implement simple migration logic to for v3 configs. If migration is successful, the v3 config file is backed up to `invokeai.yaml.bak` and the new config written to `invokeai.yaml`.

- Previously, the singleton config was accessed by calling `InvokeAIAppConfig.get_config()`. This returned an instance of `InvokeAIAppConfig`, which _also_ has the `get_config` function. This created to a confusing situation where you weren't sure if you needed to call `get_config` or just use the config object. This method is replaced by a standalone `get_config` function which returns a singleton config object.

- Wrap CLI arg parsing (for `root`) and loading/migrating `invokeai.yaml` into the new `get_config()` function.

- Move `generate_config_docstrings` into standalone utility function.

- Make `root` a private attr (`_root`). This reduces the temptation to directly modify and or use this sensitive field and ensures it is neither serialized nor read from input data. Use `root_path` to access the resolved root path, or `set_root` to set the root to something.
2024-03-19 09:24:28 +11:00
Lincoln Stein
7387b0bdc9
install missing clip_vision encoders if required by an ip adapter (#5982)
Co-authored-by: Lincoln Stein <lstein@gmail.com>
2024-03-18 02:19:53 +00:00
Lincoln Stein
7ea9cac9a3
Add sdxl controlnet models (#5980)
* allow removal of models with legacy relative path addressing

* added five controlnet models for sdxl to INITIAL_MODELS

---------

Co-authored-by: Lincoln Stein <lstein@gmail.com>
2024-03-18 01:15:15 +00:00
Brandon Rising
ea5bc94b9c Resolve when instantiating _cached_model_paths 2024-03-18 11:17:23 +11:00
Brandon Rising
a1743647b7 Stop registering and moving models which have symlinks in the models dir 2024-03-18 11:17:23 +11:00
Lincoln Stein
71a1740740 Remove core safetensors->diffusers conversion models
- No longer install core conversion models. Use the HuggingFace cache to load
  them if and when needed.

- Call directly into the diffusers library to perform conversions with only shallow
   wrappers around them to massage arguments, etc.

- At root configuration time, do not create all the possible model subdirectories,
  but let them be created and populated at model install time.

- Remove checks for missing core conversion files, since they are no
  longer installed.
2024-03-17 19:13:18 -04:00
Lincoln Stein
a0420d1442 fix ruff error 2024-03-17 14:01:04 -04:00
Lincoln Stein
a17021ba0c allow removal of models with legacy relative path addressing 2024-03-17 09:58:16 -04:00
Mary Hipp
8c04eec210 fix initial main model logic 2024-03-15 10:22:16 -04:00
Brandon Rising
330e1354b4 Run typegen, update version to 4.0.0rc2 2024-03-14 17:01:36 -04:00
psychedelicious
21621eebf0 feat(ui): handle control adapter processed images
- Add helper functions to build metadata for control adapters, including the processed images
- Update parses to parse the new metadata
2024-03-14 12:34:03 -07:00
psychedelicious
c24f2046e7 chore(ui): typegen 2024-03-14 12:34:03 -07:00
psychedelicious
297408d67e feat(nodes): add control adapter processed images to metadata
In the client, a controlnet or t2i adapter has two images:
- The source control image: the image the user selected (required)
- The processed control image: the user's image after we've processed it (optional)

The processed image is optional because a user may provide a pre-processed image.

We only actually use one of these images when building the graph, and until this change, we only stored one of the in image metadata. This created a situation where only a processed image was stored in metadata - say, a canny edge map - and the user-selected image wasn't provided.

By adding the processed image to metadata, we can recall both the control image and optional processed image.

This commit is followed by a UI-facing changes to support the change.
2024-03-14 12:34:03 -07:00
psychedelicious
0131e7d928 fix(ui): recall control adapter metadata fields 2024-03-14 12:34:03 -07:00
psychedelicious
06ff105a1f fix(ui): reset loras/control adapters when using recall all or remix 2024-03-14 12:34:03 -07:00
psychedelicious
328dc99f3a fix(ui): log model load events
- Fix types
- Fix logging in listener
2024-03-14 18:29:55 +05:30
psychedelicious
ef55077e84 feat(events): add submodel_type to model load events
This was lost during MM2 migration
2024-03-14 18:29:55 +05:30
psychedelicious
ba3d8af161 fix(events): dump event payloads to serializable format 2024-03-14 18:29:55 +05:30
psychedelicious
19d66d5ec7 feat(ui): single getModelConfigs query
Single query, with simple wrapper hooks (type-safe). Updated everywhere in frontend.
2024-03-14 23:37:40 +11:00
psychedelicious
fed1f983db fix(nodes): depth anything processor (#5956)
We were passing a PIL image when we needed to pass the np image.

Closes #5956
2024-03-14 20:14:53 +11:00
psychedelicious
a386544a1d chore: ruff 2024-03-14 17:32:02 +11:00
Lincoln Stein
0851de9090 closes #5932 2024-03-14 17:32:02 +11:00
Lincoln Stein
1bd8e33f8c Work around missing core conversion model issue
- This adds additional logic to the safetensors->diffusers conversion script
  to check for and install missing core conversion models at runtime.

- Fixes #5934
2024-03-14 16:52:01 +11:00
psychedelicious
3fd824306c feat(mm): probe for main model default settings
Currently, this is just the width and height, derived from the model base.
2024-03-14 16:03:37 +11:00
psychedelicious
2584a950aa feat(ui): add w/h to default model settings 2024-03-14 16:03:37 +11:00
psychedelicious
1adaf63253 chore(ui): typegen 2024-03-14 16:03:37 +11:00
psychedelicious
b9f1a4bd65 feat(nodes): add w/h defaults for models 2024-03-14 16:03:37 +11:00
psychedelicious
731942dbed feat(nodes): add constraints & descriptions to default settings 2024-03-14 16:03:37 +11:00
psychedelicious
4117cea5bf tidy(mm): remove misplaced comment 2024-03-14 15:54:42 +11:00
psychedelicious
21617f3bc1 docs: update description for hashing_algorithm in config 2024-03-14 15:54:42 +11:00
psychedelicious
9fcd67b5c0 feat(mm): add algorithm prefix to hashes
For example:
- md5:a0cd925fc063f98dbf029eee315060c3
- sha1:9e362940e5603fdc60566ea100a288ba2fe48b8c
- blake3:ce3f0c5f3c05d119f4a5dcaf209b50d3149046a0d3a9adee9fed4c83cad6b4d0
2024-03-14 15:54:42 +11:00
psychedelicious
a4be935458 docs: update config docs 2024-03-14 15:54:42 +11:00
psychedelicious
eb6e6548ed feat(mm): faster hashing for spinning disk HDDs
BLAKE3 has poor performance on spinning disks when parallelized. See https://github.com/BLAKE3-team/BLAKE3/issues/31

- Replace `skip_model_hash` setting with `hashing_algorithm`. Any algorithm we support is accepted.
- Add `random` algorithm: hashes a UUID with BLAKE3 to create a random "hash". Equivalent to the previous skip functionality.
- Add `blake3_single` algorithm: hashes on a single thread using BLAKE3, fixes the aforementioned performance issue
- Update model probe to accept the algorithm to hash with as an optional arg, defaulting to `blake3`
- Update all calls of the probe to use the app's configured hashing algorithm
- Update an external script that probes models
- Update tests
- Move ModelHash into its own module to avoid circuclar import issues
2024-03-14 15:54:42 +11:00
Josh Corbett
8287fcf097 feat: ✏️ rename "Workflow Editor" tab label to "Workflows" 2024-03-14 12:22:23 +11:00
psychedelicious
dd475e28ed chore(ui): remove unused translation keys via script 2024-03-14 11:38:29 +11:00
psychedelicious
24e741e2d1 feat(ui): add script to clean translations
This script removes unused translations from the `en.json` source translation file:
- Parse `en.json` to build a list of all keys, e.g. `controlnet.depthAnything`
- Check every frontend file for every key
- If the key is not found, it is removed from the translation file
- Exact matches (e.g. `controlnet.depthAnything`) and stem matches (e.g. `depthAnything`) are ignored
2024-03-14 11:38:29 +11:00
psychedelicious
e0bf9ce5c6 tidy(ui): use normal quotes in translations 2024-03-14 11:38:29 +11:00
psychedelicious
c66e8b395e fix(ui): remove unused input on depth anything processor node 2024-03-14 10:53:57 +11:00
psychedelicious
4c417adc82 fix(ui): use revised metadata model types
We can also totally remove the fetch logic because we store the same model data in state now.
2024-03-14 10:53:57 +11:00
psychedelicious
437a413ca3 chore(ui): typegen 2024-03-14 10:53:57 +11:00
psychedelicious
4492bedd19 tidy(nodes): use ModelIdentifierField for model metadata
Until recently, this had a different shape than the ModelMetadataField. They are now the same, so we can re-use the ModelIdentifierField.
2024-03-14 10:53:57 +11:00
psychedelicious
db12ce95a8 fix(ui): invalid collect node error w/ control adapters
The graph builders used awaited functions within `Array.prototype.forEach` loops. This doesn't do what you'd think. This caused graphs to be enqueued before they were fully constructed.

 Changed to `for..of` loops to fix this.
2024-03-14 10:53:57 +11:00
psychedelicious
ee3a1a95ef fix(ui): control adapters require control images
There wasn't enough validation of control adapters during graph building. It would be possible for a graph to be built with empty collect node, causing an error. Addressed with an extra check.

This should never happen in practice, because the invoke button should be disabled if an invalid CA is active.
2024-03-14 10:53:57 +11:00
psychedelicious
4bb5aba70e feat(ui): only fetch TIs on first load, add comment 2024-03-14 07:38:09 +11:00
Mary Hipp
cd55c23713 initiate TI model query when socket connects so user doesnt have to wait when opening prompt trigger phrases 2024-03-14 07:38:09 +11:00
Mary Hipp
1d2743af1b remove log 2024-03-14 07:25:48 +11:00
Mary Hipp
99d2099ccd add key for controladapter CustomSelect too 2024-03-14 07:25:48 +11:00
Mary Hipp
b64a693f16 try adding a key to force rerender when items load 2024-03-14 07:25:48 +11:00
blessedcoolant
af660163ca chore: cleanup DepthAnything code 2024-03-13 20:35:52 +05:30
psychedelicious
c73f58e486 docs: move frontend docs to mkdocs 2024-03-13 22:43:20 +11:00
psychedelicious
614fece147 chore(ui): prettier 2024-03-13 21:02:29 +11:00
psychedelicious
8ef8082d65 feat(ui): style add model panel 2024-03-13 21:02:29 +11:00
psychedelicious
d93d4afbb7 feat(ui): style HF scan tab 2024-03-13 21:02:29 +11:00
psychedelicious
01207a2fa5 fix(mm): config.json to indicates diffusers model 2024-03-13 21:02:29 +11:00
Jennifer Player
d0800c4888 ui consistency, moved is_diffusers logic to backend, extended HuggingFaceMetadata, removed logic from service 2024-03-13 21:02:29 +11:00
Jennifer Player
2a300ecada updated add model copy, added search to hugging face results 2024-03-13 21:02:29 +11:00
Jennifer Player
90340a39c7 clean up python errors 2024-03-13 21:02:29 +11:00
Jennifer Player
ee77abb4fe updated simple install button to match other tabs 2024-03-13 21:02:29 +11:00
Jennifer Player
004bca5c42 updated endpoint types 2024-03-13 21:02:29 +11:00
Jennifer Player
5ad048a161 fixed error handling 2024-03-13 21:02:29 +11:00
Jennifer Player
6369ccd05e added placeholders, updated some copy 2024-03-13 21:02:29 +11:00
Jennifer Player
3a5314f1ca install model if diffusers or single file, cleaned up backend logic to not mess with existing model install 2024-03-13 21:02:29 +11:00
Jennifer Player
4c0896e436 removed log 2024-03-13 21:02:29 +11:00
Jennifer Player
f7cd3cf1f4 added hf models import tab and route for getting available hf models 2024-03-13 21:02:29 +11:00
Mary Hipp
d0d695c020 disable trigger phrase form if empty 2024-03-12 21:08:15 -04:00
Jennifer Player
2a648da557 updated model manager to display when import item is cancelled 2024-03-13 09:18:05 +11:00
Brandon Rising
8d2a4db902 Found another instance of expecting a mid_block on the decoder in a vae 2024-03-12 12:11:38 -04:00
Brandon Rising
7b393656de Update l2i invoke and seamless to support AutoencoderTiny, remove attention processors if no mid_block is detected 2024-03-12 12:00:24 -04:00
psychedelicious
43948e0758 feat(ui): add setting for always show image size badge 2024-03-12 18:52:23 +11:00
psychedelicious
cc03fcbcb6 style(ui): tweak image dimension badge overlay styles 2024-03-12 18:52:23 +11:00
Rohinish
d1e445fa49 fix(ui): changed to theme tokens 2024-03-12 18:52:23 +11:00
Rohinish
adba8489f2 fix(ui): made changes to avoid overlapping 2024-03-12 18:52:23 +11:00
Rohinish
d919022ba5 fix(ui): fixed requested changes and made the badge display on hover 2024-03-12 18:52:23 +11:00
Rohinish
e076898798 fix(ui): logic to remove badge for small image size 2024-03-12 18:52:23 +11:00
Rohinish
9f19b766a4 feat(ui): Add image size badge to gallery images 2024-03-12 18:52:23 +11:00
Brandon Rising
be951da99d {release} 4.0.0rc1 2024-03-12 10:05:03 +11:00
Ryan Dick
9ee2e7ff25 Do not override log_memory_usage when debug logs are enabled. The speed cost of log_memory_usage=True is large. It is common to want debug log without enabling log_memory_usage. 2024-03-12 09:48:50 +11:00
Brandon Rising
149ff758b9 Run ruff 2024-03-11 15:53:00 -04:00
Brandon Rising
65d415d5aa Remove redundant with_suffix call 2024-03-11 15:53:00 -04:00
Brandon Rising
c74c1927ec Gracefully error without deleting invokeai.yaml 2024-03-11 15:53:00 -04:00
Brandon Rising
c454ccc65c Run ruff 2024-03-11 15:53:00 -04:00
Brandon Rising
46fd3465ce Skip list logic if the list only contains primitives 2024-03-11 15:53:00 -04:00
Brandon Rising
97afa6e2a6 Allow lists of basemodel objects in omegaconf 2024-03-11 15:53:00 -04:00
psychedelicious
8c2ff794d5 fix(nodes): ip adapter uses valid ModelIdentifierField for image encoder model
- Add class method to `ModelIdentifierField` to construct the field from a model config
- Use this to construct a valid IP adapter model field
2024-03-10 17:28:58 -05:00
Ryan Dick
145bb45858 Remove dead code related to an old symmetry feature. 2024-03-10 00:13:18 -06:00
psychedelicious
9376b13435 fix(mm): models lose file extension when syncing
We were stripping the file extension from file models when  moving them in `_sync_model_path`. For example, `some_model.safetensors` would be moved to `some_model`, which of course breaks things.

Instead of using the model's name as the new path, use the model's path's last segment. This is the same behaviour for directories, but for files, it retains the file extension.
2024-03-10 13:36:09 +11:00
psychedelicious
eec82afd89 fix(mm): fix models.yaml backup filename
Was erroneously `models.bak`, now `models.yaml.bak`
2024-03-10 13:36:09 +11:00
psychedelicious
c47dbf7258 docs(mm): format docstrings for ModelSearch 2024-03-10 12:09:47 +11:00
psychedelicious
92b2e8186a tidy(mm): simplify types for ModelSearch
- Use `set` instead of `Set`
- Methods accept only `Path`s
2024-03-10 12:09:47 +11:00
psychedelicious
70a88c6b99 docs(mm): update docstrings for ModelSearch 2024-03-10 12:09:47 +11:00
psychedelicious
56e7c04475 tidy(mm): remove extraneous dependencies in model search
- `config` is unused
- `stats` is created on instantiation
- `logger` uses the app logger
2024-03-10 12:09:47 +11:00
psychedelicious
bd5b43c00d tidy(mm): ModelSearch cleanup
- No need for it to by a pydantic model. Just a class now.
- Remove ABC, it made it hard to understand what was going on as attributes were spread across the ABC and implementation. Also, there is no other implementation.
- Add tests
2024-03-10 12:09:47 +11:00
dunkeroni
631e789195 fix(canvas): create masked latents when None 2024-03-10 11:58:41 +11:00
psychedelicious
133c90e116 fix(ui): update all components and logic to use enriched ModelIdentifierField 2024-03-10 11:03:38 +11:00
psychedelicious
4433b78e59 chore(ui): typegen 2024-03-10 11:03:38 +11:00
psychedelicious
daeb766468 feat(api): add ModelIdentifierField to openapi schema
- Also add `ProgressImage`
2024-03-10 11:03:38 +11:00
psychedelicious
92b0d13d0e feat(nodes): "ModelField" -> "ModelIdentifierField", add hash/name/base/type 2024-03-10 11:03:38 +11:00
psychedelicious
5b51ebf1c4 docs: regenerate config docstrings 2024-03-10 10:38:52 +11:00
psychedelicious
59228643a9 docs: skip_model_hash -> model install category, use_memory_db -> development category 2024-03-10 10:38:52 +11:00
psychedelicious
b24657df11 docs: roll back adding examples to config docstrings
This isn't a valid docstring syntax and breaks the autogeneration
2024-03-10 10:38:52 +11:00
psychedelicious
d4686b7f64 fix(mm): yaml migration fixup
- If the metadata yaml has an invalid version, exist the app. If we don't, the app will crawl the models dir and add models to the db without having first parsed `models.yaml`. This should not happen often, as the vast majority of users are on v3.0.0 models.yaml files.
- Fix off-by-one error with models count (need to pop the `__metadata__` stanza
- After a successful migration, rename `models.yaml` to `models.yaml.bak` to prevent the migration logic from re-running on subsequent app startups.
2024-03-09 08:37:45 -06:00
psychedelicious
67163c2224 fix(mm): only move model files if necessary
The old logic to check if a model needed to be moved relied on the model path being a relative path. Paths are now absolute, causing this check to fail. We then assumed the paths were different and moved the model from its current location to, well, its current location.

Use more resilient method to check if a model should be moved.
2024-03-09 22:58:26 +11:00
Brandon Rising
f01e81d382 Run ruff 2024-03-08 18:46:17 -05:00
maryhipp
a50e0a4802 use correct key name from yaml 2024-03-08 18:46:17 -05:00
maryhipp
df0a5aa92a pass config_path to migration path, make sure it uses absolute path 2024-03-08 18:46:17 -05:00
Brandon Rising
0bd9a0a9ea Add ability to provide config examples in docs 2024-03-08 16:31:39 -05:00
Brandon Rising
4ae2cd242e Update to include remote_api_tokens in the config docs 2024-03-08 16:31:39 -05:00
psychedelicious
deb1d4eb14 docs: run script to update config class's docstring 2024-03-08 16:31:39 -05:00
psychedelicious
eba1fc1355 docs: autogenerated app config docs
mkdocs can autogenerate python class docs from its docstrings. Our config is a pydantic model.

It's tedious and error-prone to duplicate docstrings from the pydantic field descriptions to the class docstrings.

- Add helper function to generate a mkdocs-compatible docstring from the InvokeAIAppConfig class fields
2024-03-08 16:31:39 -05:00
psychedelicious
96702c395e feat(config): add deprecated category for config settings
It's not clear why these are still in the config class.
2024-03-08 16:31:39 -05:00
psychedelicious
3361aec065 docs(nodes): update config field descriptions 2024-03-08 16:31:39 -05:00
Brandon Rising
8ba4b2a150 Run ruff 2024-03-08 15:36:14 -05:00
Brandon Rising
df12e12e09 Run ruff 2024-03-08 15:36:14 -05:00
Brandon Rising
ee38fbe89c Remove check for models dir in model deletion, update tests to always assume the model path is an absolute path 2024-03-08 15:36:14 -05:00
Brandon Rising
6e2cef1db5 Remove instances making models relative to the model dir 2024-03-08 15:36:14 -05:00
Brandon Rising
b1f5ac4548 fix path 2024-03-08 15:36:14 -05:00
Brandon Rising
e52274ecac Experiment with using absolute paths within model management 2024-03-08 15:36:14 -05:00
maryhipp
66f0ff5b13 add ordering to search_by_attr that is used for model lists 2024-03-08 13:38:38 -06:00
Mary Hipp
cab5b64f0b only render convert button if ckpt model 2024-03-08 13:19:08 -06:00
blessedcoolant
a42812d78d ui(model_manager): Remember Scan Path 2024-03-08 14:05:57 -05:00
maryhipp
281222df3c remove old data migration from previous schema version 2024-03-08 13:10:27 -05:00
maryhipp
d5674150fa ruff 2024-03-08 13:02:04 -05:00
maryhipp
0cb2cf6644 wrap version check in try/except 2024-03-08 13:02:04 -05:00
maryhipp
da87266c9c remove log 2024-03-08 13:02:04 -05:00
maryhipp
35731a6f51 fix null description, add logging 2024-03-08 13:02:04 -05:00
Brandon Rising
a3dfa161a8 Run ruff 2024-03-08 13:02:04 -05:00
Brandon Rising
42d606f07c use register instead of heuristic import, get rid of typing warnings 2024-03-08 13:02:04 -05:00
maryhipp
9063b1ae61 on model manager start, look to see if yaml needs to be migrated and do it if so 2024-03-08 13:02:04 -05:00
Brandon Rising
6aae88bd88 Rerun typegen 2024-03-08 12:44:58 -05:00
psychedelicious
57c1954da7 feat(ui): use control adapter processor helper in metadata parser 2024-03-08 12:44:58 -05:00
psychedelicious
a10dccdd43 fix(mm): fix bug in control adapter probe default settings
Wasn't checking for matches correctly.
2024-03-08 12:44:58 -05:00
psychedelicious
a3570901f7 fix(ui): do not show default settings for refiner models 2024-03-08 12:44:58 -05:00
psychedelicious
fd457955bc feat(ui): update default settings for control adapters
- Split out main model defaults
- Add controlnet/t2i defaults (which includes only the preprocessor)
2024-03-08 12:44:58 -05:00
psychedelicious
1f69613f5d chore(ui): typegen 2024-03-08 12:44:58 -05:00
psychedelicious
7a87ebb3b2 fix(mm): add control adapter default settings to ModelRecordChanges schema
This is needed to update Control Adapter defaults.
2024-03-08 12:44:58 -05:00
psychedelicious
4ee4a801c6 feat(ui): update default settings for main models
Needed some massaging now that only main models get main model default settings.
2024-03-08 12:44:58 -05:00
psychedelicious
53b7f6be37 feat(ui): use default settings for control adapters for processor 2024-03-08 12:44:58 -05:00
psychedelicious
dbd7c94e7c chore(ui): typegen 2024-03-08 12:44:58 -05:00
psychedelicious
50bb9a6b41 fix(mm): remove default settings from IP adapter config 2024-03-08 12:44:58 -05:00
psychedelicious
13bb3c5e15 feat(mm): add control adapter default settings while probing 2024-03-08 12:44:58 -05:00
psychedelicious
80c2a4b925 feat(mm): add AnyDefaultSettings union 2024-03-08 12:44:58 -05:00
psychedelicious
8ce485b036 feat(mm): add default settings for control adapters
Only includes `preprocessor` at this time.
2024-03-08 12:44:58 -05:00
psychedelicious
6fc3e86061 tidy(mm): only main models get the main default settings 2024-03-08 12:44:58 -05:00
Brandon Rising
33ded359e6 Run typegen 2024-03-08 11:10:44 -05:00
psychedelicious
effbd8a1ba chore: ruff 2024-03-08 11:10:44 -05:00
psychedelicious
ddde355b09 fix(mm): add ui_type to model fields
Recently the schema for models was changed to a generic `ModelField`, and the UI was unable to derive the type of those fields. This didn't affect functionality, but it did break the styling of handles.

Add `ui_type` to the affected fields and update the UI to use the correct capitalizations.
2024-03-08 11:10:44 -05:00
psychedelicious
fe2c6f621a fix(ui): do not allow model add when no location is provided 2024-03-08 14:41:03 +11:00
psychedelicious
d0fcdbe8a3 tweak(ui): simplify layout of inplace install form elements 2024-03-08 14:41:03 +11:00
Mary Hipp
a28547b3dd make inplace optional, default to true 2024-03-08 14:41:03 +11:00
Mary Hipp
c7b2bdb846 allow inplace installs 2024-03-08 14:41:03 +11:00
psychedelicious
4a20377fef tidy(config): move version "setting" to new CLIArgs category
It's not actually a setting.
2024-03-08 13:59:59 +11:00
psychedelicious
ed803640f7 tidy(mm): move remote_api_tokens to new ModelInstall category 2024-03-08 13:59:59 +11:00
psychedelicious
576bb4a61d feat(mm): support generic API tokens via regex/token pairs in config
A list of regex and token pairs is accepted. As a file is downloaded by the model installer, the URL is tested against the provided regex/token pairs. The token for the first matching regex is used during download, added as a bearer token.
2024-03-08 13:59:59 +11:00
Brandon Rising
b6065d6328 Run ruff with newest version of ruff 2024-03-08 13:59:59 +11:00
Brandon Rising
04229f4a21 Run ruff 2024-03-08 13:59:59 +11:00
Brandon Rising
73a190fb6e Add remote_repo_api_key config to be added as a token query param for all remote url model downloads 2024-03-08 13:59:59 +11:00
Brandon Rising
952d97741e Remove civit ai from tests and documentation 2024-03-08 13:59:59 +11:00
Brandon Rising
afd08c5f46 Regenerate typegen 2024-03-08 13:59:59 +11:00
Brandon Rising
d1f859a446 Remove civit AI model install resources 2024-03-08 13:59:59 +11:00
psychedelicious
5118160282 docs(mm): update comment about model images 2024-03-08 12:26:35 +11:00
psychedelicious
8e694992bb chore(ui): lint 2024-03-08 12:26:35 +11:00
psychedelicious
4077dfe0c3 fix(ui): clear pending trigger phrase immediately
If we don't clear it, there's an awkward flash of error state as the mutation completes.
2024-03-08 12:26:35 +11:00
psychedelicious
fe8e391aad fix(ui): display trigger phrases for loras in mm editor 2024-03-08 12:26:35 +11:00
psychedelicious
ac8f606d99 fix(ui): default settings linked incorrectly 2024-03-08 12:26:35 +11:00
psychedelicious
0aa2070ce0 perf(mm): add manual query cache updates for the update model route
This greatly reduces the number of network requests when editing models.
2024-03-08 12:26:35 +11:00
psychedelicious
ff66779aa3 tweak(ui): add colors to base/format badges 2024-03-08 12:26:35 +11:00
psychedelicious
2ca65ab9fa tweak(ui): style trigger phrases 2024-03-08 12:26:35 +11:00
psychedelicious
b34624a2a8 tweak(ui): style model edit 2024-03-08 12:26:35 +11:00
psychedelicious
b8aa9752f1 tweak(ui): update default settings layouts 2024-03-08 12:26:35 +11:00
psychedelicious
1b5d8eb9e7 tweak(ui): use check icon for model save button 2024-03-08 12:26:35 +11:00
psychedelicious
773182f425 fix(ui): reset model edit form state with new values
Without this, the form will incorrectly compare its state to its initial default values to determine if it is dirty. Instead, it should reset its default values to the new values after successful submit.
2024-03-08 12:26:35 +11:00
psychedelicious
6386109fc5 feat(ui): move model save/close buttons to model header 2024-03-08 12:26:35 +11:00
psychedelicious
c008704bc8 feat(ui): model header styling 2024-03-08 12:26:35 +11:00
psychedelicious
a3a42d25d3 fix(mm): model images reload when changed
When we change a model image, its URL remains the same. The browser will aggressively cache the image. The easiest way to fix this is to append a random query parameter to the URL whenever we build a model config in the API.
2024-03-08 12:26:35 +11:00
psychedelicious
8959d1bf51 fix(ui): do not persist model manager state 2024-03-08 12:26:35 +11:00
psychedelicious
8fd9342712 fix(ui): typing issues related to trigger phrase changes 2024-03-08 12:26:35 +11:00
psychedelicious
f0b815aa9b fix(ui): missing translation 2024-03-08 12:26:35 +11:00
psychedelicious
3a5b0b819c chore(ui): typegen 2024-03-08 12:26:35 +11:00
psychedelicious
bbcbcd9b63 fix(mm): only loras and main models get trigger_phrases 2024-03-08 12:26:35 +11:00
psychedelicious
fdecb886b2 feat(ui): add main model trigger phrases 2024-03-08 12:26:35 +11:00
psychedelicious
2f0a653a7f feat(ui): improved model list styling 2024-03-08 12:26:35 +11:00
psychedelicious
b0add805c5 feat(ui): use stickyscrollable for models list 2024-03-08 12:26:35 +11:00
psychedelicious
ed4e8624dd feat(ui): model manager UI tweaks
- Move image display to left
- Move description into model header
- Move model edit & convert buttons to top right of model header
- Tweak styles for model display component
2024-03-08 12:26:35 +11:00
Josh Corbett
ad70cdfe87 feat: undo/redo discard canvas staged image 2024-03-07 19:24:55 +11:00
Josh Corbett
549d461107 refactor: 🚨 satisfy the linter 2024-03-07 19:24:55 +11:00
Josh Corbett
cab3748010 feat: discard current inpaint item 2024-03-07 19:24:55 +11:00
psychedelicious
779b3e0e8e tidy(ui): remove npm lockfile 2024-03-06 21:57:41 -05:00
psychedelicious
9b48029bc9 tidy(mm): ModelImages service 2024-03-06 21:57:41 -05:00
Jennifer Player
347f1fd0b7 fix tests 2024-03-06 21:57:41 -05:00
Jennifer Player
4af5a09a68 cleanup 2024-03-06 21:57:41 -05:00
Jennifer Player
8df02623f2 cleanup 2024-03-06 21:57:41 -05:00
Jennifer Player
aa88fadc30 use webp images 2024-03-06 21:57:41 -05:00
Jennifer Player
8411029d93 get model image url from model config, added thumbnail formatting for images 2024-03-06 21:57:41 -05:00
Jennifer Player
239b1e8cc7 moved upload image field and added delete image functionality 2024-03-06 21:57:41 -05:00
Jennifer Player
8a68355926 got model images displaying, still need to clean up types and unused code 2024-03-06 21:57:41 -05:00
Jennifer Player
86aef9f31d removed modelimage for now 2024-03-06 21:57:41 -05:00
Jennifer Player
2f6964bfa5 fetching model image, still not working 2024-03-06 21:57:41 -05:00
Jennifer Player
c1cdfd132b moved model image to edit page, added model_images service 2024-03-06 21:57:41 -05:00
Jennifer Player
f6bfe5e6f2 created ugly model image upload component 2024-03-06 21:57:41 -05:00
Васянатор
b5a8455b5f translationBot(ui): update translation (Russian)
Currently translated at 94.6% (1431 of 1512 strings)

translationBot(ui): update translation (Russian)

Currently translated at 94.6% (1431 of 1512 strings)

Co-authored-by: Васянатор <ilabulanov339@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/ru/
Translation: InvokeAI/Web UI
2024-03-07 11:47:01 +11:00
Riccardo Giovanetti
645ef081ea translationBot(ui): update translation (Italian)
Currently translated at 98.0% (1487 of 1516 strings)

translationBot(ui): update translation (Italian)

Currently translated at 98.0% (1482 of 1512 strings)

translationBot(ui): update translation (Italian)

Currently translated at 98.0% (1475 of 1505 strings)

Co-authored-by: Riccardo Giovanetti <riccardo.giovanetti@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/it/
Translation: InvokeAI/Web UI
2024-03-07 11:47:01 +11:00
psychedelicious
e68d7fa6d7 fix(ui): update types 2024-03-07 10:56:59 +11:00
psychedelicious
c5ab1c7ad6 chore(ui): typegen 2024-03-07 10:56:59 +11:00
psychedelicious
5a561cab78 fix(ui): typo 2024-03-07 10:56:59 +11:00
psychedelicious
132790eebe tidy(nodes): use canonical capitalizations 2024-03-07 10:56:59 +11:00
psychedelicious
c57f6ee885 fix(ui): fix metadata for graphs to use new enriched format 2024-03-07 10:56:59 +11:00
psychedelicious
d4a2ea68fc chore(ui): typegen 2024-03-07 10:56:59 +11:00
psychedelicious
528ac5dd25 refactor(nodes): model identifiers
- All models are identified by a key and optionally a submodel type via new model `ModelField`. Previously, a few model types had their own class, but not all of them. This inconsistency just added complexity without any benefit.
- Update all invocation to use the new format.
- In the node API, models are loaded by key or an instance of `ModelField` as a convenience.
- Add an enriched model schema for metadata. It includes key, hash, name, base and type.
2024-03-07 10:56:59 +11:00
psychedelicious
afd9ae7712 tidy(mm): remove convenience methods from high level model manager service
These were added as a hold-me-over for the nodes API changes, no longer needed. A followup commit will fix the nodes API to not rely on these.
2024-03-07 10:56:59 +11:00
Josh Corbett
4eefed12f0 refactor: 🚨 please the almighty linter 2024-03-07 10:44:40 +11:00
Josh Corbett
4301a3d6fd feat: invert scroll direction for brush size 2024-03-07 10:44:40 +11:00
psychedelicious
99c0662e3f fix(nodes): load config before doing anything else
This was preventing custom nodes from loading if a custom nodes dir was specified

Closes #5862
2024-03-07 10:36:27 +11:00
maryhipp
cdc0d0c182 add config_path to ModelRecordChanges 2024-03-07 10:29:29 +11:00
Mary Hipp
a00369a67a add config path as field in model update form when model is a checkpoint 2024-03-07 10:29:29 +11:00
psychedelicious
f5e3341465 feat(scripts): add support for file path & stdin to frontend typegen script 2024-03-07 10:16:44 +11:00
Mary Hipp
b1d72d411e only show default settings on main models 2024-03-07 09:07:43 +11:00
Mary Hipp
46614ee28f lint fix 2024-03-06 15:06:27 -05:00
Mary Hipp
b019f9bb8b make sure all metadata in viewer is rendered at correct font size - specifically fixes control adapter metadata being too big 2024-03-06 15:06:27 -05:00
Mary Hipp
b857692073 update uploads from canvas to controlnet to be intermediates so they do not appear in gallery 2024-03-06 15:06:27 -05:00
Mary Hipp
90fb7a1a59 move linear tab to be first on workflow edit mode 2024-03-06 15:06:27 -05:00
Mary Hipp
56fcf6af78 empty state for workflow with no linear fields in view mode 2024-03-06 15:06:27 -05:00
Mary Hipp
c4fe7e697b add right-padding to prompt textareas so that text does not go behind icons 2024-03-06 15:06:27 -05:00
Mary Hipp
2fd483dfc8 use base.800 on invokeBlue.400 for all gallery selected states 2024-03-06 15:06:27 -05:00
Mary Hipp
b9a9507422 update padding in color picker 2024-03-06 15:06:27 -05:00
Mary Hipp Rogers
f2744fd7d1
fix URL for get image workflow (#5882)
Co-authored-by: Mary Hipp <maryhipp@Marys-MacBook-Air.local>
2024-03-06 12:46:16 -05:00
psychedelicious
fe6e879d38 fix(ui): invalidate InvocationCacheStatus query cache after clearing intermediates 2024-03-06 08:14:12 -05:00
psychedelicious
b0615bdfd4 fix(nodes): correctly serialize outputs
In order for delete by match to work, we need the whole invocation output to be stringified.

For some reason, the serialization of the output was set to only include the `type` field. It should instead include the whole output.

I don't understand how this ever worked unless pydantic had different serialization behaviour in v1 (though it appears to have been the same).

Closes #5805
2024-03-06 08:14:12 -05:00
psychedelicious
bab20467fb fix(nodes): fix invocation cache clear method args 2024-03-06 08:14:12 -05:00
psychedelicious
e24624109e fix(nodes): fix invocation cache ABC typing 2024-03-06 08:14:12 -05:00
Josh Corbett
458e7185b8 fix: 🐛 didn't include renamed file 2024-03-06 20:06:14 +11:00
Josh Corbett
a95128f5f2 refactor: ✏️ canvas mask compositor naming
changes `...MaskCompositer` spelling to `...MaskCompositor`
2024-03-06 20:06:14 +11:00
Brandon Rising
46f32c5e3c Remove references to the no longer existing invokeai.app.services.model_metadata package 2024-03-05 19:58:25 -05:00
Mary Hipp Rogers
e30cb4b52f
updates for defaultModel (#5866)
* move defaultModel logic to modelsLoaded and update to work for key instead of name/base/type string

* lint fix

---------

Co-authored-by: Mary Hipp <maryhipp@Marys-MacBook-Air.local>
2024-03-05 09:55:22 -05:00
psychedelicious
ba1f6bf926 chore: lint 2024-03-05 23:50:19 +11:00
psychedelicious
4a9cca6c2d fix(ui): format model API response data 2024-03-05 23:50:19 +11:00
psychedelicious
b0275700b3 refactor(ui): compute prompt trigger options in the component
We can derive the valid trigger options in the component without needing to lift the options list into global state.
2024-03-05 23:50:19 +11:00
psychedelicious
8319aca5f9 chore(ui): typegen 2024-03-05 23:50:19 +11:00
psychedelicious
51a604f907 pkg(ui): do not fix knip in lint:fix script 2024-03-05 23:50:19 +11:00
Mary Hipp
7515d73628 make trigger phrases a list of options and add lora name as description to appear in dropdown 2024-03-05 23:50:19 +11:00
Mary Hipp
2c453aa531 fix type error 2024-03-05 23:50:19 +11:00
Mary Hipp
2cca6e4c76 check if lora is enabled before adding trigger phrases 2024-03-05 23:50:19 +11:00
Mary Hipp
ef171e890a use a listener to recalculate trigger phrases when model or lora list changes 2024-03-05 23:50:19 +11:00
Mary Hipp
caafbf2f0d only show trigger phrase settings on main and lora 2024-03-05 23:50:19 +11:00
Mary Hipp
2db5eaf907 lint fix 2024-03-05 23:50:19 +11:00
Mary Hipp
f234bf6256 cleanup 2024-03-05 23:50:19 +11:00
Mary Hipp
cfa78b4052 adapt embedding popover to work for trigger phrases also 2024-03-05 23:50:19 +11:00