Commit Graph

6913 Commits

Author SHA1 Message Date
psychedelicious
7d0cc6ec3f chore: black 2023-08-05 02:04:22 +10:00
Sergey Borisov
2f8b928486 Add support for diff/full lora layers 2023-08-05 02:04:22 +10:00
StAlKeR7779
0d3c27f46c Fix typo
Co-authored-by: Ryan Dick <ryanjdick3@gmail.com>
2023-08-04 11:44:56 -04:00
Sergey Borisov
cff91f06d3 Add lora apply in sdxl l2l node 2023-08-04 11:44:56 -04:00
Lincoln Stein
1d5d187ba1 model probe detects sdxl lora models 2023-08-04 11:44:56 -04:00
Sergey Borisov
1ac14a1e43 add sdxl lora support 2023-08-04 11:44:56 -04:00
Mary Hipp
cfc3a20565 autoAddBoardId should always be defined 2023-08-04 22:19:11 +10:00
Lincoln Stein
05ae4e283c
Stop checking for unet/model.onnx when a model_index.json is detected (#4132)
## 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:

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


## Description


## Related Tickets & Documents

<!--
For pull requests that relate or close an issue, please include them
below. 

For example having the text: "closes #1234" would connect the current
pull
request to issue 1234.  And when we merge the pull request, Github will
automatically close the issue.
-->

- Related Issue #
- Closes #

## QA Instructions, Screenshots, Recordings

<!-- 
Please provide steps on how to test changes, any hardware or 
software specifications as well as any other pertinent information. 
-->

## Added/updated tests?

- [ ] Yes
- [ ] No : _please replace this line with details on why tests
      have not been included_

## [optional] Are there any post deployment tasks we need to perform?
2023-08-03 22:10:37 -04:00
Lincoln Stein
f06fee4581
Merge branch 'main' into remove-onnx-model-check-from-pipeline-download 2023-08-03 22:02:05 -04:00
Lincoln Stein
9091e19de8
Add execution stat reporting after each invocation (#4125)
## What type of PR is this? (check all applicable)

- [X] Feature


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

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

## Description

This PR adds execution time and VRAM usage reporting to each graph
invocation. The log output will look like this:

```
[2023-08-02 18:03:04,507]::[InvokeAI]::INFO --> Graph stats: c7764585-9c68-4d9d-a199-55e8186790f3                                                                                              
[2023-08-02 18:03:04,507]::[InvokeAI]::INFO --> Node                 Calls  Seconds  VRAM Used                                                                                                 
[2023-08-02 18:03:04,507]::[InvokeAI]::INFO --> main_model_loader        1   0.005s     0.01G                                                                                                  
[2023-08-02 18:03:04,508]::[InvokeAI]::INFO --> clip_skip                1   0.004s     0.01G                                                                                                  
[2023-08-02 18:03:04,508]::[InvokeAI]::INFO --> compel                   2   0.512s     0.26G                                                                                                  
[2023-08-02 18:03:04,508]::[InvokeAI]::INFO --> rand_int                 1   0.001s     0.01G                                                                                                  
[2023-08-02 18:03:04,508]::[InvokeAI]::INFO --> range_of_size            1   0.001s     0.01G                                                                                                  
[2023-08-02 18:03:04,508]::[InvokeAI]::INFO --> iterate                  1   0.001s     0.01G                                                                                                  
[2023-08-02 18:03:04,508]::[InvokeAI]::INFO --> metadata_accumulator     1   0.002s     0.01G                                                                                                  
[2023-08-02 18:03:04,508]::[InvokeAI]::INFO --> noise                    1   0.002s     0.01G                                                                                                  
[2023-08-02 18:03:04,508]::[InvokeAI]::INFO --> t2l                      1   3.541s     1.93G                                                                                                  
[2023-08-02 18:03:04,508]::[InvokeAI]::INFO --> l2i                      1   0.679s     0.58G                                                                                                  
[2023-08-02 18:03:04,508]::[InvokeAI]::INFO --> TOTAL GRAPH EXECUTION TIME:  4.749s                                                                                                            
[2023-08-02 18:03:04,508]::[InvokeAI]::INFO --> Current VRAM utilization 0.01G                                                                                                                 
```
On systems without CUDA, the VRAM stats are not printed.

The current implementation keeps track of graph ids separately so will
not be confused when several graphs are executing in parallel. It
handles exceptions, and it is integrated into the app framework by
defining an abstract base class and storing an implementation instance
in `InvocationServices`.
2023-08-03 20:05:21 -04:00
Lincoln Stein
0a0b7141af
Merge branch 'main' into feat/execution-stats 2023-08-03 19:49:00 -04:00
Lincoln Stein
1deca89fde
Merge branch 'main' into feat/select-vram-in-config 2023-08-03 19:27:58 -04:00
Lincoln Stein
446fb4a438 blackify 2023-08-03 19:24:23 -04:00
Lincoln Stein
ab5d938a1d use variant instead of revision 2023-08-03 19:23:52 -04:00
Brandon
9942af756a
Merge branch 'main' into remove-onnx-model-check-from-pipeline-download 2023-08-03 10:10:51 -04:00
Lincoln Stein
06742faca7 Merge branch 'feat/execution-stats' of github.com:invoke-ai/InvokeAI into feat/execution-stats 2023-08-03 08:48:05 -04:00
Lincoln Stein
d2bddf7f91 tweak formatting to accommodate longer runtimes 2023-08-03 08:47:56 -04:00
Kevin Turner
91ebf9f76e
Merge branch 'main' into refactor/model_manager_instantiate 2023-08-02 19:01:21 -07:00
psychedelicious
bf94412d14 feat: add multi-select to gallery
multi-select actions include:
- drag to board to move all to that board
- right click to add all to board or delete all

backend changes:
- add routes for changing board for list of image names, deleting list of images
- change image-specific routes to `images/i/{image_name}` to not clobber other routes (like `images/upload`, `images/delete`)
- subclass pydantic `BaseModel` as `BaseModelExcludeNull`, which excludes null values when calling `dict()` on the model. this fixes inconsistent types related to JSON parsing null values into `null` instead of `undefined`
- remove `board_id` from `remove_image_from_board`

frontend changes:
- multi-selection stuff uses `ImageDTO[]` as payloads, for dnd and other mutations. this gives us access to image `board_id`s when hitting routes, and enables efficient cache updates.
- consolidate change board and delete image modals to handle single and multiples
- board totals are now re-fetched on mutation and not kept in sync manually - was way too tedious to do this
- fixed warning about nested `<p>` elements
- closes #4088 , need to handle case when `autoAddBoardId` is `"none"`
- add option to show gallery image delete button on every gallery image

frontend refactors/organisation:
- make typegen script js instead of ts
- enable `noUncheckedIndexedAccess` to help avoid bugs when indexing into arrays, many small changes needed to satisfy TS after this
- move all image-related endpoints into `endpoints/images.ts`, its a big file now, but this fixes a number of circular dependency issues that were otherwise felt impossible to resolve
2023-08-03 11:46:59 +10:00
Lincoln Stein
e080fd1e08 blackify 2023-08-03 11:25:20 +10:00
Lincoln Stein
eeef1e08f8 restore ability to convert merged inpaint .safetensors files 2023-08-03 11:25:20 +10:00
Mary Hipp
b3b94b5a8d use correct prop 2023-08-03 11:01:21 +10:00
Mary Hipp
5c9787c145 add project-id header to requests 2023-08-03 11:01:21 +10:00
psychedelicious
cf72eba15c
Merge branch 'main' into feat/execution-stats 2023-08-03 10:53:25 +10:00
psychedelicious
a6f9396a30 fix(db): retrieve metadata even when no session_id
this was unnecessarily skipped if there was no `session_id`.
2023-08-03 10:43:44 +10:00
Brandon Rising
118d5b387b deploy: refactor github workflows
Currently we use some workflow trigger conditionals to run either a real test workflow (installing the app and running it) or a fake workflow, disguised as the real one, that just auto-passes.

This change refactors the workflow to use a single workflow that can be skipped, using another github action to determine which things to run depending on the paths changed.
2023-08-03 10:32:50 +10:00
Kevin Turner
02d2cc758d
Merge branch 'main' into refactor/model_manager_instantiate 2023-08-02 17:11:23 -07:00
Millun Atluri
db545f8801
chore: move PR template to .github/ dir (#4060)
## What type of PR is this? (check all applicable)

- [x] Refactor

## Have you discussed this change with the InvokeAI team?
- [x] No, because it's pretty minor

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


## Description

This PR just moves the PR template to within the `.github/` directory
leading to a overall minimal project structure.

## Added/updated tests?

- [x] No : because this change doesn't affect or need a separate test
2023-08-03 10:08:17 +10:00
Millun Atluri
b0d72b15b3
Merge branch 'main' into patch-1 2023-08-03 10:04:47 +10:00
Damian Stewart
4e0949fa55 fix .swap() by reverting improperly merged @classmethod change 2023-08-03 10:00:43 +10:00
psychedelicious
f028342f5b
Merge branch 'main' into patch-1 2023-08-03 10:00:10 +10:00
Eugene Brodsky
7021467048
(ci) do not install all dependencies when running static checks (#4036)
Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
2023-08-02 23:46:02 +00:00
Kevin Brack
26ef5249b1 guard board switching in board context menu 2023-08-03 09:18:46 +10:00
Kevin Brack
87424be95d block auto add board change during generation. Switch condition to isProcessing 2023-08-03 09:18:46 +10:00
Kevin Brack
366952f810 fix localization 2023-08-03 09:18:46 +10:00
Kevin Brack
450e95de59 auto change board waiting for isReady 2023-08-03 09:18:46 +10:00
Kevin Brack
0ba8a0ea6c Board assignment changing on click 2023-08-03 09:18:46 +10:00
Lincoln Stein
f4981f26d5
Merge branch 'main' into bugfix/fp16-models 2023-08-02 19:17:55 -04:00
Lincoln Stein
6bc21984c6
Merge branch 'main' into feat/select-vram-in-config 2023-08-02 19:12:43 -04:00
Lincoln Stein
43d6312587
Merge branch 'main' into feat/execution-stats 2023-08-02 19:12:08 -04:00
psychedelicious
0d125bf3e4 chore: delete nonfunctional shell.nix
This was for v2.3 and is very broken. See `flake.nix`, thanks to @zopieux
2023-08-03 09:09:40 +10:00
Lincoln Stein
921ccad04d added stats service to the cli_app startup 2023-08-02 18:41:43 -04:00
Lincoln Stein
05c9207e7b Merge branch 'feat/execution-stats' of github.com:invoke-ai/InvokeAI into feat/execution-stats 2023-08-02 18:31:33 -04:00
Lincoln Stein
3fc789a7ee fix unit tests 2023-08-02 18:31:10 -04:00
Lincoln Stein
008362918e
Merge branch 'main' into feat/execution-stats 2023-08-02 18:15:51 -04:00
Lincoln Stein
8fc75a71ee integrate correctly into app API and add features
- Create abstract base class InvocationStatsServiceBase
- Store InvocationStatsService in the InvocationServices object
- Collect and report stats on simultaneous graph execution
  independently for each graph id
- Track VRAM usage for each node
- Handle cancellations and other exceptions gracefully
2023-08-02 18:10:52 -04:00
Brandon
82d259f43b
Merge branch 'main' into remove-onnx-model-check-from-pipeline-download 2023-08-02 16:35:46 -04:00
Lincoln Stein
ec48779080 blackify 2023-08-02 14:28:19 -04:00
Lincoln Stein
bc20fe4cb5 Merge branch 'main' into feat/select-vram-in-config 2023-08-02 14:27:17 -04:00
Lincoln Stein
5de42be4a6 reduce VRAM cache default; take max RAM from system 2023-08-02 14:27:13 -04:00