mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-16 07:35:24 -05:00
feat(ui): add multi-select and batch capabilities
This introduces the core functionality for batch operations on images and multiple selection in the gallery/batch manager. A number of other substantial changes are included: - `imagesSlice` is consolidated into `gallerySlice`, allowing for simpler selection of filtered images - `batchSlice` is added to manage the batch - The wonky context pattern for image deletion has been changed, much simpler now using a `imageDeletionSlice` and redux listeners; this needs to be implemented still for the other image modals - Minimum gallery size in px implemented as a hook - Many style fixes & several bug fixes TODO: - The UI and UX need to be figured out, especially for controlnet - Batch processing is not hooked up; generation does not do anything with batch - Routes to support batch image operations, specifically delete and add/remove to/from boards
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { OffsetPaginatedResults_ImageDTO_ } from 'services/api/types';
|
||||
import { api } from '..';
|
||||
import { paths } from '../schema';
|
||||
import { imagesApi } from './images';
|
||||
|
||||
type ListBoardImagesArg =
|
||||
paths['/api/v1/board_images/{board_id}']['get']['parameters']['path'] &
|
||||
@@ -41,8 +42,22 @@ export const boardImagesApi = api.injectEndpoints({
|
||||
}),
|
||||
invalidatesTags: (result, error, arg) => [
|
||||
{ type: 'Board', id: arg.board_id },
|
||||
{ type: 'Image', id: arg.image_name },
|
||||
],
|
||||
async onQueryStarted(
|
||||
{ image_name, ...patch },
|
||||
{ dispatch, queryFulfilled }
|
||||
) {
|
||||
const patchResult = dispatch(
|
||||
imagesApi.util.updateQueryData('getImageDTO', image_name, (draft) => {
|
||||
Object.assign(draft, patch);
|
||||
})
|
||||
);
|
||||
try {
|
||||
await queryFulfilled;
|
||||
} catch {
|
||||
patchResult.undo();
|
||||
}
|
||||
},
|
||||
}),
|
||||
|
||||
removeImageFromBoard: build.mutation<void, RemoveImageFromBoardArg>({
|
||||
@@ -53,8 +68,22 @@ export const boardImagesApi = api.injectEndpoints({
|
||||
}),
|
||||
invalidatesTags: (result, error, arg) => [
|
||||
{ type: 'Board', id: arg.board_id },
|
||||
{ type: 'Image', id: arg.image_name },
|
||||
],
|
||||
async onQueryStarted(
|
||||
{ image_name, ...patch },
|
||||
{ dispatch, queryFulfilled }
|
||||
) {
|
||||
const patchResult = dispatch(
|
||||
imagesApi.util.updateQueryData('getImageDTO', image_name, (draft) => {
|
||||
Object.assign(draft, { board_id: null });
|
||||
})
|
||||
);
|
||||
try {
|
||||
await queryFulfilled;
|
||||
} catch {
|
||||
patchResult.undo();
|
||||
}
|
||||
},
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
233
invokeai/frontend/web/src/services/api/schema.d.ts
vendored
233
invokeai/frontend/web/src/services/api/schema.d.ts
vendored
@@ -76,10 +76,10 @@ export type paths = {
|
||||
*/
|
||||
get: operations["list_models"];
|
||||
/**
|
||||
* Update Model
|
||||
* Import Model
|
||||
* @description Add Model
|
||||
*/
|
||||
post: operations["update_model"];
|
||||
post: operations["import_model"];
|
||||
};
|
||||
"/api/v1/models/{model_name}": {
|
||||
/**
|
||||
@@ -650,7 +650,7 @@ export type components = {
|
||||
end_step_percent: number;
|
||||
/**
|
||||
* Control Mode
|
||||
* @description The contorl mode to use
|
||||
* @description The control mode to use
|
||||
* @default balanced
|
||||
* @enum {string}
|
||||
*/
|
||||
@@ -1030,7 +1030,7 @@ export type components = {
|
||||
* @description The nodes in this graph
|
||||
*/
|
||||
nodes?: {
|
||||
[key: string]: (components["schemas"]["LoadImageInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["ImageProcessorInvocation"] | components["schemas"]["PipelineModelLoaderInvocation"] | components["schemas"]["LoraLoaderInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["ParamIntInvocation"] | components["schemas"]["ParamFloatInvocation"] | components["schemas"]["TextToLatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["UpscaleInvocation"] | components["schemas"]["RestoreFaceInvocation"] | components["schemas"]["InpaintInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["GraphInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["OpenposeImageProcessorInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["LatentsToLatentsInvocation"]) | undefined;
|
||||
[key: string]: (components["schemas"]["LoadImageInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["ImageProcessorInvocation"] | components["schemas"]["PipelineModelLoaderInvocation"] | components["schemas"]["LoraLoaderInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["ParamIntInvocation"] | components["schemas"]["ParamFloatInvocation"] | components["schemas"]["TextToLatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["UpscaleInvocation"] | components["schemas"]["RestoreFaceInvocation"] | components["schemas"]["InpaintInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["GraphInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["OpenposeImageProcessorInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"] | components["schemas"]["LatentsToLatentsInvocation"]) | undefined;
|
||||
};
|
||||
/**
|
||||
* Edges
|
||||
@@ -1073,7 +1073,7 @@ export type components = {
|
||||
* @description The results of node executions
|
||||
*/
|
||||
results: {
|
||||
[key: string]: (components["schemas"]["ImageOutput"] | components["schemas"]["MaskOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["LoraLoaderOutput"] | components["schemas"]["PromptOutput"] | components["schemas"]["PromptCollectionOutput"] | components["schemas"]["CompelOutput"] | components["schemas"]["IntOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["IntCollectionOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["GraphInvocationOutput"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["CollectInvocationOutput"]) | undefined;
|
||||
[key: string]: (components["schemas"]["ImageOutput"] | components["schemas"]["MaskOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["LoraLoaderOutput"] | components["schemas"]["PromptOutput"] | components["schemas"]["PromptCollectionOutput"] | components["schemas"]["CompelOutput"] | components["schemas"]["IntOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["IntCollectionOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["ImageCollectionOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["GraphInvocationOutput"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["CollectInvocationOutput"]) | undefined;
|
||||
};
|
||||
/**
|
||||
* Errors
|
||||
@@ -1276,6 +1276,53 @@ export type components = {
|
||||
*/
|
||||
channel?: "A" | "R" | "G" | "B";
|
||||
};
|
||||
/**
|
||||
* ImageCollectionInvocation
|
||||
* @description Load a collection of images and provide it as output.
|
||||
*/
|
||||
ImageCollectionInvocation: {
|
||||
/**
|
||||
* Id
|
||||
* @description The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Is Intermediate
|
||||
* @description Whether or not this node is an intermediate node.
|
||||
* @default false
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
/**
|
||||
* Type
|
||||
* @default image_collection
|
||||
* @enum {string}
|
||||
*/
|
||||
type?: "image_collection";
|
||||
/**
|
||||
* Images
|
||||
* @description The image collection to load
|
||||
* @default []
|
||||
*/
|
||||
images?: (components["schemas"]["ImageField"])[];
|
||||
};
|
||||
/**
|
||||
* ImageCollectionOutput
|
||||
* @description A collection of images
|
||||
*/
|
||||
ImageCollectionOutput: {
|
||||
/**
|
||||
* Type
|
||||
* @default image_collection
|
||||
* @enum {string}
|
||||
*/
|
||||
type: "image_collection";
|
||||
/**
|
||||
* Collection
|
||||
* @description The output images
|
||||
* @default []
|
||||
*/
|
||||
collection: (components["schemas"]["ImageField"])[];
|
||||
};
|
||||
/**
|
||||
* ImageConvertInvocation
|
||||
* @description Converts an image to a different mode.
|
||||
@@ -1928,6 +1975,20 @@ export type components = {
|
||||
*/
|
||||
thumbnail_url: string;
|
||||
};
|
||||
/** ImportModelRequest */
|
||||
ImportModelRequest: {
|
||||
/**
|
||||
* Name
|
||||
* @description A model path, repo_id or URL to import
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Prediction Type
|
||||
* @description Prediction type for SDv2 checkpoint files
|
||||
* @enum {string}
|
||||
*/
|
||||
prediction_type?: "epsilon" | "v_prediction" | "sample";
|
||||
};
|
||||
/**
|
||||
* InfillColorInvocation
|
||||
* @description Infills transparent areas of an image with a solid color
|
||||
@@ -2440,6 +2501,64 @@ export type components = {
|
||||
*/
|
||||
strength?: number;
|
||||
};
|
||||
/**
|
||||
* LeresImageProcessorInvocation
|
||||
* @description Applies leres processing to image
|
||||
*/
|
||||
LeresImageProcessorInvocation: {
|
||||
/**
|
||||
* Id
|
||||
* @description The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Is Intermediate
|
||||
* @description Whether or not this node is an intermediate node.
|
||||
* @default false
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
/**
|
||||
* Type
|
||||
* @default leres_image_processor
|
||||
* @enum {string}
|
||||
*/
|
||||
type?: "leres_image_processor";
|
||||
/**
|
||||
* Image
|
||||
* @description The image to process
|
||||
*/
|
||||
image?: components["schemas"]["ImageField"];
|
||||
/**
|
||||
* Thr A
|
||||
* @description Leres parameter `thr_a`
|
||||
* @default 0
|
||||
*/
|
||||
thr_a?: number;
|
||||
/**
|
||||
* Thr B
|
||||
* @description Leres parameter `thr_b`
|
||||
* @default 0
|
||||
*/
|
||||
thr_b?: number;
|
||||
/**
|
||||
* Boost
|
||||
* @description Whether to use boost mode
|
||||
* @default false
|
||||
*/
|
||||
boost?: boolean;
|
||||
/**
|
||||
* Detect Resolution
|
||||
* @description The pixel resolution for detection
|
||||
* @default 512
|
||||
*/
|
||||
detect_resolution?: number;
|
||||
/**
|
||||
* Image Resolution
|
||||
* @description The pixel resolution for the output image
|
||||
* @default 512
|
||||
*/
|
||||
image_resolution?: number;
|
||||
};
|
||||
/**
|
||||
* LineartAnimeImageProcessorInvocation
|
||||
* @description Applies line art anime processing to image
|
||||
@@ -2907,7 +3026,7 @@ export type components = {
|
||||
* @description An enumeration.
|
||||
* @enum {string}
|
||||
*/
|
||||
ModelType: "pipeline" | "vae" | "lora" | "controlnet" | "embedding";
|
||||
ModelType: "main" | "vae" | "lora" | "controlnet" | "embedding";
|
||||
/**
|
||||
* ModelVariantType
|
||||
* @description An enumeration.
|
||||
@@ -2993,12 +3112,6 @@ export type components = {
|
||||
* @default 512
|
||||
*/
|
||||
height?: number;
|
||||
/**
|
||||
* Perlin
|
||||
* @description The amount of perlin noise to add to the noise
|
||||
* @default 0
|
||||
*/
|
||||
perlin?: number;
|
||||
/**
|
||||
* Use Cpu
|
||||
* @description Use CPU for noise generation (for reproducible results across platforms)
|
||||
@@ -3697,11 +3810,33 @@ export type components = {
|
||||
antialias?: boolean;
|
||||
};
|
||||
/**
|
||||
* SchedulerPredictionType
|
||||
* @description An enumeration.
|
||||
* @enum {string}
|
||||
* SegmentAnythingProcessorInvocation
|
||||
* @description Applies segment anything processing to image
|
||||
*/
|
||||
SchedulerPredictionType: "epsilon" | "v_prediction" | "sample";
|
||||
SegmentAnythingProcessorInvocation: {
|
||||
/**
|
||||
* Id
|
||||
* @description The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Is Intermediate
|
||||
* @description Whether or not this node is an intermediate node.
|
||||
* @default false
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
/**
|
||||
* Type
|
||||
* @default segment_anything_processor
|
||||
* @enum {string}
|
||||
*/
|
||||
type?: "segment_anything_processor";
|
||||
/**
|
||||
* Image
|
||||
* @description The image to process
|
||||
*/
|
||||
image?: components["schemas"]["ImageField"];
|
||||
};
|
||||
/**
|
||||
* ShowImageInvocation
|
||||
* @description Displays a provided image, and passes it forward in the pipeline.
|
||||
@@ -3739,7 +3874,7 @@ export type components = {
|
||||
* Type
|
||||
* @enum {string}
|
||||
*/
|
||||
type: "pipeline";
|
||||
type: "main";
|
||||
/** Path */
|
||||
path: string;
|
||||
/** Description */
|
||||
@@ -3753,7 +3888,7 @@ export type components = {
|
||||
/** Vae */
|
||||
vae?: string;
|
||||
/** Config */
|
||||
config?: string;
|
||||
config: string;
|
||||
variant: components["schemas"]["ModelVariantType"];
|
||||
};
|
||||
/** StableDiffusion1ModelDiffusersConfig */
|
||||
@@ -3765,7 +3900,7 @@ export type components = {
|
||||
* Type
|
||||
* @enum {string}
|
||||
*/
|
||||
type: "pipeline";
|
||||
type: "main";
|
||||
/** Path */
|
||||
path: string;
|
||||
/** Description */
|
||||
@@ -3789,7 +3924,7 @@ export type components = {
|
||||
* Type
|
||||
* @enum {string}
|
||||
*/
|
||||
type: "pipeline";
|
||||
type: "main";
|
||||
/** Path */
|
||||
path: string;
|
||||
/** Description */
|
||||
@@ -3803,11 +3938,8 @@ export type components = {
|
||||
/** Vae */
|
||||
vae?: string;
|
||||
/** Config */
|
||||
config?: string;
|
||||
config: string;
|
||||
variant: components["schemas"]["ModelVariantType"];
|
||||
prediction_type: components["schemas"]["SchedulerPredictionType"];
|
||||
/** Upcast Attention */
|
||||
upcast_attention: boolean;
|
||||
};
|
||||
/** StableDiffusion2ModelDiffusersConfig */
|
||||
StableDiffusion2ModelDiffusersConfig: {
|
||||
@@ -3818,7 +3950,7 @@ export type components = {
|
||||
* Type
|
||||
* @enum {string}
|
||||
*/
|
||||
type: "pipeline";
|
||||
type: "main";
|
||||
/** Path */
|
||||
path: string;
|
||||
/** Description */
|
||||
@@ -3832,9 +3964,6 @@ export type components = {
|
||||
/** Vae */
|
||||
vae?: string;
|
||||
variant: components["schemas"]["ModelVariantType"];
|
||||
prediction_type: components["schemas"]["SchedulerPredictionType"];
|
||||
/** Upcast Attention */
|
||||
upcast_attention: boolean;
|
||||
};
|
||||
/**
|
||||
* StepParamEasingInvocation
|
||||
@@ -4044,6 +4173,40 @@ export type components = {
|
||||
model_format: null;
|
||||
error?: components["schemas"]["ModelError"];
|
||||
};
|
||||
/**
|
||||
* TileResamplerProcessorInvocation
|
||||
* @description Base class for invocations that preprocess images for ControlNet
|
||||
*/
|
||||
TileResamplerProcessorInvocation: {
|
||||
/**
|
||||
* Id
|
||||
* @description The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Is Intermediate
|
||||
* @description Whether or not this node is an intermediate node.
|
||||
* @default false
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
/**
|
||||
* Type
|
||||
* @default tile_image_processor
|
||||
* @enum {string}
|
||||
*/
|
||||
type?: "tile_image_processor";
|
||||
/**
|
||||
* Image
|
||||
* @description The image to process
|
||||
*/
|
||||
image?: components["schemas"]["ImageField"];
|
||||
/**
|
||||
* Down Sampling Rate
|
||||
* @description Down sampling rate
|
||||
* @default 1
|
||||
*/
|
||||
down_sampling_rate?: number;
|
||||
};
|
||||
/** UNetField */
|
||||
UNetField: {
|
||||
/**
|
||||
@@ -4311,7 +4474,7 @@ export type operations = {
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["LoadImageInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["ImageProcessorInvocation"] | components["schemas"]["PipelineModelLoaderInvocation"] | components["schemas"]["LoraLoaderInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["ParamIntInvocation"] | components["schemas"]["ParamFloatInvocation"] | components["schemas"]["TextToLatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["UpscaleInvocation"] | components["schemas"]["RestoreFaceInvocation"] | components["schemas"]["InpaintInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["GraphInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["OpenposeImageProcessorInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["LatentsToLatentsInvocation"];
|
||||
"application/json": components["schemas"]["LoadImageInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["ImageProcessorInvocation"] | components["schemas"]["PipelineModelLoaderInvocation"] | components["schemas"]["LoraLoaderInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["ParamIntInvocation"] | components["schemas"]["ParamFloatInvocation"] | components["schemas"]["TextToLatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["UpscaleInvocation"] | components["schemas"]["RestoreFaceInvocation"] | components["schemas"]["InpaintInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["GraphInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["OpenposeImageProcessorInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"] | components["schemas"]["LatentsToLatentsInvocation"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
@@ -4348,7 +4511,7 @@ export type operations = {
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["LoadImageInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["ImageProcessorInvocation"] | components["schemas"]["PipelineModelLoaderInvocation"] | components["schemas"]["LoraLoaderInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["ParamIntInvocation"] | components["schemas"]["ParamFloatInvocation"] | components["schemas"]["TextToLatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["UpscaleInvocation"] | components["schemas"]["RestoreFaceInvocation"] | components["schemas"]["InpaintInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["GraphInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["OpenposeImageProcessorInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["LatentsToLatentsInvocation"];
|
||||
"application/json": components["schemas"]["LoadImageInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["ImageProcessorInvocation"] | components["schemas"]["PipelineModelLoaderInvocation"] | components["schemas"]["LoraLoaderInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["ParamIntInvocation"] | components["schemas"]["ParamFloatInvocation"] | components["schemas"]["TextToLatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["UpscaleInvocation"] | components["schemas"]["RestoreFaceInvocation"] | components["schemas"]["InpaintInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["GraphInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["OpenposeImageProcessorInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"] | components["schemas"]["LatentsToLatentsInvocation"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
@@ -4568,13 +4731,13 @@ export type operations = {
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Update Model
|
||||
* Import Model
|
||||
* @description Add Model
|
||||
*/
|
||||
update_model: {
|
||||
import_model: {
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["CreateModelRequest"];
|
||||
"application/json": components["schemas"]["ImportModelRequest"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
@@ -4947,6 +5110,10 @@ export type operations = {
|
||||
*/
|
||||
delete_board: {
|
||||
parameters: {
|
||||
query?: {
|
||||
/** @description Permanently delete all images on the board */
|
||||
include_images?: boolean;
|
||||
};
|
||||
path: {
|
||||
/** @description The id of board to delete */
|
||||
board_id: string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import queryString from 'query-string';
|
||||
import { createAppAsyncThunk } from 'app/store/storeUtils';
|
||||
import { selectImagesAll } from 'features/gallery/store/imagesSlice';
|
||||
import { selectImagesAll } from 'features/gallery/store/gallerySlice';
|
||||
import { size } from 'lodash-es';
|
||||
import { paths } from 'services/api/schema';
|
||||
import { $client } from 'services/api/client';
|
||||
@@ -112,6 +112,10 @@ type UploadedToastAction = {
|
||||
type: 'TOAST_UPLOADED';
|
||||
};
|
||||
|
||||
type AddToBatchAction = {
|
||||
type: 'ADD_TO_BATCH';
|
||||
};
|
||||
|
||||
export type PostUploadAction =
|
||||
| ControlNetAction
|
||||
| InitialImageAction
|
||||
@@ -119,12 +123,12 @@ export type PostUploadAction =
|
||||
| CanvasInitialImageAction
|
||||
| CanvasMergedAction
|
||||
| CanvasSavedToGalleryAction
|
||||
| UploadedToastAction;
|
||||
| UploadedToastAction
|
||||
| AddToBatchAction;
|
||||
|
||||
type UploadImageArg =
|
||||
paths['/api/v1/images/']['post']['parameters']['query'] & {
|
||||
file: File;
|
||||
// file: paths['/api/v1/images/']['post']['requestBody']['content']['multipart/form-data']['file'];
|
||||
postUploadAction?: PostUploadAction;
|
||||
};
|
||||
|
||||
@@ -284,8 +288,7 @@ export const receivedPageOfImages = createAppAsyncThunk<
|
||||
const { get } = $client.get();
|
||||
|
||||
const state = getState();
|
||||
const { categories } = state.images;
|
||||
const { selectedBoardId } = state.boards;
|
||||
const { categories, selectedBoardId } = state.gallery;
|
||||
|
||||
const images = selectImagesAll(state).filter((i) => {
|
||||
const isInCategory = categories.includes(i.image_category);
|
||||
|
||||
@@ -58,6 +58,7 @@ export type LatentsToLatentsInvocation = N<'LatentsToLatentsInvocation'>;
|
||||
export type ImageToLatentsInvocation = N<'ImageToLatentsInvocation'>;
|
||||
export type LatentsToImageInvocation = N<'LatentsToImageInvocation'>;
|
||||
export type PipelineModelLoaderInvocation = N<'PipelineModelLoaderInvocation'>;
|
||||
export type ImageCollectionInvocation = N<'ImageCollectionInvocation'>;
|
||||
|
||||
// ControlNet Nodes
|
||||
export type ControlNetInvocation = N<'ControlNetInvocation'>;
|
||||
|
||||
Reference in New Issue
Block a user