From 4ca325e8e6daae1b7203e27a8f3a903581789ce8 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Thu, 15 Jun 2023 03:20:49 +1200 Subject: [PATCH] chore: Rebuild API --- .../api/models/DynamicPromptInvocation.ts | 1 - .../api/models/FloatLinearRangeInvocation.ts | 1 - .../web/src/services/api/models/Graph.ts | 3 +- .../api/models/GraphExecutionState.ts | 3 +- .../api/models/PromptCollectionOutput.ts | 1 - .../api/models/StepParamEasingInvocation.ts | 1 - .../schemas/$CannyImageProcessorInvocation.ts | 31 --- ...$ContentShuffleImageProcessorInvocation.ts | 43 ---- .../src/services/api/schemas/$ControlField.ts | 37 --- .../api/schemas/$ControlNetInvocation.ts | 41 --- .../services/api/schemas/$ControlOutput.ts | 28 --- .../schemas/$HedImageprocessorInvocation.ts | 35 --- .../api/schemas/$ImageProcessorInvocation.ts | 23 -- .../$LineartAnimeImageProcessorInvocation.ts | 31 --- .../$LineartImageProcessorInvocation.ts | 35 --- .../$MidasDepthImageProcessorInvocation.ts | 31 --- .../schemas/$MlsdImageProcessorInvocation.ts | 39 --- .../$NormalbaeImageProcessorInvocation.ts | 31 --- .../$OpenposeImageProcessorInvocation.ts | 35 --- .../schemas/$PidiImageProcessorInvocation.ts | 39 --- .../api/schemas/$RandomIntInvocation.ts | 16 -- .../services/api/services/ImagesService.ts | 180 ++++++------- .../services/api/services/SessionsService.ts | 236 +++++++++--------- 23 files changed, 210 insertions(+), 711 deletions(-) delete mode 100644 invokeai/frontend/web/src/services/api/schemas/$CannyImageProcessorInvocation.ts delete mode 100644 invokeai/frontend/web/src/services/api/schemas/$ContentShuffleImageProcessorInvocation.ts delete mode 100644 invokeai/frontend/web/src/services/api/schemas/$ControlField.ts delete mode 100644 invokeai/frontend/web/src/services/api/schemas/$ControlNetInvocation.ts delete mode 100644 invokeai/frontend/web/src/services/api/schemas/$ControlOutput.ts delete mode 100644 invokeai/frontend/web/src/services/api/schemas/$HedImageprocessorInvocation.ts delete mode 100644 invokeai/frontend/web/src/services/api/schemas/$ImageProcessorInvocation.ts delete mode 100644 invokeai/frontend/web/src/services/api/schemas/$LineartAnimeImageProcessorInvocation.ts delete mode 100644 invokeai/frontend/web/src/services/api/schemas/$LineartImageProcessorInvocation.ts delete mode 100644 invokeai/frontend/web/src/services/api/schemas/$MidasDepthImageProcessorInvocation.ts delete mode 100644 invokeai/frontend/web/src/services/api/schemas/$MlsdImageProcessorInvocation.ts delete mode 100644 invokeai/frontend/web/src/services/api/schemas/$NormalbaeImageProcessorInvocation.ts delete mode 100644 invokeai/frontend/web/src/services/api/schemas/$OpenposeImageProcessorInvocation.ts delete mode 100644 invokeai/frontend/web/src/services/api/schemas/$PidiImageProcessorInvocation.ts delete mode 100644 invokeai/frontend/web/src/services/api/schemas/$RandomIntInvocation.ts diff --git a/invokeai/frontend/web/src/services/api/models/DynamicPromptInvocation.ts b/invokeai/frontend/web/src/services/api/models/DynamicPromptInvocation.ts index f7323a489b..79dc958d0f 100644 --- a/invokeai/frontend/web/src/services/api/models/DynamicPromptInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/DynamicPromptInvocation.ts @@ -28,4 +28,3 @@ export type DynamicPromptInvocation = { */ combinatorial?: boolean; }; - diff --git a/invokeai/frontend/web/src/services/api/models/FloatLinearRangeInvocation.ts b/invokeai/frontend/web/src/services/api/models/FloatLinearRangeInvocation.ts index e0fd4a1caa..a9e67d8135 100644 --- a/invokeai/frontend/web/src/services/api/models/FloatLinearRangeInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/FloatLinearRangeInvocation.ts @@ -28,4 +28,3 @@ export type FloatLinearRangeInvocation = { */ steps?: number; }; - diff --git a/invokeai/frontend/web/src/services/api/models/Graph.ts b/invokeai/frontend/web/src/services/api/models/Graph.ts index efac5dabcc..9de1cd280c 100644 --- a/invokeai/frontend/web/src/services/api/models/Graph.ts +++ b/invokeai/frontend/web/src/services/api/models/Graph.ts @@ -72,10 +72,9 @@ export type Graph = { /** * The nodes in this graph */ - nodes?: Record; + nodes?: Record; /** * The connections between nodes and their fields in this graph */ edges?: Array; }; - diff --git a/invokeai/frontend/web/src/services/api/models/GraphExecutionState.ts b/invokeai/frontend/web/src/services/api/models/GraphExecutionState.ts index ccd5d6f499..75e43d10b7 100644 --- a/invokeai/frontend/web/src/services/api/models/GraphExecutionState.ts +++ b/invokeai/frontend/web/src/services/api/models/GraphExecutionState.ts @@ -46,7 +46,7 @@ export type GraphExecutionState = { /** * The results of node executions */ - results: Record; + results: Record; /** * Errors raised when executing nodes */ @@ -60,4 +60,3 @@ export type GraphExecutionState = { */ source_prepared_mapping: Record>; }; - diff --git a/invokeai/frontend/web/src/services/api/models/PromptCollectionOutput.ts b/invokeai/frontend/web/src/services/api/models/PromptCollectionOutput.ts index 4444ab4d33..ffab4ca09a 100644 --- a/invokeai/frontend/web/src/services/api/models/PromptCollectionOutput.ts +++ b/invokeai/frontend/web/src/services/api/models/PromptCollectionOutput.ts @@ -16,4 +16,3 @@ export type PromptCollectionOutput = { */ count: number; }; - diff --git a/invokeai/frontend/web/src/services/api/models/StepParamEasingInvocation.ts b/invokeai/frontend/web/src/services/api/models/StepParamEasingInvocation.ts index 2cff38b3e5..dca4fa8e82 100644 --- a/invokeai/frontend/web/src/services/api/models/StepParamEasingInvocation.ts +++ b/invokeai/frontend/web/src/services/api/models/StepParamEasingInvocation.ts @@ -56,4 +56,3 @@ export type StepParamEasingInvocation = { */ show_easing_plot?: boolean; }; - diff --git a/invokeai/frontend/web/src/services/api/schemas/$CannyImageProcessorInvocation.ts b/invokeai/frontend/web/src/services/api/schemas/$CannyImageProcessorInvocation.ts deleted file mode 100644 index e2f1bc2111..0000000000 --- a/invokeai/frontend/web/src/services/api/schemas/$CannyImageProcessorInvocation.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $CannyImageProcessorInvocation = { - description: `Canny edge detection for ControlNet`, - properties: { - id: { - type: 'string', - description: `The id of this node. Must be unique among all nodes.`, - isRequired: true, - }, - type: { - type: 'Enum', - }, - image: { - type: 'all-of', - description: `image to process`, - contains: [{ - type: 'ImageField', - }], - }, - low_threshold: { - type: 'number', - description: `low threshold of Canny pixel gradient`, - }, - high_threshold: { - type: 'number', - description: `high threshold of Canny pixel gradient`, - }, - }, -} as const; diff --git a/invokeai/frontend/web/src/services/api/schemas/$ContentShuffleImageProcessorInvocation.ts b/invokeai/frontend/web/src/services/api/schemas/$ContentShuffleImageProcessorInvocation.ts deleted file mode 100644 index 9c51fdecc0..0000000000 --- a/invokeai/frontend/web/src/services/api/schemas/$ContentShuffleImageProcessorInvocation.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ContentShuffleImageProcessorInvocation = { - description: `Applies content shuffle processing to image`, - properties: { - id: { - type: 'string', - description: `The id of this node. Must be unique among all nodes.`, - isRequired: true, - }, - type: { - type: 'Enum', - }, - image: { - type: 'all-of', - description: `image to process`, - contains: [{ - type: 'ImageField', - }], - }, - detect_resolution: { - type: 'number', - description: `pixel resolution for edge detection`, - }, - image_resolution: { - type: 'number', - description: `pixel resolution for output image`, - }, - 'h': { - type: 'number', - description: `content shuffle h parameter`, - }, - 'w': { - type: 'number', - description: `content shuffle w parameter`, - }, - 'f': { - type: 'number', - description: `cont`, - }, - }, -} as const; diff --git a/invokeai/frontend/web/src/services/api/schemas/$ControlField.ts b/invokeai/frontend/web/src/services/api/schemas/$ControlField.ts deleted file mode 100644 index 81292b8638..0000000000 --- a/invokeai/frontend/web/src/services/api/schemas/$ControlField.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ControlField = { - properties: { - image: { - type: 'all-of', - description: `processed image`, - contains: [{ - type: 'ImageField', - }], - isRequired: true, - }, - control_model: { - type: 'string', - description: `control model used`, - isRequired: true, - }, - control_weight: { - type: 'number', - description: `weight given to controlnet`, - isRequired: true, - }, - begin_step_percent: { - type: 'number', - description: `% of total steps at which controlnet is first applied`, - isRequired: true, - maximum: 1, - }, - end_step_percent: { - type: 'number', - description: `% of total steps at which controlnet is last applied`, - isRequired: true, - maximum: 1, - }, - }, -} as const; diff --git a/invokeai/frontend/web/src/services/api/schemas/$ControlNetInvocation.ts b/invokeai/frontend/web/src/services/api/schemas/$ControlNetInvocation.ts deleted file mode 100644 index 29ff507e66..0000000000 --- a/invokeai/frontend/web/src/services/api/schemas/$ControlNetInvocation.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ControlNetInvocation = { - description: `Collects ControlNet info to pass to other nodes`, - properties: { - id: { - type: 'string', - description: `The id of this node. Must be unique among all nodes.`, - isRequired: true, - }, - type: { - type: 'Enum', - }, - image: { - type: 'all-of', - description: `image to process`, - contains: [{ - type: 'ImageField', - }], - }, - control_model: { - type: 'Enum', - }, - control_weight: { - type: 'number', - description: `weight given to controlnet`, - maximum: 1, - }, - begin_step_percent: { - type: 'number', - description: `% of total steps at which controlnet is first applied`, - maximum: 1, - }, - end_step_percent: { - type: 'number', - description: `% of total steps at which controlnet is last applied`, - maximum: 1, - }, - }, -} as const; diff --git a/invokeai/frontend/web/src/services/api/schemas/$ControlOutput.ts b/invokeai/frontend/web/src/services/api/schemas/$ControlOutput.ts deleted file mode 100644 index d94d633fca..0000000000 --- a/invokeai/frontend/web/src/services/api/schemas/$ControlOutput.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ControlOutput = { - description: `node output for ControlNet info`, - properties: { - type: { - type: 'Enum', - }, - control: { - type: 'all-of', - description: `The control info dict`, - contains: [{ - type: 'ControlField', - }], - }, - width: { - type: 'number', - description: `The width of the noise in pixels`, - isRequired: true, - }, - height: { - type: 'number', - description: `The height of the noise in pixels`, - isRequired: true, - }, - }, -} as const; diff --git a/invokeai/frontend/web/src/services/api/schemas/$HedImageprocessorInvocation.ts b/invokeai/frontend/web/src/services/api/schemas/$HedImageprocessorInvocation.ts deleted file mode 100644 index 3cffa008f5..0000000000 --- a/invokeai/frontend/web/src/services/api/schemas/$HedImageprocessorInvocation.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $HedImageprocessorInvocation = { - description: `Applies HED edge detection to image`, - properties: { - id: { - type: 'string', - description: `The id of this node. Must be unique among all nodes.`, - isRequired: true, - }, - type: { - type: 'Enum', - }, - image: { - type: 'all-of', - description: `image to process`, - contains: [{ - type: 'ImageField', - }], - }, - detect_resolution: { - type: 'number', - description: `pixel resolution for edge detection`, - }, - image_resolution: { - type: 'number', - description: `pixel resolution for output image`, - }, - scribble: { - type: 'boolean', - description: `whether to use scribble mode`, - }, - }, -} as const; diff --git a/invokeai/frontend/web/src/services/api/schemas/$ImageProcessorInvocation.ts b/invokeai/frontend/web/src/services/api/schemas/$ImageProcessorInvocation.ts deleted file mode 100644 index 36748982c5..0000000000 --- a/invokeai/frontend/web/src/services/api/schemas/$ImageProcessorInvocation.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ImageProcessorInvocation = { - description: `Base class for invocations that preprocess images for ControlNet`, - properties: { - id: { - type: 'string', - description: `The id of this node. Must be unique among all nodes.`, - isRequired: true, - }, - type: { - type: 'Enum', - }, - image: { - type: 'all-of', - description: `image to process`, - contains: [{ - type: 'ImageField', - }], - }, - }, -} as const; diff --git a/invokeai/frontend/web/src/services/api/schemas/$LineartAnimeImageProcessorInvocation.ts b/invokeai/frontend/web/src/services/api/schemas/$LineartAnimeImageProcessorInvocation.ts deleted file mode 100644 index 63a9c8158c..0000000000 --- a/invokeai/frontend/web/src/services/api/schemas/$LineartAnimeImageProcessorInvocation.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $LineartAnimeImageProcessorInvocation = { - description: `Applies line art anime processing to image`, - properties: { - id: { - type: 'string', - description: `The id of this node. Must be unique among all nodes.`, - isRequired: true, - }, - type: { - type: 'Enum', - }, - image: { - type: 'all-of', - description: `image to process`, - contains: [{ - type: 'ImageField', - }], - }, - detect_resolution: { - type: 'number', - description: `pixel resolution for edge detection`, - }, - image_resolution: { - type: 'number', - description: `pixel resolution for output image`, - }, - }, -} as const; diff --git a/invokeai/frontend/web/src/services/api/schemas/$LineartImageProcessorInvocation.ts b/invokeai/frontend/web/src/services/api/schemas/$LineartImageProcessorInvocation.ts deleted file mode 100644 index 6ba4064823..0000000000 --- a/invokeai/frontend/web/src/services/api/schemas/$LineartImageProcessorInvocation.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $LineartImageProcessorInvocation = { - description: `Applies line art processing to image`, - properties: { - id: { - type: 'string', - description: `The id of this node. Must be unique among all nodes.`, - isRequired: true, - }, - type: { - type: 'Enum', - }, - image: { - type: 'all-of', - description: `image to process`, - contains: [{ - type: 'ImageField', - }], - }, - detect_resolution: { - type: 'number', - description: `pixel resolution for edge detection`, - }, - image_resolution: { - type: 'number', - description: `pixel resolution for output image`, - }, - coarse: { - type: 'boolean', - description: `whether to use coarse mode`, - }, - }, -} as const; diff --git a/invokeai/frontend/web/src/services/api/schemas/$MidasDepthImageProcessorInvocation.ts b/invokeai/frontend/web/src/services/api/schemas/$MidasDepthImageProcessorInvocation.ts deleted file mode 100644 index ea0b2b0099..0000000000 --- a/invokeai/frontend/web/src/services/api/schemas/$MidasDepthImageProcessorInvocation.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $MidasDepthImageProcessorInvocation = { - description: `Applies Midas depth processing to image`, - properties: { - id: { - type: 'string', - description: `The id of this node. Must be unique among all nodes.`, - isRequired: true, - }, - type: { - type: 'Enum', - }, - image: { - type: 'all-of', - description: `image to process`, - contains: [{ - type: 'ImageField', - }], - }, - a_mult: { - type: 'number', - description: `Midas parameter a = amult * PI`, - }, - bg_th: { - type: 'number', - description: `Midas parameter bg_th`, - }, - }, -} as const; diff --git a/invokeai/frontend/web/src/services/api/schemas/$MlsdImageProcessorInvocation.ts b/invokeai/frontend/web/src/services/api/schemas/$MlsdImageProcessorInvocation.ts deleted file mode 100644 index 1bff7579cc..0000000000 --- a/invokeai/frontend/web/src/services/api/schemas/$MlsdImageProcessorInvocation.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $MlsdImageProcessorInvocation = { - description: `Applies MLSD processing to image`, - properties: { - id: { - type: 'string', - description: `The id of this node. Must be unique among all nodes.`, - isRequired: true, - }, - type: { - type: 'Enum', - }, - image: { - type: 'all-of', - description: `image to process`, - contains: [{ - type: 'ImageField', - }], - }, - detect_resolution: { - type: 'number', - description: `pixel resolution for edge detection`, - }, - image_resolution: { - type: 'number', - description: `pixel resolution for output image`, - }, - thr_v: { - type: 'number', - description: `MLSD parameter thr_v`, - }, - thr_d: { - type: 'number', - description: `MLSD parameter thr_d`, - }, - }, -} as const; diff --git a/invokeai/frontend/web/src/services/api/schemas/$NormalbaeImageProcessorInvocation.ts b/invokeai/frontend/web/src/services/api/schemas/$NormalbaeImageProcessorInvocation.ts deleted file mode 100644 index 7cdfe6f3ae..0000000000 --- a/invokeai/frontend/web/src/services/api/schemas/$NormalbaeImageProcessorInvocation.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $NormalbaeImageProcessorInvocation = { - description: `Applies NormalBae processing to image`, - properties: { - id: { - type: 'string', - description: `The id of this node. Must be unique among all nodes.`, - isRequired: true, - }, - type: { - type: 'Enum', - }, - image: { - type: 'all-of', - description: `image to process`, - contains: [{ - type: 'ImageField', - }], - }, - detect_resolution: { - type: 'number', - description: `pixel resolution for edge detection`, - }, - image_resolution: { - type: 'number', - description: `pixel resolution for output image`, - }, - }, -} as const; diff --git a/invokeai/frontend/web/src/services/api/schemas/$OpenposeImageProcessorInvocation.ts b/invokeai/frontend/web/src/services/api/schemas/$OpenposeImageProcessorInvocation.ts deleted file mode 100644 index 2a187e9cf2..0000000000 --- a/invokeai/frontend/web/src/services/api/schemas/$OpenposeImageProcessorInvocation.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $OpenposeImageProcessorInvocation = { - description: `Applies Openpose processing to image`, - properties: { - id: { - type: 'string', - description: `The id of this node. Must be unique among all nodes.`, - isRequired: true, - }, - type: { - type: 'Enum', - }, - image: { - type: 'all-of', - description: `image to process`, - contains: [{ - type: 'ImageField', - }], - }, - hand_and_face: { - type: 'boolean', - description: `whether to use hands and face mode`, - }, - detect_resolution: { - type: 'number', - description: `pixel resolution for edge detection`, - }, - image_resolution: { - type: 'number', - description: `pixel resolution for output image`, - }, - }, -} as const; diff --git a/invokeai/frontend/web/src/services/api/schemas/$PidiImageProcessorInvocation.ts b/invokeai/frontend/web/src/services/api/schemas/$PidiImageProcessorInvocation.ts deleted file mode 100644 index 0fd53967c2..0000000000 --- a/invokeai/frontend/web/src/services/api/schemas/$PidiImageProcessorInvocation.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $PidiImageProcessorInvocation = { - description: `Applies PIDI processing to image`, - properties: { - id: { - type: 'string', - description: `The id of this node. Must be unique among all nodes.`, - isRequired: true, - }, - type: { - type: 'Enum', - }, - image: { - type: 'all-of', - description: `image to process`, - contains: [{ - type: 'ImageField', - }], - }, - detect_resolution: { - type: 'number', - description: `pixel resolution for edge detection`, - }, - image_resolution: { - type: 'number', - description: `pixel resolution for output image`, - }, - safe: { - type: 'boolean', - description: `whether to use safe mode`, - }, - scribble: { - type: 'boolean', - description: `whether to use scribble mode`, - }, - }, -} as const; diff --git a/invokeai/frontend/web/src/services/api/schemas/$RandomIntInvocation.ts b/invokeai/frontend/web/src/services/api/schemas/$RandomIntInvocation.ts deleted file mode 100644 index e5b0387d5a..0000000000 --- a/invokeai/frontend/web/src/services/api/schemas/$RandomIntInvocation.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $RandomIntInvocation = { - description: `Outputs a single random integer.`, - properties: { - id: { - type: 'string', - description: `The id of this node. Must be unique among all nodes.`, - isRequired: true, - }, - type: { - type: 'Enum', - }, - }, -} as const; diff --git a/invokeai/frontend/web/src/services/api/services/ImagesService.ts b/invokeai/frontend/web/src/services/api/services/ImagesService.ts index d0eae92d4b..06065eb1a3 100644 --- a/invokeai/frontend/web/src/services/api/services/ImagesService.ts +++ b/invokeai/frontend/web/src/services/api/services/ImagesService.ts @@ -22,33 +22,33 @@ export class ImagesService { * @throws ApiError */ public static listImagesWithMetadata({ - imageOrigin, - categories, - isIntermediate, - offset, - limit = 10, - }: { - /** - * The origin of images to list - */ - imageOrigin?: ResourceOrigin, - /** - * The categories of image to include - */ - categories?: Array, - /** - * Whether to list intermediate images - */ - isIntermediate?: boolean, - /** - * The page offset - */ - offset?: number, - /** - * The number of images per page - */ - limit?: number, - }): CancelablePromise { +imageOrigin, +categories, +isIntermediate, +offset, +limit = 10, +}: { +/** + * The origin of images to list + */ +imageOrigin?: ResourceOrigin, +/** + * The categories of image to include + */ +categories?: Array, +/** + * Whether to list intermediate images + */ +isIntermediate?: boolean, +/** + * The page offset + */ +offset?: number, +/** + * The number of images per page + */ +limit?: number, +}): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/images/', @@ -72,25 +72,25 @@ export class ImagesService { * @throws ApiError */ public static uploadImage({ - imageCategory, - isIntermediate, - formData, - sessionId, - }: { - /** - * The category of the image - */ - imageCategory: ImageCategory, - /** - * Whether this is an intermediate image - */ - isIntermediate: boolean, - formData: Body_upload_image, - /** - * The session ID associated with this upload, if any - */ - sessionId?: string, - }): CancelablePromise { +imageCategory, +isIntermediate, +formData, +sessionId, +}: { +/** + * The category of the image + */ +imageCategory: ImageCategory, +/** + * Whether this is an intermediate image + */ +isIntermediate: boolean, +formData: Body_upload_image, +/** + * The session ID associated with this upload, if any + */ +sessionId?: string, +}): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/images/', @@ -115,13 +115,13 @@ export class ImagesService { * @throws ApiError */ public static getImageFull({ - imageName, - }: { - /** - * The name of full-resolution image file to get - */ - imageName: string, - }): CancelablePromise { +imageName, +}: { +/** + * The name of full-resolution image file to get + */ +imageName: string, +}): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/images/{image_name}', @@ -142,13 +142,13 @@ export class ImagesService { * @throws ApiError */ public static deleteImage({ - imageName, - }: { - /** - * The name of the image to delete - */ - imageName: string, - }): CancelablePromise { +imageName, +}: { +/** + * The name of the image to delete + */ +imageName: string, +}): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/v1/images/{image_name}', @@ -168,15 +168,15 @@ export class ImagesService { * @throws ApiError */ public static updateImage({ - imageName, - requestBody, - }: { - /** - * The name of the image to update - */ - imageName: string, - requestBody: ImageRecordChanges, - }): CancelablePromise { +imageName, +requestBody, +}: { +/** + * The name of the image to update + */ +imageName: string, +requestBody: ImageRecordChanges, +}): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', url: '/api/v1/images/{image_name}', @@ -198,13 +198,13 @@ export class ImagesService { * @throws ApiError */ public static getImageMetadata({ - imageName, - }: { - /** - * The name of image to get - */ - imageName: string, - }): CancelablePromise { +imageName, +}: { +/** + * The name of image to get + */ +imageName: string, +}): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/images/{image_name}/metadata', @@ -224,13 +224,13 @@ export class ImagesService { * @throws ApiError */ public static getImageThumbnail({ - imageName, - }: { - /** - * The name of thumbnail image file to get - */ - imageName: string, - }): CancelablePromise { +imageName, +}: { +/** + * The name of thumbnail image file to get + */ +imageName: string, +}): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/images/{image_name}/thumbnail', @@ -251,13 +251,13 @@ export class ImagesService { * @throws ApiError */ public static getImageUrls({ - imageName, - }: { - /** - * The name of the image whose URL to get - */ - imageName: string, - }): CancelablePromise { +imageName, +}: { +/** + * The name of the image whose URL to get + */ +imageName: string, +}): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/images/{image_name}/urls', diff --git a/invokeai/frontend/web/src/services/api/services/SessionsService.ts b/invokeai/frontend/web/src/services/api/services/SessionsService.ts index d850a1ed38..c4faa09362 100644 --- a/invokeai/frontend/web/src/services/api/services/SessionsService.ts +++ b/invokeai/frontend/web/src/services/api/services/SessionsService.ts @@ -79,23 +79,23 @@ export class SessionsService { * @throws ApiError */ public static listSessions({ - page, - perPage = 10, - query = '', - }: { - /** - * The page of results to get - */ - page?: number, - /** - * The number of results per page - */ - perPage?: number, - /** - * The query string to search for - */ - query?: string, - }): CancelablePromise { +page, +perPage = 10, +query = '', +}: { +/** + * The page of results to get + */ +page?: number, +/** + * The number of results per page + */ +perPage?: number, +/** + * The query string to search for + */ +query?: string, +}): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/sessions/', @@ -117,10 +117,10 @@ export class SessionsService { * @throws ApiError */ public static createSession({ - requestBody, - }: { - requestBody?: Graph, - }): CancelablePromise { +requestBody, +}: { +requestBody?: Graph, +}): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/sessions/', @@ -140,13 +140,13 @@ export class SessionsService { * @throws ApiError */ public static getSession({ - sessionId, - }: { - /** - * The id of the session to get - */ - sessionId: string, - }): CancelablePromise { +sessionId, +}: { +/** + * The id of the session to get + */ +sessionId: string, +}): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/v1/sessions/{session_id}', @@ -167,15 +167,15 @@ export class SessionsService { * @throws ApiError */ public static addNode({ - sessionId, - requestBody, - }: { - /** - * The id of the session - */ - sessionId: string, - requestBody: (LoadImageInvocation | ShowImageInvocation | ImageCropInvocation | ImagePasteInvocation | MaskFromAlphaInvocation | ImageMultiplyInvocation | ImageChannelInvocation | ImageConvertInvocation | ImageBlurInvocation | ImageResizeInvocation | ImageScaleInvocation | ImageLerpInvocation | ImageInverseLerpInvocation | ControlNetInvocation | ImageProcessorInvocation | DynamicPromptInvocation | CompelInvocation | AddInvocation | SubtractInvocation | MultiplyInvocation | DivideInvocation | RandomIntInvocation | ParamIntInvocation | ParamFloatInvocation | NoiseInvocation | TextToLatentsInvocation | LatentsToImageInvocation | ResizeLatentsInvocation | ScaleLatentsInvocation | ImageToLatentsInvocation | CvInpaintInvocation | RangeInvocation | RangeOfSizeInvocation | RandomRangeInvocation | FloatLinearRangeInvocation | StepParamEasingInvocation | UpscaleInvocation | RestoreFaceInvocation | TextToImageInvocation | InfillColorInvocation | InfillTileInvocation | InfillPatchMatchInvocation | GraphInvocation | IterateInvocation | CollectInvocation | CannyImageProcessorInvocation | HedImageProcessorInvocation | LineartImageProcessorInvocation | LineartAnimeImageProcessorInvocation | OpenposeImageProcessorInvocation | MidasDepthImageProcessorInvocation | NormalbaeImageProcessorInvocation | MlsdImageProcessorInvocation | PidiImageProcessorInvocation | ContentShuffleImageProcessorInvocation | ZoeDepthImageProcessorInvocation | MediapipeFaceProcessorInvocation | LatentsToLatentsInvocation | ImageToImageInvocation | InpaintInvocation), - }): CancelablePromise { +sessionId, +requestBody, +}: { +/** + * The id of the session + */ +sessionId: string, +requestBody: (RangeInvocation | RangeOfSizeInvocation | RandomRangeInvocation | CompelInvocation | LoadImageInvocation | ShowImageInvocation | ImageCropInvocation | ImagePasteInvocation | MaskFromAlphaInvocation | ImageMultiplyInvocation | ImageChannelInvocation | ImageConvertInvocation | ImageBlurInvocation | ImageResizeInvocation | ImageScaleInvocation | ImageLerpInvocation | ImageInverseLerpInvocation | ControlNetInvocation | ImageProcessorInvocation | CvInpaintInvocation | TextToImageInvocation | InfillColorInvocation | InfillTileInvocation | InfillPatchMatchInvocation | NoiseInvocation | TextToLatentsInvocation | LatentsToImageInvocation | ResizeLatentsInvocation | ScaleLatentsInvocation | ImageToLatentsInvocation | AddInvocation | SubtractInvocation | MultiplyInvocation | DivideInvocation | RandomIntInvocation | ParamIntInvocation | ParamFloatInvocation | FloatLinearRangeInvocation | StepParamEasingInvocation | DynamicPromptInvocation | RestoreFaceInvocation | UpscaleInvocation | GraphInvocation | IterateInvocation | CollectInvocation | CannyImageProcessorInvocation | HedImageProcessorInvocation | LineartImageProcessorInvocation | LineartAnimeImageProcessorInvocation | OpenposeImageProcessorInvocation | MidasDepthImageProcessorInvocation | NormalbaeImageProcessorInvocation | MlsdImageProcessorInvocation | PidiImageProcessorInvocation | ContentShuffleImageProcessorInvocation | ZoeDepthImageProcessorInvocation | MediapipeFaceProcessorInvocation | ImageToImageInvocation | LatentsToLatentsInvocation | InpaintInvocation), +}): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/sessions/{session_id}/nodes', @@ -199,20 +199,20 @@ export class SessionsService { * @throws ApiError */ public static updateNode({ - sessionId, - nodePath, - requestBody, - }: { - /** - * The id of the session - */ - sessionId: string, - /** - * The path to the node in the graph - */ - nodePath: string, - requestBody: (LoadImageInvocation | ShowImageInvocation | ImageCropInvocation | ImagePasteInvocation | MaskFromAlphaInvocation | ImageMultiplyInvocation | ImageChannelInvocation | ImageConvertInvocation | ImageBlurInvocation | ImageResizeInvocation | ImageScaleInvocation | ImageLerpInvocation | ImageInverseLerpInvocation | ControlNetInvocation | ImageProcessorInvocation | DynamicPromptInvocation | CompelInvocation | AddInvocation | SubtractInvocation | MultiplyInvocation | DivideInvocation | RandomIntInvocation | ParamIntInvocation | ParamFloatInvocation | NoiseInvocation | TextToLatentsInvocation | LatentsToImageInvocation | ResizeLatentsInvocation | ScaleLatentsInvocation | ImageToLatentsInvocation | CvInpaintInvocation | RangeInvocation | RangeOfSizeInvocation | RandomRangeInvocation | FloatLinearRangeInvocation | StepParamEasingInvocation | UpscaleInvocation | RestoreFaceInvocation | TextToImageInvocation | InfillColorInvocation | InfillTileInvocation | InfillPatchMatchInvocation | GraphInvocation | IterateInvocation | CollectInvocation | CannyImageProcessorInvocation | HedImageProcessorInvocation | LineartImageProcessorInvocation | LineartAnimeImageProcessorInvocation | OpenposeImageProcessorInvocation | MidasDepthImageProcessorInvocation | NormalbaeImageProcessorInvocation | MlsdImageProcessorInvocation | PidiImageProcessorInvocation | ContentShuffleImageProcessorInvocation | ZoeDepthImageProcessorInvocation | MediapipeFaceProcessorInvocation | LatentsToLatentsInvocation | ImageToImageInvocation | InpaintInvocation), - }): CancelablePromise { +sessionId, +nodePath, +requestBody, +}: { +/** + * The id of the session + */ +sessionId: string, +/** + * The path to the node in the graph + */ +nodePath: string, +requestBody: (RangeInvocation | RangeOfSizeInvocation | RandomRangeInvocation | CompelInvocation | LoadImageInvocation | ShowImageInvocation | ImageCropInvocation | ImagePasteInvocation | MaskFromAlphaInvocation | ImageMultiplyInvocation | ImageChannelInvocation | ImageConvertInvocation | ImageBlurInvocation | ImageResizeInvocation | ImageScaleInvocation | ImageLerpInvocation | ImageInverseLerpInvocation | ControlNetInvocation | ImageProcessorInvocation | CvInpaintInvocation | TextToImageInvocation | InfillColorInvocation | InfillTileInvocation | InfillPatchMatchInvocation | NoiseInvocation | TextToLatentsInvocation | LatentsToImageInvocation | ResizeLatentsInvocation | ScaleLatentsInvocation | ImageToLatentsInvocation | AddInvocation | SubtractInvocation | MultiplyInvocation | DivideInvocation | RandomIntInvocation | ParamIntInvocation | ParamFloatInvocation | FloatLinearRangeInvocation | StepParamEasingInvocation | DynamicPromptInvocation | RestoreFaceInvocation | UpscaleInvocation | GraphInvocation | IterateInvocation | CollectInvocation | CannyImageProcessorInvocation | HedImageProcessorInvocation | LineartImageProcessorInvocation | LineartAnimeImageProcessorInvocation | OpenposeImageProcessorInvocation | MidasDepthImageProcessorInvocation | NormalbaeImageProcessorInvocation | MlsdImageProcessorInvocation | PidiImageProcessorInvocation | ContentShuffleImageProcessorInvocation | ZoeDepthImageProcessorInvocation | MediapipeFaceProcessorInvocation | ImageToImageInvocation | LatentsToLatentsInvocation | InpaintInvocation), +}): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/v1/sessions/{session_id}/nodes/{node_path}', @@ -237,18 +237,18 @@ export class SessionsService { * @throws ApiError */ public static deleteNode({ - sessionId, - nodePath, - }: { - /** - * The id of the session - */ - sessionId: string, - /** - * The path to the node to delete - */ - nodePath: string, - }): CancelablePromise { +sessionId, +nodePath, +}: { +/** + * The id of the session + */ +sessionId: string, +/** + * The path to the node to delete + */ +nodePath: string, +}): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/v1/sessions/{session_id}/nodes/{node_path}', @@ -271,15 +271,15 @@ export class SessionsService { * @throws ApiError */ public static addEdge({ - sessionId, - requestBody, - }: { - /** - * The id of the session - */ - sessionId: string, - requestBody: Edge, - }): CancelablePromise { +sessionId, +requestBody, +}: { +/** + * The id of the session + */ +sessionId: string, +requestBody: Edge, +}): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/v1/sessions/{session_id}/edges', @@ -303,33 +303,33 @@ export class SessionsService { * @throws ApiError */ public static deleteEdge({ - sessionId, - fromNodeId, - fromField, - toNodeId, - toField, - }: { - /** - * The id of the session - */ - sessionId: string, - /** - * The id of the node the edge is coming from - */ - fromNodeId: string, - /** - * The field of the node the edge is coming from - */ - fromField: string, - /** - * The id of the node the edge is going to - */ - toNodeId: string, - /** - * The field of the node the edge is going to - */ - toField: string, - }): CancelablePromise { +sessionId, +fromNodeId, +fromField, +toNodeId, +toField, +}: { +/** + * The id of the session + */ +sessionId: string, +/** + * The id of the node the edge is coming from + */ +fromNodeId: string, +/** + * The field of the node the edge is coming from + */ +fromField: string, +/** + * The id of the node the edge is going to + */ +toNodeId: string, +/** + * The field of the node the edge is going to + */ +toField: string, +}): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/v1/sessions/{session_id}/edges/{from_node_id}/{from_field}/{to_node_id}/{to_field}', @@ -355,18 +355,18 @@ export class SessionsService { * @throws ApiError */ public static invokeSession({ - sessionId, - all = false, - }: { - /** - * The id of the session to invoke - */ - sessionId: string, - /** - * Whether or not to invoke all remaining invocations - */ - all?: boolean, - }): CancelablePromise { +sessionId, +all = false, +}: { +/** + * The id of the session to invoke + */ +sessionId: string, +/** + * Whether or not to invoke all remaining invocations + */ +all?: boolean, +}): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/v1/sessions/{session_id}/invoke', @@ -391,13 +391,13 @@ export class SessionsService { * @throws ApiError */ public static cancelSessionInvoke({ - sessionId, - }: { - /** - * The id of the session to cancel - */ - sessionId: string, - }): CancelablePromise { +sessionId, +}: { +/** + * The id of the session to cancel + */ +sessionId: string, +}): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/v1/sessions/{session_id}/invoke',