Skip to content

Commit

Permalink
chore: Rebuild API
Browse files Browse the repository at this point in the history
  • Loading branch information
blessedcoolant committed Jun 17, 2023
1 parent 67d05d2 commit 76dd749
Show file tree
Hide file tree
Showing 126 changed files with 732 additions and 331 deletions.
24 changes: 24 additions & 0 deletions invokeai/frontend/web/src/services/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ export { OpenAPI } from './core/OpenAPI';
export type { OpenAPIConfig } from './core/OpenAPI';

export type { AddInvocation } from './models/AddInvocation';
export type { BaseModelType } from './models/BaseModelType';
export type { Body_upload_image } from './models/Body_upload_image';
export type { CannyImageProcessorInvocation } from './models/CannyImageProcessorInvocation';
export type { CkptModelInfo } from './models/CkptModelInfo';
export type { ClipField } from './models/ClipField';
export type { CollectInvocation } from './models/CollectInvocation';
export type { CollectInvocationOutput } from './models/CollectInvocationOutput';
export type { ColorField } from './models/ColorField';
Expand All @@ -19,6 +21,7 @@ export type { ConditioningField } from './models/ConditioningField';
export type { ContentShuffleImageProcessorInvocation } from './models/ContentShuffleImageProcessorInvocation';
export type { ControlField } from './models/ControlField';
export type { ControlNetInvocation } from './models/ControlNetInvocation';
export type { ControlNetModelConfig } from './models/ControlNetModelConfig';
export type { ControlOutput } from './models/ControlOutput';
export type { CreateModelRequest } from './models/CreateModelRequest';
export type { CvInpaintInvocation } from './models/CvInpaintInvocation';
Expand Down Expand Up @@ -71,12 +74,21 @@ export type { LatentsToLatentsInvocation } from './models/LatentsToLatentsInvoca
export type { LineartAnimeImageProcessorInvocation } from './models/LineartAnimeImageProcessorInvocation';
export type { LineartImageProcessorInvocation } from './models/LineartImageProcessorInvocation';
export type { LoadImageInvocation } from './models/LoadImageInvocation';
export type { LoraInfo } from './models/LoraInfo';
export type { LoraLoaderInvocation } from './models/LoraLoaderInvocation';
export type { LoraLoaderOutput } from './models/LoraLoaderOutput';
export type { LoraModelConfig } from './models/LoraModelConfig';
export type { MaskFromAlphaInvocation } from './models/MaskFromAlphaInvocation';
export type { MaskOutput } from './models/MaskOutput';
export type { MediapipeFaceProcessorInvocation } from './models/MediapipeFaceProcessorInvocation';
export type { MidasDepthImageProcessorInvocation } from './models/MidasDepthImageProcessorInvocation';
export type { MlsdImageProcessorInvocation } from './models/MlsdImageProcessorInvocation';
export type { ModelError } from './models/ModelError';
export type { ModelInfo } from './models/ModelInfo';
export type { ModelLoaderOutput } from './models/ModelLoaderOutput';
export type { ModelsList } from './models/ModelsList';
export type { ModelType } from './models/ModelType';
export type { ModelVariantType } from './models/ModelVariantType';
export type { MultiplyInvocation } from './models/MultiplyInvocation';
export type { NoiseInvocation } from './models/NoiseInvocation';
export type { NoiseOutput } from './models/NoiseOutput';
Expand All @@ -97,12 +109,24 @@ export type { ResizeLatentsInvocation } from './models/ResizeLatentsInvocation';
export type { ResourceOrigin } from './models/ResourceOrigin';
export type { RestoreFaceInvocation } from './models/RestoreFaceInvocation';
export type { ScaleLatentsInvocation } from './models/ScaleLatentsInvocation';
export type { SchedulerPredictionType } from './models/SchedulerPredictionType';
export type { SD1ModelLoaderInvocation } from './models/SD1ModelLoaderInvocation';
export type { SD2ModelLoaderInvocation } from './models/SD2ModelLoaderInvocation';
export type { ShowImageInvocation } from './models/ShowImageInvocation';
export type { StableDiffusion1CheckpointModelConfig } from './models/StableDiffusion1CheckpointModelConfig';
export type { StableDiffusion1DiffusersModelConfig } from './models/StableDiffusion1DiffusersModelConfig';
export type { StableDiffusion2CheckpointModelConfig } from './models/StableDiffusion2CheckpointModelConfig';
export type { StableDiffusion2DiffusersModelConfig } from './models/StableDiffusion2DiffusersModelConfig';
export type { StepParamEasingInvocation } from './models/StepParamEasingInvocation';
export type { SubModelType } from './models/SubModelType';
export type { SubtractInvocation } from './models/SubtractInvocation';
export type { TextToImageInvocation } from './models/TextToImageInvocation';
export type { TextToLatentsInvocation } from './models/TextToLatentsInvocation';
export type { TextualInversionModelConfig } from './models/TextualInversionModelConfig';
export type { UNetField } from './models/UNetField';
export type { UpscaleInvocation } from './models/UpscaleInvocation';
export type { VaeField } from './models/VaeField';
export type { VAEModelConfig } from './models/VAEModelConfig';
export type { VaeRepo } from './models/VaeRepo';
export type { ValidationError } from './models/ValidationError';
export type { ZoeDepthImageProcessorInvocation } from './models/ZoeDepthImageProcessorInvocation';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ export type AddInvocation = {
*/
'b'?: number;
};

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* An enumeration.
*/
export type BaseModelType = 'sd-1' | 'sd-2';
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
export type Body_upload_image = {
file: Blob;
};

Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ export type CannyImageProcessorInvocation = {
*/
high_threshold?: number;
};

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ export type CkptModelInfo = {
* A description of the model
*/
description?: string;
/**
* The name of the model
*/
model_name: string;
/**
* The type of the model
*/
model_type: string;
format?: 'ckpt';
/**
* The path to the model config
Expand All @@ -29,4 +37,3 @@ export type CkptModelInfo = {
*/
height?: number;
};

