mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
edit view for model, depending on type and valid values
This commit is contained in:
committed by
psychedelicious
parent
6b68971f38
commit
0a69779df9
@@ -29,6 +29,8 @@ type UpdateModelResponse = paths['/api/v2/models/i/{key}']['patch']['responses']
|
||||
|
||||
type GetModelResponse =
|
||||
paths['/api/v2/models/i/{key}']['get']['responses']['200']['content']['application/json'];
|
||||
type GetModelMetadataResponse =
|
||||
paths['/api/v2/models/meta/i/{key}']['get']['responses']['200']['content']['application/json'];
|
||||
|
||||
type ListModelsArg = NonNullable<paths['/api/v2/models/']['get']['parameters']['query']>;
|
||||
|
||||
@@ -175,6 +177,12 @@ export const modelsApi = api.injectEndpoints({
|
||||
},
|
||||
providesTags: ['Model'],
|
||||
}),
|
||||
getModelMetadata: build.query<GetModelMetadataResponse, string>({
|
||||
query: (key) => {
|
||||
return buildModelsUrl(`meta/i/${key}`);
|
||||
},
|
||||
providesTags: ['Model'],
|
||||
}),
|
||||
updateModels: build.mutation<UpdateModelResponse, UpdateModelArg>({
|
||||
query: ({ key, body }) => {
|
||||
return {
|
||||
@@ -330,5 +338,6 @@ export const {
|
||||
useGetModelsInFolderQuery,
|
||||
useGetCheckpointConfigsQuery,
|
||||
useGetModelImportsQuery,
|
||||
useGetModelQuery
|
||||
useGetModelQuery,
|
||||
useGetModelMetadataQuery
|
||||
} = modelsApi;
|
||||
|
||||
@@ -22,7 +22,7 @@ export type paths = {
|
||||
"/api/v2/models/i/{key}": {
|
||||
/**
|
||||
* Get Model Record
|
||||
* @description Get a model record and metadata
|
||||
* @description Get a model record
|
||||
*/
|
||||
get: operations["get_model_record"];
|
||||
/**
|
||||
@@ -4202,13 +4202,6 @@ export type components = {
|
||||
*/
|
||||
type: "freeu";
|
||||
};
|
||||
/** GetModelResponse */
|
||||
GetModelResponse: {
|
||||
/** Config */
|
||||
config: (components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"]) | (components["schemas"]["ONNXSD1Config"] | components["schemas"]["ONNXSD2Config"] | components["schemas"]["ONNXSDXLConfig"]) | (components["schemas"]["VaeDiffusersConfig"] | components["schemas"]["VaeCheckpointConfig"]) | (components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"]) | components["schemas"]["LoRAConfig"] | components["schemas"]["TextualInversionConfig"] | components["schemas"]["IPAdapterConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["T2IConfig"];
|
||||
/** Metadata */
|
||||
metadata: (components["schemas"]["BaseMetadata"] | components["schemas"]["HuggingFaceMetadata"] | components["schemas"]["CivitaiMetadata"]) | null;
|
||||
};
|
||||
/** Graph */
|
||||
Graph: {
|
||||
/**
|
||||
@@ -11176,7 +11169,7 @@ export type operations = {
|
||||
};
|
||||
/**
|
||||
* Get Model Record
|
||||
* @description Get a model record and metadata
|
||||
* @description Get a model record
|
||||
*/
|
||||
get_model_record: {
|
||||
parameters: {
|
||||
@@ -11189,7 +11182,7 @@ export type operations = {
|
||||
/** @description The model configuration was retrieved successfully */
|
||||
200: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["GetModelResponse"];
|
||||
"application/json": (components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"]) | (components["schemas"]["ONNXSD1Config"] | components["schemas"]["ONNXSD2Config"] | components["schemas"]["ONNXSDXLConfig"]) | (components["schemas"]["VaeDiffusersConfig"] | components["schemas"]["VaeCheckpointConfig"]) | (components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"]) | components["schemas"]["LoRAConfig"] | components["schemas"]["TextualInversionConfig"] | components["schemas"]["IPAdapterConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"] | components["schemas"]["T2IConfig"];
|
||||
};
|
||||
};
|
||||
/** @description Bad request */
|
||||
@@ -11346,10 +11339,6 @@ export type operations = {
|
||||
400: {
|
||||
content: never;
|
||||
};
|
||||
/** @description No metadata available */
|
||||
404: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Validation Error */
|
||||
422: {
|
||||
content: {
|
||||
|
||||
Reference in New Issue
Block a user