Commit Graph

2519 Commits

Author SHA1 Message Date
blessedcoolant
d6bf6513ef
Merge branch 'main' into fix-types-2 2023-07-24 20:01:48 +12:00
blessedcoolant
9c59083406
Merge branch 'main' into fix-types-1 2023-07-24 19:52:46 +12:00
blessedcoolant
e766ddbcf4 fix: Generate random seed using the generator instead of RandomState 2023-07-24 19:38:21 +12:00
blessedcoolant
374b4a1b12 Merge branch 'main' into pr/3917 2023-07-24 18:58:34 +12:00
blessedcoolant
0cf7a10c5c fix: Other lora missing type 2023-07-24 18:58:24 +12:00
psychedelicious
66cdeba8a1 fix(nodes): fix seed modulus operation
This was incorect and resulted in the max seed being one less than intended.
2023-07-24 16:44:32 +10:00
psychedelicious
d5a75eb833 feat: increase seed from int32 to uint32
At some point I typo'd this and set the max seed to signed int32 max. It should be *un*signed int32 max.

This restored the seed range to what it was in v2.3.
2023-07-24 16:34:50 +10:00
Alexandre Macabies
0beec08d38 Add missing import. 2023-07-23 16:40:05 +02:00
Alexandre Macabies
07a90c0198 Fix incorrect use of a singleton list.
This was found through pylance type errors. Go types!
2023-07-23 15:28:05 +02:00
psychedelicious
28031ead70 feat(ui): display canvas generation mode in status text
- use the existing logic to determine if generation is txt2img, img2img, inpaint or outpaint
- technically `outpaint` and `inpaint` are the same, just display
"Inpaint" if its either
- debounce this by 1s to prevent jank
2023-07-23 23:22:59 +10:00
psychedelicious
4b334be7d0 feat(nodes,ui): fix soft locks on session/invocation retrieval
When a queue item is popped for processing, we need to retrieve its session from the DB. Pydantic serializes the graph at this stage.

It's possible for a graph to have been made invalid during the graph preparation stage (e.g. an ancestor node executes, and its output is not valid for its successor node's input field).

When this occurs, the session in the DB will fail validation, but we don't have a chance to find out until it is retrieved and parsed by pydantic.

This logic was previously not wrapped in any exception handling.

Just after retrieving a session, we retrieve the specific invocation to execute from the session. It's possible that this could also have some sort of error, though it should be impossible for it to be a pydantic validation error (that would have been caught during session validation). There was also no exception handling here.

When either of these processes fail, the processor gets soft-locked because the processor's cleanup logic is never run. (I didn't dig deeper into exactly what cleanup is not happening, because the fix is to just handle the exceptions.)

This PR adds exception handling to both the session retrieval and node retrieval and events for each: `session_retrieval_error` and `invocation_retrieval_error`.

