psychedelicious
0cf7fe43af
feat(db): refactor migrate callbacks to use dependencies, remote pre/post callbacks
2023-12-12 12:35:42 +11:00
psychedelicious
6063760ce2
feat(db): tweak docstring
2023-12-12 11:13:40 +11:00
psychedelicious
c5ba4f2ea5
feat(db): remove file backups
...
Instead of mucking about with the filesystem, we rely on SQLite transactions to handle failed migrations.
2023-12-12 11:12:46 +11:00
psychedelicious
3414437eea
feat(db): instantiate SqliteMigrator with a SqliteDatabase
...
Simplifies a couple things:
- Init is more straightforward
- It's clear in the migrator that the connection we are working with is related to the SqliteDatabase
2023-12-12 10:46:08 +11:00
psychedelicious
417db71471
feat(db): decouple SqliteDatabase from config object
...
- Simplify init args to path (None means use memory), logger, and verbose
- Add docstrings to SqliteDatabase (it had almost none)
- Update all usages of the class
2023-12-12 10:30:37 +11:00
psychedelicious
afe4e55bf9
feat(db): simplify migration registration validation
...
With the previous change to assert that the to_version == from_version + 1, this validation can be simpler.
2023-12-12 09:52:03 +11:00
psychedelicious
55acc16b2d
feat(db): require migration versions to be consecutive
2023-12-12 09:43:09 +11:00
skunkworxdark
c84526fae5
Fixed Tests that where using round_to_8 and removed redundant tests
2023-12-11 17:05:45 +00:00
skunkworxdark
f762940335
Merge branch 'main' into tiled-upscaling-graph
2023-12-11 16:57:36 +00:00
skunkworxdark
fefb78795f
- Even_spilt overlap renamed to overlap_fraction
...
- min_overlap removed * restrictions and round_to_8
- min_overlap handles tile size > image size by clipping the num tiles to 1.
- Updated assert test on min_overlap.
2023-12-11 16:55:27 +00:00
psychedelicious
290851016e
feat(db): move sqlite_migrator into its own module
2023-12-11 16:41:30 +11:00
psychedelicious
fa7d002175
fix(tests): fix typing issues
2023-12-11 16:22:29 +11:00
psychedelicious@windows
f1b6f78319
fix(db): fix windows db migrator tests
...
- Ensure db files are closed before manipulating them
- Use contextlib.closing() so that sqlite connections are closed on existing the context
2023-12-11 16:14:25 +11:00
psychedelicious
4f3c32a2ee
fix(db): remove errant print stmts
2023-12-11 16:14:25 +11:00
psychedelicious
41db92b9e8
feat(db): add check for missing migration from 0
2023-12-11 16:14:25 +11:00
psychedelicious
3227b30430
feat(db): extract non-stateful logic to class methods
2023-12-11 16:14:25 +11:00
psychedelicious
567f107a81
feat(db): return backup_db_path, move log stmt to run_migrations
2023-12-11 16:14:25 +11:00
psychedelicious
b3d5955bc7
fix(db): rename Migrator._migrations -> _migration_set
2023-12-11 16:14:25 +11:00
psychedelicious
8726b203d4
fix(db): fix migration chain validation
2023-12-11 16:14:25 +11:00
psychedelicious
b3f92e0547
fix(db): fix docstring
2023-12-11 16:14:25 +11:00
psychedelicious
72c9a7663f
fix(db): add docstring
2023-12-11 16:14:25 +11:00
psychedelicious
fcb9e89bd7
feat(db): tidy db naming utils
2023-12-11 16:14:25 +11:00
psychedelicious
56966d6d05
feat(db): only reinit db if migrations occurred
2023-12-11 16:14:25 +11:00
psychedelicious
e46dc9b34e
fix(db): close db conn before reinitializing
2023-12-11 16:14:25 +11:00
psychedelicious
e461f9925e
feat(db): invert backup/restore logic
...
Do the migration on a temp copy of the db, then back up the original and move the temp into its file.
2023-12-11 16:14:25 +11:00
psychedelicious
abeb1bd3b3
feat(db): reduce power MigrateCallback, only gets cursor
...
use partial to provide extra dependencies for the image workflow migration function
2023-12-11 16:14:25 +11:00
psychedelicious
83e820d721
feat(db): decouple from SqliteDatabase
2023-12-11 16:14:25 +11:00
psychedelicious
f8e4b93a74
feat(db): add migration lock file
2023-12-11 16:14:25 +11:00
psychedelicious
0710ec30cf
feat(db): incorporate feedback
2023-12-11 16:14:25 +11:00
psychedelicious
c382329e8c
feat(db): move migrator out of SqliteDatabase
2023-12-11 16:14:25 +11:00
psychedelicious
a2dc780188
feat: add script to migrate image workflows
2023-12-11 16:14:25 +11:00
psychedelicious
f2c6819d68
feat(db): add SQLiteMigrator to perform db migrations
2023-12-11 16:14:25 +11:00
Lincoln Stein
bbcd58e681
Merge branch 'refactor/model-manager-3' of github.com:invoke-ai/InvokeAI into refactor/model-manager-3
2023-12-10 21:34:14 -05:00
Lincoln Stein
36043bf38b
fixed docstring in probe module
2023-12-10 21:33:54 -05:00
Lincoln Stein
fd68c47920
Merge branch 'main' into refactor/model-manager-3
2023-12-10 21:26:44 -05:00
psychedelicious
daf00efa4d
fix(api): only attempt to serve UI build if it exists
2023-12-11 12:30:13 +11:00
psychedelicious
55cfb879d0
feat: no frontend build in repo
...
In other words, build frontend when creating installer.
Changes to `create_installer.sh`
- If `python` is not in `PATH` but `python3` is, alias them (well, via function). This is needed on some machines to run the installer without symlinking to `python3`.
- Make the messages about pushing tags clearer. The script force-pushes, so it's possible to accidentally take destructive action. I'm not sure how to otherwise prevent damage, so I just added a warning.
- Print out `pwd` when prompting about being in the `installer` dir.
- Rebuild the frontend - if there is already a frontend build, first checks if the user wants to rebuild it.
- Checks for existence of `../build` dir before deleting - if the dir doesn't exist, the script errors and exits at this point.
- Format and spell check.
Other changes:
- Ignore `dist/` folder.
- Delete `dist/`.
**Note: you may need to use `git rm --cached invokeai/app/frontend/web/dist/` if git still wants to track `dist/`.**
2023-12-11 12:30:13 +11:00
Lincoln Stein
de2879f602
port new code for detecting sdxl-based embeddings
2023-12-10 15:48:02 -05:00
Lincoln Stein
3b1ff4a7f4
resolve test failure caused by renamed sqlite_database module
2023-12-10 12:59:00 -05:00
Lincoln Stein
d7f7fbc8c2
Merge branch 'main' into refactor/model-manager-3
2023-12-10 12:55:28 -05:00
Lincoln Stein
e2567a7e31
Merge branch 'refactor/model-manager-3' of github.com:invoke-ai/InvokeAI into refactor/model-manager-3
2023-12-10 12:55:24 -05:00
Lincoln Stein
2f3457c02a
rename installer __del__() to stop(). Improve probe error messages
2023-12-10 12:55:01 -05:00
Lincoln Stein
aab6369ffe
Update invokeai/backend/model_manager/search.py
...
Co-authored-by: Ryan Dick <ryanjdick3@gmail.com>
2023-12-10 12:24:50 -05:00
skunkworxdark
4c97b619fb
Update tiles.py
...
merge with main
2023-12-09 22:05:23 +00:00
skunkworxdark
abdd840fb9
Merge branch 'main' into tiled-upscaling-graph
2023-12-09 22:03:18 +00:00
skunkworxdark
e656768eb2
more fixes from code review
2023-12-09 21:56:31 +00:00
skunkworxdark
494c2a9b05
Updates based on code review by @RyanJDick
2023-12-09 18:38:07 +00:00
psychedelicious
076284c26f
fix(ui): add validation to field value reducers
...
Insurance against invalid inputs. Closes #5250
2023-12-09 17:09:02 +11:00
psychedelicious
1af4260ab6
fix(ui): fix workflow saving
...
'id' should not be omitted when building a workflow, it makes workflows always save as a copy
2023-12-09 16:35:44 +11:00
psychedelicious
0ac33f36ef
fix(tests): fix pydantic warning about deprecated fields
...
Calling `inspect.getmembers()` on a pydantic field results in `getattr` being called on all members of the field. Pydantic has some attrs that are marked deprecated.
In our test suite, we do not filter deprecation warnings, so this is surfaced.
Use a context manager to ignore deprecation warnings when calling the function.
2023-12-09 16:31:41 +11:00