21 changes: 21 additions & 0 deletions invokeai/frontend/web/src/services/api/models/ClipField.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { LoraInfo } from './LoraInfo';
import type { ModelInfo } from './ModelInfo';

export type ClipField = {
/**
* Info to load tokenizer submodel
*/
tokenizer: ModelInfo;
/**
* Info to load text_encoder submodel
*/
text_encoder: ModelInfo;
/**
* Loras to apply on model loading
*/
loras: Array<LoraInfo>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ export type CollectInvocation = {
*/
collection?: Array<any>;
};

Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ export type CollectInvocationOutput = {
*/
collection: Array<any>;
};

Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ export type ColorField = {
*/
'a': number;
};

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/* tslint:disable */
/* eslint-disable */

import type { ClipField } from './ClipField';

/**
* Parse prompt using compel package to conditioning.
*/
Expand All @@ -20,8 +22,7 @@ export type CompelInvocation = {
*/
prompt?: string;
/**
* Model to use
* Clip to use
*/
model?: string;
clip?: ClipField;
};

Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ export type CompelOutput = {
*/
conditioning?: ConditioningField;
};

Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ export type ConditioningField = {
*/
conditioning_name: string;
};

Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,3 @@ export type ContentShuffleImageProcessorInvocation = {
*/
'f'?: number;
};

Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ export type ControlField = {
*/
end_step_percent: number;
};

Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,3 @@ export type ControlNetInvocation = {
*/
end_step_percent?: number;
};

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { ModelError } from './ModelError';

export type ControlNetModelConfig = {
path: string;
description?: string;
format: ('checkpoint' | 'diffusers');
default?: boolean;
error?: ModelError;
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ export type ControlOutput = {
*/
control?: ControlField;
};

Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ export type CreateModelRequest = {
*/
info: (CkptModelInfo | DiffusersModelInfo);
};

Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ export type CvInpaintInvocation = {
*/
mask?: ImageField;
};

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@ export type DiffusersModelInfo = {
* A description of the model
*/
description?: string;
format?: 'diffusers';
/**
* The name of the model
*/
model_name: string;
/**
* The type of the model
*/
model_type: string;
format?: 'folder';
/**
* The VAE repo to use for this model
*/
Expand All @@ -23,4 +31,3 @@ export type DiffusersModelInfo = {
*/
path?: string;
};

Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ export type DivideInvocation = {
*/
'b'?: number;
};

Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ export type DynamicPromptInvocation = {
*/
combinatorial?: boolean;
};

1 change: 0 additions & 1 deletion invokeai/frontend/web/src/services/api/models/Edge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ export type Edge = {
*/
destination: EdgeConnection;
};

Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ export type EdgeConnection = {
*/
field: string;
};

Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ export type FloatCollectionOutput = {
*/
collection?: Array<number>;
};

Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ export type FloatLinearRangeInvocation = {
*/
steps?: number;
};

Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ export type FloatOutput = {
*/
param?: number;
};

6 changes: 4 additions & 2 deletions invokeai/frontend/web/src/services/api/models/Graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import type { LatentsToLatentsInvocation } from './LatentsToLatentsInvocation';
import type { LineartAnimeImageProcessorInvocation } from './LineartAnimeImageProcessorInvocation';
import type { LineartImageProcessorInvocation } from './LineartImageProcessorInvocation';
import type { LoadImageInvocation } from './LoadImageInvocation';
import type { LoraLoaderInvocation } from './LoraLoaderInvocation';
import type { MaskFromAlphaInvocation } from './MaskFromAlphaInvocation';
import type { MediapipeFaceProcessorInvocation } from './MediapipeFaceProcessorInvocation';
import type { MidasDepthImageProcessorInvocation } from './MidasDepthImageProcessorInvocation';
Expand All @@ -56,6 +57,8 @@ import type { RangeOfSizeInvocation } from './RangeOfSizeInvocation';
import type { ResizeLatentsInvocation } from './ResizeLatentsInvocation';
import type { RestoreFaceInvocation } from './RestoreFaceInvocation';
import type { ScaleLatentsInvocation } from './ScaleLatentsInvocation';
import type { SD1ModelLoaderInvocation } from './SD1ModelLoaderInvocation';
import type { SD2ModelLoaderInvocation } from './SD2ModelLoaderInvocation';
import type { ShowImageInvocation } from './ShowImageInvocation';
import type { StepParamEasingInvocation } from './StepParamEasingInvocation';
import type { SubtractInvocation } from './SubtractInvocation';
Expand All @@ -72,10 +75,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 | SD1ModelLoaderInvocation | SD2ModelLoaderInvocation | LoraLoaderInvocation | 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>;
};

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import type { IntCollectionOutput } from './IntCollectionOutput';
import type { IntOutput } from './IntOutput';
import type { IterateInvocationOutput } from './IterateInvocationOutput';
import type { LatentsOutput } from './LatentsOutput';
import type { LoraLoaderOutput } from './LoraLoaderOutput';
import type { MaskOutput } from './MaskOutput';
import type { ModelLoaderOutput } from './ModelLoaderOutput';
import type { NoiseOutput } from './NoiseOutput';
import type { PromptCollectionOutput } from './PromptCollectionOutput';
import type { PromptOutput } from './PromptOutput';
Expand Down Expand Up @@ -46,7 +48,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 | ModelLoaderOutput | LoraLoaderOutput | CompelOutput | ImageOutput | MaskOutput | ControlOutput | LatentsOutput | NoiseOutput | IntOutput | FloatOutput | PromptOutput | PromptCollectionOutput | GraphInvocationOutput | IterateInvocationOutput | CollectInvocationOutput)>;
/**
* Errors raised when executing nodes
*/
Expand All @@ -60,4 +62,3 @@ export type GraphExecutionState = {
*/
source_prepared_mapping: Record<string, Array<string>>;
};

Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ export type GraphInvocation = {
*/
graph?: Graph;
};

Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
export type GraphInvocationOutput = {
type: 'graph_output';
};

Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ import type { ValidationError } from './ValidationError';
export type HTTPValidationError = {
detail?: Array<ValidationError>;
};

Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ export type HedImageProcessorInvocation = {
*/
scribble?: boolean;
};

Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ export type ImageBlurInvocation = {
*/
blur_type?: 'gaussian' | 'box';
};

Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ export type ImageChannelInvocation = {
*/
channel?: 'A' | 'R' | 'G' | 'B';
};

Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ export type ImageConvertInvocation = {
*/
mode?: 'L' | 'RGB' | 'RGBA' | 'CMYK' | 'YCbCr' | 'LAB' | 'HSV' | 'I' | 'F';
};

Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,3 @@ export type ImageCropInvocation = {
*/
height?: number;
};

1 change: 0 additions & 1 deletion invokeai/frontend/web/src/services/api/models/ImageDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,3 @@ export type ImageDTO = {
*/
metadata?: ImageMetadata;
};

Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ export type ImageField = {
*/
image_name: string;
};

Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ export type ImageInverseLerpInvocation = {
*/
max?: number;
};

Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ export type ImageLerpInvocation = {
*/
max?: number;
};

Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,3 @@ export type ImageMetadata = {
*/
extra?: string;
};

Loading

0 comments on commit 76dd749

Please sign in to comment.