From 5025f84627bc52279b42ea7f2f5d587480bc5860 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 25 May 2023 23:47:36 +1000 Subject: [PATCH] chore(ui): regen api client --- .../frontend/web/src/services/api/index.ts | 15 +++-- .../src/services/api/models/AddInvocation.ts | 6 ++ .../services/api/models/CollectInvocation.ts | 6 ++ .../services/api/models/CompelInvocation.ts | 6 ++ .../api/models/CvInpaintInvocation.ts | 5 ++ .../services/api/models/DivideInvocation.ts | 6 ++ .../web/src/services/api/models/Graph.ts | 15 +++-- .../services/api/models/GraphInvocation.ts | 8 ++- ...urInvocation.ts => ImageBlurInvocation.ts} | 9 ++- .../src/services/api/models/ImageCategory.ts | 2 +- .../api/models/ImageChannelInvocation.ts | 30 ++++++++++ .../api/models/ImageConvertInvocation.ts | 30 ++++++++++ ...geInvocation.ts => ImageCropInvocation.ts} | 9 ++- .../web/src/services/api/models/ImageDTO.ts | 4 ++ ...ation.ts => ImageInverseLerpInvocation.ts} | 9 ++- ...rpInvocation.ts => ImageLerpInvocation.ts} | 9 ++- .../api/models/ImageMultiplyInvocation.ts | 30 ++++++++++ ...eInvocation.ts => ImagePasteInvocation.ts} | 9 ++- .../services/api/models/ImageRecordChanges.ts | 24 ++++++++ .../api/models/ImageToImageInvocation.ts | 5 ++ .../api/models/ImageToLatentsInvocation.ts | 5 ++ .../web/src/services/api/models/ImageType.ts | 2 +- .../api/models/InfillColorInvocation.ts | 5 ++ .../api/models/InfillPatchMatchInvocation.ts | 5 ++ .../api/models/InfillTileInvocation.ts | 5 ++ .../services/api/models/InpaintInvocation.ts | 5 ++ .../src/services/api/models/InvocationMeta.ts | 11 ++++ .../services/api/models/IterateInvocation.ts | 9 ++- .../api/models/LatentsToImageInvocation.ts | 5 ++ .../api/models/LatentsToLatentsInvocation.ts | 13 ++--- .../api/models/LoadImageInvocation.ts | 11 ++-- .../api/models/MaskFromAlphaInvocation.ts | 5 ++ .../services/api/models/MultiplyInvocation.ts | 6 ++ .../services/api/models/NoiseInvocation.ts | 6 ++ .../services/api/models/ParamIntInvocation.ts | 6 ++ .../api/models/RandomIntInvocation.ts | 6 ++ .../api/models/RandomRangeInvocation.ts | 6 ++ .../services/api/models/RangeInvocation.ts | 6 ++ .../api/models/RangeOfSizeInvocation.ts | 6 ++ .../api/models/ResizeLatentsInvocation.ts | 5 ++ .../api/models/RestoreFaceInvocation.ts | 5 ++ .../api/models/ScaleLatentsInvocation.ts | 5 ++ .../api/models/ShowImageInvocation.ts | 5 ++ .../services/api/models/SubtractInvocation.ts | 6 ++ .../api/models/TextToImageInvocation.ts | 6 ++ .../api/models/TextToLatentsInvocation.ts | 13 ++--- .../services/api/models/UpscaleInvocation.ts | 5 ++ .../services/api/services/ImagesService.ts | 58 ++++++++++++++++++- .../services/api/services/SessionsService.ts | 17 +++--- 49 files changed, 427 insertions(+), 58 deletions(-) rename invokeai/frontend/web/src/services/api/models/{BlurInvocation.ts => ImageBlurInvocation.ts} (68%) create mode 100644 invokeai/frontend/web/src/services/api/models/ImageChannelInvocation.ts create mode 100644 invokeai/frontend/web/src/services/api/models/ImageConvertInvocation.ts rename invokeai/frontend/web/src/services/api/models/{CropImageInvocation.ts => ImageCropInvocation.ts} (77%) rename invokeai/frontend/web/src/services/api/models/{InverseLerpInvocation.ts => ImageInverseLerpInvocation.ts} (69%) rename invokeai/frontend/web/src/services/api/models/{LerpInvocation.ts => ImageLerpInvocation.ts} (69%) create mode 100644 invokeai/frontend/web/src/services/api/models/ImageMultiplyInvocation.ts rename invokeai/frontend/web/src/services/api/models/{PasteImageInvocation.ts => ImagePasteInvocation.ts} (75%) create mode 100644 invokeai/frontend/web/src/services/api/models/ImageRecordChanges.ts create mode 100644 invokeai/frontend/web/src/services/api/models/InvocationMeta.ts diff --git a/invokeai/frontend/web/src/services/api/index.ts b/invokeai/frontend/web/src/services/api/index.ts index ecf8621ed6..b7cfb476a2 100644 --- a/invokeai/frontend/web/src/services/api/index.ts +++ b/invokeai/frontend/web/src/services/api/index.ts @@ -7,7 +7,6 @@ export { OpenAPI } from './core/OpenAPI'; export type { OpenAPIConfig } from './core/OpenAPI'; export type { AddInvocation } from './models/AddInvocation'; -export type { BlurInvocation } from './models/BlurInvocation'; export type { Body_upload_image } from './models/Body_upload_image'; export type { CkptModelInfo } from './models/CkptModelInfo'; export type { CollectInvocation } from './models/CollectInvocation'; @@ -17,7 +16,6 @@ export type { CompelInvocation } from './models/CompelInvocation'; export type { CompelOutput } from './models/CompelOutput'; export type { ConditioningField } from './models/ConditioningField'; export type { CreateModelRequest } from './models/CreateModelRequest'; -export type { CropImageInvocation } from './models/CropImageInvocation'; export type { CvInpaintInvocation } from './models/CvInpaintInvocation'; export type { DiffusersModelInfo } from './models/DiffusersModelInfo'; export type { DivideInvocation } from './models/DivideInvocation'; @@ -28,11 +26,20 @@ export type { GraphExecutionState } from './models/GraphExecutionState'; export type { GraphInvocation } from './models/GraphInvocation'; export type { GraphInvocationOutput } from './models/GraphInvocationOutput'; export type { HTTPValidationError } from './models/HTTPValidationError'; +export type { ImageBlurInvocation } from './models/ImageBlurInvocation'; export type { ImageCategory } from './models/ImageCategory'; +export type { ImageChannelInvocation } from './models/ImageChannelInvocation'; +export type { ImageConvertInvocation } from './models/ImageConvertInvocation'; +export type { ImageCropInvocation } from './models/ImageCropInvocation'; export type { ImageDTO } from './models/ImageDTO'; export type { ImageField } from './models/ImageField'; +export type { ImageInverseLerpInvocation } from './models/ImageInverseLerpInvocation'; +export type { ImageLerpInvocation } from './models/ImageLerpInvocation'; export type { ImageMetadata } from './models/ImageMetadata'; +export type { ImageMultiplyInvocation } from './models/ImageMultiplyInvocation'; export type { ImageOutput } from './models/ImageOutput'; +export type { ImagePasteInvocation } from './models/ImagePasteInvocation'; +export type { ImageRecordChanges } from './models/ImageRecordChanges'; export type { ImageToImageInvocation } from './models/ImageToImageInvocation'; export type { ImageToLatentsInvocation } from './models/ImageToLatentsInvocation'; export type { ImageType } from './models/ImageType'; @@ -43,14 +50,13 @@ export type { InfillTileInvocation } from './models/InfillTileInvocation'; export type { InpaintInvocation } from './models/InpaintInvocation'; export type { IntCollectionOutput } from './models/IntCollectionOutput'; export type { IntOutput } from './models/IntOutput'; -export type { InverseLerpInvocation } from './models/InverseLerpInvocation'; +export type { InvocationMeta } from './models/InvocationMeta'; export type { IterateInvocation } from './models/IterateInvocation'; export type { IterateInvocationOutput } from './models/IterateInvocationOutput'; export type { LatentsField } from './models/LatentsField'; export type { LatentsOutput } from './models/LatentsOutput'; export type { LatentsToImageInvocation } from './models/LatentsToImageInvocation'; export type { LatentsToLatentsInvocation } from './models/LatentsToLatentsInvocation'; -export type { LerpInvocation } from './models/LerpInvocation'; export type { LoadImageInvocation } from './models/LoadImageInvocation'; export type { MaskFromAlphaInvocation } from './models/MaskFromAlphaInvocation'; export type { MaskOutput } from './models/MaskOutput'; @@ -61,7 +67,6 @@ export type { NoiseOutput } from './models/NoiseOutput'; export type { PaginatedResults_GraphExecutionState_ } from './models/PaginatedResults_GraphExecutionState_'; export type { PaginatedResults_ImageDTO_ } from './models/PaginatedResults_ImageDTO_'; export type { ParamIntInvocation } from './models/ParamIntInvocation'; -export type { PasteImageInvocation } from './models/PasteImageInvocation'; export type { PromptOutput } from './models/PromptOutput'; export type { RandomIntInvocation } from './models/RandomIntInvocation'; export type { RandomRangeInvocation } from './models/RandomRangeInvocation'; diff --git a/invokeai/frontend/web/src/services/api/models/AddInvocation.ts b/invokeai/frontend/web/src/services/api/models/AddInvocation.ts index 1ff7b010c2..52898bfd0c 100644 --- a/invokeai/frontend/web/src/services/api/models/AddInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/AddInvocation.ts @@ -2,6 +2,8 @@ /* tslint:disable */ /* eslint-disable */ +import type { InvocationMeta } from './InvocationMeta'; + /** * Adds two numbers */ @@ -11,6 +13,10 @@ export type AddInvocation = { */ id: string; type?: 'add'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The first number */ diff --git a/invokeai/frontend/web/src/services/api/models/CollectInvocation.ts b/invokeai/frontend/web/src/services/api/models/CollectInvocation.ts index d250ae4450..fb6c7b40e5 100644 --- a/invokeai/frontend/web/src/services/api/models/CollectInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/CollectInvocation.ts @@ -2,6 +2,8 @@ /* tslint:disable */ /* eslint-disable */ +import type { InvocationMeta } from './InvocationMeta'; + /** * Collects values into a collection */ @@ -11,6 +13,10 @@ export type CollectInvocation = { */ id: string; type?: 'collect'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The item to collect (all inputs must be of the same type) */ diff --git a/invokeai/frontend/web/src/services/api/models/CompelInvocation.ts b/invokeai/frontend/web/src/services/api/models/CompelInvocation.ts index f03d53a841..ec483a76d5 100644 --- a/invokeai/frontend/web/src/services/api/models/CompelInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/CompelInvocation.ts @@ -2,6 +2,8 @@ /* tslint:disable */ /* eslint-disable */ +import type { InvocationMeta } from './InvocationMeta'; + /** * Parse prompt using compel package to conditioning. */ @@ -11,6 +13,10 @@ export type CompelInvocation = { */ id: string; type?: 'compel'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * Prompt */ diff --git a/invokeai/frontend/web/src/services/api/models/CvInpaintInvocation.ts b/invokeai/frontend/web/src/services/api/models/CvInpaintInvocation.ts index 19342acf8f..d8fafc02d4 100644 --- a/invokeai/frontend/web/src/services/api/models/CvInpaintInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/CvInpaintInvocation.ts @@ -3,6 +3,7 @@ /* eslint-disable */ import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; /** * Simple inpaint using opencv. @@ -13,6 +14,10 @@ export type CvInpaintInvocation = { */ id: string; type?: 'cv_inpaint'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The image to inpaint */ diff --git a/invokeai/frontend/web/src/services/api/models/DivideInvocation.ts b/invokeai/frontend/web/src/services/api/models/DivideInvocation.ts index 3cb262e9af..220f635580 100644 --- a/invokeai/frontend/web/src/services/api/models/DivideInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/DivideInvocation.ts @@ -2,6 +2,8 @@ /* tslint:disable */ /* eslint-disable */ +import type { InvocationMeta } from './InvocationMeta'; + /** * Divides two numbers */ @@ -11,6 +13,10 @@ export type DivideInvocation = { */ id: string; type?: 'div'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The first number */ diff --git a/invokeai/frontend/web/src/services/api/models/Graph.ts b/invokeai/frontend/web/src/services/api/models/Graph.ts index 039923e585..6be925841b 100644 --- a/invokeai/frontend/web/src/services/api/models/Graph.ts +++ b/invokeai/frontend/web/src/services/api/models/Graph.ts @@ -3,31 +3,34 @@ /* eslint-disable */ import type { AddInvocation } from './AddInvocation'; -import type { BlurInvocation } from './BlurInvocation'; import type { CollectInvocation } from './CollectInvocation'; import type { CompelInvocation } from './CompelInvocation'; -import type { CropImageInvocation } from './CropImageInvocation'; import type { CvInpaintInvocation } from './CvInpaintInvocation'; import type { DivideInvocation } from './DivideInvocation'; import type { Edge } from './Edge'; import type { GraphInvocation } from './GraphInvocation'; +import type { ImageBlurInvocation } from './ImageBlurInvocation'; +import type { ImageChannelInvocation } from './ImageChannelInvocation'; +import type { ImageConvertInvocation } from './ImageConvertInvocation'; +import type { ImageCropInvocation } from './ImageCropInvocation'; +import type { ImageInverseLerpInvocation } from './ImageInverseLerpInvocation'; +import type { ImageLerpInvocation } from './ImageLerpInvocation'; +import type { ImageMultiplyInvocation } from './ImageMultiplyInvocation'; +import type { ImagePasteInvocation } from './ImagePasteInvocation'; import type { ImageToImageInvocation } from './ImageToImageInvocation'; import type { ImageToLatentsInvocation } from './ImageToLatentsInvocation'; import type { InfillColorInvocation } from './InfillColorInvocation'; import type { InfillPatchMatchInvocation } from './InfillPatchMatchInvocation'; import type { InfillTileInvocation } from './InfillTileInvocation'; import type { InpaintInvocation } from './InpaintInvocation'; -import type { InverseLerpInvocation } from './InverseLerpInvocation'; import type { IterateInvocation } from './IterateInvocation'; import type { LatentsToImageInvocation } from './LatentsToImageInvocation'; import type { LatentsToLatentsInvocation } from './LatentsToLatentsInvocation'; -import type { LerpInvocation } from './LerpInvocation'; import type { LoadImageInvocation } from './LoadImageInvocation'; import type { MaskFromAlphaInvocation } from './MaskFromAlphaInvocation'; import type { MultiplyInvocation } from './MultiplyInvocation'; import type { NoiseInvocation } from './NoiseInvocation'; import type { ParamIntInvocation } from './ParamIntInvocation'; -import type { PasteImageInvocation } from './PasteImageInvocation'; import type { RandomIntInvocation } from './RandomIntInvocation'; import type { RandomRangeInvocation } from './RandomRangeInvocation'; import type { RangeInvocation } from './RangeInvocation'; @@ -49,7 +52,7 @@ export type Graph = { /** * The nodes in this graph */ - nodes?: Record; + nodes?: Record; /** * The connections between nodes and their fields in this graph */ diff --git a/invokeai/frontend/web/src/services/api/models/GraphInvocation.ts b/invokeai/frontend/web/src/services/api/models/GraphInvocation.ts index 5109a49a68..b631edce62 100644 --- a/invokeai/frontend/web/src/services/api/models/GraphInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/GraphInvocation.ts @@ -3,10 +3,10 @@ /* eslint-disable */ import type { Graph } from './Graph'; +import type { InvocationMeta } from './InvocationMeta'; /** - * A node to process inputs and produce outputs. - * May use dependency injection in __init__ to receive providers. + * Execute a graph */ export type GraphInvocation = { /** @@ -14,6 +14,10 @@ export type GraphInvocation = { */ id: string; type?: 'graph'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The graph to run */ diff --git a/invokeai/frontend/web/src/services/api/models/BlurInvocation.ts b/invokeai/frontend/web/src/services/api/models/ImageBlurInvocation.ts similarity index 68% rename from invokeai/frontend/web/src/services/api/models/BlurInvocation.ts rename to invokeai/frontend/web/src/services/api/models/ImageBlurInvocation.ts index 0643e4b309..caa189c0ab 100644 --- a/invokeai/frontend/web/src/services/api/models/BlurInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/ImageBlurInvocation.ts @@ -3,16 +3,21 @@ /* eslint-disable */ import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; /** * Blurs an image */ -export type BlurInvocation = { +export type ImageBlurInvocation = { /** * The id of this node. Must be unique among all nodes. */ id: string; - type?: 'blur'; + type?: 'img_blur'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The image to blur */ diff --git a/invokeai/frontend/web/src/services/api/models/ImageCategory.ts b/invokeai/frontend/web/src/services/api/models/ImageCategory.ts index c4edf90fd3..6b04a0b864 100644 --- a/invokeai/frontend/web/src/services/api/models/ImageCategory.ts +++ b/invokeai/frontend/web/src/services/api/models/ImageCategory.ts @@ -5,4 +5,4 @@ /** * The category of an image. Use ImageCategory.OTHER for non-default categories. */ -export type ImageCategory = 'general' | 'control' | 'other'; +export type ImageCategory = 'general' | 'control' | 'mask' | 'other'; diff --git a/invokeai/frontend/web/src/services/api/models/ImageChannelInvocation.ts b/invokeai/frontend/web/src/services/api/models/ImageChannelInvocation.ts new file mode 100644 index 0000000000..0320b3d50a --- /dev/null +++ b/invokeai/frontend/web/src/services/api/models/ImageChannelInvocation.ts @@ -0,0 +1,30 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; + +/** + * Gets a channel from an image. + */ +export type ImageChannelInvocation = { + /** + * The id of this node. Must be unique among all nodes. + */ + id: string; + type?: 'img_chan'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; + /** + * The image to get the channel from + */ + image?: ImageField; + /** + * The channel to get + */ + channel?: 'A' | 'R' | 'G' | 'B'; +}; + diff --git a/invokeai/frontend/web/src/services/api/models/ImageConvertInvocation.ts b/invokeai/frontend/web/src/services/api/models/ImageConvertInvocation.ts new file mode 100644 index 0000000000..34f0365541 --- /dev/null +++ b/invokeai/frontend/web/src/services/api/models/ImageConvertInvocation.ts @@ -0,0 +1,30 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; + +/** + * Converts an image to a different mode. + */ +export type ImageConvertInvocation = { + /** + * The id of this node. Must be unique among all nodes. + */ + id: string; + type?: 'img_conv'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; + /** + * The image to convert + */ + image?: ImageField; + /** + * The mode to convert to + */ + mode?: 'L' | 'RGB' | 'RGBA' | 'CMYK' | 'YCbCr' | 'LAB' | 'HSV' | 'I' | 'F'; +}; + diff --git a/invokeai/frontend/web/src/services/api/models/CropImageInvocation.ts b/invokeai/frontend/web/src/services/api/models/ImageCropInvocation.ts similarity index 77% rename from invokeai/frontend/web/src/services/api/models/CropImageInvocation.ts rename to invokeai/frontend/web/src/services/api/models/ImageCropInvocation.ts index 2676f5cb87..ad672f1772 100644 --- a/invokeai/frontend/web/src/services/api/models/CropImageInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/ImageCropInvocation.ts @@ -3,16 +3,21 @@ /* eslint-disable */ import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; /** * Crops an image to a specified box. The box can be outside of the image. */ -export type CropImageInvocation = { +export type ImageCropInvocation = { /** * The id of this node. Must be unique among all nodes. */ id: string; - type?: 'crop'; + type?: 'img_crop'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The image to crop */ diff --git a/invokeai/frontend/web/src/services/api/models/ImageDTO.ts b/invokeai/frontend/web/src/services/api/models/ImageDTO.ts index c5377b4c76..bc2f19f1b5 100644 --- a/invokeai/frontend/web/src/services/api/models/ImageDTO.ts +++ b/invokeai/frontend/web/src/services/api/models/ImageDTO.ts @@ -50,6 +50,10 @@ export type ImageDTO = { * The deleted timestamp of the image. */ deleted_at?: string; + /** + * Whether this is an intermediate image. + */ + is_intermediate: boolean; /** * The session ID that generated this image, if it is a generated image. */ diff --git a/invokeai/frontend/web/src/services/api/models/InverseLerpInvocation.ts b/invokeai/frontend/web/src/services/api/models/ImageInverseLerpInvocation.ts similarity index 69% rename from invokeai/frontend/web/src/services/api/models/InverseLerpInvocation.ts rename to invokeai/frontend/web/src/services/api/models/ImageInverseLerpInvocation.ts index 33c59b7bac..be88fb5d54 100644 --- a/invokeai/frontend/web/src/services/api/models/InverseLerpInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/ImageInverseLerpInvocation.ts @@ -3,16 +3,21 @@ /* eslint-disable */ import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; /** * Inverse linear interpolation of all pixels of an image */ -export type InverseLerpInvocation = { +export type ImageInverseLerpInvocation = { /** * The id of this node. Must be unique among all nodes. */ id: string; - type?: 'ilerp'; + type?: 'img_ilerp'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The image to lerp */ diff --git a/invokeai/frontend/web/src/services/api/models/LerpInvocation.ts b/invokeai/frontend/web/src/services/api/models/ImageLerpInvocation.ts similarity index 69% rename from invokeai/frontend/web/src/services/api/models/LerpInvocation.ts rename to invokeai/frontend/web/src/services/api/models/ImageLerpInvocation.ts index f2406c2246..fcf1ea184c 100644 --- a/invokeai/frontend/web/src/services/api/models/LerpInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/ImageLerpInvocation.ts @@ -3,16 +3,21 @@ /* eslint-disable */ import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; /** * Linear interpolation of all pixels of an image */ -export type LerpInvocation = { +export type ImageLerpInvocation = { /** * The id of this node. Must be unique among all nodes. */ id: string; - type?: 'lerp'; + type?: 'img_lerp'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The image to lerp */ diff --git a/invokeai/frontend/web/src/services/api/models/ImageMultiplyInvocation.ts b/invokeai/frontend/web/src/services/api/models/ImageMultiplyInvocation.ts new file mode 100644 index 0000000000..c1b76b3864 --- /dev/null +++ b/invokeai/frontend/web/src/services/api/models/ImageMultiplyInvocation.ts @@ -0,0 +1,30 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; + +/** + * Multiplies two images together using `PIL.ImageChops.multiply()`. + */ +export type ImageMultiplyInvocation = { + /** + * The id of this node. Must be unique among all nodes. + */ + id: string; + type?: 'img_mul'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; + /** + * The first image to multiply + */ + image1?: ImageField; + /** + * The second image to multiply + */ + image2?: ImageField; +}; + diff --git a/invokeai/frontend/web/src/services/api/models/PasteImageInvocation.ts b/invokeai/frontend/web/src/services/api/models/ImagePasteInvocation.ts similarity index 75% rename from invokeai/frontend/web/src/services/api/models/PasteImageInvocation.ts rename to invokeai/frontend/web/src/services/api/models/ImagePasteInvocation.ts index 8a181ccf07..3db0c33bf9 100644 --- a/invokeai/frontend/web/src/services/api/models/PasteImageInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/ImagePasteInvocation.ts @@ -3,16 +3,21 @@ /* eslint-disable */ import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; /** * Pastes an image into another image. */ -export type PasteImageInvocation = { +export type ImagePasteInvocation = { /** * The id of this node. Must be unique among all nodes. */ id: string; - type?: 'paste'; + type?: 'img_paste'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The base image */ diff --git a/invokeai/frontend/web/src/services/api/models/ImageRecordChanges.ts b/invokeai/frontend/web/src/services/api/models/ImageRecordChanges.ts new file mode 100644 index 0000000000..51f0ee2079 --- /dev/null +++ b/invokeai/frontend/web/src/services/api/models/ImageRecordChanges.ts @@ -0,0 +1,24 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ImageCategory } from './ImageCategory'; + +/** + * A set of changes to apply to an image record. + * + * Only limited changes are valid: + * - `image_category`: change the category of an image + * - `session_id`: change the session associated with an image + */ +export type ImageRecordChanges = { + /** + * The image's new category. + */ + image_category?: ImageCategory; + /** + * The image's new session ID. + */ + session_id?: string; +}; + diff --git a/invokeai/frontend/web/src/services/api/models/ImageToImageInvocation.ts b/invokeai/frontend/web/src/services/api/models/ImageToImageInvocation.ts index fb43c76921..809403e38c 100644 --- a/invokeai/frontend/web/src/services/api/models/ImageToImageInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/ImageToImageInvocation.ts @@ -3,6 +3,7 @@ /* eslint-disable */ import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; /** * Generates an image using img2img. @@ -13,6 +14,10 @@ export type ImageToImageInvocation = { */ id: string; type?: 'img2img'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The prompt to generate an image from */ diff --git a/invokeai/frontend/web/src/services/api/models/ImageToLatentsInvocation.ts b/invokeai/frontend/web/src/services/api/models/ImageToLatentsInvocation.ts index f72d446615..fc510a2b4c 100644 --- a/invokeai/frontend/web/src/services/api/models/ImageToLatentsInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/ImageToLatentsInvocation.ts @@ -3,6 +3,7 @@ /* eslint-disable */ import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; /** * Encodes an image into latents. @@ -13,6 +14,10 @@ export type ImageToLatentsInvocation = { */ id: string; type?: 'i2l'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The image to encode */ diff --git a/invokeai/frontend/web/src/services/api/models/ImageType.ts b/invokeai/frontend/web/src/services/api/models/ImageType.ts index bba9134e63..dfc10bf455 100644 --- a/invokeai/frontend/web/src/services/api/models/ImageType.ts +++ b/invokeai/frontend/web/src/services/api/models/ImageType.ts @@ -5,4 +5,4 @@ /** * The type of an image. */ -export type ImageType = 'results' | 'uploads' | 'intermediates'; +export type ImageType = 'results' | 'uploads'; diff --git a/invokeai/frontend/web/src/services/api/models/InfillColorInvocation.ts b/invokeai/frontend/web/src/services/api/models/InfillColorInvocation.ts index 157c976e11..dbfac9cd60 100644 --- a/invokeai/frontend/web/src/services/api/models/InfillColorInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/InfillColorInvocation.ts @@ -4,6 +4,7 @@ import type { ColorField } from './ColorField'; import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; /** * Infills transparent areas of an image with a solid color @@ -14,6 +15,10 @@ export type InfillColorInvocation = { */ id: string; type?: 'infill_rgba'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The image to infill */ diff --git a/invokeai/frontend/web/src/services/api/models/InfillPatchMatchInvocation.ts b/invokeai/frontend/web/src/services/api/models/InfillPatchMatchInvocation.ts index a4c18ade5d..49d8519e13 100644 --- a/invokeai/frontend/web/src/services/api/models/InfillPatchMatchInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/InfillPatchMatchInvocation.ts @@ -3,6 +3,7 @@ /* eslint-disable */ import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; /** * Infills transparent areas of an image using the PatchMatch algorithm @@ -13,6 +14,10 @@ export type InfillPatchMatchInvocation = { */ id: string; type?: 'infill_patchmatch'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The image to infill */ diff --git a/invokeai/frontend/web/src/services/api/models/InfillTileInvocation.ts b/invokeai/frontend/web/src/services/api/models/InfillTileInvocation.ts index 12113f57f5..ce318b9c29 100644 --- a/invokeai/frontend/web/src/services/api/models/InfillTileInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/InfillTileInvocation.ts @@ -3,6 +3,7 @@ /* eslint-disable */ import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; /** * Infills transparent areas of an image with tiles of the image @@ -13,6 +14,10 @@ export type InfillTileInvocation = { */ id: string; type?: 'infill_tile'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The image to infill */ diff --git a/invokeai/frontend/web/src/services/api/models/InpaintInvocation.ts b/invokeai/frontend/web/src/services/api/models/InpaintInvocation.ts index 88ead9907c..c73d001c5b 100644 --- a/invokeai/frontend/web/src/services/api/models/InpaintInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/InpaintInvocation.ts @@ -4,6 +4,7 @@ import type { ColorField } from './ColorField'; import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; /** * Generates an image using inpaint. @@ -14,6 +15,10 @@ export type InpaintInvocation = { */ id: string; type?: 'inpaint'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The prompt to generate an image from */ diff --git a/invokeai/frontend/web/src/services/api/models/InvocationMeta.ts b/invokeai/frontend/web/src/services/api/models/InvocationMeta.ts new file mode 100644 index 0000000000..e2973c150a --- /dev/null +++ b/invokeai/frontend/web/src/services/api/models/InvocationMeta.ts @@ -0,0 +1,11 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type InvocationMeta = { + /** + * Whether this is an intermediate node. Intermediate nodes are periodically deleted. + */ + is_intermediate?: boolean; +}; + diff --git a/invokeai/frontend/web/src/services/api/models/IterateInvocation.ts b/invokeai/frontend/web/src/services/api/models/IterateInvocation.ts index 0ff7a1258d..419caa15a4 100644 --- a/invokeai/frontend/web/src/services/api/models/IterateInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/IterateInvocation.ts @@ -2,9 +2,10 @@ /* tslint:disable */ /* eslint-disable */ +import type { InvocationMeta } from './InvocationMeta'; + /** - * A node to process inputs and produce outputs. - * May use dependency injection in __init__ to receive providers. + * Iterates over a list of items */ export type IterateInvocation = { /** @@ -12,6 +13,10 @@ export type IterateInvocation = { */ id: string; type?: 'iterate'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The list of items to iterate over */ diff --git a/invokeai/frontend/web/src/services/api/models/LatentsToImageInvocation.ts b/invokeai/frontend/web/src/services/api/models/LatentsToImageInvocation.ts index 8acd872e28..a01877cc40 100644 --- a/invokeai/frontend/web/src/services/api/models/LatentsToImageInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/LatentsToImageInvocation.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ +import type { InvocationMeta } from './InvocationMeta'; import type { LatentsField } from './LatentsField'; /** @@ -13,6 +14,10 @@ export type LatentsToImageInvocation = { */ id: string; type?: 'l2i'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The latents to generate an image from */ diff --git a/invokeai/frontend/web/src/services/api/models/LatentsToLatentsInvocation.ts b/invokeai/frontend/web/src/services/api/models/LatentsToLatentsInvocation.ts index 29995c6ad9..b441f51b3f 100644 --- a/invokeai/frontend/web/src/services/api/models/LatentsToLatentsInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/LatentsToLatentsInvocation.ts @@ -3,6 +3,7 @@ /* eslint-disable */ import type { ConditioningField } from './ConditioningField'; +import type { InvocationMeta } from './InvocationMeta'; import type { LatentsField } from './LatentsField'; /** @@ -14,6 +15,10 @@ export type LatentsToLatentsInvocation = { */ id: string; type?: 'l2l'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * Positive conditioning for generation */ @@ -42,14 +47,6 @@ export type LatentsToLatentsInvocation = { * The model to use (currently ignored) */ model?: string; - /** - * Whether or not to generate an image that can tile without seams - */ - seamless?: boolean; - /** - * The axes to tile the image on, 'x' and/or 'y' - */ - seamless_axes?: string; /** * The latents to use as a base image */ diff --git a/invokeai/frontend/web/src/services/api/models/LoadImageInvocation.ts b/invokeai/frontend/web/src/services/api/models/LoadImageInvocation.ts index 745a9b44e4..c147597806 100644 --- a/invokeai/frontend/web/src/services/api/models/LoadImageInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/LoadImageInvocation.ts @@ -2,7 +2,8 @@ /* tslint:disable */ /* eslint-disable */ -import type { ImageType } from './ImageType'; +import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; /** * Load an image and provide it as output. @@ -14,12 +15,12 @@ export type LoadImageInvocation = { id: string; type?: 'load_image'; /** - * The type of the image + * The meta properties of this node. */ - image_type: ImageType; + meta?: InvocationMeta; /** - * The name of the image + * The image to load */ - image_name: string; + image?: ImageField; }; diff --git a/invokeai/frontend/web/src/services/api/models/MaskFromAlphaInvocation.ts b/invokeai/frontend/web/src/services/api/models/MaskFromAlphaInvocation.ts index e71b1f464b..74aee00b2f 100644 --- a/invokeai/frontend/web/src/services/api/models/MaskFromAlphaInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/MaskFromAlphaInvocation.ts @@ -3,6 +3,7 @@ /* eslint-disable */ import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; /** * Extracts the alpha channel of an image as a mask. @@ -13,6 +14,10 @@ export type MaskFromAlphaInvocation = { */ id: string; type?: 'tomask'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The image to create the mask from */ diff --git a/invokeai/frontend/web/src/services/api/models/MultiplyInvocation.ts b/invokeai/frontend/web/src/services/api/models/MultiplyInvocation.ts index eede8f18d7..aa6cbf6fb4 100644 --- a/invokeai/frontend/web/src/services/api/models/MultiplyInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/MultiplyInvocation.ts @@ -2,6 +2,8 @@ /* tslint:disable */ /* eslint-disable */ +import type { InvocationMeta } from './InvocationMeta'; + /** * Multiplies two numbers */ @@ -11,6 +13,10 @@ export type MultiplyInvocation = { */ id: string; type?: 'mul'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The first number */ diff --git a/invokeai/frontend/web/src/services/api/models/NoiseInvocation.ts b/invokeai/frontend/web/src/services/api/models/NoiseInvocation.ts index 59e50b76f3..67c77d024e 100644 --- a/invokeai/frontend/web/src/services/api/models/NoiseInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/NoiseInvocation.ts @@ -2,6 +2,8 @@ /* tslint:disable */ /* eslint-disable */ +import type { InvocationMeta } from './InvocationMeta'; + /** * Generates latent noise. */ @@ -11,6 +13,10 @@ export type NoiseInvocation = { */ id: string; type?: 'noise'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The seed to use */ diff --git a/invokeai/frontend/web/src/services/api/models/ParamIntInvocation.ts b/invokeai/frontend/web/src/services/api/models/ParamIntInvocation.ts index 7047310a87..6dc597f183 100644 --- a/invokeai/frontend/web/src/services/api/models/ParamIntInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/ParamIntInvocation.ts @@ -2,6 +2,8 @@ /* tslint:disable */ /* eslint-disable */ +import type { InvocationMeta } from './InvocationMeta'; + /** * An integer parameter */ @@ -11,6 +13,10 @@ export type ParamIntInvocation = { */ id: string; type?: 'param_int'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The integer value */ diff --git a/invokeai/frontend/web/src/services/api/models/RandomIntInvocation.ts b/invokeai/frontend/web/src/services/api/models/RandomIntInvocation.ts index 0a5220c31d..1cccffe93e 100644 --- a/invokeai/frontend/web/src/services/api/models/RandomIntInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/RandomIntInvocation.ts @@ -2,6 +2,8 @@ /* tslint:disable */ /* eslint-disable */ +import type { InvocationMeta } from './InvocationMeta'; + /** * Outputs a single random integer. */ @@ -11,6 +13,10 @@ export type RandomIntInvocation = { */ id: string; type?: 'rand_int'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The inclusive low value */ diff --git a/invokeai/frontend/web/src/services/api/models/RandomRangeInvocation.ts b/invokeai/frontend/web/src/services/api/models/RandomRangeInvocation.ts index c1f80042a6..fbf8455226 100644 --- a/invokeai/frontend/web/src/services/api/models/RandomRangeInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/RandomRangeInvocation.ts @@ -2,6 +2,8 @@ /* tslint:disable */ /* eslint-disable */ +import type { InvocationMeta } from './InvocationMeta'; + /** * Creates a collection of random numbers */ @@ -11,6 +13,10 @@ export type RandomRangeInvocation = { */ id: string; type?: 'random_range'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The inclusive low value */ diff --git a/invokeai/frontend/web/src/services/api/models/RangeInvocation.ts b/invokeai/frontend/web/src/services/api/models/RangeInvocation.ts index 1c37ca7fe3..5173ceeb7f 100644 --- a/invokeai/frontend/web/src/services/api/models/RangeInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/RangeInvocation.ts @@ -2,6 +2,8 @@ /* tslint:disable */ /* eslint-disable */ +import type { InvocationMeta } from './InvocationMeta'; + /** * Creates a range of numbers from start to stop with step */ @@ -11,6 +13,10 @@ export type RangeInvocation = { */ id: string; type?: 'range'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The start of the range */ diff --git a/invokeai/frontend/web/src/services/api/models/RangeOfSizeInvocation.ts b/invokeai/frontend/web/src/services/api/models/RangeOfSizeInvocation.ts index b918f17130..2a7d5bae2a 100644 --- a/invokeai/frontend/web/src/services/api/models/RangeOfSizeInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/RangeOfSizeInvocation.ts @@ -2,6 +2,8 @@ /* tslint:disable */ /* eslint-disable */ +import type { InvocationMeta } from './InvocationMeta'; + /** * Creates a range from start to start + size with step */ @@ -11,6 +13,10 @@ export type RangeOfSizeInvocation = { */ id: string; type?: 'range_of_size'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The start of the range */ diff --git a/invokeai/frontend/web/src/services/api/models/ResizeLatentsInvocation.ts b/invokeai/frontend/web/src/services/api/models/ResizeLatentsInvocation.ts index c0fabb4984..e0cbb5c0c7 100644 --- a/invokeai/frontend/web/src/services/api/models/ResizeLatentsInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/ResizeLatentsInvocation.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ +import type { InvocationMeta } from './InvocationMeta'; import type { LatentsField } from './LatentsField'; /** @@ -13,6 +14,10 @@ export type ResizeLatentsInvocation = { */ id: string; type?: 'lresize'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The latents to resize */ diff --git a/invokeai/frontend/web/src/services/api/models/RestoreFaceInvocation.ts b/invokeai/frontend/web/src/services/api/models/RestoreFaceInvocation.ts index e03ed01c81..01de107ab9 100644 --- a/invokeai/frontend/web/src/services/api/models/RestoreFaceInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/RestoreFaceInvocation.ts @@ -3,6 +3,7 @@ /* eslint-disable */ import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; /** * Restores faces in an image. @@ -13,6 +14,10 @@ export type RestoreFaceInvocation = { */ id: string; type?: 'restore_face'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The input image */ diff --git a/invokeai/frontend/web/src/services/api/models/ScaleLatentsInvocation.ts b/invokeai/frontend/web/src/services/api/models/ScaleLatentsInvocation.ts index f398eaf408..08cd8de900 100644 --- a/invokeai/frontend/web/src/services/api/models/ScaleLatentsInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/ScaleLatentsInvocation.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ +import type { InvocationMeta } from './InvocationMeta'; import type { LatentsField } from './LatentsField'; /** @@ -13,6 +14,10 @@ export type ScaleLatentsInvocation = { */ id: string; type?: 'lscale'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The latents to scale */ diff --git a/invokeai/frontend/web/src/services/api/models/ShowImageInvocation.ts b/invokeai/frontend/web/src/services/api/models/ShowImageInvocation.ts index 145895ad75..6934eeaa90 100644 --- a/invokeai/frontend/web/src/services/api/models/ShowImageInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/ShowImageInvocation.ts @@ -3,6 +3,7 @@ /* eslint-disable */ import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; /** * Displays a provided image, and passes it forward in the pipeline. @@ -13,6 +14,10 @@ export type ShowImageInvocation = { */ id: string; type?: 'show_image'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The image to show */ diff --git a/invokeai/frontend/web/src/services/api/models/SubtractInvocation.ts b/invokeai/frontend/web/src/services/api/models/SubtractInvocation.ts index 6f2da116a2..8ef305183c 100644 --- a/invokeai/frontend/web/src/services/api/models/SubtractInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/SubtractInvocation.ts @@ -2,6 +2,8 @@ /* tslint:disable */ /* eslint-disable */ +import type { InvocationMeta } from './InvocationMeta'; + /** * Subtracts two numbers */ @@ -11,6 +13,10 @@ export type SubtractInvocation = { */ id: string; type?: 'sub'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The first number */ diff --git a/invokeai/frontend/web/src/services/api/models/TextToImageInvocation.ts b/invokeai/frontend/web/src/services/api/models/TextToImageInvocation.ts index 184e35693b..56dfd076f9 100644 --- a/invokeai/frontend/web/src/services/api/models/TextToImageInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/TextToImageInvocation.ts @@ -2,6 +2,8 @@ /* tslint:disable */ /* eslint-disable */ +import type { InvocationMeta } from './InvocationMeta'; + /** * Generates an image using text2img. */ @@ -11,6 +13,10 @@ export type TextToImageInvocation = { */ id: string; type?: 'txt2img'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The prompt to generate an image from */ diff --git a/invokeai/frontend/web/src/services/api/models/TextToLatentsInvocation.ts b/invokeai/frontend/web/src/services/api/models/TextToLatentsInvocation.ts index d1ec5ed08c..865360d39b 100644 --- a/invokeai/frontend/web/src/services/api/models/TextToLatentsInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/TextToLatentsInvocation.ts @@ -3,6 +3,7 @@ /* eslint-disable */ import type { ConditioningField } from './ConditioningField'; +import type { InvocationMeta } from './InvocationMeta'; import type { LatentsField } from './LatentsField'; /** @@ -14,6 +15,10 @@ export type TextToLatentsInvocation = { */ id: string; type?: 't2l'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * Positive conditioning for generation */ @@ -42,13 +47,5 @@ export type TextToLatentsInvocation = { * The model to use (currently ignored) */ model?: string; - /** - * Whether or not to generate an image that can tile without seams - */ - seamless?: boolean; - /** - * The axes to tile the image on, 'x' and/or 'y' - */ - seamless_axes?: string; }; diff --git a/invokeai/frontend/web/src/services/api/models/UpscaleInvocation.ts b/invokeai/frontend/web/src/services/api/models/UpscaleInvocation.ts index 8416c2454d..fe34b74678 100644 --- a/invokeai/frontend/web/src/services/api/models/UpscaleInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/UpscaleInvocation.ts @@ -3,6 +3,7 @@ /* eslint-disable */ import type { ImageField } from './ImageField'; +import type { InvocationMeta } from './InvocationMeta'; /** * Upscales an image. @@ -13,6 +14,10 @@ export type UpscaleInvocation = { */ id: string; type?: 'upscale'; + /** + * The meta properties of this node. + */ + meta?: InvocationMeta; /** * The input image */ diff --git a/invokeai/frontend/web/src/services/api/services/ImagesService.ts b/invokeai/frontend/web/src/services/api/services/ImagesService.ts index 13b2ef836a..d01a97a45e 100644 --- a/invokeai/frontend/web/src/services/api/services/ImagesService.ts +++ b/invokeai/frontend/web/src/services/api/services/ImagesService.ts @@ -4,6 +4,7 @@ import type { Body_upload_image } from '../models/Body_upload_image'; import type { ImageCategory } from '../models/ImageCategory'; import type { ImageDTO } from '../models/ImageDTO'; +import type { ImageRecordChanges } from '../models/ImageRecordChanges'; import type { ImageType } from '../models/ImageType'; import type { ImageUrlsDTO } from '../models/ImageUrlsDTO'; import type { PaginatedResults_ImageDTO_ } from '../models/PaginatedResults_ImageDTO_'; @@ -65,20 +66,32 @@ export class ImagesService { * @throws ApiError */ public static uploadImage({ - imageType, formData, imageCategory, + isIntermediate = false, + sessionId, }: { - imageType: ImageType, formData: Body_upload_image, + /** + * The category of the image + */ imageCategory?: ImageCategory, + /** + * Whether this is an intermediate image + */ + isIntermediate?: boolean, + /** + * The session ID associated with this upload, if any + */ + sessionId?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/images/', query: { - 'image_type': imageType, 'image_category': imageCategory, + 'is_intermediate': isIntermediate, + 'session_id': sessionId, }, formData: formData, mediaType: 'multipart/form-data', @@ -132,6 +145,9 @@ export class ImagesService { imageType, imageName, }: { + /** + * The type of image to delete + */ imageType: ImageType, /** * The name of the image to delete @@ -151,6 +167,42 @@ export class ImagesService { }); } + /** + * Update Image + * Updates an image + * @returns ImageDTO Successful Response + * @throws ApiError + */ + public static updateImage({ + imageType, + imageName, + requestBody, + }: { + /** + * The type of image to update + */ + imageType: ImageType, + /** + * The name of the image to update + */ + imageName: string, + requestBody: ImageRecordChanges, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PATCH', + url: '/api/v1/images/{image_type}/{image_name}', + path: { + 'image_type': imageType, + 'image_name': imageName, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** * Get Image Metadata * Gets an image's metadata diff --git a/invokeai/frontend/web/src/services/api/services/SessionsService.ts b/invokeai/frontend/web/src/services/api/services/SessionsService.ts index 23597c9e9e..1c55d36502 100644 --- a/invokeai/frontend/web/src/services/api/services/SessionsService.ts +++ b/invokeai/frontend/web/src/services/api/services/SessionsService.ts @@ -2,34 +2,37 @@ /* tslint:disable */ /* eslint-disable */ import type { AddInvocation } from '../models/AddInvocation'; -import type { BlurInvocation } from '../models/BlurInvocation'; import type { CollectInvocation } from '../models/CollectInvocation'; import type { CompelInvocation } from '../models/CompelInvocation'; -import type { CropImageInvocation } from '../models/CropImageInvocation'; import type { CvInpaintInvocation } from '../models/CvInpaintInvocation'; import type { DivideInvocation } from '../models/DivideInvocation'; import type { Edge } from '../models/Edge'; import type { Graph } from '../models/Graph'; import type { GraphExecutionState } from '../models/GraphExecutionState'; import type { GraphInvocation } from '../models/GraphInvocation'; +import type { ImageBlurInvocation } from '../models/ImageBlurInvocation'; +import type { ImageChannelInvocation } from '../models/ImageChannelInvocation'; +import type { ImageConvertInvocation } from '../models/ImageConvertInvocation'; +import type { ImageCropInvocation } from '../models/ImageCropInvocation'; +import type { ImageInverseLerpInvocation } from '../models/ImageInverseLerpInvocation'; +import type { ImageLerpInvocation } from '../models/ImageLerpInvocation'; +import type { ImageMultiplyInvocation } from '../models/ImageMultiplyInvocation'; +import type { ImagePasteInvocation } from '../models/ImagePasteInvocation'; import type { ImageToImageInvocation } from '../models/ImageToImageInvocation'; import type { ImageToLatentsInvocation } from '../models/ImageToLatentsInvocation'; import type { InfillColorInvocation } from '../models/InfillColorInvocation'; import type { InfillPatchMatchInvocation } from '../models/InfillPatchMatchInvocation'; import type { InfillTileInvocation } from '../models/InfillTileInvocation'; import type { InpaintInvocation } from '../models/InpaintInvocation'; -import type { InverseLerpInvocation } from '../models/InverseLerpInvocation'; import type { IterateInvocation } from '../models/IterateInvocation'; import type { LatentsToImageInvocation } from '../models/LatentsToImageInvocation'; import type { LatentsToLatentsInvocation } from '../models/LatentsToLatentsInvocation'; -import type { LerpInvocation } from '../models/LerpInvocation'; import type { LoadImageInvocation } from '../models/LoadImageInvocation'; import type { MaskFromAlphaInvocation } from '../models/MaskFromAlphaInvocation'; import type { MultiplyInvocation } from '../models/MultiplyInvocation'; import type { NoiseInvocation } from '../models/NoiseInvocation'; import type { PaginatedResults_GraphExecutionState_ } from '../models/PaginatedResults_GraphExecutionState_'; import type { ParamIntInvocation } from '../models/ParamIntInvocation'; -import type { PasteImageInvocation } from '../models/PasteImageInvocation'; import type { RandomIntInvocation } from '../models/RandomIntInvocation'; import type { RandomRangeInvocation } from '../models/RandomRangeInvocation'; import type { RangeInvocation } from '../models/RangeInvocation'; @@ -151,7 +154,7 @@ export class SessionsService { * The id of the session */ sessionId: string, - requestBody: (LoadImageInvocation | ShowImageInvocation | CropImageInvocation | PasteImageInvocation | MaskFromAlphaInvocation | BlurInvocation | LerpInvocation | InverseLerpInvocation | CompelInvocation | AddInvocation | SubtractInvocation | MultiplyInvocation | DivideInvocation | RandomIntInvocation | ParamIntInvocation | NoiseInvocation | TextToLatentsInvocation | LatentsToImageInvocation | ResizeLatentsInvocation | ScaleLatentsInvocation | ImageToLatentsInvocation | CvInpaintInvocation | RangeInvocation | RangeOfSizeInvocation | RandomRangeInvocation | UpscaleInvocation | RestoreFaceInvocation | TextToImageInvocation | InfillColorInvocation | InfillTileInvocation | InfillPatchMatchInvocation | GraphInvocation | IterateInvocation | CollectInvocation | LatentsToLatentsInvocation | ImageToImageInvocation | InpaintInvocation), + requestBody: (LoadImageInvocation | ShowImageInvocation | ImageCropInvocation | ImagePasteInvocation | MaskFromAlphaInvocation | ImageMultiplyInvocation | ImageChannelInvocation | ImageConvertInvocation | ImageBlurInvocation | ImageLerpInvocation | ImageInverseLerpInvocation | CompelInvocation | AddInvocation | SubtractInvocation | MultiplyInvocation | DivideInvocation | RandomIntInvocation | ParamIntInvocation | NoiseInvocation | TextToLatentsInvocation | LatentsToImageInvocation | ResizeLatentsInvocation | ScaleLatentsInvocation | ImageToLatentsInvocation | CvInpaintInvocation | RangeInvocation | RangeOfSizeInvocation | RandomRangeInvocation | UpscaleInvocation | RestoreFaceInvocation | TextToImageInvocation | InfillColorInvocation | InfillTileInvocation | InfillPatchMatchInvocation | GraphInvocation | IterateInvocation | CollectInvocation | LatentsToLatentsInvocation | ImageToImageInvocation | InpaintInvocation), }): CancelablePromise { return __request(OpenAPI, { method: 'POST', @@ -188,7 +191,7 @@ export class SessionsService { * The path to the node in the graph */ nodePath: string, - requestBody: (LoadImageInvocation | ShowImageInvocation | CropImageInvocation | PasteImageInvocation | MaskFromAlphaInvocation | BlurInvocation | LerpInvocation | InverseLerpInvocation | CompelInvocation | AddInvocation | SubtractInvocation | MultiplyInvocation | DivideInvocation | RandomIntInvocation | ParamIntInvocation | NoiseInvocation | TextToLatentsInvocation | LatentsToImageInvocation | ResizeLatentsInvocation | ScaleLatentsInvocation | ImageToLatentsInvocation | CvInpaintInvocation | RangeInvocation | RangeOfSizeInvocation | RandomRangeInvocation | UpscaleInvocation | RestoreFaceInvocation | TextToImageInvocation | InfillColorInvocation | InfillTileInvocation | InfillPatchMatchInvocation | GraphInvocation | IterateInvocation | CollectInvocation | LatentsToLatentsInvocation | ImageToImageInvocation | InpaintInvocation), + requestBody: (LoadImageInvocation | ShowImageInvocation | ImageCropInvocation | ImagePasteInvocation | MaskFromAlphaInvocation | ImageMultiplyInvocation | ImageChannelInvocation | ImageConvertInvocation | ImageBlurInvocation | ImageLerpInvocation | ImageInverseLerpInvocation | CompelInvocation | AddInvocation | SubtractInvocation | MultiplyInvocation | DivideInvocation | RandomIntInvocation | ParamIntInvocation | NoiseInvocation | TextToLatentsInvocation | LatentsToImageInvocation | ResizeLatentsInvocation | ScaleLatentsInvocation | ImageToLatentsInvocation | CvInpaintInvocation | RangeInvocation | RangeOfSizeInvocation | RandomRangeInvocation | UpscaleInvocation | RestoreFaceInvocation | TextToImageInvocation | InfillColorInvocation | InfillTileInvocation | InfillPatchMatchInvocation | GraphInvocation | IterateInvocation | CollectInvocation | LatentsToLatentsInvocation | ImageToImageInvocation | InpaintInvocation), }): CancelablePromise { return __request(OpenAPI, { method: 'PUT',