Commit Graph

189 Commits

Author SHA1 Message Date
Kent Keirsey
0f7695a081
Merge branch 'main' into feat/batch-graphs 2023-08-27 11:41:45 -04:00
blessedcoolant
49892faee4 experimental: LaMa Infill 2023-08-23 23:05:29 -04:00
psychedelicious
b98c9b516a feat: add batch docstrings 2023-08-21 19:51:16 +10:00
psychedelicious
a15a5bc3b8 fix(api): correct get_batch response model 2023-08-21 19:51:02 +10:00
Brandon Rising
4b6d9a73ed Merge branch 'main' into feat/batch-graphs 2023-08-18 15:40:34 -04:00
Brandon Rising
3e26214b83 Add a few more endpoints for managing batches 2023-08-18 15:38:16 -04:00
Martin Kristiansen
537ae2f901 Resolving merge conflicts for flake8 2023-08-18 15:52:04 +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
f246b236dd fix(api): fix start_batch route responses 2023-08-17 11:51:14 +10:00
Brandon Rising
796ff34c8a Testing out Spencer's batch data structure 2023-08-16 15:21:11 -04:00
Brandon
314891a125
Merge branch 'main' into feat/batch-graphs 2023-08-15 22:42:49 -04:00
psychedelicious
60c2c877d7 fix: add response model for star/unstar routes
- also implement pessimistic updates for starring, only changing the images that were successfully updated by backend
- some autoformat changes crept in
2023-08-16 12:07:34 +10:00
maryhipp
80b0c5eab4 change from pin to star 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
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
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
Lincoln Stein
a969707e45 prevent vae: '' from crashing model 2023-08-10 17:33:04 -04: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
Kevin Turner
809705c30d api(images): allow HEAD request on image/full 2023-08-07 15:11:47 -07:00
psychedelicious
d09dfc3e9b fix(api): use db_location instead of db_path_string
This may just be the SQLite memory sentinel value.
2023-08-06 14:09:04 +10:00
psychedelicious
9ba50130a1 fix(api): fix db location types
The services all want strings instead of `Path`s; create variable for the string representation of the path provided by the config services.
2023-08-06 14:09:04 +10:00
psychedelicious
d4cf2d2666 fix(api): fix ApiDependencies.invoker types
ApiDependencies.invoker` provides typing for the API's services layer. Marking it `Optional` results in all the routes seeing it as optional, which is not good.

Instead of marking it optional to satisfy the initial assignment to `None`, we can just skip the initial assignment. This preserves the IDE hinting in API layer and is types-legal.
2023-08-06 14:09:04 +10:00
Lincoln Stein
0a0b7141af
Merge branch 'main' into feat/execution-stats 2023-08-03 19:49:00 -04: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
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
835d76af45
Merge branch 'main' into feat/batch-graphs 2023-08-01 16:44:30 -04:00
Brandon Rising
a61685696f Run black formatting 2023-08-01 16:41:40 -04:00
Brandon Rising
02aa93c67c Cancel batch endpoint 2023-07-31 16:05:27 -04:00
Brandon Rising
55b921818d Create batch manager 2023-07-31 15:45:35 -04:00
Brandon Rising
bb681a8a11 Merge branch 'main' into feat/batch-graphs 2023-07-31 13:22:11 -04:00
Alexandre Macabies
50e00feceb Add missing Optional on a few nullable fields. 2023-07-30 16:25:12 +02:00
Lincoln Stein
0d8f9cbe55 resolved conflicts with main 2023-07-27 15:11:25 -04:00
Lincoln Stein
fd75a1dd10 reformat with black 2023-07-27 15:01:00 -04:00
Martin Kristiansen
218b6d0546 Apply black 2023-07-27 10:54:01 -04:00
Lincoln Stein
2c5b539d3a esrgan and its models are now nested in app config route 2023-07-26 15:27:04 +10:00
Lincoln Stein
85ad5ef204 refactored code; added watermark and nsfw facilities to app config route 2023-07-26 15:27:04 +10:00
Brandon Rising
f080c56771 Testing out generating a new session for each batch_index 2023-07-25 16:50:07 -04:00
Lincoln Stein
2aefa921fe fix "unknown model type" error when rebasing a model with API
- Add command-line model probing script for dev use
- Minor documentation tweak
2023-07-25 08:36:57 -04: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
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
896b77cf56 feat(api,db): allow creating an image with a board_id 2023-07-21 07:26:12 -04:00
Lincoln Stein
9370572169 prettify startup messages 2023-07-20 22:45:35 -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