Commit Graph

23 Commits

Author SHA1 Message Date
Martin Kristiansen
e467ca7f1b Apply black, isort, flake8 2023-09-12 13:01:58 -04:00
Martin Kristiansen
5615c31799 isort wip 2023-09-12 13:01:58 -04:00
psychedelicious
d0a7832326 fix(tests): clarify test_deny_nodes xfail.reason 2023-09-08 13:24:37 -04:00
psychedelicious
75bc43b2a5 fix(tests): make test_deny_nodes as xfail :( 2023-09-08 13:24:37 -04:00
psychedelicious
4395ee3c03 feat: parse config before importing anything else
We need to parse the config before doing anything related to invocations to ensure that the invocations union picks up on denied nodes.

- Move that to the top of api_app and cli_app
- Wrap subsequent imports in `if True:`, as a hack to satisfy flake8 and not have to noqa every line or the whole file
- Add tests to ensure graph validation fails when using a denied node, and that the invocations union does not have denied nodes (this indirectly provides confidence that the generated OpenAPI schema will not include denied nodes)
2023-09-08 13:24:37 -04:00
Lincoln Stein
a536719fc3 blackify 2023-08-20 15:27:51 -04:00
Lincoln Stein
8e6d88e98c resolve merge conflicts 2023-08-20 15:26:52 -04:00
Martin Kristiansen
537ae2f901 Resolving merge conflicts for flake8 2023-08-18 15:52:04 +10:00
Lincoln Stein
635a814dfb fix up documentation 2023-08-17 14:32:05 -04:00
Lincoln Stein
ed38eaa10c refactor InvokeAIAppConfig 2023-08-17 13:47:26 -04:00
Lincoln Stein
437f45a97f do not depend on existence of /tmp directory 2023-08-01 00:41:35 -04:00
Lincoln Stein
72ebe2ce68 refactor root directory detection to be cleaner 2023-07-31 22:30:06 -04:00
Martin Kristiansen
218b6d0546 Apply black 2023-07-27 10:54:01 -04:00
Lincoln Stein
0ce8472562 adjust unit test to account for nsfw always being true now 2023-07-26 07:29:33 -04:00
Lincoln Stein
c3adb301a0 fix the test of the config system 2023-07-11 17:46:16 -04:00
Lincoln Stein
257e972599 fix failing pytest for config module 2023-06-20 13:26:01 -04:00
Lincoln Stein
9e31b1f387
Merge branch 'main' into lstein/config-management-fixes 2023-06-04 18:17:43 -04:00
Lincoln Stein
2273b3a8c8 fix potential race condition in config system 2023-05-25 20:41:26 -04:00
Lincoln Stein
b87f3043ae add logging configuration 2023-05-24 23:57:15 -04:00
Lincoln Stein
7ea995149e fixes to env parsing, textual inversion & help text
- Make environment variable settings case InSenSiTive:
  INVOKEAI_MAX_LOADED_MODELS and InvokeAI_Max_Loaded_Models
  environment variables will both set `max_loaded_models`

- Updated realesrgan to use new config system.

- Updated textual_inversion_training to use new config system.

- Discovered a race condition when InvokeAIAppConfig is created
  at module load time, which makes it impossible to customize
  or replace the help message produced with --help on the command
  line. To fix this, moved all instances of get_invokeai_config()
  from module load time to object initialization time. Makes code
  cleaner, too.

- Added `--from_file` argument to `invokeai-node-cli` and changed
  github action to match. CI tests will hopefully work now.
2023-05-18 10:48:23 -04:00
Lincoln Stein
7593dc19d6 complete several steps needed to make 3.0 installable
- invokeai-configure updated to work with new config system
- migrate invokeai.init to invokeai.yaml during configure
- replace legacy invokeai with invokeai-node-cli
- add ability to run an invocation directly from invokeai-node-cli command line
- update CI tests to work with new invokeai syntax
2023-05-17 14:13:27 -04:00
Lincoln Stein
b7c5a39685 make invokeai.yaml more hierarchical; fix list configuration bug 2023-05-17 12:19:19 -04:00
Lincoln Stein
29c2ada23c add test for the configuration module 2023-05-04 00:45:52 -04:00