mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix tests
This commit is contained in:
committed by
Kent Keirsey
parent
4af5a09a68
commit
347f1fd0b7
@ -79,7 +79,6 @@ example_model_input = {
|
|||||||
"description": "Model description",
|
"description": "Model description",
|
||||||
"vae": None,
|
"vae": None,
|
||||||
"variant": "normal",
|
"variant": "normal",
|
||||||
"image": "blob",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
@ -24,8 +24,8 @@ export type UpdateModelArg = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type UpdateModelImageArg = {
|
export type UpdateModelImageArg = {
|
||||||
key: paths['/api/v2/models/i/{key}/image']['patch']['parameters']['path']['key'];
|
key: string;
|
||||||
image: paths['/api/v2/models/i/{key}/image']['patch']['requestBody']['content']['multipart/form-data'];
|
image: Blob;
|
||||||
};
|
};
|
||||||
|
|
||||||
type UpdateModelResponse = paths['/api/v2/models/i/{key}']['patch']['responses']['200']['content']['application/json'];
|
type UpdateModelResponse = paths['/api/v2/models/i/{key}']['patch']['responses']['200']['content']['application/json'];
|
||||||
@ -155,7 +155,7 @@ export const modelsApi = api.injectEndpoints({
|
|||||||
updateModelImage: build.mutation<UpdateModelImageResponse, UpdateModelImageArg>({
|
updateModelImage: build.mutation<UpdateModelImageResponse, UpdateModelImageArg>({
|
||||||
query: ({ key, image }) => {
|
query: ({ key, image }) => {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('image', image.image);
|
formData.append('image', image);
|
||||||
return {
|
return {
|
||||||
url: buildModelsUrl(`i/${key}/image`),
|
url: buildModelsUrl(`i/${key}/image`),
|
||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
|
File diff suppressed because one or more lines are too long
@ -44,6 +44,7 @@ def mock_services() -> InvocationServices:
|
|||||||
images=ImageService(),
|
images=ImageService(),
|
||||||
invocation_cache=MemoryInvocationCache(max_cache_size=0),
|
invocation_cache=MemoryInvocationCache(max_cache_size=0),
|
||||||
logger=logging, # type: ignore
|
logger=logging, # type: ignore
|
||||||
|
model_images=None, # type: ignore
|
||||||
model_manager=None, # type: ignore
|
model_manager=None, # type: ignore
|
||||||
download_queue=None, # type: ignore
|
download_queue=None, # type: ignore
|
||||||
names=None, # type: ignore
|
names=None, # type: ignore
|
||||||
|
Reference in New Issue
Block a user