Commit Graph

8250 Commits

Author SHA1 Message Date
psychedelicious
3d33b3e1f5 fix(nodes): explicitly include custom nodes files
setuptools ignores markdown files - explicitly include all files in `"invokeai.app.invocations"` to ensure all custom node files are included
2023-10-20 15:18:29 +11:00
Millun Atluri
7b066681f0
Docker image update: ubuntu23.04+python3.11 (#4953)
## What type of PR is this? (check all applicable)

- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [x] Optimization
- [x] Documentation Update
- [ ] Community Node Submission


## Have you discussed this change with the InvokeAI team?
- [x] Yes
- [ ] No, because:

      
## Have you updated all relevant documentation?
- [x] Yes
- [ ] No


## Description

- updates the Docker image with ubuntu23.04 base, python3.11
- use the newer pytorch wheel with cuda12.1 support
- corrects `docker compose` CLI in shell script wrappers and docs
- update / overhaul Docker docs
- clean up obsolete lines in `.gitignore`

## QA Instructions, Screenshots, Recordings

Follow the documentation changes, or simply:

```bash
cd docker
cp .env.sample .env
# Set your INVOKEAI_ROOT in .env
docker compose up
```

## Added/updated tests?

- [ ] Yes
- [x] No : N/A
2023-10-20 14:30:53 +11:00
Millun Atluri
1177234931
Merge branch 'main' into ebr/docker-py311 2023-10-20 14:28:40 +11:00
psychedelicious
824702de99 feat(nodes): change expected structure for custom nodes 2023-10-20 14:28:16 +11:00
psychedelicious
8604943e89 feat(nodes): simple custom nodes
Custom nodes may be places in `$INVOKEAI_ROOT/nodes/` (configurable with `custom_nodes_dir` option).

On app startup, an `__init__.py` is copied into the custom nodes dir, which recursively loads all python files in the directory as modules (files starting with `_` are ignored). The custom nodes dir is now a python module itself.

When we `from invocations import *` to load init all invocations, we load the custom nodes dir, registering all custom nodes.
2023-10-20 14:28:16 +11:00
psychedelicious
b7f63a4065 fix(ui): fix canvas color picker when value is zero
good ol' zero is false-y
2023-10-19 23:13:35 -04:00
psychedelicious
dcd11327c1 fix(db): remove unused, commented out methods 2023-10-20 12:05:13 +11:00
psychedelicious
c071262c20 fix(ui): remove getMetadataFromFile query & util
This will all be handled by python going forward
2023-10-20 12:05:13 +11:00
psychedelicious
2f4f83280b fix(db): remove extraneous conflict handling in workflow image records 2023-10-20 12:05:13 +11:00
psychedelicious
301a8fef92 fix(ui): fix batch metadata logic when graph has no metadata
On canvas, images have no metadata yet, so this needs to be handled
2023-10-20 12:05:13 +11:00
psychedelicious
52fbd1b222 fix(ui): remove errant comment 2023-10-20 12:05:13 +11:00
psychedelicious
16dacb5f43 fix(nodes): remove constraints on ip adapter metadata fields 2023-10-20 12:05:13 +11:00
psychedelicious
b5940039f3 chore: lint 2023-10-20 12:05:13 +11:00
psychedelicious
9104979943 chore(ui): regen types 2023-10-20 12:05:13 +11:00
psychedelicious
f04462973b feat(ui): create debounced metadata/workflow query hooks
Also added config options for metadata and workflow debounce times (`metadataFetchDebounce` & `workflowFetchDebounce`).

Falls back to 0 if not provided.

In OSS, because we have no major latency concerns, the debounce is 0. But in other environments, it may be desirable to set this to something like 300ms.
2023-10-20 12:05:13 +11:00
psychedelicious
2faed653d7 fix(api): deduplicate metadata/workflow extraction logic 2023-10-20 12:05:13 +11:00
psychedelicious
23fa2e560a fix: fix tests 2023-10-20 12:05:13 +11:00
psychedelicious
0cda7943fa feat(api): add workflow_images junction table
similar to boards, images and workflows may be associated via junction table
2023-10-20 12:05:13 +11:00
psychedelicious
6d776bad7e fix(nodes): remove errant print 2023-10-20 12:05:13 +11:00
psychedelicious
86c3acf184 fix(nodes): revert optional graph 2023-10-20 12:05:13 +11:00
psychedelicious
d32caf7cb1 fix(ui): remove references to metadata accumulator 2023-10-20 12:05:13 +11:00
psychedelicious
e3e8d8af02 fix(ui): fix log message 2023-10-20 12:05:13 +11:00
psychedelicious
7b6e2bc37f feat(nodes): add field name validation
Protect against using reserved field names
2023-10-20 12:05:13 +11:00
psychedelicious
bbae4045c9 fix(nodes): GraphInvocation should use InputField 2023-10-20 12:05:13 +11:00
psychedelicious
8910e912c7 chore(ui): regen types 2023-10-20 12:05:13 +11:00
psychedelicious
4012388f0a feat: use ModelValidator naming convention for pydantic type adapters
This is the naming convention in the docs and is also clear.
2023-10-20 12:05:13 +11:00
psychedelicious
3c4f43314c feat: move workflow/metadata models to baseinvocation.py
needed to prevent circular imports
2023-10-20 12:05:13 +11:00
psychedelicious
5a163f02a6 fix(nodes): fix metadata/workflow serialization 2023-10-20 12:05:13 +11:00
psychedelicious
f0db4d36e4 feat: metadata refactor
- Refactor how metadata is handled to support a user-defined metadata in graphs
- Update workflow embed handling
- Update UI to work with these changes
- Update tests to support metadata/workflow changes
2023-10-20 12:05:13 +11:00
psychedelicious
c2da74c587 feat: add workflows table & service 2023-10-20 12:05:13 +11:00
Eugene Brodsky
575c7bbfd8 feat(docker): update docker documentation 2023-10-19 11:26:36 -04:00
Eugene Brodsky
f102e38076 feat(docker): update docker image, etc. to python3.11+ubuntu23.04 2023-10-19 11:26:16 -04:00
psychedelicious
9195c8c957 feat: dedicated route to get intermediates count
This fixes a weird issue where the list images method needed to handle `None` for its `limit` and `offset` arguments, in order to get a count of all intermediates.
2023-10-19 16:58:51 +11:00
Millun Atluri
677918df61
Docs Update (python version & T2I (#4867)
* Updated Control Adapter Docs

* fixed typo

* Update docs for 3.10

* Update diffusers language

Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>

* Diffusers format

Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>

* Current T2I Adapter usage

Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>

* Update test-invoke-pip.yml

---------

Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
2023-10-18 23:38:31 -04:00
psychedelicious
96e80c71fb chore: lint 2023-10-19 08:52:02 +11:00
psychedelicious
da403ba04c fix(api): flesh out types for api_app.py 2023-10-19 08:52:02 +11:00
psychedelicious
e4c45012f4 feat(api): add gzip middleware
On our local installs this will be a very minor change. For those running on remote servers, load times should be slightly improved.

It's a small change but I think correct.
2023-10-19 08:52:02 +11:00
psychedelicious
ef14ba1713 fix(api): fix uvicorn config loop arg
We were providing the loop itself, not the kind of loop. This didn't appear to cause any issues whatsoever, but now it's correct.
2023-10-19 08:52:02 +11:00
psychedelicious
9e06371178 feat(api): serve app via route & add cache-control: no-store
This should prevent `index.html` from *ever* being cached, so UIs will never be out of date.

Minor organisation to accomodate this.

Deleting old unused files from the early days
2023-10-19 08:52:02 +11:00
psychedelicious
a459786d73 fix(nodes): enable number to string coercion 2023-10-19 08:43:08 +11:00
d8ahazard
fdf02c33d0 Catch generic model errors
Prevent the app from dying on invalid models.
2023-10-19 07:28:33 +11:00
psychedelicious
0a01d86ab1 fix(ui): fix multiple control adapters on canvas
We were making an edges for each adapter where we should isntead have one from the adapter's collect node into the denoising node
2023-10-19 07:15:27 +11:00
psychedelicious
5e6df975fd fix(nodes): fix math node validation
Update field_validator api for pydantic v2
2023-10-19 06:50:00 +11:00
Ryan Dick
967a2dad54
Multi-Image IP-Adapter (#4882)
## What type of PR is this? (check all applicable)

- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
- [ ] Community Node Submission

## Description

This PR adds the ability to pass multiple images to a single IP-Adapter
(note the difference from using _multiple IP-Adapters at once_, which is
already supported.). The image embeddings are combined in the IP-Adapter
attention layers. This is the same strategy for combining multiple
images as used in Insta-LoRA workflows
(https://civitai.com/articles/2345).

This PR only adds multi-image support in the backend and the node
editor. The Linear UI still needs to be updated.

## QA Instructions, Screenshots, Recordings

I have manually tested the following via the workflow editor:
- Multiple images with a single IP-Adapter
- Multiple images per IP-Adapter, and multiple IP-Adapters
- Both standard and sequential conditioning
- IP-Adapters still work in the Linear UI.

Please hammer at this feature some more with manual testing.

## Added/updated tests?

- [x] Yes
- [ ] No

I updated the existing IP-Adapter smoke test, but it provides pretty
limited coverage of this feature. This feature would probably be best
tested by an end-to-end workflow test, which is not currently supported.
(I'm hoping to put some effort into workflow-level testing soon.)
2023-10-18 10:17:34 -04:00
Ryan Dick
a078efc0f2 Merge branch 'main' into ryan/multi-image-ip 2023-10-18 08:59:12 -04:00
psychedelicious
024aa5eb90 fix(ui): fix field sorting
closes #4934
2023-10-18 15:35:26 +11:00
psychedelicious
67a343b3e4 Update pyproject.toml 2023-10-18 11:28:26 +11:00
Lincoln Stein
d27392cc2d remove all references to CLI 2023-10-18 11:28:26 +11:00
blessedcoolant
9fa8e38163
fix(ui): use pidi processor for sketch (#4931)
## What type of PR is this? (check all applicable)

- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] Optimization
- [ ] Documentation Update
- [ ] Community Node Submission


## Have you discussed this change with the InvokeAI team?
- [x] Yes
- [ ] No, because:

## Description

fix(ui): use pidi processor for sketch control adapters
2023-10-18 04:04:42 +05:30
blessedcoolant
4b197cb6d4
Merge branch 'main' into fix/ui/sketch-pidi-processor 2023-10-18 04:02:30 +05:30