Commit Graph

6022 Commits

Author SHA1 Message Date
psychedelicious
79d65125c2 feat(ui): extract mantine component styles to hook, add less opinionated mantine components
IAIMantineSelect and IAIMantineMultiSelect have a bit of extra logic that prevents simple select functionality from working as expected.

- extract the styles into hooks
- rename those two components to IAIMantineSearchableSelect and IAIMantineSearchableMultiSelect
- Create IAIMantineSelect (which is just a dropdown) and use it in model manager and a few other places

When we only have a few options to present and searching is not efficient, we should use this instead.
2023-07-14 23:00:38 +10:00
blessedcoolant
e8d531b987
feat(api): set max-age for images (#3711)
Image files are immutable and we expect deletion to result in no further
requests for a given image, so we can set the max-age to something
thicc.

Resolves #3426

@ebr @brandonrising @maryhipp
2023-07-15 00:33:19 +12:00
Mary Hipp Rogers
545e2f557f
Merge branch 'main' into feat/api/image-max-age 2023-07-14 08:21:44 -04:00
psychedelicious
23c1a6b9d5 fix(nodes): make ResizeLatents w/h optional
now you can connect to them in node editor
2023-07-14 21:42:42 +10:00
psychedelicious
d4dfd84525 feat(ui): mm colors 2023-07-14 20:12:02 +10:00
psychedelicious
eb2a7058bf feat(ui): tweak fontSize in modellist 2023-07-14 19:49:05 +10:00
psychedelicious
56d209842f feat(ui): only show modellistitem when none in array 2023-07-14 19:46:18 +10:00
psychedelicious
0b2f0c05b2 fix(ui): fix selecting model does not update form 2023-07-14 19:31:52 +10:00
psychedelicious
1e5ae9d986 feat(ui): refactor model manager ui
- simplify UI logic in `ModelManagerPanel` components
- fix up the types a bit to make it easier to select models
- remove `openModel` state, just make it a useState since it is very local to model manager
2023-07-14 19:22:37 +10:00
psychedelicious
f2af82bf73 feat(ui): add model convert for success/failure handling 2023-07-14 17:39:00 +10:00
psychedelicious
6d7fb49a7a fix(ui): fix model edit button disabled status 2023-07-14 17:36:10 +10:00
psychedelicious
48a8bd4985 feat(ui): add model update for success/failure handling 2023-07-14 17:35:45 +10:00
psychedelicious
d8437d3036 feat(ui): add simple selectIsBusy selector 2023-07-14 17:34:34 +10:00
psychedelicious
a0cb18a12c feat(ui): refetch models on socket connect 2023-07-14 17:34:13 +10:00
psychedelicious
b2005d821a fix(ui): fix types for models queries 2023-07-14 16:59:31 +10:00
psychedelicious
66b12ab0ea fix(ui): do not blacklist the rtk query events
doing so breaks the devtools
2023-07-14 16:59:13 +10:00
blessedcoolant
834774ce4c fix: Merge Conflicts 2023-07-14 18:16:34 +12:00
blessedcoolant
7cd60214cb Merge branch 'main' into mm-ui 2023-07-14 18:14:45 +12:00
blessedcoolant
5c58bc6348 fix: Missing VAE Input Field Component 2023-07-14 16:07:22 +10:00
blessedcoolant
e1d6c09ed2 fix: Type errors & missing Unet field component 2023-07-14 16:07:22 +10:00
psychedelicious
8dd4ca5723 feat(ui): update node editor to use model object format
similar to the previous commit, update the node editor to not just store models as strings - instead, store the model object.

the model select components in nodes are now just kinda copy-pastes over the linear UI versions of the same components, but they were different enough that we can't just share them.

i explored adding some props to override the linear ui components' logic, but it was too brittle. so just copy/paste.
2023-07-14 16:07:22 +10:00
psychedelicious
a071873327 feat(ui): fix a lot of model-related crashes/bugs
We were storing all types of models by their model ID, which is a format like `sd-1/main/deliberate`.

This meant we had to do a lot of extra parsing, because nodes actually wants something like `{base_model: 'sd-1', model_name: 'deliberate'}`.

Some of this parsing was done with zod's error-throwing `parse()` method, and in other places it was done with brittle string parsing.

This commit refactors the state to use the object form of models.

There is still a bit of string parsing done in the to construct the ID from the object form, but it's far less complicated.

Also, the zod parsing is now done using `safeParse()`, which does not throw. This requires a few more conditional checks, but should prevent further crashes.
2023-07-14 16:07:22 +10:00
psychedelicious
14587464d5 fix(ui): check for metadataAccumulator before connecting to it
Fixes an edge case in graph building.
2023-07-14 16:07:22 +10:00
psychedelicious
d858a0c5d8 fix(ui): fix rtk tags
I had mixed up `type` and `id` on a bunch of the tags. Fixing those
2023-07-14 15:32:09 +10:00
blessedcoolant
abe2a0f9b4 fix: merge conflicts (name renamed to model_name) for models 2023-07-14 15:53:28 +12:00
blessedcoolant
16e93c6455 Merge branch 'main' into mm-ui 2023-07-14 15:46:53 +12:00
Sergey Borisov
9fb0b0959f Make sde and ancestral schedulers reproducible 2023-07-14 05:25:09 +03:00
Sergey Borisov
d8f88c09ea Fix pink output on a lot of samplers 2023-07-14 05:00:33 +03:00
psychedelicious
536a397b12
ui: gallery enhancements (#3752)
* feat(ui): salvaged gallery UI enhancements

* restore boardimage functionality, load boardimages and remove some cachine optimizations in the name of data integrity

* fix assets, fix load more params

* jk NOW fix assets, fix load more params

---------

Co-authored-by: Mary Hipp <maryhipp@Marys-MacBook-Air.local>
Co-authored-by: Mary Hipp Rogers <maryhipp@gmail.com>
2023-07-13 20:31:10 +00:00
blessedcoolant
271f64068c
fix: model_name reference in Model Manager (#3756) 2023-07-14 05:58:35 +12:00
blessedcoolant
50f10ce5d7 fix: model_name reference in Model Manager 2023-07-14 03:36:11 +12:00
psychedelicious
d46261a528 chore(ui): regen types 2023-07-13 23:26:52 +10:00
psychedelicious
978016ea51 feat(ui): use query to populate infill methods dropdown
- available infill methods is server state - remove it from client state, use the query to populate the dropdown
- add listener to ensure the selected infill method is an available one
2023-07-13 23:26:52 +10:00
psychedelicious
4d25d702a1 feat(api): app/config route returns available infill methods 2023-07-13 23:26:52 +10:00
Mary Hipp
d6c914eedc detect if user has patchmatch enabled 2023-07-13 23:26:52 +10:00
maryhipp
fba25792f9 add new route for app config 2023-07-13 23:26:52 +10:00
Lincoln Stein
8fc0ce7e38
Fix wrong conditioning used (#3595)
As it said in comment to this branch we want to use conditioning run:
```python
if cfg_injection:  # only applying ControlNet to conditional instead of in unconditioned
```
But in code used unconditioning
embeddings(`conditioning_data.unconditioned_embeddings`).

Later in code confirms that we want to run conditioning generation by
comment and tensor concatenation order(as all code expect to get [uc, c]
tensor):
```python
if cfg_injection:
    # Inferred ControlNet only for the conditional batch.
    # To apply the output of ControlNet to both the unconditional and conditional batches,
    #   add 0 to the unconditional batch to keep it unchanged.
    down_samples = [torch.cat([torch.zeros_like(d), d]) for d in down_samples]
    mid_sample = torch.cat([torch.zeros_like(mid_sample), mid_sample])
```
2023-07-13 09:19:13 -04:00
blessedcoolant
9348dc8e0d
Merge branch 'main' into fix/controlnet_cfg_inj_cond 2023-07-14 01:11:04 +12:00
blessedcoolant
d4ec8873f7
Fix Inpainting Issues (#3744)
- fix: Inpaint not working with some schedulers: Resolves #3732
- fix: LoRA's not working at all while inpainting.
2023-07-13 23:42:44 +12:00
blessedcoolant
34bff3ba77
Merge branch 'main' into fix-inpainting 2023-07-13 23:35:12 +12:00
mickr777
3cf75e48c5 remove clearnode export 2023-07-13 21:34:12 +10:00
mickr777
b5e7384f09 Delete clearnodes and change nodeEditorReset 2023-07-13 21:34:12 +10:00
mickr777
ee253ea4f1 add useCallback 2023-07-13 21:34:12 +10:00
blessedcoolant
430b9c291f fix: Loras not working correctly with Inpainting 2023-07-13 22:59:38 +12:00
blessedcoolant
16f53228c2 Merge branch 'main' into fix-inpainting 2023-07-13 22:31:08 +12:00
blessedcoolant
28001271b8
fix(ui): fix nodes crash when adding model loader (#3755) 2023-07-13 22:30:17 +12:00
psychedelicious
4ab4942e69 fix(ui): fix nodes crash when adding model loader 2023-07-13 20:29:03 +10:00
blessedcoolant
1b42996925
fix(ui): fix node parsing failing (#3754) 2023-07-13 22:19:00 +12:00
blessedcoolant
98a5b3fc24
Merge branch 'main' into fix/ui/fix-missing-nodes 2023-07-13 22:18:27 +12:00
psychedelicious
944b46908a fix(ui): fix node parsing failing 2023-07-13 20:17:18 +10:00