chore: Rebuild API

This commit is contained in:
blessedcoolant 2023-06-15 03:20:49 +12:00
parent 6b8e88ad7f
commit 4ca325e8e6
23 changed files with 210 additions and 711 deletions

View File

@ -28,4 +28,3 @@ export type DynamicPromptInvocation = {
*/
combinatorial?: boolean;
};

View File

@ -28,4 +28,3 @@ export type FloatLinearRangeInvocation = {
*/
steps?: number;
};

View File

@ -72,10 +72,9 @@ export type Graph = {
/**
* The nodes in this graph
*/
nodes?: Record<string, (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)>;
nodes?: Record<string, (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)>;
/**
* The connections between nodes and their fields in this graph
*/
edges?: Array<Edge>;
};

View File

@ -46,7 +46,7 @@ export type GraphExecutionState = {
/**
* The results of node executions
*/
results: Record<string, (ImageOutput | MaskOutput | ControlOutput | PromptOutput | PromptCollectionOutput | CompelOutput | IntOutput | FloatOutput | LatentsOutput | NoiseOutput | IntCollectionOutput | FloatCollectionOutput | GraphInvocationOutput | IterateInvocationOutput | CollectInvocationOutput)>;
results: Record<string, (IntCollectionOutput | FloatCollectionOutput | CompelOutput | ImageOutput | MaskOutput | ControlOutput | LatentsOutput | NoiseOutput | IntOutput | FloatOutput | PromptOutput | PromptCollectionOutput | GraphInvocationOutput | IterateInvocationOutput | CollectInvocationOutput)>;
/**
* Errors raised when executing nodes
*/
@ -60,4 +60,3 @@ export type GraphExecutionState = {
*/
source_prepared_mapping: Record<string, Array<string>>;
};

View File

@ -16,4 +16,3 @@ export type PromptCollectionOutput = {
*/
count: number;
};

View File

@ -56,4 +56,3 @@ export type StepParamEasingInvocation = {
*/
show_easing_plot?: boolean;
};

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -174,7 +174,7 @@ export class SessionsService {
* 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),
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<string> {
return __request(OpenAPI, {
method: 'POST',
@ -211,7 +211,7 @@ export class SessionsService {
* 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),
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<GraphExecutionState> {
return __request(OpenAPI, {
method: 'PUT',