mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
update metadata endpoint
This commit is contained in:
parent
5b7633f3c6
commit
5a12886dbb
@ -1,6 +1,6 @@
|
||||
import { skipToken } from '@reduxjs/toolkit/query';
|
||||
import { useAppDispatch, useAppSelector } from '../../../../app/store/storeHooks';
|
||||
import { useGetModelQuery, useUpdateModelsMutation } from '../../../../services/api/endpoints/models';
|
||||
import { useGetModelConfigQuery, useUpdateModelsMutation } from '../../../../services/api/endpoints/models';
|
||||
import {
|
||||
Flex,
|
||||
Text,
|
||||
@ -40,7 +40,7 @@ import { makeToast } from '../../../system/util/makeToast';
|
||||
export const ModelEdit = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
const selectedModelKey = useAppSelector((s) => s.modelmanagerV2.selectedModelKey);
|
||||
const { data, isLoading } = useGetModelQuery(selectedModelKey ?? skipToken);
|
||||
const { data, isLoading } = useGetModelConfigQuery(selectedModelKey ?? skipToken);
|
||||
|
||||
const [updateModel, { isLoading: isSubmitting }] = useUpdateModelsMutation();
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { skipToken } from '@reduxjs/toolkit/query';
|
||||
import { useAppDispatch, useAppSelector } from '../../../../app/store/storeHooks';
|
||||
import { useGetModelMetadataQuery, useGetModelQuery } from '../../../../services/api/endpoints/models';
|
||||
import { useGetModelMetadataQuery, useGetModelConfigQuery } from '../../../../services/api/endpoints/models';
|
||||
import { Flex, Text, Heading, Button, Box } from '@invoke-ai/ui-library';
|
||||
import DataViewer from '../../../gallery/components/ImageMetadataViewer/DataViewer';
|
||||
import { useCallback, useMemo } from 'react';
|
||||
@ -21,7 +21,7 @@ import { setSelectedModelMode } from '../../store/modelManagerV2Slice';
|
||||
export const ModelView = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
const selectedModelKey = useAppSelector((s) => s.modelmanagerV2.selectedModelKey);
|
||||
const { data, isLoading } = useGetModelQuery(selectedModelKey ?? skipToken);
|
||||
const { data, isLoading } = useGetModelConfigQuery(selectedModelKey ?? skipToken);
|
||||
const { data: metadata } = useGetModelMetadataQuery(selectedModelKey ?? skipToken);
|
||||
|
||||
const modelData = useMemo(() => {
|
||||
|
@ -46,7 +46,7 @@ export type paths = {
|
||||
*/
|
||||
get: operations["list_model_summary"];
|
||||
};
|
||||
"/api/v2/models/meta/i/{key}": {
|
||||
"/api/v2/models/i/{key}/meta": {
|
||||
/**
|
||||
* Get Model Metadata
|
||||
* @description Get a model metadata object.
|
||||
|
Loading…
Reference in New Issue
Block a user