mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
get model image url from model config, added thumbnail formatting for images
This commit is contained in:
committed by
Kent Keirsey
parent
239b1e8cc7
commit
8411029d93
@@ -138,7 +138,7 @@ const buildTransformResponse =
|
||||
* buildModelsUrl('some-path')
|
||||
* // '/api/v1/models/some-path'
|
||||
*/
|
||||
export const buildModelsUrl = (path: string = '') => buildV2Url(`models/${path}`);
|
||||
const buildModelsUrl = (path: string = '') => buildV2Url(`models/${path}`);
|
||||
|
||||
export const modelsApi = api.injectEndpoints({
|
||||
endpoints: (build) => ({
|
||||
@@ -162,6 +162,7 @@ export const modelsApi = api.injectEndpoints({
|
||||
body: formData,
|
||||
};
|
||||
},
|
||||
invalidatesTags: ['Model'],
|
||||
}),
|
||||
installModel: build.mutation<InstallModelResponse, InstallModelArg>({
|
||||
query: ({ source }) => {
|
||||
@@ -189,6 +190,7 @@ export const modelsApi = api.injectEndpoints({
|
||||
method: 'DELETE',
|
||||
};
|
||||
},
|
||||
invalidatesTags: ['Model'],
|
||||
}),
|
||||
getModelImage: build.query<string, string>({
|
||||
query: (key) => buildModelsUrl(`i/${key}/image`)
|
||||
|
||||
Reference in New Issue
Block a user