experimenting with image queries

This commit is contained in:
psychedelicious
2024-07-23 18:02:26 +10:00
parent dca5a2ce26
commit a03c895668
14 changed files with 1215 additions and 130 deletions

View File

@ -51,6 +51,16 @@ export const addInvocationCompleteEventListener = (startAppListening: AppStartLi
}
if (!imageDTO.is_intermediate) {
console.log('maybe updating getImageNames');
dispatch(
imagesApi.util.updateQueryData('getImageNames', { starred_first: false }, (draft) => {
if (!draft.find((name) => name === imageDTO.image_name)) {
console.log('image not found, adding');
draft.unshift(imageDTO.image_name);
}
})
);
dispatch(
imagesApi.util.invalidateTags([
{ type: 'Board', id: imageDTO.board_id ?? 'none' },

View File

@ -13,6 +13,7 @@ import {
} from '@invoke-ai/ui-library';
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
import { GalleryHeader } from 'features/gallery/components/GalleryHeader';
import { GalleryImageListExperiment } from 'features/gallery/components/ImageGrid/GalleryImageListExperiment';
import { galleryViewChanged } from 'features/gallery/store/gallerySlice';
import ResizeHandle from 'features/ui/components/tabs/ResizeHandle';
import { usePanel, type UsePanelOptions } from 'features/ui/hooks/usePanel';
@ -26,7 +27,6 @@ import { Panel, PanelGroup } from 'react-resizable-panels';
import BoardsList from './Boards/BoardsList/BoardsList';
import BoardsSearch from './Boards/BoardsList/BoardsSearch';
import GallerySettingsPopover from './GallerySettingsPopover/GallerySettingsPopover';
import GalleryImageGrid from './ImageGrid/GalleryImageGrid';
import { GalleryPagination } from './ImageGrid/GalleryPagination';
import { GallerySearch } from './ImageGrid/GallerySearch';
@ -168,7 +168,7 @@ const ImageGalleryContent = () => {
</Box>
</Collapse>
</Box>
<GalleryImageGrid />
<GalleryImageListExperiment />
<GalleryPagination />
</Flex>
</Panel>

View File

@ -0,0 +1,122 @@
import { Box, Flex, Image, Skeleton, Text } from '@invoke-ai/ui-library';
import { useAppStore } from 'app/store/storeHooks';
import { overlayScrollbarsParams } from 'common/components/OverlayScrollbars/constants';
import { debounce } from 'lodash-es';
import { useOverlayScrollbars } from 'overlayscrollbars-react';
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
import type { ListRange } from 'react-virtuoso';
import { Virtuoso } from 'react-virtuoso';
import { imagesApi, useGetImageNamesQuery, useLazyGetImagesByNameQuery } from 'services/api/endpoints/images';
import type { ImageDTO } from 'services/api/types';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
type TableVirtuosoScrollerRef = (ref: HTMLElement | Window | null) => any;
export const GalleryImageListExperiment = memo(() => {
const store = useAppStore();
const { data } = useGetImageNamesQuery({ starred_first: false });
const [getImagesByName] = useLazyGetImagesByNameQuery();
const itemContent = useCallback((index: number, data: string) => {
return <ListItem index={index} data={data} />;
}, []);
const onRangeChanged = useCallback(
({ startIndex, endIndex }: ListRange) => {
// user has scrolled to a new range, fetch images that are not already in the store
console.log('rangeChanged', startIndex, endIndex);
// get the list of image names represented by this range
// endIndex must be +1 bc else we miss the last image
const imageNames = data?.slice(startIndex, endIndex + 1);
if (imageNames) {
// optimisation: we may have already loaded some of these images, so filter out the ones we already have
const imageNamesToFetch: string[] = [];
for (const name of imageNames) {
// check if we have this image cached already
const { data } = imagesApi.endpoints.getImageDTO.select(name)(store.getState());
if (!data) {
// nope, we need to fetch it
imageNamesToFetch.push(name);
}
}
console.log('imageNamesToFetch', imageNamesToFetch);
getImagesByName({ image_names: imageNamesToFetch });
}
},
[data, getImagesByName, store]
);
// debounce the onRangeChanged callback to avoid fetching images too frequently
const debouncedOnRangeChanged = useMemo(() => debounce(onRangeChanged, 300), [onRangeChanged]);
const rootRef = useRef<HTMLDivElement>(null);
const [scroller, setScroller] = useState<HTMLElement | null>(null);
const [initialize, osInstance] = useOverlayScrollbars(overlayScrollbarsParams);
useEffect(() => {
const { current: root } = rootRef;
if (scroller && root) {
initialize({
target: root,
elements: {
viewport: scroller,
},
});
}
return () => osInstance()?.destroy();
}, [scroller, initialize, osInstance]);
if (!data) {
return null;
}
return (
<Box ref={rootRef} position="relative" w="full" h="full" mt={2}>
<Virtuoso
data={data}
itemContent={itemContent}
rangeChanged={debouncedOnRangeChanged}
// increases teh virual viewport by 200px in each direction, so we fetch a few more images than required
increaseViewportBy={200}
scrollerRef={setScroller as TableVirtuosoScrollerRef}
/>
</Box>
);
});
GalleryImageListExperiment.displayName = 'GalleryImageListExperiment';
const useGetImageDTOCache = (imageName: string): ImageDTO | undefined => {
// get the image data for this image - useQueryState does not trigger a fetch
const { data, isUninitialized } = imagesApi.endpoints.getImageDTO.useQueryState(imageName);
// but we want this component to be a subscriber of the cache! that way, when this component unmounts, the query cache is automatically cleared
// useQuerySubscription allows us to subscribe, but by default it fetches the data immediately. using skip we can prevent that
// the result is we never fetch data for this image from this component, it only subscribes to the cache
// unfortunately this subcribe-to-cache-but-don't-fetch functionality is not built in to RTKQ.
imagesApi.endpoints.getImageDTO.useQuerySubscription(imageName, { skip: isUninitialized });
return data;
};
// the skeleton and real component need to be the same size else virtuoso will need to call rangeChanged multiples times to fill
const HEIGHT = 24;
const ListItem = ({ index, data }: { index: number; data: string }) => {
const imageDTO = useGetImageDTOCache(data);
if (!imageDTO) {
return <Skeleton w="full" h={HEIGHT} />;
}
return (
<Flex h={HEIGHT}>
<Image src={imageDTO.thumbnail_url} h="full" aspectRatio="1/1" />
<Flex flexDir="column">
<Text>{index}</Text>
<Text>{imageDTO.image_name}</Text>
</Flex>
</Flex>
);
};

View File

@ -498,6 +498,33 @@ export const imagesApi = api.injectEndpoints({
},
}),
}),
getImageNames: build.query<
paths['/api/v1/images/image_names']['get']['responses']['200']['content']['application/json'],
paths['/api/v1/images/image_names']['get']['parameters']['query']
>({
query: (params) => ({
url: buildImagesUrl('image_names'),
method: 'GET',
params,
}),
}),
getImagesByName: build.query<
paths['/api/v1/images/images/by_name']['post']['responses']['200']['content']['application/json'],
paths['/api/v1/images/images/by_name']['post']['requestBody']['content']['application/json']
>({
query: (body) => ({
url: buildImagesUrl('images/by_name'),
method: 'POST',
body,
}),
onQueryStarted: (_, { dispatch, queryFulfilled }) => {
queryFulfilled.then(({ data }) => {
for (const imageDTO of data) {
dispatch(imagesApi.util.upsertQueryData('getImageDTO', imageDTO.image_name, imageDTO));
}
});
},
}),
}),
});
@ -519,6 +546,9 @@ export const {
useStarImagesMutation,
useUnstarImagesMutation,
useBulkDownloadImagesMutation,
useGetImageNamesQuery,
useLazyGetImagesByNameQuery,
useLazyGetImageDTOQuery,
} = imagesApi;
export const useGetImageDTOQuery = (...args: Parameters<typeof imagesApi.useGetImageDTOQuery>) => {

View File

@ -297,6 +297,27 @@ export type paths = {
*/
get: operations["get_bulk_download_item"];
};
"/api/v1/images/image_names": {
/**
* List Image Names
* @description Gets a list of image names
*/
get: operations["list_image_names"];
};
"/api/v1/images/images": {
/**
* Images
* @description Gets a list of image names
*/
get: operations["list_images"];
};
"/api/v1/images/images/by_name": {
/**
* Get Images By Name
* @description Gets a list of image names
*/
post: operations["get_images_by_name"];
};
"/api/v1/boards/": {
/**
* List Boards
@ -340,6 +361,13 @@ export type paths = {
*/
get: operations["get_uncategorized_image_counts"];
};
"/api/v1/boards/uncategorized/names": {
/**
* Get Uncategorized Image Names
* @description Gets count of images and assets for uncategorized images (images with no board assocation)
*/
get: operations["get_uncategorized_image_names"];
};
"/api/v1/board_images/": {
/**
* Add Image To Board
@ -1188,6 +1216,11 @@ export type components = {
*/
prepend?: boolean;
};
/** Body_get_images_by_name */
Body_get_images_by_name: {
/** Image Names */
image_names: string[];
};
/** Body_parse_dynamicprompts */
Body_parse_dynamicprompts: {
/**
@ -6388,6 +6421,71 @@ export type components = {
*/
type: "img_paste";
};
/**
* ImageRecord
* @description Deserialized image record without metadata.
*/
ImageRecord: {
/**
* Image Name
* @description The unique name of the image.
*/
image_name: string;
/** @description The type of the image. */
image_origin: components["schemas"]["ResourceOrigin"];
/** @description The category of the image. */
image_category: components["schemas"]["ImageCategory"];
/**
* Width
* @description The width of the image in px.
*/
width: number;
/**
* Height
* @description The height of the image in px.
*/
height: number;
/**
* Created At
* @description The created timestamp of the image.
*/
created_at: string;
/**
* Updated At
* @description The updated timestamp of the image.
*/
updated_at: string;
/**
* Deleted At
* @description The deleted timestamp of the image.
*/
deleted_at?: string | null;
/**
* Is Intermediate
* @description Whether this is an intermediate image.
*/
is_intermediate: boolean;
/**
* Session Id
* @description The session ID that generated this image, if it is a generated image.
*/
session_id?: string | null;
/**
* Node Id
* @description The node ID that generated this image, if it is a generated image.
*/
node_id?: string | null;
/**
* Starred
* @description Whether this image is starred.
*/
starred: boolean;
/**
* Has Workflow
* @description Whether this image has a workflow.
*/
has_workflow: boolean;
};
/**
* ImageRecordChanges
* @description A set of changes to apply to an image record.
@ -6580,7 +6678,7 @@ export type components = {
tiled?: boolean;
/**
* Tile Size
* @description The tile size for VAE tiling in pixels (image space). If set to 0, the default tile size for the
* @description The tile size for VAE tiling in pixels (image space). If set to 0, the default tile size for the model will be used. Larger tile sizes generally produce better results at the cost of higher memory usage.
* @default 0
*/
tile_size?: number;
@ -7316,145 +7414,145 @@ export type components = {
project_id: string | null;
};
InvocationOutputMap: {
img_channel_offset: components["schemas"]["ImageOutput"];
metadata: components["schemas"]["MetadataOutput"];
clip_skip: components["schemas"]["CLIPSkipInvocationOutput"];
canvas_paste_back: components["schemas"]["ImageOutput"];
seamless: components["schemas"]["SeamlessModeOutput"];
blank_image: components["schemas"]["ImageOutput"];
dynamic_prompt: components["schemas"]["StringCollectionOutput"];
step_param_easing: components["schemas"]["FloatCollectionOutput"];
latents_collection: components["schemas"]["LatentsCollectionOutput"];
normalbae_image_processor: components["schemas"]["ImageOutput"];
rand_float: components["schemas"]["FloatOutput"];
lora_loader: components["schemas"]["LoRALoaderOutput"];
collect: components["schemas"]["CollectInvocationOutput"];
infill_rgba: components["schemas"]["ImageOutput"];
img_lerp: components["schemas"]["ImageOutput"];
integer_math: components["schemas"]["IntegerOutput"];
conditioning_collection: components["schemas"]["ConditioningCollectionOutput"];
mask_from_id: components["schemas"]["ImageOutput"];
mlsd_image_processor: components["schemas"]["ImageOutput"];
zoe_depth_image_processor: components["schemas"]["ImageOutput"];
ideal_size: components["schemas"]["IdealSizeOutput"];
conditioning: components["schemas"]["ConditioningOutput"];
img_resize: components["schemas"]["ImageOutput"];
integer_collection: components["schemas"]["IntegerCollectionOutput"];
float_range: components["schemas"]["FloatCollectionOutput"];
tile_to_properties: components["schemas"]["TileToPropertiesOutput"];
alpha_mask_to_tensor: components["schemas"]["MaskOutput"];
img_watermark: components["schemas"]["ImageOutput"];
merge_tiles_to_image: components["schemas"]["ImageOutput"];
merge_metadata: components["schemas"]["MetadataOutput"];
round_float: components["schemas"]["FloatOutput"];
denoise_latents: components["schemas"]["LatentsOutput"];
string_join_three: components["schemas"]["StringOutput"];
img_blur: components["schemas"]["ImageOutput"];
color_map_image_processor: components["schemas"]["ImageOutput"];
img_scale: components["schemas"]["ImageOutput"];
infill_tile: components["schemas"]["ImageOutput"];
add: components["schemas"]["IntegerOutput"];
img_paste: components["schemas"]["ImageOutput"];
img_crop: components["schemas"]["ImageOutput"];
cv_inpaint: components["schemas"]["ImageOutput"];
image_collection: components["schemas"]["ImageCollectionOutput"];
img_pad_crop: components["schemas"]["ImageOutput"];
canny_image_processor: components["schemas"]["ImageOutput"];
model_identifier: components["schemas"]["ModelIdentifierOutput"];
i2l: components["schemas"]["LatentsOutput"];
face_mask_detection: components["schemas"]["FaceMaskOutput"];
img_channel_multiply: components["schemas"]["ImageOutput"];
sdxl_model_loader: components["schemas"]["SDXLModelLoaderOutput"];
img_mul: components["schemas"]["ImageOutput"];
tomask: components["schemas"]["ImageOutput"];
image_mask_to_tensor: components["schemas"]["MaskOutput"];
latents: components["schemas"]["LatentsOutput"];
face_identifier: components["schemas"]["ImageOutput"];
noise: components["schemas"]["NoiseOutput"];
lscale: components["schemas"]["LatentsOutput"];
canny_image_processor: components["schemas"]["ImageOutput"];
dynamic_prompt: components["schemas"]["StringCollectionOutput"];
integer_math: components["schemas"]["IntegerOutput"];
esrgan: components["schemas"]["ImageOutput"];
lblend: components["schemas"]["LatentsOutput"];
t2i_adapter: components["schemas"]["T2IAdapterOutput"];
infill_tile: components["schemas"]["ImageOutput"];
img_resize: components["schemas"]["ImageOutput"];
string: components["schemas"]["StringOutput"];
img_channel_multiply: components["schemas"]["ImageOutput"];
ip_adapter: components["schemas"]["IPAdapterOutput"];
image: components["schemas"]["ImageOutput"];
alpha_mask_to_tensor: components["schemas"]["MaskOutput"];
round_float: components["schemas"]["FloatOutput"];
img_blur: components["schemas"]["ImageOutput"];
controlnet: components["schemas"]["ControlOutput"];
ideal_size: components["schemas"]["IdealSizeOutput"];
collect: components["schemas"]["CollectInvocationOutput"];
lora_selector: components["schemas"]["LoRASelectorOutput"];
l2i: components["schemas"]["ImageOutput"];
tile_image_processor: components["schemas"]["ImageOutput"];
merge_metadata: components["schemas"]["MetadataOutput"];
img_scale: components["schemas"]["ImageOutput"];
dw_openpose_image_processor: components["schemas"]["ImageOutput"];
img_mul: components["schemas"]["ImageOutput"];
img_paste: components["schemas"]["ImageOutput"];
string_join_three: components["schemas"]["StringOutput"];
img_crop: components["schemas"]["ImageOutput"];
img_pad_crop: components["schemas"]["ImageOutput"];
lora_collection_loader: components["schemas"]["LoRALoaderOutput"];
vae_loader: components["schemas"]["VAEOutput"];
lineart_anime_image_processor: components["schemas"]["ImageOutput"];
tomask: components["schemas"]["ImageOutput"];
add: components["schemas"]["IntegerOutput"];
freeu: components["schemas"]["UNetOutput"];
pidi_image_processor: components["schemas"]["ImageOutput"];
color: components["schemas"]["ColorOutput"];
content_shuffle_image_processor: components["schemas"]["ImageOutput"];
heuristic_resize: components["schemas"]["ImageOutput"];
mediapipe_face_processor: components["schemas"]["ImageOutput"];
string_collection: components["schemas"]["StringCollectionOutput"];
image_mask_to_tensor: components["schemas"]["MaskOutput"];
show_image: components["schemas"]["ImageOutput"];
pair_tile_image: components["schemas"]["PairTileImageOutput"];
mul: components["schemas"]["IntegerOutput"];
sub: components["schemas"]["IntegerOutput"];
main_model_loader: components["schemas"]["ModelLoaderOutput"];
controlnet: components["schemas"]["ControlOutput"];
ip_adapter: components["schemas"]["IPAdapterOutput"];
lscale: components["schemas"]["LatentsOutput"];
sdxl_lora_collection_loader: components["schemas"]["SDXLLoRALoaderOutput"];
latents: components["schemas"]["LatentsOutput"];
string_split: components["schemas"]["String2Output"];
sdxl_refiner_compel_prompt: components["schemas"]["ConditioningOutput"];
esrgan: components["schemas"]["ImageOutput"];
dw_openpose_image_processor: components["schemas"]["ImageOutput"];
compel: components["schemas"]["ConditioningOutput"];
sdxl_lora_loader: components["schemas"]["SDXLLoRALoaderOutput"];
sdxl_compel_prompt: components["schemas"]["ConditioningOutput"];
tile_image_processor: components["schemas"]["ImageOutput"];
mediapipe_face_processor: components["schemas"]["ImageOutput"];
metadata_item: components["schemas"]["MetadataItemOutput"];
float_math: components["schemas"]["FloatOutput"];
prompt_from_file: components["schemas"]["StringCollectionOutput"];
pidi_image_processor: components["schemas"]["ImageOutput"];
content_shuffle_image_processor: components["schemas"]["ImageOutput"];
lineart_anime_image_processor: components["schemas"]["ImageOutput"];
t2i_adapter: components["schemas"]["T2IAdapterOutput"];
integer: components["schemas"]["IntegerOutput"];
unsharp_mask: components["schemas"]["ImageOutput"];
range: components["schemas"]["IntegerCollectionOutput"];
string: components["schemas"]["StringOutput"];
show_image: components["schemas"]["ImageOutput"];
image: components["schemas"]["ImageOutput"];
heuristic_resize: components["schemas"]["ImageOutput"];
div: components["schemas"]["IntegerOutput"];
rand_int: components["schemas"]["IntegerOutput"];
float: components["schemas"]["FloatOutput"];
img_conv: components["schemas"]["ImageOutput"];
mask_combine: components["schemas"]["ImageOutput"];
random_range: components["schemas"]["IntegerCollectionOutput"];
boolean_collection: components["schemas"]["BooleanCollectionOutput"];
pair_tile_image: components["schemas"]["PairTileImageOutput"];
save_image: components["schemas"]["ImageOutput"];
lora_selector: components["schemas"]["LoRASelectorOutput"];
boolean: components["schemas"]["BooleanOutput"];
tiled_multi_diffusion_denoise_latents: components["schemas"]["LatentsOutput"];
rectangle_mask: components["schemas"]["MaskOutput"];
create_denoise_mask: components["schemas"]["DenoiseMaskOutput"];
create_gradient_mask: components["schemas"]["GradientMaskOutput"];
lineart_image_processor: components["schemas"]["ImageOutput"];
midas_depth_image_processor: components["schemas"]["ImageOutput"];
integer_collection: components["schemas"]["IntegerCollectionOutput"];
depth_anything_image_processor: components["schemas"]["ImageOutput"];
float_collection: components["schemas"]["FloatCollectionOutput"];
mask_combine: components["schemas"]["ImageOutput"];
sdxl_compel_prompt: components["schemas"]["ConditioningOutput"];
sdxl_refiner_compel_prompt: components["schemas"]["ConditioningOutput"];
sdxl_refiner_model_loader: components["schemas"]["SDXLRefinerModelLoaderOutput"];
save_image: components["schemas"]["ImageOutput"];
string_split: components["schemas"]["String2Output"];
float_math: components["schemas"]["FloatOutput"];
unsharp_mask: components["schemas"]["ImageOutput"];
seamless: components["schemas"]["SeamlessModeOutput"];
compel: components["schemas"]["ConditioningOutput"];
calculate_image_tiles_min_overlap: components["schemas"]["CalculateImageTilesOutput"];
scheduler: components["schemas"]["SchedulerOutput"];
calculate_image_tiles_even_split: components["schemas"]["CalculateImageTilesOutput"];
leres_image_processor: components["schemas"]["ImageOutput"];
img_conv: components["schemas"]["ImageOutput"];
metadata_item: components["schemas"]["MetadataItemOutput"];
hed_image_processor: components["schemas"]["ImageOutput"];
calculate_image_tiles: components["schemas"]["CalculateImageTilesOutput"];
img_nsfw: components["schemas"]["ImageOutput"];
face_off: components["schemas"]["FaceOffOutput"];
div: components["schemas"]["IntegerOutput"];
range: components["schemas"]["IntegerCollectionOutput"];
infill_patchmatch: components["schemas"]["ImageOutput"];
infill_lama: components["schemas"]["ImageOutput"];
infill_cv2: components["schemas"]["ImageOutput"];
float_to_int: components["schemas"]["IntegerOutput"];
color: components["schemas"]["ColorOutput"];
lora_collection_loader: components["schemas"]["LoRALoaderOutput"];
vae_loader: components["schemas"]["VAEOutput"];
string_split_neg: components["schemas"]["StringPosNegOutput"];
lresize: components["schemas"]["LatentsOutput"];
string_collection: components["schemas"]["StringCollectionOutput"];
invert_tensor_mask: components["schemas"]["MaskOutput"];
depth_anything_image_processor: components["schemas"]["ImageOutput"];
hed_image_processor: components["schemas"]["ImageOutput"];
leres_image_processor: components["schemas"]["ImageOutput"];
img_ilerp: components["schemas"]["ImageOutput"];
freeu: components["schemas"]["UNetOutput"];
latents_collection: components["schemas"]["LatentsCollectionOutput"];
rand_int: components["schemas"]["IntegerOutput"];
noise: components["schemas"]["NoiseOutput"];
mask_edge: components["schemas"]["ImageOutput"];
string_join: components["schemas"]["StringOutput"];
img_hue_adjust: components["schemas"]["ImageOutput"];
color_correct: components["schemas"]["ImageOutput"];
calculate_image_tiles_min_overlap: components["schemas"]["CalculateImageTilesOutput"];
img_chan: components["schemas"]["ImageOutput"];
calculate_image_tiles_even_split: components["schemas"]["CalculateImageTilesOutput"];
create_denoise_mask: components["schemas"]["DenoiseMaskOutput"];
lblend: components["schemas"]["LatentsOutput"];
img_hue_adjust: components["schemas"]["ImageOutput"];
crop_latents: components["schemas"]["LatentsOutput"];
segment_anything_processor: components["schemas"]["ImageOutput"];
img_ilerp: components["schemas"]["ImageOutput"];
conditioning_collection: components["schemas"]["ConditioningCollectionOutput"];
lresize: components["schemas"]["LatentsOutput"];
random_range: components["schemas"]["IntegerCollectionOutput"];
conditioning: components["schemas"]["ConditioningOutput"];
rectangle_mask: components["schemas"]["MaskOutput"];
img_chan: components["schemas"]["ImageOutput"];
prompt_from_file: components["schemas"]["StringCollectionOutput"];
float_range: components["schemas"]["FloatCollectionOutput"];
float_to_int: components["schemas"]["IntegerOutput"];
invert_tensor_mask: components["schemas"]["MaskOutput"];
img_channel_offset: components["schemas"]["ImageOutput"];
string_split_neg: components["schemas"]["StringPosNegOutput"];
normalbae_image_processor: components["schemas"]["ImageOutput"];
image_collection: components["schemas"]["ImageCollectionOutput"];
blank_image: components["schemas"]["ImageOutput"];
string_join: components["schemas"]["StringOutput"];
model_identifier: components["schemas"]["ModelIdentifierOutput"];
canvas_paste_back: components["schemas"]["ImageOutput"];
i2l: components["schemas"]["LatentsOutput"];
tile_to_properties: components["schemas"]["TileToPropertiesOutput"];
denoise_latents: components["schemas"]["LatentsOutput"];
lora_loader: components["schemas"]["LoRALoaderOutput"];
merge_tiles_to_image: components["schemas"]["ImageOutput"];
mlsd_image_processor: components["schemas"]["ImageOutput"];
integer: components["schemas"]["IntegerOutput"];
cv_inpaint: components["schemas"]["ImageOutput"];
string_replace: components["schemas"]["StringOutput"];
range_of_size: components["schemas"]["IntegerCollectionOutput"];
calculate_image_tiles: components["schemas"]["CalculateImageTilesOutput"];
iterate: components["schemas"]["IterateInvocationOutput"];
create_gradient_mask: components["schemas"]["GradientMaskOutput"];
face_off: components["schemas"]["FaceOffOutput"];
sdxl_refiner_model_loader: components["schemas"]["SDXLRefinerModelLoaderOutput"];
scheduler: components["schemas"]["SchedulerOutput"];
float_collection: components["schemas"]["FloatCollectionOutput"];
zoe_depth_image_processor: components["schemas"]["ImageOutput"];
sdxl_model_loader: components["schemas"]["SDXLModelLoaderOutput"];
color_map_image_processor: components["schemas"]["ImageOutput"];
mask_from_id: components["schemas"]["ImageOutput"];
infill_rgba: components["schemas"]["ImageOutput"];
main_model_loader: components["schemas"]["ModelLoaderOutput"];
float: components["schemas"]["FloatOutput"];
tiled_multi_diffusion_denoise_latents: components["schemas"]["LatentsOutput"];
core_metadata: components["schemas"]["MetadataOutput"];
segment_anything_processor: components["schemas"]["ImageOutput"];
boolean_collection: components["schemas"]["BooleanCollectionOutput"];
iterate: components["schemas"]["IterateInvocationOutput"];
sdxl_lora_collection_loader: components["schemas"]["SDXLLoRALoaderOutput"];
step_param_easing: components["schemas"]["FloatCollectionOutput"];
img_lerp: components["schemas"]["ImageOutput"];
clip_skip: components["schemas"]["CLIPSkipInvocationOutput"];
boolean: components["schemas"]["BooleanOutput"];
img_watermark: components["schemas"]["ImageOutput"];
sdxl_lora_loader: components["schemas"]["SDXLLoRALoaderOutput"];
face_mask_detection: components["schemas"]["FaceMaskOutput"];
metadata: components["schemas"]["MetadataOutput"];
};
/**
* InvocationStartedEvent
@ -7794,7 +7892,7 @@ export type components = {
tiled?: boolean;
/**
* Tile Size
* @description The tile size for VAE tiling in pixels (image space). If set to 0, the default tile size for the
* @description The tile size for VAE tiling in pixels (image space). If set to 0, the default tile size for the model will be used. Larger tile sizes generally produce better results at the cost of higher memory usage.
* @default 0
*/
tile_size?: number;
@ -15015,6 +15113,91 @@ export type operations = {
};
};
};
/**
* List Image Names
* @description Gets a list of image names
*/
list_image_names: {
parameters: {
query?: {
board_id?: string | null;
category?: "images" | "assets";
starred_first?: boolean;
order_dir?: components["schemas"]["SQLiteDirection"];
search_term?: string | null;
};
};
responses: {
/** @description Successful Response */
200: {
content: {
"application/json": string[];
};
};
/** @description Validation Error */
422: {
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
/**
* Images
* @description Gets a list of image names
*/
list_images: {
parameters: {
query?: {
board_id?: string | null;
category?: "images" | "assets";
starred_first?: boolean;
order_dir?: components["schemas"]["SQLiteDirection"];
search_term?: string | null;
from_image_name?: string | null;
count?: number;
};
};
responses: {
/** @description Successful Response */
200: {
content: {
"application/json": components["schemas"]["ImageRecord"][];
};
};
/** @description Validation Error */
422: {
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
/**
* Get Images By Name
* @description Gets a list of image names
*/
get_images_by_name: {
requestBody: {
content: {
"application/json": components["schemas"]["Body_get_images_by_name"];
};
};
responses: {
/** @description Successful Response */
200: {
content: {
"application/json": components["schemas"]["ImageDTO"][];
};
};
/** @description Validation Error */
422: {
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
/**
* List Boards
* @description Gets a list of boards
@ -15202,6 +15385,20 @@ export type operations = {
};
};
};
/**
* Get Uncategorized Image Names
* @description Gets count of images and assets for uncategorized images (images with no board assocation)
*/
get_uncategorized_image_names: {
responses: {
/** @description Successful Response */
200: {
content: {
"application/json": string[];
};
};
};
};
/**
* Add Image To Board
* @description Creates a board_image