mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
implement workaround for FastAPI and discriminated unions in Body parameter
This commit is contained in:
@ -44,6 +44,12 @@ def example_config() -> TextualInversionConfig:
|
||||
)
|
||||
|
||||
|
||||
def test_type(store: ModelRecordServiceBase):
|
||||
config = example_config()
|
||||
store.add_model("key1", config)
|
||||
config1 = store.get_model("key1")
|
||||
assert type(config1) == TextualInversionConfig
|
||||
|
||||
def test_add(store: ModelRecordServiceBase):
|
||||
raw = dict(
|
||||
path="/tmp/foo.ckpt",
|
||||
|
Reference in New Issue
Block a user