Merge branch 'main' into release/make-web-dist-startable

This commit is contained in:
Lincoln Stein
2023-05-28 19:46:09 -04:00
committed by GitHub
53 changed files with 1985 additions and 41 deletions

View File

@ -1,5 +1,10 @@
import { forEach, size } from 'lodash-es';
import { ImageField, LatentsField, ConditioningField } from 'services/api';
import {
ImageField,
LatentsField,
ConditioningField,
ControlField,
} from 'services/api';
const OBJECT_TYPESTRING = '[object Object]';
const STRING_TYPESTRING = '[object String]';
@ -98,6 +103,24 @@ const parseConditioningField = (
};
};
const parseControlField = (controlField: unknown): ControlField | undefined => {
// Must be an object
if (!isObject(controlField)) {
return;
}
// A ControlField must have a `control`
if (!('control' in controlField)) {
return;
}
// console.log(typeof controlField.control);
// Build a valid ControlField
return {
control: controlField.control,
};
};
type NodeMetadata = {
[key: string]:
| string
@ -105,7 +128,8 @@ type NodeMetadata = {
| boolean
| ImageField
| LatentsField
| ConditioningField;
| ConditioningField
| ControlField;
};
type InvokeAIMetadata = {
@ -131,7 +155,7 @@ export const parseNodeMetadata = (
return;
}
// the only valid object types are ImageField, LatentsField and ConditioningField
// the only valid object types are ImageField, LatentsField, ConditioningField, ControlField
if (isObject(nodeItem)) {
if ('image_name' in nodeItem || 'image_type' in nodeItem) {
const imageField = parseImageField(nodeItem);
@ -156,6 +180,14 @@ export const parseNodeMetadata = (
}
return;
}
if ('control' in nodeItem) {
const controlField = parseControlField(nodeItem);
if (controlField) {
parsed[nodeKey] = controlField;
}
return;
}
}
// otherwise we accept any string, number or boolean

View File

@ -7,6 +7,7 @@ import EnumInputFieldComponent from './fields/EnumInputFieldComponent';
import ImageInputFieldComponent from './fields/ImageInputFieldComponent';
import LatentsInputFieldComponent from './fields/LatentsInputFieldComponent';
import ConditioningInputFieldComponent from './fields/ConditioningInputFieldComponent';
import ControlInputFieldComponent from './fields/ControlInputFieldComponent';
import ModelInputFieldComponent from './fields/ModelInputFieldComponent';
import NumberInputFieldComponent from './fields/NumberInputFieldComponent';
import StringInputFieldComponent from './fields/StringInputFieldComponent';
@ -97,6 +98,16 @@ const InputFieldComponent = (props: InputFieldComponentProps) => {
);
}
if (type === 'control' && template.type === 'control') {
return (
<ControlInputFieldComponent
nodeId={nodeId}
field={field}
template={template}
/>
);
}
if (type === 'model' && template.type === 'model') {
return (
<ModelInputFieldComponent

View File

@ -0,0 +1,16 @@
import {
ControlInputFieldTemplate,
ControlInputFieldValue,
} from 'features/nodes/types/types';
import { memo } from 'react';
import { FieldComponentProps } from './types';
const ControlInputFieldComponent = (
props: FieldComponentProps<ControlInputFieldValue, ControlInputFieldTemplate>
) => {
const { nodeId, field } = props;
return null;
};
export default memo(ControlInputFieldComponent);

View File

@ -4,6 +4,7 @@ export const HANDLE_TOOLTIP_OPEN_DELAY = 500;
export const FIELD_TYPE_MAP: Record<string, FieldType> = {
integer: 'integer',
float: 'float',
number: 'float',
string: 'string',
boolean: 'boolean',
@ -15,6 +16,8 @@ export const FIELD_TYPE_MAP: Record<string, FieldType> = {
array: 'array',
item: 'item',
ColorField: 'color',
ControlField: 'control',
control: 'control',
};
const COLOR_TOKEN_VALUE = 500;
@ -22,6 +25,9 @@ const COLOR_TOKEN_VALUE = 500;
const getColorTokenCssVariable = (color: string) =>
`var(--invokeai-colors-${color}-${COLOR_TOKEN_VALUE})`;
// @ts-ignore
// @ts-ignore
// @ts-ignore
export const FIELDS: Record<FieldType, FieldUIConfig> = {
integer: {
color: 'red',
@ -71,6 +77,12 @@ export const FIELDS: Record<FieldType, FieldUIConfig> = {
title: 'Conditioning',
description: 'Conditioning may be passed between nodes.',
},
control: {
color: 'cyan',
colorCssVar: getColorTokenCssVariable('cyan'), // TODO: no free color left
title: 'Control',
description: 'Control info passed between nodes.',
},
model: {
color: 'teal',
colorCssVar: getColorTokenCssVariable('teal'),

View File

@ -61,6 +61,7 @@ export type FieldType =
| 'image'
| 'latents'
| 'conditioning'
| 'control'
| 'model'
| 'array'
| 'item'
@ -82,6 +83,7 @@ export type InputFieldValue =
| ImageInputFieldValue
| LatentsInputFieldValue
| ConditioningInputFieldValue
| ControlInputFieldValue
| EnumInputFieldValue
| ModelInputFieldValue
| ArrayInputFieldValue
@ -102,6 +104,7 @@ export type InputFieldTemplate =
| ImageInputFieldTemplate
| LatentsInputFieldTemplate
| ConditioningInputFieldTemplate
| ControlInputFieldTemplate
| EnumInputFieldTemplate
| ModelInputFieldTemplate
| ArrayInputFieldTemplate
@ -177,6 +180,11 @@ export type LatentsInputFieldValue = FieldValueBase & {
export type ConditioningInputFieldValue = FieldValueBase & {
type: 'conditioning';
value?: string;
};
export type ControlInputFieldValue = FieldValueBase & {
type: 'control';
value?: undefined;
};
@ -262,6 +270,11 @@ export type ConditioningInputFieldTemplate = InputFieldTemplateBase & {
type: 'conditioning';
};
export type ControlInputFieldTemplate = InputFieldTemplateBase & {
default: undefined;
type: 'control';
};
export type EnumInputFieldTemplate = InputFieldTemplateBase & {
default: string | number;
type: 'enum';

View File

@ -10,6 +10,7 @@ import {
IntegerInputFieldTemplate,
LatentsInputFieldTemplate,
ConditioningInputFieldTemplate,
ControlInputFieldTemplate,
StringInputFieldTemplate,
ModelInputFieldTemplate,
ArrayInputFieldTemplate,
@ -215,6 +216,21 @@ const buildConditioningInputFieldTemplate = ({
return template;
};
const buildControlInputFieldTemplate = ({
schemaObject,
baseField,
}: BuildInputFieldArg): ControlInputFieldTemplate => {
const template: ControlInputFieldTemplate = {
...baseField,
type: 'control',
inputRequirement: 'always',
inputKind: 'connection',
default: schemaObject.default ?? undefined,
};
return template;
};
const buildEnumInputFieldTemplate = ({
schemaObject,
baseField,
@ -286,9 +302,20 @@ export const getFieldType = (
if (typeHints && name in typeHints) {
rawFieldType = typeHints[name];
} else if (!schemaObject.type) {
rawFieldType = refObjectToFieldType(
schemaObject.allOf![0] as OpenAPIV3.ReferenceObject
);
// if schemaObject has no type, then it should have one of allOf, anyOf, oneOf
if (schemaObject.allOf) {
rawFieldType = refObjectToFieldType(
schemaObject.allOf![0] as OpenAPIV3.ReferenceObject
);
} else if (schemaObject.anyOf) {
rawFieldType = refObjectToFieldType(
schemaObject.anyOf![0] as OpenAPIV3.ReferenceObject
);
} else if (schemaObject.oneOf) {
rawFieldType = refObjectToFieldType(
schemaObject.oneOf![0] as OpenAPIV3.ReferenceObject
);
}
} else if (schemaObject.enum) {
rawFieldType = 'enum';
} else if (schemaObject.type) {
@ -331,6 +358,9 @@ export const buildInputFieldTemplate = (
if (['conditioning'].includes(fieldType)) {
return buildConditioningInputFieldTemplate({ schemaObject, baseField });
}
if (['control'].includes(fieldType)) {
return buildControlInputFieldTemplate({ schemaObject, baseField });
}
if (['model'].includes(fieldType)) {
return buildModelInputFieldTemplate({ schemaObject, baseField });
}

View File

@ -52,6 +52,10 @@ export const buildInputFieldValue = (
fieldValue.value = undefined;
}
if (template.type === 'control') {
fieldValue.value = undefined;
}
if (template.type === 'model') {
fieldValue.value = undefined;
}

View File

@ -0,0 +1,29 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ImageField } from './ImageField';
/**
* Canny edge detection for ControlNet
*/
export type CannyImageProcessorInvocation = {
/**
* The id of this node. Must be unique among all nodes.
*/
id: string;
type?: 'canny_image_processor';
/**
* image to process
*/
image?: ImageField;
/**
* low threshold of Canny pixel gradient
*/
low_threshold?: number;
/**
* high threshold of Canny pixel gradient
*/
high_threshold?: number;
};

View File

@ -0,0 +1,41 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ImageField } from './ImageField';
/**
* Applies content shuffle processing to image
*/
export type ContentShuffleImageProcessorInvocation = {
/**
* The id of this node. Must be unique among all nodes.
*/
id: string;
type?: 'content_shuffle_image_processor';
/**
* image to process
*/
image?: ImageField;
/**
* pixel resolution for edge detection
*/
detect_resolution?: number;
/**
* pixel resolution for output image
*/
image_resolution?: number;
/**
* content shuffle h parameter
*/
'h'?: number;
/**
* content shuffle w parameter
*/
'w'?: number;
/**
* cont
*/
'f'?: number;
};

View File

@ -0,0 +1,29 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ImageField } from './ImageField';
export type ControlField = {
/**
* processed image
*/
image: ImageField;
/**
* control model used
*/
control_model: string;
/**
* weight given to controlnet
*/
control_weight: number;
/**
* % of total steps at which controlnet is first applied
*/
begin_step_percent: number;
/**
* % of total steps at which controlnet is last applied
*/
end_step_percent: number;
};

View File

@ -0,0 +1,37 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ImageField } from './ImageField';
/**
* Collects ControlNet info to pass to other nodes
*/
export type ControlNetInvocation = {
/**
* The id of this node. Must be unique among all nodes.
*/
id: string;
type?: 'controlnet';
/**
* image to process
*/
image?: ImageField;
/**
* control model used
*/
control_model?: 'lllyasviel/sd-controlnet-canny' | 'lllyasviel/sd-controlnet-depth' | 'lllyasviel/sd-controlnet-hed' | 'lllyasviel/sd-controlnet-seg' | 'lllyasviel/sd-controlnet-openpose' | 'lllyasviel/sd-controlnet-scribble' | 'lllyasviel/sd-controlnet-normal' | 'lllyasviel/sd-controlnet-mlsd' | 'lllyasviel/control_v11p_sd15_canny' | 'lllyasviel/control_v11p_sd15_openpose' | 'lllyasviel/control_v11p_sd15_seg' | 'lllyasviel/control_v11f1p_sd15_depth' | 'lllyasviel/control_v11p_sd15_normalbae' | 'lllyasviel/control_v11p_sd15_scribble' | 'lllyasviel/control_v11p_sd15_mlsd' | 'lllyasviel/control_v11p_sd15_softedge' | 'lllyasviel/control_v11p_sd15s2_lineart_anime' | 'lllyasviel/control_v11p_sd15_lineart' | 'lllyasviel/control_v11p_sd15_inpaint' | 'lllyasviel/control_v11e_sd15_shuffle' | 'lllyasviel/control_v11e_sd15_ip2p' | 'lllyasviel/control_v11f1e_sd15_tile' | 'thibaud/controlnet-sd21-openpose-diffusers' | 'thibaud/controlnet-sd21-canny-diffusers' | 'thibaud/controlnet-sd21-depth-diffusers' | 'thibaud/controlnet-sd21-scribble-diffusers' | 'thibaud/controlnet-sd21-hed-diffusers' | 'thibaud/controlnet-sd21-zoedepth-diffusers' | 'thibaud/controlnet-sd21-color-diffusers' | 'thibaud/controlnet-sd21-openposev2-diffusers' | 'thibaud/controlnet-sd21-lineart-diffusers' | 'thibaud/controlnet-sd21-normalbae-diffusers' | 'thibaud/controlnet-sd21-ade20k-diffusers' | 'CrucibleAI/ControlNetMediaPipeFace';
/**
* weight given to controlnet
*/
control_weight?: number;
/**
* % of total steps at which controlnet is first applied
*/
begin_step_percent?: number;
/**
* % of total steps at which controlnet is last applied
*/
end_step_percent?: number;
};

View File

@ -0,0 +1,17 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ControlField } from './ControlField';
/**
* node output for ControlNet info
*/
export type ControlOutput = {
type?: 'control_output';
/**
* The control info dict
*/
control?: ControlField;
};

View File

@ -0,0 +1,33 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ImageField } from './ImageField';
/**
* Applies HED edge detection to image
*/
export type HedImageprocessorInvocation = {
/**
* The id of this node. Must be unique among all nodes.
*/
id: string;
type?: 'hed_image_processor';
/**
* image to process
*/
image?: ImageField;
/**
* pixel resolution for edge detection
*/
detect_resolution?: number;
/**
* pixel resolution for output image
*/
image_resolution?: number;
/**
* whether to use scribble mode
*/
scribble?: boolean;
};

View File

@ -0,0 +1,21 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ImageField } from './ImageField';
/**
* Base class for invocations that preprocess images for ControlNet
*/
export type ImageProcessorInvocation = {
/**
* The id of this node. Must be unique among all nodes.
*/
id: string;
type?: 'image_processor';
/**
* image to process
*/
image?: ImageField;
};

View File

@ -49,6 +49,18 @@ export type ImageToImageInvocation = {
* The model to use (currently ignored)
*/
model?: string;
/**
* Whether or not to produce progress images during generation
*/
progress_images?: boolean;
/**
* The control model to use
*/
control_model?: string;
/**
* The processed control image
*/
control_image?: ImageField;
/**
* The input image
*/

View File

@ -50,6 +50,18 @@ export type InpaintInvocation = {
* The model to use (currently ignored)
*/
model?: string;
/**
* Whether or not to produce progress images during generation
*/
progress_images?: boolean;
/**
* The control model to use
*/
control_model?: string;
/**
* The processed control image
*/
control_image?: ImageField;
/**
* The input image
*/

View File

@ -0,0 +1,29 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ImageField } from './ImageField';
/**
* Applies line art anime processing to image
*/
export type LineartAnimeImageProcessorInvocation = {
/**
* The id of this node. Must be unique among all nodes.
*/
id: string;
type?: 'lineart_anime_image_processor';
/**
* image to process
*/
image?: ImageField;
/**
* pixel resolution for edge detection
*/
detect_resolution?: number;
/**
* pixel resolution for output image
*/
image_resolution?: number;
};

View File

@ -0,0 +1,33 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ImageField } from './ImageField';
/**
* Applies line art processing to image
*/
export type LineartImageProcessorInvocation = {
/**
* The id of this node. Must be unique among all nodes.
*/
id: string;
type?: 'lineart_image_processor';
/**
* image to process
*/
image?: ImageField;
/**
* pixel resolution for edge detection
*/
detect_resolution?: number;
/**
* pixel resolution for output image
*/
image_resolution?: number;
/**
* whether to use coarse mode
*/
coarse?: boolean;
};

View File

@ -0,0 +1,29 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ImageField } from './ImageField';
/**
* Applies Midas depth processing to image
*/
export type MidasDepthImageProcessorInvocation = {
/**
* The id of this node. Must be unique among all nodes.
*/
id: string;
type?: 'midas_depth_image_processor';
/**
* image to process
*/
image?: ImageField;
/**
* Midas parameter a = amult * PI
*/
a_mult?: number;
/**
* Midas parameter bg_th
*/
bg_th?: number;
};

View File

@ -0,0 +1,37 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ImageField } from './ImageField';
/**
* Applies MLSD processing to image
*/
export type MlsdImageProcessorInvocation = {
/**
* The id of this node. Must be unique among all nodes.
*/
id: string;
type?: 'mlsd_image_processor';
/**
* image to process
*/
image?: ImageField;
/**
* pixel resolution for edge detection
*/
detect_resolution?: number;
/**
* pixel resolution for output image
*/
image_resolution?: number;
/**
* MLSD parameter thr_v
*/
thr_v?: number;
/**
* MLSD parameter thr_d
*/
thr_d?: number;
};

View File

@ -0,0 +1,29 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ImageField } from './ImageField';
/**
* Applies NormalBae processing to image
*/
export type NormalbaeImageProcessorInvocation = {
/**
* The id of this node. Must be unique among all nodes.
*/
id: string;
type?: 'normalbae_image_processor';
/**
* image to process
*/
image?: ImageField;
/**
* pixel resolution for edge detection
*/
detect_resolution?: number;
/**
* pixel resolution for output image
*/
image_resolution?: number;
};

View File

@ -0,0 +1,33 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ImageField } from './ImageField';
/**
* Applies Openpose processing to image
*/
export type OpenposeImageProcessorInvocation = {
/**
* The id of this node. Must be unique among all nodes.
*/
id: string;
type?: 'openpose_image_processor';
/**
* image to process
*/
image?: ImageField;
/**
* whether to use hands and face mode
*/
hand_and_face?: boolean;
/**
* pixel resolution for edge detection
*/
detect_resolution?: number;
/**
* pixel resolution for output image
*/
image_resolution?: number;
};

View File

@ -0,0 +1,37 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ImageField } from './ImageField';
/**
* Applies PIDI processing to image
*/
export type PidiImageProcessorInvocation = {
/**
* The id of this node. Must be unique among all nodes.
*/
id: string;
type?: 'pidi_image_processor';
/**
* image to process
*/
image?: ImageField;
/**
* pixel resolution for edge detection
*/
detect_resolution?: number;
/**
* pixel resolution for output image
*/
image_resolution?: number;
/**
* whether to use safe mode
*/
safe?: boolean;
/**
* whether to use scribble mode
*/
scribble?: boolean;
};

View File

@ -2,6 +2,8 @@
/* tslint:disable */
/* eslint-disable */
import type { ImageField } from './ImageField';
/**
* Generates an image using text2img.
*/
@ -47,5 +49,17 @@ export type TextToImageInvocation = {
* The model to use (currently ignored)
*/
model?: string;
/**
* Whether or not to produce progress images during generation
*/
progress_images?: boolean;
/**
* The control model to use
*/
control_model?: string;
/**
* The processed control image
*/
control_image?: ImageField;
};

View File

@ -0,0 +1,31 @@
/* 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

@ -0,0 +1,43 @@
/* 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

@ -0,0 +1,37 @@
/* 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

@ -0,0 +1,41 @@
/* 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

@ -0,0 +1,28 @@
/* 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

@ -0,0 +1,35 @@
/* 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

@ -0,0 +1,23 @@
/* 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

@ -0,0 +1,31 @@
/* 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

@ -0,0 +1,35 @@
/* 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

@ -0,0 +1,31 @@
/* 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

@ -0,0 +1,39 @@
/* 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

@ -0,0 +1,31 @@
/* 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

@ -0,0 +1,35 @@
/* 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

@ -0,0 +1,39 @@
/* 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

@ -0,0 +1,16 @@
/* 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;