Brandon Rising
0282f46c71
Add runs field for running the same batch multiple times
2023-08-18 13:41:07 -04:00
Brandon Rising
99e03fe92e
Run unmodified graph if no batch data is provided
2023-08-18 13:33:09 -04:00
Brandon Rising
cb65526880
More session not found handling
2023-08-17 14:23:12 -04:00
psychedelicious
59bc9ed399
fix(backend): handle BatchSessionNotFoundException
in BatchManager._process()
...
The internal `BatchProcessStorage.get_session()` method throws when it finds nothing, but we were not catching any exceptions.
This caused a exception when the batch manager handles a `graph_execution_state_complete` event that did not originate from a batch.
Fixed by handling the exception.
2023-08-17 13:58:11 +10:00
psychedelicious
e62d5478fd
fix(backend): fix sqlite cannot commit - no transaction is active
...
The `commit()` was called even if we hadn't executed anything
2023-08-17 13:55:38 +10:00
psychedelicious
cc3c2756bd
feat(backend): rename batch changes variable
...
`updateSession` -> `changes`
2023-08-17 13:32:32 +10:00
psychedelicious
67cf594bb3
feat(backend): add missing types to batch_manager_storage.py
2023-08-17 13:29:19 +10:00
psychedelicious
c5b963f1a6
fix(backend): typo
...
`relavent` -> `relevant`
2023-08-17 12:47:58 +10:00
psychedelicious
4d2dd6bb10
feat(backend): rename BatchManager.process
to _process
...
Just to make it clear that this is not a method on the ABC.
2023-08-17 12:47:05 +10:00
psychedelicious
7e4beab4ff
feat(backend): surface BatchSessionNodeFoundException
...
Catch this exception in the router and return an appropriate `HTTPException`.
2023-08-17 12:45:32 +10:00
psychedelicious
e16b5f7cdc
feat(backend): deserialize batch session directly
...
If the values from the `session_dict` are invalid, the model instantiation will fail, or if we end up with an invalid `batch_id`, the app will not run. So I think just parsing the dict directly is equivalent.
Also the LSP analyser is pleased now - no red squigglies.
2023-08-17 12:37:03 +10:00
psychedelicious
1f355d5810
feat(backend): update batch_manager_storage.py
docstrings
2023-08-17 12:31:51 +10:00
psychedelicious
df7370f9d9
chore(backend): remove unused code
2023-08-17 12:16:34 +10:00
psychedelicious
5bec64d65b
fix(backend): fix typings in batch_manager.py
...
- `batch_indicies` is `tuple[int]` not `list[int]`
- explicit `None` return values
2023-08-17 12:07:20 +10:00
psychedelicious
8cf9bd47b2
chore(backend): remove unnecessary batch validation function
...
The `Batch` model is fully validated by pydantic on instantiation; we do not need any validation logic for it.
2023-08-17 11:59:47 +10:00
psychedelicious
c91621b46c
fix(backend): BatchProcess.batch_id
is required
...
Providing a `default_factory` is enough for pydantic to know to create the attribute on instantiation if it's not already provided. We can then make make the typing just `str`.
2023-08-17 11:58:29 +10:00
Brandon Rising
f7277a8b21
Run python black
2023-08-16 15:44:52 -04:00
Brandon Rising
796ff34c8a
Testing out Spencer's batch data structure
2023-08-16 15:21:11 -04:00
Brandon Rising
d6a5c2dbe3
Fix tests
2023-08-16 14:35:49 -04:00
Brandon
314891a125
Merge branch 'main' into feat/batch-graphs
2023-08-15 22:42:49 -04:00
psychedelicious
8b1ec2685f
chore: black
2023-08-16 12:07:34 +10:00
maryhipp
80b0c5eab4
change from pin to star
2023-08-16 12:07:34 +10:00
maryhipp
ee6a26a97d
update list images endpoint to sort by pinnedness and then created_at
2023-08-16 12:07:34 +10:00
maryhipp
04a9894e77
(api) add ability to pin and unpin images
2023-08-16 12:07:34 +10:00
Brandon Rising
2d3094f988
Run python black
2023-08-15 21:51:45 -04:00
Brandon Rising
abf09fc8fa
Switch sqlite clients to only use one connection
2023-08-15 21:46:24 -04:00
psychedelicious
fa884134d9
feat: rename ui_type_hint
to ui_type
...
Just a bit more succinct while not losing any clarity.
2023-08-16 09:54:38 +10:00
psychedelicious
c48fd9c083
feat(nodes): refactor parameter/primitive nodes
...
Refine concept of "parameter" nodes to "primitives":
- integer
- float
- string
- boolean
- image
- latents
- conditioning
- color
Each primitive has:
- A field definition, if it is not already python primitive value. The field is how this primitive value is passed between nodes. Collections are lists of the field in node definitions. ex: `ImageField` & `list[ImageField]`
- A single output class. ex: `ImageOutput`
- A collection output class. ex: `ImageCollectionOutput`
- A node, which functions to load or pass on the primitive value. ex: `ImageInvocation` (in this case, `ImageInvocation` replaces `LoadImage`)
Plus a number of related changes:
- Reorganize these into `primitives.py`
- Update all nodes and logic to use primitives
- Consolidate "prompt" outputs into "string" & "mask" into "image" (there's no reason for these to be different, the function identically)
- Update default graphs & tests
- Regen frontend types & minor frontend tidy related to changes
2023-08-16 09:54:38 +10:00
psychedelicious
f49fc7fb55
feat: node editor
...
squashed rebase on main after backendd refactor
2023-08-16 09:54:38 +10:00
Brandon Rising
15e7ca1baa
Break apart create/start logic
2023-08-15 16:28:47 -04:00
Brandon Rising
6cb90e01de
Graph is required in batch create
2023-08-15 16:13:51 -04:00
Brandon Rising
faa4574970
Turn off WAL mode
2023-08-15 15:59:42 -04:00
Brandon
cc5755d5b1
Update invokeai/app/services/batch_manager_storage.py
...
Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
2023-08-15 15:54:57 -04:00
Brandon
85105fc070
Update invokeai/app/services/batch_manager_storage.py
...
Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
2023-08-15 15:54:17 -04:00
Brandon Rising
f8d8b16267
Run python black
2023-08-14 11:01:31 -04:00
Brandon Rising
69f541075c
Merge branch 'main' into feat/batch-graphs
2023-08-14 10:32:35 -04:00
Brandon Rising
1debc31e3d
Allow cancel of running batch
2023-08-11 15:52:49 -04:00
Brandon Rising
1d798d4119
Return session id's on batch creation
2023-08-11 11:45:27 -04:00
blessedcoolant
87ce4ab27c
fix: Update default_graph to use new DenoiseLatents
2023-08-11 22:21:13 +12:00
Brandon Rising
c1dde83abb
Clean up erroniously added lines
2023-08-10 14:28:50 -04:00
Brandon Rising
280ac15da2
Go back to 1 lock per table
2023-08-10 14:26:22 -04:00
Brandon Rising
e751f7d815
More testing
2023-08-10 14:09:00 -04:00
Brandon Rising
e26e4740b3
Testing sqlite issues with batch_manager
2023-08-10 11:38:28 -04:00
Sergey Borisov
ade78b9591
Merge branch 'main' into feat/refactor_generation_backend
2023-08-10 04:32:16 +03:00
Sergey Borisov
e98f7eda2e
Fix total_steps in generation event, order field added
2023-08-09 03:34:25 +03:00
Lincoln Stein
4d5169e16d
Merge branch 'main' into feat/select-vram-in-config
2023-08-08 13:50:02 -04:00
Lincoln Stein
e77400ab62
remove deprecated options from config
2023-08-08 08:33:30 -07:00
Lincoln Stein
a9bf387e5e
turned on Pydantic validate_assignment
2023-08-08 08:33:30 -07:00
Lincoln Stein
0fd13d3604
Merge branch 'main' into feat/select-vram-in-config
2023-08-07 15:51:59 -04:00
psychedelicious
66f524cae7
fix(mm): fix a lot of typing issues
...
Most fixes are just things being typed as `str` but having default values of `None`, but there are some minor logic changes.
2023-08-06 14:09:04 +10:00