These events are caught and displayed in the UI as toasts, along with the type of the python exception (e.g. `Validation Error`). The events are also logged to the browser console.
2023-07-23 21:41:01 +10:00
blessedcoolant
af4579b4d4 feat: Add more sanity checks for graph loading 2023-07-23 18:12:25 +12:00
blessedcoolant
35acb5de76 Merge branch 'main' into json-crash-fix 2023-07-23 16:50:36 +12:00
blessedcoolant
225f608556 fix: Add more sanity checks & rename buttons to Graphs 2023-07-23 16:49:52 +12:00
Alexandre Macabies
00d3cd4aed Fix 'Del' hotkey to delete current image. 2023-07-23 14:16:32 +10:00
blessedcoolant
fdc444ed61 fix: Fix app crashing when you upload an incorrect JSON to node editor 2023-07-23 15:24:04 +12:00
psychedelicious
c5147d0f57 fix(ui): fix all eslint & prettier issues 2023-07-22 23:45:24 +10:00
psychedelicious
6452d0fc28 fix(ui): fix all circular dependencies 2023-07-22 22:48:39 +10:00
psychedelicious
5468d9a9fc fix(ui): resolve all typescript issues 2023-07-22 21:38:50 +10:00
psychedelicious
75863e7181 feat(ui): logging cleanup
- simplify access to app logger
- spruce up and make consistent log format
- improve messaging
2023-07-22 21:12:51 +10:00
Lincoln Stein
845d1524ad warn, do not crash, when duplicate models encountered 2023-07-21 15:00:55 -04:00
psychedelicious
3f79812dc6 fix: mps attention fix for sd2 2023-07-21 09:22:37 -04:00
Lincoln Stein
19cdd5a99b rebuild frontend for release 2023-07-21 07:48:30 -04:00
Lincoln Stein
eb4ca4042e
Merge branch 'main' into release/3-0-0 2023-07-21 07:38:02 -04:00
psychedelicious
594bf6fef1 fix(api,ui): fix canvas saved images have extra transparent regions
- add `crop_visible` param to upload image & set to true only for canvas saves
2023-07-21 07:26:12 -04:00
psychedelicious
6f2e8d5217 chore(ui): regen types 2023-07-21 07:26:12 -04:00
psychedelicious
52ae15c167 fix(ui): fix console error related to css 2023-07-21 07:26:12 -04:00
psychedelicious
2c4128d44e fix(ui): deleting board does not reset selected board/image 2023-07-21 07:26:12 -04:00
psychedelicious
01b106d939 fix(ui): fix no image selected on first load 2023-07-21 07:26:12 -04:00
psychedelicious
68f1f87c6f feat(ui): board styles 2023-07-21 07:26:12 -04:00
psychedelicious
c2c99b8650 feat(ui): fix more caching bugs 2023-07-21 07:26:12 -04:00
psychedelicious
896b77cf56 feat(api,db): allow creating an image with a board_id 2023-07-21 07:26:12 -04:00
Lincoln Stein
fba4085939
ui: boards 2: electric boogaloo (#3869)
## What type of PR is this? (check all applicable)

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


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


## Description

Revised boards logic and UI

## 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 # discord convos
- 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
- [x] No : n/a

## [optional] Are there any post deployment tasks we need to perform?
2023-07-21 06:42:16 -04:00
blessedcoolant
9ce4bd1182 fix: Simplify gallery board name layout 2023-07-21 18:15:55 +12:00
blessedcoolant
39b7ace273 fix: Differentiate no boards from the user boards 2023-07-21 18:15:12 +12:00
blessedcoolant
319c56f844 fix: Make auto add icon be a tad bit smaller 2023-07-21 18:14:57 +12:00
psychedelicious
389a0d2810 feat(ui): use badge for autoadd 2023-07-21 16:01:40 +10:00
psychedelicious
fe33acedad fix(ui): fix crash when removing last image 2023-07-21 15:57:09 +10:00
psychedelicious
eab18c7385 fix(ui): fix incorrect gallery tab 2023-07-21 15:56:50 +10:00
psychedelicious
8e98085530 fix(ui): fix missing 'none' on no-board cache updates 2023-07-21 15:53:41 +10:00
psychedelicious
5396e998b3 feat(ui): simplify auto-add context menu 2023-07-21 15:47:12 +10:00
psychedelicious
fc98089960 fix(ui): debounce metadata query on context menu 2023-07-21 15:37:33 +10:00
psychedelicious
dd0b4dc744 fix(ui): fix next prev buttons 2023-07-21 15:37:20 +10:00
psychedelicious
ddeba190bc fix(ui): really fixed autoadd context menu 2023-07-21 15:18:48 +10:00
psychedelicious
3a610e1a65 fix(ui): more fixing of auto-add 2023-07-21 15:00:07 +10:00
psychedelicious
e10e22440d fix(ui): restore auto-add to board functionality 2023-07-21 14:29:42 +10:00
psychedelicious
f4e8a91bcf fix(ui): update boardIdSelected 2023-07-21 14:22:18 +10:00
Lincoln Stein
ce7fbdb01d bump version; update contributors list 2023-07-21 00:17:21 -04:00
psychedelicious
4da6623700 fix(ui): fix deleteboard cache changes 2023-07-21 14:16:19 +10:00
psychedelicious
0e3ca59e49 feat(ui): refactor boards hierarchy 2023-07-21 13:48:15 +10:00
Lincoln Stein
5962d96f27
Merge branch 'main' into fix/long_tensors_mps 2023-07-20 23:24:47 -04:00
Lincoln Stein
46801c076f
Merge branch 'main' into release/invokeai-3-0-rc 2023-07-20 23:16:05 -04:00
Lincoln Stein
9370572169 prettify startup messages 2023-07-20 22:45:35 -04:00
Sergey Borisov
e6d890888c Replace SlicedAttnProcessor with patched to chunk memory consumption less then 4gb in each attention calculation pass 2023-07-21 04:08:49 +03:00
Kent Keirsey
8e7f581065
Update FoundModelsList.tsx 2023-07-20 20:51:54 -04:00
Lincoln Stein
85ef3f51e7 extra check for empty hftoken 2023-07-20 15:16:06 -04:00
blessedcoolant
52d56e96a5 fix: No board name being displayed if it is empty 2023-07-21 05:07:50 +12:00
Lincoln Stein
c013fe5b5d Merge branch 'main' into release/invokeai-3-0-rc 2023-07-20 12:22:27 -04:00
Sergey Borisov
4a0774b260 Use scale from vae 2023-07-20 18:54:51 +03:00
Lincoln Stein
17e401cb8c rebuild frontend 2023-07-20 11:47:04 -04:00
Sergey Borisov
29a590cced Add sdxl generation preview 2023-07-20 18:45:54 +03:00
Lincoln Stein
7deafa838b merge with main 2023-07-20 11:45:54 -04:00
Lincoln Stein
5134de7cfa
Merge branch 'main' into lstein/logger-route 2023-07-20 11:29:48 -04:00
Lincoln Stein
b1a6ba552b reinitialize models.yaml if corrupt or missing 2023-07-20 11:26:20 -04:00
psychedelicious
cd21d2f2b6 fix(ui): fix no_board cache not updating
two areas marked TODO were not TODONE!
2023-07-20 23:50:14 +10:00
Mary Hipp
9dc28373d8 use brackets 2023-07-20 23:45:49 +10:00
Mary Hipp
ffe7d5785b if updating intermediate, dont add to gallery list cache 2023-07-20 23:45:49 +10:00
Lincoln Stein
a2e2f0858d bump version number 2023-07-20 09:42:02 -04:00
blessedcoolant
e2240feae4 fix: Chevron icon styling 2023-07-21 01:21:04 +12:00
blessedcoolant
e06348bfab fix: Expand chevron icon being too small 2023-07-21 01:14:19 +12:00
blessedcoolant
8fb970d436 fix: Use layout gap to control layout instead of margin 2023-07-21 01:07:00 +12:00
blessedcoolant
15256ed3a4 fix: Layout shift on the ControlNet Panel 2023-07-21 01:04:16 +12:00
Lincoln Stein
89a15f78dd collapse all autoimport directories into a single folder 2023-07-20 09:01:49 -04:00
blessedcoolant
8fc20c837b Merge branch 'main' into feat/controlnet-resize-mode 2023-07-21 00:58:28 +12:00
blessedcoolant
8dfe196c4f feat: Add Image Count to Board Name 2023-07-20 22:56:52 +10:00
psychedelicious
9e27fd9b90 feat(ui): color tweak on board 2023-07-20 22:56:52 +10:00
psychedelicious
2771328853 feat(ui): reduce saturation by 8% for 1337 contrast 2023-07-20 22:56:52 +10:00
psychedelicious
a481607d3f feat(ui): boards are only punch-you-in-the-face-purple if selected 2023-07-20 22:56:52 +10:00
psychedelicious
1e3cebbf42 feat(ui): add useBoardTotal hook to get total items in board
actually not using it now, but it's there
2023-07-20 22:56:52 +10:00
blessedcoolant
d523556558 fix: Truncate board name if longer than 20 chars 2023-07-20 22:56:52 +10:00
blessedcoolant
da523fa32f fix: Editable text aligning left instead of inplace. 2023-07-20 22:56:52 +10:00
blessedcoolant
ab9b5f3b95 fix: Possible fix to the name plate getting displaced 2023-07-20 22:56:52 +10:00
blessedcoolant
f32bd5dd10 fix: Minor color tweaks to the name plate on boards 2023-07-20 22:56:52 +10:00
psychedelicious
190ba5af59 feat(ui): boards styling 2023-07-20 22:56:52 +10:00
Lincoln Stein
cb29ac63a8 prevent crashes on quick install when hftoken not defined 2023-07-20 08:38:37 -04:00
Lincoln Stein
603989dc0d added get_log_level and set_log_level operations to the app route 2023-07-20 08:33:01 -04:00
blessedcoolant
2872ae2aab fix: Adjust layout of Resize Mode dropdown
Moved it next to ControlMode to make it more compact
2023-07-20 22:53:45 +12:00
blessedcoolant
b7cdda0781 feat: Add ControlNet Resize Mode to Linear UI 2023-07-20 22:48:35 +12:00
blessedcoolant
267940a77e Merge branch 'main' into feat/controlnet-resize-mode 2023-07-20 22:24:11 +12:00
blessedcoolant
0795d8764f
Merge branch 'main' into fix/post-model-sync 2023-07-20 20:16:14 +12:00
user1
70fec9ddab Added pixel_perfect_resolution() method to controlnet_utils.py, but not using yet. To be usable this will likely require modification of ControlNet preprocessors 2023-07-20 00:41:49 -07:00
user1
909f538fb5 Switching over to controlnet_utils prepare_control_image(), with added resize_mode. 2023-07-20 00:41:49 -07:00
user1
bab8b6d240 Removed diffusers_pipeline prepare_control_image() -- replaced with controlnet_utils.prepare_control_image()
Added resize_mode to ControlNetData class.
2023-07-20 00:41:49 -07:00
user1
f2f49bd8d0 Added resize_mode param to ControlNet node 2023-07-20 00:41:49 -07:00
user1
b8e0810ed1 Added revised prepare_control_image() that leverages lvmin high quality resizing 2023-07-20 00:41:49 -07:00
user1
6cb9167a1b Added controlnet_utils.py with code from lvmin for high quality resize, crop+resize, fill+resize 2023-07-20 00:41:49 -07:00
blessedcoolant
82eb1f1075 feat: Add Sync Models to UI 2023-07-20 18:50:43 +12:00
psychedelicious
187cf906fa
ui: enhance intermediates clear, enhance board auto-add (#3851)
* feat(ui): enhance clear intermediates feature

- retrieve the # of intermediates using a new query (just uses list images endpoint w/ limit of 0)
- display the count in the UI
- add types for clearIntermediates mutation
- minor styling and verbiage changes

* feat(ui): remove unused settings option for guides

* feat(ui): use solid badge variant

consistent with the rest of the usage of badges

* feat(ui): update board ctx menu, add board auto-add

- add context menu to system boards - only open is select board. did this so that you dont think its broken when you click it
- add auto-add board. you can right click a user board to enable it for auto-add, or use the gallery settings popover to select it. the invoke button has a tooltip on a short delay to remind you that you have auto-add enabled
- made useBoardName hook, provide it a board id and it gets your the board name
- removed `boardIdToAdTo` state & logic, updated workflows to auto-switch and auto-add on image generation

* fix(ui): clear controlnet when clearing intermediates

* feat: Make Add Board icon a button

* feat(db, api): clear intermediates now clears all of them

* feat(ui): make reset webui text subtext style

* feat(ui): board name change submits on blur

---------

Co-authored-by: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
2023-07-20 17:44:22 +12:00
Lincoln Stein
d76bf4444c
Update invokeai/app/api/routers/models.py
Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
2023-07-19 22:46:49 -04:00
blessedcoolant
6e36c275c9
feat: Add Setting Switch Component (#3847) 2023-07-20 14:17:51 +12:00