Commit Graph

129 Commits

Author SHA1 Message Date
151ba02022 fix models.yaml version assertion error in pytests 2023-09-17 17:22:50 -04:00
d051c0868e attempt to fix flake8 lint errors 2023-09-17 17:13:56 -04:00
c029534243 all methods in router API now tested and working 2023-09-16 19:43:01 -04:00
dc683475d4 loading and conversions of checkpoints working 2023-09-16 16:27:57 -04:00
db7fdc3555 fix more isort issues 2023-09-15 22:22:43 -04:00
716a1b6423 model_manager_service now mostly type correct 2023-09-14 21:12:31 -04:00
27dcd89c90 merge with main; model_manager_service.py needs to be rewritten 2023-09-13 20:19:14 -04:00
e467ca7f1b Apply black, isort, flake8 2023-09-12 13:01:58 -04:00
5615c31799 isort wip 2023-09-12 13:01:58 -04:00
6d8b2a7385 pytests mostly working; model_manager_service needs rewriting 2023-09-11 23:47:24 -04:00
f454304c91 make it possible to pause/resume repo_id downloads 2023-09-10 17:20:47 -04:00
8052f2eb5d Merge branch 'main' into lstein/model-manager-refactor 2023-09-10 13:01:19 -04:00
b7a6a536e6 fix flake8 warnings 2023-09-09 21:26:09 -04:00
b2892f9068 incorporate civitai metadata into model config 2023-09-09 21:17:55 -04:00
d0a7832326 fix(tests): clarify test_deny_nodes xfail.reason 2023-09-08 13:24:37 -04:00
75bc43b2a5 fix(tests): make test_deny_nodes as xfail :( 2023-09-08 13:24:37 -04:00
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
b7ca983f9c blackify 2023-09-07 21:14:24 -04:00
2165d55a67 add checks for malformed URLs and malicious content dispositions 2023-09-07 21:14:10 -04:00
a7aca29765 implement regression tests for pause/cancel/error conditions 2023-09-07 17:06:59 -04:00
79b2423159 last flake8 fix - why is local flake8 not identical to git flake8? 2023-09-07 09:38:15 -04:00
b09e012baa Merge branch 'lstein/model-manager-refactor' of github.com:invoke-ai/InvokeAI into lstein/model-manager-refactor 2023-09-07 09:20:32 -04:00
c9a016f1a2 more flake8 fixes 2023-09-07 09:20:23 -04:00
d979c50de3 Merge branch 'main' into lstein/model-manager-refactor 2023-09-07 09:17:16 -04:00
404cfe0eb9 add download manager to invoke services 2023-09-06 18:47:30 -04:00
e9074176bd add unit tests for queued model download 2023-09-06 18:25:04 -04:00
d1c5990abe merge and resolve conflicts 2023-09-04 18:50:06 -04:00
3dbb0e1bfb feat(tests): add tests for node versions 2023-09-04 19:16:44 +10:00
59cb6305b9 feat(tests): add tests for decorator and int -> float 2023-09-04 19:07:41 +10:00
044d4c107a feat(nodes): move all invocation metadata (type, title, tags, category) to decorator
All invocation metadata (type, title, tags and category) are now defined in decorators.

The decorators add the `type: Literal["invocation_type"]: "invocation_type"` field to the invocation.

Category is a new invocation metadata, but it is not used by the frontend just yet.

- `@invocation()` decorator for invocations

```py
@invocation(
    "sdxl_compel_prompt",
    title="SDXL Prompt",
    tags=["sdxl", "compel", "prompt"],
    category="conditioning",
)
class SDXLCompelPromptInvocation(BaseInvocation, SDXLPromptInvocationBase):
    ...
```

- `@invocation_output()` decorator for invocation outputs

```py
@invocation_output("clip_skip_output")
class ClipSkipInvocationOutput(BaseInvocationOutput):
    ...
```

- update invocation docs
- add category to decorator
- regen frontend types
2023-08-30 18:35:12 +10:00
055ad0101d merge with main; resolve conflicts 2023-08-23 19:45:25 -04:00
3f7ac556c6 Merge branch 'main' into refactor/rename-performance-options 2023-08-21 22:29:34 -04:00
0c639bd751 fix(tests): fix tests 2023-08-22 10:26:11 +10:00
0deb3f9e2a Merge branch 'main' into lstein/model-manager-refactor 2023-08-20 16:15:14 -04:00
a536719fc3 blackify 2023-08-20 15:27:51 -04:00
8e6d88e98c resolve merge conflicts 2023-08-20 15:26:52 -04:00
c96ae4c331 Reverting late imports to fix tests 2023-08-18 15:52:04 +10:00
537ae2f901 Resolving merge conflicts for flake8 2023-08-18 15:52:04 +10:00
635a814dfb fix up documentation 2023-08-17 14:32:05 -04:00
ed38eaa10c refactor InvokeAIAppConfig 2023-08-17 13:47:26 -04:00
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
7db71ed42e rename modules 2023-08-14 20:55:30 -04:00
81da3d3b23 change model field name "hash" to "id" 2023-08-13 18:49:30 -04:00
1ea0ccb7b9 add SQL backend 2023-08-13 18:15:49 -04:00
5434dcd273 fix test to work with string paths 2023-08-13 13:36:31 -04:00
b2894b5270 add class docstring and blackify 2023-08-12 20:13:00 -04:00
32958db6f6 add YAML file storage backend 2023-08-12 20:06:00 -04:00
e8815a1676 rename ModelConfig to ModelConfigFactory 2023-08-12 18:30:14 -04:00
b5d97b18f1 blackify 2023-08-12 17:24:03 -04:00
ae56c000fc define model configuration classes 2023-08-12 17:11:34 -04:00