mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
Merge branch 'main' of github.com:invoke-ai/InvokeAI into feat/controlnet-control-modes
Only "real" conflicts were in:
invokeai/frontend/web/src/features/controlNet/components/ControlNet.tsx
invokeai/frontend/web/src/features/controlNet/store/controlNetSlice.ts
This commit is contained in:
33
invokeai/frontend/web/src/services/api/client.ts
Normal file
33
invokeai/frontend/web/src/services/api/client.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { atom, computed } from 'nanostores';
|
||||
import createClient from 'openapi-fetch';
|
||||
import { paths } from 'services/api/schema';
|
||||
|
||||
/**
|
||||
* We use nanostores to store the token and base url for very simple reactivity
|
||||
*/
|
||||
|
||||
/**
|
||||
* The user's auth token.
|
||||
*/
|
||||
export const $authToken = atom<string | undefined>();
|
||||
|
||||
/**
|
||||
* The OpenAPI base url.
|
||||
*/
|
||||
export const $baseUrl = atom<string | undefined>();
|
||||
|
||||
/**
|
||||
* Autogenerated, type-safe fetch client for the API. Used when RTK Query is not an option.
|
||||
* Dynamically updates when the token or base url changes.
|
||||
* Use `$client.get()` to get the client.
|
||||
*
|
||||
* @example
|
||||
* const { get, post, del } = $client.get();
|
||||
*/
|
||||
export const $client = computed([$authToken, $baseUrl], (authToken, baseUrl) =>
|
||||
createClient<paths>({
|
||||
headers: authToken ? { Authorization: `Bearer ${authToken}` } : {},
|
||||
// do not include `api/v1` in the base url for this client
|
||||
baseUrl: `${baseUrl ?? ''}`,
|
||||
})
|
||||
);
|
||||
@@ -1,24 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ApiRequestOptions } from './ApiRequestOptions';
|
||||
import type { ApiResult } from './ApiResult';
|
||||
|
||||
export class ApiError extends Error {
|
||||
public readonly url: string;
|
||||
public readonly status: number;
|
||||
public readonly statusText: string;
|
||||
public readonly body: any;
|
||||
public readonly request: ApiRequestOptions;
|
||||
|
||||
constructor(request: ApiRequestOptions, response: ApiResult, message: string) {
|
||||
super(message);
|
||||
|
||||
this.name = 'ApiError';
|
||||
this.url = response.url;
|
||||
this.status = response.status;
|
||||
this.statusText = response.statusText;
|
||||
this.body = response.body;
|
||||
this.request = request;
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ApiRequestOptions = {
|
||||
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
|
||||
readonly url: string;
|
||||
readonly path?: Record<string, any>;
|
||||
readonly cookies?: Record<string, any>;
|
||||
readonly headers?: Record<string, any>;
|
||||
readonly query?: Record<string, any>;
|
||||
readonly formData?: Record<string, any>;
|
||||
readonly body?: any;
|
||||
readonly mediaType?: string;
|
||||
readonly responseHeader?: string;
|
||||
readonly errors?: Record<number, string>;
|
||||
};
|
||||
@@ -1,10 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ApiResult = {
|
||||
readonly url: string;
|
||||
readonly ok: boolean;
|
||||
readonly status: number;
|
||||
readonly statusText: string;
|
||||
readonly body: any;
|
||||
};
|
||||
@@ -1,130 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export class CancelError extends Error {
|
||||
|
||||
constructor(message: string) {
|
||||
super(message);
|
||||
this.name = 'CancelError';
|
||||
}
|
||||
|
||||
public get isCancelled(): boolean {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export interface OnCancel {
|
||||
readonly isResolved: boolean;
|
||||
readonly isRejected: boolean;
|
||||
readonly isCancelled: boolean;
|
||||
|
||||
(cancelHandler: () => void): void;
|
||||
}
|
||||
|
||||
export class CancelablePromise<T> implements Promise<T> {
|
||||
#isResolved: boolean;
|
||||
#isRejected: boolean;
|
||||
#isCancelled: boolean;
|
||||
readonly #cancelHandlers: (() => void)[];
|
||||
readonly #promise: Promise<T>;
|
||||
#resolve?: (value: T | PromiseLike<T>) => void;
|
||||
#reject?: (reason?: any) => void;
|
||||
|
||||
constructor(
|
||||
executor: (
|
||||
resolve: (value: T | PromiseLike<T>) => void,
|
||||
reject: (reason?: any) => void,
|
||||
onCancel: OnCancel
|
||||
) => void
|
||||
) {
|
||||
this.#isResolved = false;
|
||||
this.#isRejected = false;
|
||||
this.#isCancelled = false;
|
||||
this.#cancelHandlers = [];
|
||||
this.#promise = new Promise<T>((resolve, reject) => {
|
||||
this.#resolve = resolve;
|
||||
this.#reject = reject;
|
||||
|
||||
const onResolve = (value: T | PromiseLike<T>): void => {
|
||||
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
||||
return;
|
||||
}
|
||||
this.#isResolved = true;
|
||||
this.#resolve?.(value);
|
||||
};
|
||||
|
||||
const onReject = (reason?: any): void => {
|
||||
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
||||
return;
|
||||
}
|
||||
this.#isRejected = true;
|
||||
this.#reject?.(reason);
|
||||
};
|
||||
|
||||
const onCancel = (cancelHandler: () => void): void => {
|
||||
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
||||
return;
|
||||
}
|
||||
this.#cancelHandlers.push(cancelHandler);
|
||||
};
|
||||
|
||||
Object.defineProperty(onCancel, 'isResolved', {
|
||||
get: (): boolean => this.#isResolved,
|
||||
});
|
||||
|
||||
Object.defineProperty(onCancel, 'isRejected', {
|
||||
get: (): boolean => this.#isRejected,
|
||||
});
|
||||
|
||||
Object.defineProperty(onCancel, 'isCancelled', {
|
||||
get: (): boolean => this.#isCancelled,
|
||||
});
|
||||
|
||||
return executor(onResolve, onReject, onCancel as OnCancel);
|
||||
});
|
||||
}
|
||||
|
||||
get [Symbol.toStringTag]() {
|
||||
return "Cancellable Promise";
|
||||
}
|
||||
|
||||
public then<TResult1 = T, TResult2 = never>(
|
||||
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
|
||||
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null
|
||||
): Promise<TResult1 | TResult2> {
|
||||
return this.#promise.then(onFulfilled, onRejected);
|
||||
}
|
||||
|
||||
public catch<TResult = never>(
|
||||
onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null
|
||||
): Promise<T | TResult> {
|
||||
return this.#promise.catch(onRejected);
|
||||
}
|
||||
|
||||
public finally(onFinally?: (() => void) | null): Promise<T> {
|
||||
return this.#promise.finally(onFinally);
|
||||
}
|
||||
|
||||
public cancel(): void {
|
||||
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
||||
return;
|
||||
}
|
||||
this.#isCancelled = true;
|
||||
if (this.#cancelHandlers.length) {
|
||||
try {
|
||||
for (const cancelHandler of this.#cancelHandlers) {
|
||||
cancelHandler();
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('Cancellation threw an error', error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.#cancelHandlers.length = 0;
|
||||
this.#reject?.(new CancelError('Request aborted'));
|
||||
}
|
||||
|
||||
public get isCancelled(): boolean {
|
||||
return this.#isCancelled;
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ApiRequestOptions } from './ApiRequestOptions';
|
||||
|
||||
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
||||
type Headers = Record<string, string>;
|
||||
|
||||
export type OpenAPIConfig = {
|
||||
BASE: string;
|
||||
VERSION: string;
|
||||
WITH_CREDENTIALS: boolean;
|
||||
CREDENTIALS: 'include' | 'omit' | 'same-origin';
|
||||
TOKEN?: string | Resolver<string>;
|
||||
USERNAME?: string | Resolver<string>;
|
||||
PASSWORD?: string | Resolver<string>;
|
||||
HEADERS?: Headers | Resolver<Headers>;
|
||||
ENCODE_PATH?: (path: string) => string;
|
||||
};
|
||||
|
||||
export const OpenAPI: OpenAPIConfig = {
|
||||
BASE: '',
|
||||
VERSION: '1.0.0',
|
||||
WITH_CREDENTIALS: false,
|
||||
CREDENTIALS: 'include',
|
||||
TOKEN: undefined,
|
||||
USERNAME: undefined,
|
||||
PASSWORD: undefined,
|
||||
HEADERS: undefined,
|
||||
ENCODE_PATH: undefined,
|
||||
};
|
||||
@@ -1,353 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* DO NOT DELETE EVEN THOUGH IT IS NOT USED!
|
||||
*
|
||||
* Custom `request.ts` file for OpenAPI code generator.
|
||||
*
|
||||
* Patches the request logic in such a way that we can extract headers from requests.
|
||||
*
|
||||
* Copied from https://github.com/ferdikoomen/openapi-typescript-codegen/issues/829#issuecomment-1228224477
|
||||
*
|
||||
* This file should be excluded in `tsconfig.json` and ignored by prettier/eslint!
|
||||
*/
|
||||
|
||||
import axios from 'axios';
|
||||
import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
|
||||
import FormData from 'form-data';
|
||||
|
||||
import { ApiError } from './ApiError';
|
||||
import type { ApiRequestOptions } from './ApiRequestOptions';
|
||||
import type { ApiResult } from './ApiResult';
|
||||
import { CancelablePromise } from './CancelablePromise';
|
||||
import type { OnCancel } from './CancelablePromise';
|
||||
import type { OpenAPIConfig } from './OpenAPI';
|
||||
|
||||
export const HEADERS = Symbol('HEADERS');
|
||||
|
||||
const isDefined = <T>(
|
||||
value: T | null | undefined
|
||||
): value is Exclude<T, null | undefined> => {
|
||||
return value !== undefined && value !== null;
|
||||
};
|
||||
|
||||
const isString = (value: any): value is string => {
|
||||
return typeof value === 'string';
|
||||
};
|
||||
|
||||
const isStringWithValue = (value: any): value is string => {
|
||||
return isString(value) && value !== '';
|
||||
};
|
||||
|
||||
const isBlob = (value: any): value is Blob => {
|
||||
return (
|
||||
typeof value === 'object' &&
|
||||
typeof value.type === 'string' &&
|
||||
typeof value.stream === 'function' &&
|
||||
typeof value.arrayBuffer === 'function' &&
|
||||
typeof value.constructor === 'function' &&
|
||||
typeof value.constructor.name === 'string' &&
|
||||
/^(Blob|File)$/.test(value.constructor.name) &&
|
||||
/^(Blob|File)$/.test(value[Symbol.toStringTag])
|
||||
);
|
||||
};
|
||||
|
||||
const isFormData = (value: any): value is FormData => {
|
||||
return value instanceof FormData;
|
||||
};
|
||||
|
||||
const isSuccess = (status: number): boolean => {
|
||||
return status >= 200 && status < 300;
|
||||
};
|
||||
|
||||
const base64 = (str: string): string => {
|
||||
try {
|
||||
return btoa(str);
|
||||
} catch (err) {
|
||||
// @ts-ignore
|
||||
return Buffer.from(str).toString('base64');
|
||||
}
|
||||
};
|
||||
|
||||
const getQueryString = (params: Record<string, any>): string => {
|
||||
const qs: string[] = [];
|
||||
|
||||
const append = (key: string, value: any) => {
|
||||
qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
|
||||
};
|
||||
|
||||
const process = (key: string, value: any) => {
|
||||
if (isDefined(value)) {
|
||||
if (Array.isArray(value)) {
|
||||
value.forEach((v) => {
|
||||
process(key, v);
|
||||
});
|
||||
} else if (typeof value === 'object') {
|
||||
Object.entries(value).forEach(([k, v]) => {
|
||||
process(`${key}[${k}]`, v);
|
||||
});
|
||||
} else {
|
||||
append(key, value);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Object.entries(params).forEach(([key, value]) => {
|
||||
process(key, value);
|
||||
});
|
||||
|
||||
if (qs.length > 0) {
|
||||
return `?${qs.join('&')}`;
|
||||
}
|
||||
|
||||
return '';
|
||||
};
|
||||
|
||||
const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {
|
||||
const encoder = config.ENCODE_PATH || encodeURI;
|
||||
|
||||
const path = options.url
|
||||
.replace('{api-version}', config.VERSION)
|
||||
.replace(/{(.*?)}/g, (substring: string, group: string) => {
|
||||
if (options.path?.hasOwnProperty(group)) {
|
||||
return encoder(String(options.path[group]));
|
||||
}
|
||||
return substring;
|
||||
});
|
||||
|
||||
const url = `${config.BASE}${path}`;
|
||||
if (options.query) {
|
||||
return `${url}${getQueryString(options.query)}`;
|
||||
}
|
||||
return url;
|
||||
};
|
||||
|
||||
const getFormData = (options: ApiRequestOptions): FormData | undefined => {
|
||||
if (options.formData) {
|
||||
const formData = new FormData();
|
||||
|
||||
const process = (key: string, value: any) => {
|
||||
if (isString(value) || isBlob(value)) {
|
||||
formData.append(key, value);
|
||||
} else {
|
||||
formData.append(key, JSON.stringify(value));
|
||||
}
|
||||
};
|
||||
|
||||
Object.entries(options.formData)
|
||||
.filter(([_, value]) => isDefined(value))
|
||||
.forEach(([key, value]) => {
|
||||
if (Array.isArray(value)) {
|
||||
value.forEach((v) => process(key, v));
|
||||
} else {
|
||||
process(key, value);
|
||||
}
|
||||
});
|
||||
|
||||
return formData;
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
||||
|
||||
const resolve = async <T>(
|
||||
options: ApiRequestOptions,
|
||||
resolver?: T | Resolver<T>
|
||||
): Promise<T | undefined> => {
|
||||
if (typeof resolver === 'function') {
|
||||
return (resolver as Resolver<T>)(options);
|
||||
}
|
||||
return resolver;
|
||||
};
|
||||
|
||||
const getHeaders = async (
|
||||
config: OpenAPIConfig,
|
||||
options: ApiRequestOptions,
|
||||
formData?: FormData
|
||||
): Promise<Record<string, string>> => {
|
||||
const token = await resolve(options, config.TOKEN);
|
||||
const username = await resolve(options, config.USERNAME);
|
||||
const password = await resolve(options, config.PASSWORD);
|
||||
const additionalHeaders = await resolve(options, config.HEADERS);
|
||||
const formHeaders =
|
||||
(typeof formData?.getHeaders === 'function' && formData?.getHeaders()) ||
|
||||
{};
|
||||
|
||||
const headers = Object.entries({
|
||||
Accept: 'application/json',
|
||||
...additionalHeaders,
|
||||
...options.headers,
|
||||
...formHeaders,
|
||||
})
|
||||
.filter(([_, value]) => isDefined(value))
|
||||
.reduce(
|
||||
(headers, [key, value]) => ({
|
||||
...headers,
|
||||
[key]: String(value),
|
||||
}),
|
||||
{} as Record<string, string>
|
||||
);
|
||||
|
||||
if (isStringWithValue(token)) {
|
||||
headers['Authorization'] = `Bearer ${token}`;
|
||||
}
|
||||
|
||||
if (isStringWithValue(username) && isStringWithValue(password)) {
|
||||
const credentials = base64(`${username}:${password}`);
|
||||
headers['Authorization'] = `Basic ${credentials}`;
|
||||
}
|
||||
|
||||
if (options.body) {
|
||||
if (options.mediaType) {
|
||||
headers['Content-Type'] = options.mediaType;
|
||||
} else if (isBlob(options.body)) {
|
||||
headers['Content-Type'] = options.body.type || 'application/octet-stream';
|
||||
} else if (isString(options.body)) {
|
||||
headers['Content-Type'] = 'text/plain';
|
||||
} else if (!isFormData(options.body)) {
|
||||
headers['Content-Type'] = 'application/json';
|
||||
}
|
||||
}
|
||||
|
||||
return headers;
|
||||
};
|
||||
|
||||
const getRequestBody = (options: ApiRequestOptions): any => {
|
||||
if (options.body) {
|
||||
return options.body;
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
const sendRequest = async <T>(
|
||||
config: OpenAPIConfig,
|
||||
options: ApiRequestOptions,
|
||||
url: string,
|
||||
body: any,
|
||||
formData: FormData | undefined,
|
||||
headers: Record<string, string>,
|
||||
onCancel: OnCancel
|
||||
): Promise<AxiosResponse<T>> => {
|
||||
const source = axios.CancelToken.source();
|
||||
|
||||
const requestConfig: AxiosRequestConfig = {
|
||||
url,
|
||||
headers,
|
||||
data: body ?? formData,
|
||||
method: options.method,
|
||||
withCredentials: config.WITH_CREDENTIALS,
|
||||
cancelToken: source.token,
|
||||
};
|
||||
|
||||
onCancel(() => source.cancel('The user aborted a request.'));
|
||||
|
||||
try {
|
||||
return await axios.request(requestConfig);
|
||||
} catch (error) {
|
||||
const axiosError = error as AxiosError<T>;
|
||||
if (axiosError.response) {
|
||||
return axiosError.response;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
const getResponseHeader = (
|
||||
response: AxiosResponse<any>,
|
||||
responseHeader?: string
|
||||
): string | undefined => {
|
||||
if (responseHeader) {
|
||||
const content = response.headers[responseHeader];
|
||||
if (isString(content)) {
|
||||
return content;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
const getResponseBody = (response: AxiosResponse<any>): any => {
|
||||
if (response.status !== 204) {
|
||||
return response.data;
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
const catchErrorCodes = (
|
||||
options: ApiRequestOptions,
|
||||
result: ApiResult
|
||||
): void => {
|
||||
const errors: Record<number, string> = {
|
||||
400: 'Bad Request',
|
||||
401: 'Unauthorized',
|
||||
403: 'Forbidden',
|
||||
404: 'Not Found',
|
||||
500: 'Internal Server Error',
|
||||
502: 'Bad Gateway',
|
||||
503: 'Service Unavailable',
|
||||
...options.errors,
|
||||
};
|
||||
|
||||
const error = errors[result.status];
|
||||
if (error) {
|
||||
throw new ApiError(options, result, error);
|
||||
}
|
||||
|
||||
if (!result.ok) {
|
||||
throw new ApiError(options, result, 'Generic Error');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Request method
|
||||
* @param config The OpenAPI configuration object
|
||||
* @param options The request options from the service
|
||||
* @returns CancelablePromise<T>
|
||||
* @throws ApiError
|
||||
*/
|
||||
export const request = <T>(
|
||||
config: OpenAPIConfig,
|
||||
options: ApiRequestOptions
|
||||
): CancelablePromise<T> => {
|
||||
return new CancelablePromise(async (resolve, reject, onCancel) => {
|
||||
try {
|
||||
const url = getUrl(config, options);
|
||||
const formData = getFormData(options);
|
||||
const body = getRequestBody(options);
|
||||
const headers = await getHeaders(config, options, formData);
|
||||
|
||||
if (!onCancel.isCancelled) {
|
||||
const response = await sendRequest<T>(
|
||||
config,
|
||||
options,
|
||||
url,
|
||||
body,
|
||||
formData,
|
||||
headers,
|
||||
onCancel
|
||||
);
|
||||
const responseBody = getResponseBody(response);
|
||||
const responseHeader = getResponseHeader(
|
||||
response,
|
||||
options.responseHeader
|
||||
);
|
||||
|
||||
const result: ApiResult = {
|
||||
url,
|
||||
ok: isSuccess(response.status),
|
||||
status: response.status,
|
||||
statusText: response.statusText,
|
||||
body: responseHeader ?? responseBody,
|
||||
};
|
||||
|
||||
catchErrorCodes(options, result);
|
||||
|
||||
resolve({ ...result.body, [HEADERS]: response.headers });
|
||||
}
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,66 @@
|
||||
import { OffsetPaginatedResults_ImageDTO_ } from 'services/api/types';
|
||||
import { api } from '..';
|
||||
import { paths } from '../schema';
|
||||
|
||||
type ListBoardImagesArg =
|
||||
paths['/api/v1/board_images/{board_id}']['get']['parameters']['path'] &
|
||||
paths['/api/v1/board_images/{board_id}']['get']['parameters']['query'];
|
||||
|
||||
type AddImageToBoardArg =
|
||||
paths['/api/v1/board_images/']['post']['requestBody']['content']['application/json'];
|
||||
|
||||
type RemoveImageFromBoardArg =
|
||||
paths['/api/v1/board_images/']['delete']['requestBody']['content']['application/json'];
|
||||
|
||||
export const boardImagesApi = api.injectEndpoints({
|
||||
endpoints: (build) => ({
|
||||
/**
|
||||
* Board Images Queries
|
||||
*/
|
||||
|
||||
listBoardImages: build.query<
|
||||
OffsetPaginatedResults_ImageDTO_,
|
||||
ListBoardImagesArg
|
||||
>({
|
||||
query: ({ board_id, offset, limit }) => ({
|
||||
url: `board_images/${board_id}`,
|
||||
method: 'DELETE',
|
||||
body: { offset, limit },
|
||||
}),
|
||||
}),
|
||||
|
||||
/**
|
||||
* Board Images Mutations
|
||||
*/
|
||||
|
||||
addImageToBoard: build.mutation<void, AddImageToBoardArg>({
|
||||
query: ({ board_id, image_name }) => ({
|
||||
url: `board_images/`,
|
||||
method: 'POST',
|
||||
body: { board_id, image_name },
|
||||
}),
|
||||
invalidatesTags: (result, error, arg) => [
|
||||
{ type: 'Board', id: arg.board_id },
|
||||
{ type: 'Image', id: arg.image_name },
|
||||
],
|
||||
}),
|
||||
|
||||
removeImageFromBoard: build.mutation<void, RemoveImageFromBoardArg>({
|
||||
query: ({ board_id, image_name }) => ({
|
||||
url: `board_images/`,
|
||||
method: 'DELETE',
|
||||
body: { board_id, image_name },
|
||||
}),
|
||||
invalidatesTags: (result, error, arg) => [
|
||||
{ type: 'Board', id: arg.board_id },
|
||||
{ type: 'Image', id: arg.image_name },
|
||||
],
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
export const {
|
||||
useAddImageToBoardMutation,
|
||||
useRemoveImageFromBoardMutation,
|
||||
useListBoardImagesQuery,
|
||||
} = boardImagesApi;
|
||||
99
invokeai/frontend/web/src/services/api/endpoints/boards.ts
Normal file
99
invokeai/frontend/web/src/services/api/endpoints/boards.ts
Normal file
@@ -0,0 +1,99 @@
|
||||
import { BoardDTO, OffsetPaginatedResults_BoardDTO_ } from 'services/api/types';
|
||||
import { ApiFullTagDescription, LIST_TAG, api } from '..';
|
||||
import { paths } from '../schema';
|
||||
|
||||
type ListBoardsArg = NonNullable<
|
||||
paths['/api/v1/boards/']['get']['parameters']['query']
|
||||
>;
|
||||
|
||||
type UpdateBoardArg =
|
||||
paths['/api/v1/boards/{board_id}']['patch']['parameters']['path'] & {
|
||||
changes: paths['/api/v1/boards/{board_id}']['patch']['requestBody']['content']['application/json'];
|
||||
};
|
||||
|
||||
export const boardsApi = api.injectEndpoints({
|
||||
endpoints: (build) => ({
|
||||
/**
|
||||
* Boards Queries
|
||||
*/
|
||||
listBoards: build.query<OffsetPaginatedResults_BoardDTO_, ListBoardsArg>({
|
||||
query: (arg) => ({ url: 'boards/', params: arg }),
|
||||
providesTags: (result, error, arg) => {
|
||||
// any list of boards
|
||||
const tags: ApiFullTagDescription[] = [{ id: 'Board', type: LIST_TAG }];
|
||||
|
||||
if (result) {
|
||||
// and individual tags for each board
|
||||
tags.push(
|
||||
...result.items.map(({ board_id }) => ({
|
||||
type: 'Board' as const,
|
||||
id: board_id,
|
||||
}))
|
||||
);
|
||||
}
|
||||
|
||||
return tags;
|
||||
},
|
||||
}),
|
||||
|
||||
listAllBoards: build.query<Array<BoardDTO>, void>({
|
||||
query: () => ({
|
||||
url: 'boards/',
|
||||
params: { all: true },
|
||||
}),
|
||||
providesTags: (result, error, arg) => {
|
||||
// any list of boards
|
||||
const tags: ApiFullTagDescription[] = [{ id: 'Board', type: LIST_TAG }];
|
||||
|
||||
if (result) {
|
||||
// and individual tags for each board
|
||||
tags.push(
|
||||
...result.map(({ board_id }) => ({
|
||||
type: 'Board' as const,
|
||||
id: board_id,
|
||||
}))
|
||||
);
|
||||
}
|
||||
|
||||
return tags;
|
||||
},
|
||||
}),
|
||||
|
||||
/**
|
||||
* Boards Mutations
|
||||
*/
|
||||
|
||||
createBoard: build.mutation<BoardDTO, string>({
|
||||
query: (board_name) => ({
|
||||
url: `boards/`,
|
||||
method: 'POST',
|
||||
params: { board_name },
|
||||
}),
|
||||
invalidatesTags: [{ id: 'Board', type: LIST_TAG }],
|
||||
}),
|
||||
|
||||
updateBoard: build.mutation<BoardDTO, UpdateBoardArg>({
|
||||
query: ({ board_id, changes }) => ({
|
||||
url: `boards/${board_id}`,
|
||||
method: 'PATCH',
|
||||
body: changes,
|
||||
}),
|
||||
invalidatesTags: (result, error, arg) => [
|
||||
{ type: 'Board', id: arg.board_id },
|
||||
],
|
||||
}),
|
||||
|
||||
deleteBoard: build.mutation<void, string>({
|
||||
query: (board_id) => ({ url: `boards/${board_id}`, method: 'DELETE' }),
|
||||
invalidatesTags: (result, error, arg) => [{ type: 'Board', id: arg }],
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
export const {
|
||||
useListBoardsQuery,
|
||||
useListAllBoardsQuery,
|
||||
useCreateBoardMutation,
|
||||
useUpdateBoardMutation,
|
||||
useDeleteBoardMutation,
|
||||
} = boardsApi;
|
||||
22
invokeai/frontend/web/src/services/api/endpoints/images.ts
Normal file
22
invokeai/frontend/web/src/services/api/endpoints/images.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { ApiFullTagDescription, api } from '..';
|
||||
import { ImageDTO } from '../types';
|
||||
|
||||
export const imagesApi = api.injectEndpoints({
|
||||
endpoints: (build) => ({
|
||||
/**
|
||||
* Image Queries
|
||||
*/
|
||||
getImageDTO: build.query<ImageDTO, string>({
|
||||
query: (image_name) => ({ url: `images/${image_name}/metadata` }),
|
||||
providesTags: (result, error, arg) => {
|
||||
const tags: ApiFullTagDescription[] = [{ type: 'Image', id: arg }];
|
||||
if (result?.board_id) {
|
||||
tags.push({ type: 'Board', id: result.board_id });
|
||||
}
|
||||
return tags;
|
||||
},
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
export const { useGetImageDTOQuery } = imagesApi;
|
||||
52
invokeai/frontend/web/src/services/api/endpoints/models.ts
Normal file
52
invokeai/frontend/web/src/services/api/endpoints/models.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import { ModelsList } from 'services/api/types';
|
||||
import { EntityState, createEntityAdapter } from '@reduxjs/toolkit';
|
||||
import { keyBy } from 'lodash-es';
|
||||
|
||||
import { ApiFullTagDescription, LIST_TAG, api } from '..';
|
||||
import { paths } from '../schema';
|
||||
|
||||
type ModelConfig = ModelsList['models'][number];
|
||||
|
||||
type ListModelsArg = NonNullable<
|
||||
paths['/api/v1/models/']['get']['parameters']['query']
|
||||
>;
|
||||
|
||||
const modelsAdapter = createEntityAdapter<ModelConfig>({
|
||||
selectId: (model) => getModelId(model),
|
||||
sortComparer: (a, b) => a.name.localeCompare(b.name),
|
||||
});
|
||||
|
||||
const getModelId = ({ base_model, type, name }: ModelConfig) =>
|
||||
`${base_model}/${type}/${name}`;
|
||||
|
||||
export const modelsApi = api.injectEndpoints({
|
||||
endpoints: (build) => ({
|
||||
listModels: build.query<EntityState<ModelConfig>, ListModelsArg>({
|
||||
query: (arg) => ({ url: 'models/', params: arg }),
|
||||
providesTags: (result, error, arg) => {
|
||||
// any list of boards
|
||||
const tags: ApiFullTagDescription[] = [{ id: 'Model', type: LIST_TAG }];
|
||||
|
||||
if (result) {
|
||||
// and individual tags for each board
|
||||
tags.push(
|
||||
...result.ids.map((id) => ({
|
||||
type: 'Model' as const,
|
||||
id,
|
||||
}))
|
||||
);
|
||||
}
|
||||
|
||||
return tags;
|
||||
},
|
||||
transformResponse: (response: ModelsList, meta, arg) => {
|
||||
return modelsAdapter.setAll(
|
||||
modelsAdapter.getInitialState(),
|
||||
keyBy(response.models, getModelId)
|
||||
);
|
||||
},
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
export const { useListModelsQuery } = modelsApi;
|
||||
77
invokeai/frontend/web/src/services/api/guards.ts
Normal file
77
invokeai/frontend/web/src/services/api/guards.ts
Normal file
@@ -0,0 +1,77 @@
|
||||
import { get, isObject, isString } from 'lodash-es';
|
||||
import {
|
||||
GraphExecutionState,
|
||||
GraphInvocationOutput,
|
||||
ImageOutput,
|
||||
MaskOutput,
|
||||
PromptOutput,
|
||||
IterateInvocationOutput,
|
||||
CollectInvocationOutput,
|
||||
ImageField,
|
||||
LatentsOutput,
|
||||
ResourceOrigin,
|
||||
ImageDTO,
|
||||
BoardDTO,
|
||||
} from 'services/api/types';
|
||||
|
||||
export const isImageDTO = (obj: unknown): obj is ImageDTO => {
|
||||
return (
|
||||
isObject(obj) &&
|
||||
'image_name' in obj &&
|
||||
isString(obj?.image_name) &&
|
||||
'thumbnail_url' in obj &&
|
||||
isString(obj?.thumbnail_url) &&
|
||||
'image_url' in obj &&
|
||||
isString(obj?.image_url) &&
|
||||
'image_origin' in obj &&
|
||||
isString(obj?.image_origin) &&
|
||||
'created_at' in obj &&
|
||||
isString(obj?.created_at)
|
||||
);
|
||||
};
|
||||
|
||||
export const isBoardDTO = (obj: unknown): obj is BoardDTO => {
|
||||
return (
|
||||
isObject(obj) &&
|
||||
'board_id' in obj &&
|
||||
isString(obj?.board_id) &&
|
||||
'board_name' in obj &&
|
||||
isString(obj?.board_name)
|
||||
);
|
||||
};
|
||||
|
||||
export const isImageOutput = (
|
||||
output: GraphExecutionState['results'][string]
|
||||
): output is ImageOutput => output?.type === 'image_output';
|
||||
|
||||
export const isLatentsOutput = (
|
||||
output: GraphExecutionState['results'][string]
|
||||
): output is LatentsOutput => output?.type === 'latents_output';
|
||||
|
||||
export const isMaskOutput = (
|
||||
output: GraphExecutionState['results'][string]
|
||||
): output is MaskOutput => output?.type === 'mask';
|
||||
|
||||
export const isPromptOutput = (
|
||||
output: GraphExecutionState['results'][string]
|
||||
): output is PromptOutput => output?.type === 'prompt';
|
||||
|
||||
export const isGraphOutput = (
|
||||
output: GraphExecutionState['results'][string]
|
||||
): output is GraphInvocationOutput => output?.type === 'graph_output';
|
||||
|
||||
export const isIterateOutput = (
|
||||
output: GraphExecutionState['results'][string]
|
||||
): output is IterateInvocationOutput => output?.type === 'iterate_output';
|
||||
|
||||
export const isCollectOutput = (
|
||||
output: GraphExecutionState['results'][string]
|
||||
): output is CollectInvocationOutput => output?.type === 'collect_output';
|
||||
|
||||
export const isResourceOrigin = (t: unknown): t is ResourceOrigin =>
|
||||
isString(t) && ['internal', 'external'].includes(t);
|
||||
|
||||
export const isImageField = (imageField: unknown): imageField is ImageField =>
|
||||
isObject(imageField) &&
|
||||
isString(get(imageField, 'image_name')) &&
|
||||
isResourceOrigin(get(imageField, 'image_origin'));
|
||||
@@ -1,112 +1,44 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export { ApiError } from './core/ApiError';
|
||||
export { CancelablePromise, CancelError } from './core/CancelablePromise';
|
||||
export { OpenAPI } from './core/OpenAPI';
|
||||
export type { OpenAPIConfig } from './core/OpenAPI';
|
||||
import {
|
||||
BaseQueryFn,
|
||||
FetchArgs,
|
||||
FetchBaseQueryError,
|
||||
createApi,
|
||||
fetchBaseQuery,
|
||||
} from '@reduxjs/toolkit/query/react';
|
||||
import { FullTagDescription } from '@reduxjs/toolkit/dist/query/endpointDefinitions';
|
||||
import { $authToken, $baseUrl } from 'services/api/client';
|
||||
|
||||
export type { AddInvocation } from './models/AddInvocation';
|
||||
export type { Body_upload_image } from './models/Body_upload_image';
|
||||
export type { CannyImageProcessorInvocation } from './models/CannyImageProcessorInvocation';
|
||||
export type { CkptModelInfo } from './models/CkptModelInfo';
|
||||
export type { CollectInvocation } from './models/CollectInvocation';
|
||||
export type { CollectInvocationOutput } from './models/CollectInvocationOutput';
|
||||
export type { ColorField } from './models/ColorField';
|
||||
export type { CompelInvocation } from './models/CompelInvocation';
|
||||
export type { CompelOutput } from './models/CompelOutput';
|
||||
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 { ControlOutput } from './models/ControlOutput';
|
||||
export type { CreateModelRequest } from './models/CreateModelRequest';
|
||||
export type { CvInpaintInvocation } from './models/CvInpaintInvocation';
|
||||
export type { DiffusersModelInfo } from './models/DiffusersModelInfo';
|
||||
export type { DivideInvocation } from './models/DivideInvocation';
|
||||
export type { DynamicPromptInvocation } from './models/DynamicPromptInvocation';
|
||||
export type { Edge } from './models/Edge';
|
||||
export type { EdgeConnection } from './models/EdgeConnection';
|
||||
export type { FloatCollectionOutput } from './models/FloatCollectionOutput';
|
||||
export type { FloatLinearRangeInvocation } from './models/FloatLinearRangeInvocation';
|
||||
export type { FloatOutput } from './models/FloatOutput';
|
||||
export type { Graph } from './models/Graph';
|
||||
export type { GraphExecutionState } from './models/GraphExecutionState';
|
||||
export type { GraphInvocation } from './models/GraphInvocation';
|
||||
export type { GraphInvocationOutput } from './models/GraphInvocationOutput';
|
||||
export type { HedImageProcessorInvocation } from './models/HedImageProcessorInvocation';
|
||||
export type { HTTPValidationError } from './models/HTTPValidationError';
|
||||
export type { ImageBlurInvocation } from './models/ImageBlurInvocation';
|
||||
export type { ImageCategory } from './models/ImageCategory';
|
||||
export type { ImageChannelInvocation } from './models/ImageChannelInvocation';
|
||||
export type { ImageConvertInvocation } from './models/ImageConvertInvocation';
|
||||
export type { ImageCropInvocation } from './models/ImageCropInvocation';
|
||||
export type { ImageDTO } from './models/ImageDTO';
|
||||
export type { ImageField } from './models/ImageField';
|
||||
export type { ImageInverseLerpInvocation } from './models/ImageInverseLerpInvocation';
|
||||
export type { ImageLerpInvocation } from './models/ImageLerpInvocation';
|
||||
export type { ImageMetadata } from './models/ImageMetadata';
|
||||
export type { ImageMultiplyInvocation } from './models/ImageMultiplyInvocation';
|
||||
export type { ImageOutput } from './models/ImageOutput';
|
||||
export type { ImagePasteInvocation } from './models/ImagePasteInvocation';
|
||||
export type { ImageProcessorInvocation } from './models/ImageProcessorInvocation';
|
||||
export type { ImageRecordChanges } from './models/ImageRecordChanges';
|
||||
export type { ImageResizeInvocation } from './models/ImageResizeInvocation';
|
||||
export type { ImageScaleInvocation } from './models/ImageScaleInvocation';
|
||||
export type { ImageToImageInvocation } from './models/ImageToImageInvocation';
|
||||
export type { ImageToLatentsInvocation } from './models/ImageToLatentsInvocation';
|
||||
export type { ImageUrlsDTO } from './models/ImageUrlsDTO';
|
||||
export type { InfillColorInvocation } from './models/InfillColorInvocation';
|
||||
export type { InfillPatchMatchInvocation } from './models/InfillPatchMatchInvocation';
|
||||
export type { InfillTileInvocation } from './models/InfillTileInvocation';
|
||||
export type { InpaintInvocation } from './models/InpaintInvocation';
|
||||
export type { IntCollectionOutput } from './models/IntCollectionOutput';
|
||||
export type { IntOutput } from './models/IntOutput';
|
||||
export type { IterateInvocation } from './models/IterateInvocation';
|
||||
export type { IterateInvocationOutput } from './models/IterateInvocationOutput';
|
||||
export type { LatentsField } from './models/LatentsField';
|
||||
export type { LatentsOutput } from './models/LatentsOutput';
|
||||
export type { LatentsToImageInvocation } from './models/LatentsToImageInvocation';
|
||||
export type { LatentsToLatentsInvocation } from './models/LatentsToLatentsInvocation';
|
||||
export type { LineartAnimeImageProcessorInvocation } from './models/LineartAnimeImageProcessorInvocation';
|
||||
export type { LineartImageProcessorInvocation } from './models/LineartImageProcessorInvocation';
|
||||
export type { LoadImageInvocation } from './models/LoadImageInvocation';
|
||||
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 { ModelsList } from './models/ModelsList';
|
||||
export type { MultiplyInvocation } from './models/MultiplyInvocation';
|
||||
export type { NoiseInvocation } from './models/NoiseInvocation';
|
||||
export type { NoiseOutput } from './models/NoiseOutput';
|
||||
export type { NormalbaeImageProcessorInvocation } from './models/NormalbaeImageProcessorInvocation';
|
||||
export type { OffsetPaginatedResults_ImageDTO_ } from './models/OffsetPaginatedResults_ImageDTO_';
|
||||
export type { OpenposeImageProcessorInvocation } from './models/OpenposeImageProcessorInvocation';
|
||||
export type { PaginatedResults_GraphExecutionState_ } from './models/PaginatedResults_GraphExecutionState_';
|
||||
export type { ParamFloatInvocation } from './models/ParamFloatInvocation';
|
||||
export type { ParamIntInvocation } from './models/ParamIntInvocation';
|
||||
export type { PidiImageProcessorInvocation } from './models/PidiImageProcessorInvocation';
|
||||
export type { PromptCollectionOutput } from './models/PromptCollectionOutput';
|
||||
export type { PromptOutput } from './models/PromptOutput';
|
||||
export type { RandomIntInvocation } from './models/RandomIntInvocation';
|
||||
export type { RandomRangeInvocation } from './models/RandomRangeInvocation';
|
||||
export type { RangeInvocation } from './models/RangeInvocation';
|
||||
export type { RangeOfSizeInvocation } from './models/RangeOfSizeInvocation';
|
||||
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 { ShowImageInvocation } from './models/ShowImageInvocation';
|
||||
export type { StepParamEasingInvocation } from './models/StepParamEasingInvocation';
|
||||
export type { SubtractInvocation } from './models/SubtractInvocation';
|
||||
export type { TextToImageInvocation } from './models/TextToImageInvocation';
|
||||
export type { TextToLatentsInvocation } from './models/TextToLatentsInvocation';
|
||||
export type { UpscaleInvocation } from './models/UpscaleInvocation';
|
||||
export type { VaeRepo } from './models/VaeRepo';
|
||||
export type { ValidationError } from './models/ValidationError';
|
||||
export type { ZoeDepthImageProcessorInvocation } from './models/ZoeDepthImageProcessorInvocation';
|
||||
export const tagTypes = ['Board', 'Image', 'Model'];
|
||||
export type ApiFullTagDescription = FullTagDescription<
|
||||
(typeof tagTypes)[number]
|
||||
>;
|
||||
export const LIST_TAG = 'LIST';
|
||||
|
||||
export { ImagesService } from './services/ImagesService';
|
||||
export { ModelsService } from './services/ModelsService';
|
||||
export { SessionsService } from './services/SessionsService';
|
||||
const dynamicBaseQuery: BaseQueryFn<
|
||||
string | FetchArgs,
|
||||
unknown,
|
||||
FetchBaseQueryError
|
||||
> = async (args, api, extraOptions) => {
|
||||
const baseUrl = $baseUrl.get();
|
||||
const authToken = $authToken.get();
|
||||
|
||||
const rawBaseQuery = fetchBaseQuery({
|
||||
baseUrl: `${baseUrl ?? ''}/api/v1`,
|
||||
prepareHeaders: (headers) => {
|
||||
if (authToken) {
|
||||
headers.set('Authorization', `Bearer ${authToken}`);
|
||||
}
|
||||
|
||||
return headers;
|
||||
},
|
||||
});
|
||||
|
||||
return rawBaseQuery(args, api, extraOptions);
|
||||
};
|
||||
|
||||
export const api = createApi({
|
||||
baseQuery: dynamicBaseQuery,
|
||||
reducerPath: 'api',
|
||||
tagTypes,
|
||||
endpoints: () => ({}),
|
||||
});
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Adds two numbers
|
||||
*/
|
||||
export type AddInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'add';
|
||||
/**
|
||||
* The first number
|
||||
*/
|
||||
'a'?: number;
|
||||
/**
|
||||
* The second number
|
||||
*/
|
||||
'b'?: number;
|
||||
};
|
||||
@@ -1,7 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type Body_upload_image = {
|
||||
file: Blob;
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
/* 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;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'canny_image_processor';
|
||||
/**
|
||||
* The image to process
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The low threshold of the Canny pixel gradient (0-255)
|
||||
*/
|
||||
low_threshold?: number;
|
||||
/**
|
||||
* The high threshold of the Canny pixel gradient (0-255)
|
||||
*/
|
||||
high_threshold?: number;
|
||||
};
|
||||
@@ -1,31 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type CkptModelInfo = {
|
||||
/**
|
||||
* A description of the model
|
||||
*/
|
||||
description?: string;
|
||||
format?: 'ckpt';
|
||||
/**
|
||||
* The path to the model config
|
||||
*/
|
||||
config: string;
|
||||
/**
|
||||
* The path to the model weights
|
||||
*/
|
||||
weights: string;
|
||||
/**
|
||||
* The path to the model VAE
|
||||
*/
|
||||
vae: string;
|
||||
/**
|
||||
* The width of the model
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* The height of the model
|
||||
*/
|
||||
height?: number;
|
||||
};
|
||||
@@ -1,26 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Collects values into a collection
|
||||
*/
|
||||
export type CollectInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'collect';
|
||||
/**
|
||||
* The item to collect (all inputs must be of the same type)
|
||||
*/
|
||||
item?: any;
|
||||
/**
|
||||
* The collection, will be provided on execution
|
||||
*/
|
||||
collection?: Array<any>;
|
||||
};
|
||||
@@ -1,14 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Base class for all invocation outputs
|
||||
*/
|
||||
export type CollectInvocationOutput = {
|
||||
type: 'collect_output';
|
||||
/**
|
||||
* The collection of input items
|
||||
*/
|
||||
collection: Array<any>;
|
||||
};
|
||||
@@ -1,22 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type ColorField = {
|
||||
/**
|
||||
* The red component
|
||||
*/
|
||||
'r': number;
|
||||
/**
|
||||
* The green component
|
||||
*/
|
||||
'g': number;
|
||||
/**
|
||||
* The blue component
|
||||
*/
|
||||
'b': number;
|
||||
/**
|
||||
* The alpha component
|
||||
*/
|
||||
'a': number;
|
||||
};
|
||||
@@ -1,26 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Parse prompt using compel package to conditioning.
|
||||
*/
|
||||
export type CompelInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'compel';
|
||||
/**
|
||||
* Prompt
|
||||
*/
|
||||
prompt?: string;
|
||||
/**
|
||||
* Model to use
|
||||
*/
|
||||
model?: string;
|
||||
};
|
||||
@@ -1,16 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ConditioningField } from './ConditioningField';
|
||||
|
||||
/**
|
||||
* Compel parser output
|
||||
*/
|
||||
export type CompelOutput = {
|
||||
type?: 'compel_output';
|
||||
/**
|
||||
* Conditioning
|
||||
*/
|
||||
conditioning?: ConditioningField;
|
||||
};
|
||||
@@ -1,10 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type ConditioningField = {
|
||||
/**
|
||||
* The name of conditioning data
|
||||
*/
|
||||
conditioning_name: string;
|
||||
};
|
||||
@@ -1,44 +0,0 @@
|
||||
/* 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;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'content_shuffle_image_processor';
|
||||
/**
|
||||
* The image to process
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The pixel resolution for detection
|
||||
*/
|
||||
detect_resolution?: number;
|
||||
/**
|
||||
* The pixel resolution for the output image
|
||||
*/
|
||||
image_resolution?: number;
|
||||
/**
|
||||
* Content shuffle `h` parameter
|
||||
*/
|
||||
'h'?: number;
|
||||
/**
|
||||
* Content shuffle `w` parameter
|
||||
*/
|
||||
'w'?: number;
|
||||
/**
|
||||
* Content shuffle `f` parameter
|
||||
*/
|
||||
'f'?: number;
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
export type ControlField = {
|
||||
/**
|
||||
* The control image
|
||||
*/
|
||||
image: ImageField;
|
||||
/**
|
||||
* The ControlNet model to use
|
||||
*/
|
||||
control_model: string;
|
||||
/**
|
||||
* The weight given to the ControlNet
|
||||
*/
|
||||
control_weight: (number | Array<number>);
|
||||
/**
|
||||
* When the ControlNet is first applied (% of total steps)
|
||||
*/
|
||||
begin_step_percent: number;
|
||||
/**
|
||||
* When the ControlNet is last applied (% of total steps)
|
||||
*/
|
||||
end_step_percent: number;
|
||||
/**
|
||||
* The contorl mode to use
|
||||
*/
|
||||
control_mode?: 'balanced' | 'more_prompt' | 'more_control' | 'unbalanced';
|
||||
};
|
||||
@@ -1,44 +0,0 @@
|
||||
/* 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;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'controlnet';
|
||||
/**
|
||||
* The control image
|
||||
*/
|
||||
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,diffusion_sd15' | 'CrucibleAI/ControlNetMediaPipeFace';
|
||||
/**
|
||||
* The weight given to the ControlNet
|
||||
*/
|
||||
control_weight?: (number | Array<number>);
|
||||
/**
|
||||
* When the ControlNet is first applied (% of total steps)
|
||||
*/
|
||||
begin_step_percent?: number;
|
||||
/**
|
||||
* When the ControlNet is last applied (% of total steps)
|
||||
*/
|
||||
end_step_percent?: number;
|
||||
/**
|
||||
* The control mode used
|
||||
*/
|
||||
control_mode?: 'balanced' | 'more_prompt' | 'more_control' | 'unbalanced';
|
||||
};
|
||||
@@ -1,16 +0,0 @@
|
||||
/* 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
|
||||
*/
|
||||
control?: ControlField;
|
||||
};
|
||||
@@ -1,17 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { CkptModelInfo } from './CkptModelInfo';
|
||||
import type { DiffusersModelInfo } from './DiffusersModelInfo';
|
||||
|
||||
export type CreateModelRequest = {
|
||||
/**
|
||||
* The name of the model
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The model info
|
||||
*/
|
||||
info: (CkptModelInfo | DiffusersModelInfo);
|
||||
};
|
||||
@@ -1,28 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Simple inpaint using opencv.
|
||||
*/
|
||||
export type CvInpaintInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'cv_inpaint';
|
||||
/**
|
||||
* The image to inpaint
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The mask to use when inpainting
|
||||
*/
|
||||
mask?: ImageField;
|
||||
};
|
||||
@@ -1,25 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { VaeRepo } from './VaeRepo';
|
||||
|
||||
export type DiffusersModelInfo = {
|
||||
/**
|
||||
* A description of the model
|
||||
*/
|
||||
description?: string;
|
||||
format?: 'diffusers';
|
||||
/**
|
||||
* The VAE repo to use for this model
|
||||
*/
|
||||
vae?: VaeRepo;
|
||||
/**
|
||||
* The repo ID to use for this model
|
||||
*/
|
||||
repo_id?: string;
|
||||
/**
|
||||
* The path to the model
|
||||
*/
|
||||
path?: string;
|
||||
};
|
||||
@@ -1,26 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Divides two numbers
|
||||
*/
|
||||
export type DivideInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'div';
|
||||
/**
|
||||
* The first number
|
||||
*/
|
||||
'a'?: number;
|
||||
/**
|
||||
* The second number
|
||||
*/
|
||||
'b'?: number;
|
||||
};
|
||||
@@ -1,30 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Parses a prompt using adieyal/dynamicprompts' random or combinatorial generator
|
||||
*/
|
||||
export type DynamicPromptInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'dynamic_prompt';
|
||||
/**
|
||||
* The prompt to parse with dynamicprompts
|
||||
*/
|
||||
prompt: string;
|
||||
/**
|
||||
* The number of prompts to generate
|
||||
*/
|
||||
max_prompts?: number;
|
||||
/**
|
||||
* Whether to use the combinatorial generator
|
||||
*/
|
||||
combinatorial?: boolean;
|
||||
};
|
||||
@@ -1,16 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { EdgeConnection } from './EdgeConnection';
|
||||
|
||||
export type Edge = {
|
||||
/**
|
||||
* The connection for the edge's from node and field
|
||||
*/
|
||||
source: EdgeConnection;
|
||||
/**
|
||||
* The connection for the edge's to node and field
|
||||
*/
|
||||
destination: EdgeConnection;
|
||||
};
|
||||
@@ -1,14 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type EdgeConnection = {
|
||||
/**
|
||||
* The id of the node for this edge connection
|
||||
*/
|
||||
node_id: string;
|
||||
/**
|
||||
* The field for this connection
|
||||
*/
|
||||
field: string;
|
||||
};
|
||||
@@ -1,14 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* A collection of floats
|
||||
*/
|
||||
export type FloatCollectionOutput = {
|
||||
type?: 'float_collection';
|
||||
/**
|
||||
* The float collection
|
||||
*/
|
||||
collection?: Array<number>;
|
||||
};
|
||||
@@ -1,30 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Creates a range
|
||||
*/
|
||||
export type FloatLinearRangeInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'float_range';
|
||||
/**
|
||||
* The first value of the range
|
||||
*/
|
||||
start?: number;
|
||||
/**
|
||||
* The last value of the range
|
||||
*/
|
||||
stop?: number;
|
||||
/**
|
||||
* number of values to interpolate over (including start and stop)
|
||||
*/
|
||||
steps?: number;
|
||||
};
|
||||
@@ -1,14 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* A float output
|
||||
*/
|
||||
export type FloatOutput = {
|
||||
type?: 'float_output';
|
||||
/**
|
||||
* The output float
|
||||
*/
|
||||
param?: number;
|
||||
};
|
||||
@@ -1,80 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { AddInvocation } from './AddInvocation';
|
||||
import type { CannyImageProcessorInvocation } from './CannyImageProcessorInvocation';
|
||||
import type { CollectInvocation } from './CollectInvocation';
|
||||
import type { CompelInvocation } from './CompelInvocation';
|
||||
import type { ContentShuffleImageProcessorInvocation } from './ContentShuffleImageProcessorInvocation';
|
||||
import type { ControlNetInvocation } from './ControlNetInvocation';
|
||||
import type { CvInpaintInvocation } from './CvInpaintInvocation';
|
||||
import type { DivideInvocation } from './DivideInvocation';
|
||||
import type { DynamicPromptInvocation } from './DynamicPromptInvocation';
|
||||
import type { Edge } from './Edge';
|
||||
import type { FloatLinearRangeInvocation } from './FloatLinearRangeInvocation';
|
||||
import type { GraphInvocation } from './GraphInvocation';
|
||||
import type { HedImageProcessorInvocation } from './HedImageProcessorInvocation';
|
||||
import type { ImageBlurInvocation } from './ImageBlurInvocation';
|
||||
import type { ImageChannelInvocation } from './ImageChannelInvocation';
|
||||
import type { ImageConvertInvocation } from './ImageConvertInvocation';
|
||||
import type { ImageCropInvocation } from './ImageCropInvocation';
|
||||
import type { ImageInverseLerpInvocation } from './ImageInverseLerpInvocation';
|
||||
import type { ImageLerpInvocation } from './ImageLerpInvocation';
|
||||
import type { ImageMultiplyInvocation } from './ImageMultiplyInvocation';
|
||||
import type { ImagePasteInvocation } from './ImagePasteInvocation';
|
||||
import type { ImageProcessorInvocation } from './ImageProcessorInvocation';
|
||||
import type { ImageResizeInvocation } from './ImageResizeInvocation';
|
||||
import type { ImageScaleInvocation } from './ImageScaleInvocation';
|
||||
import type { ImageToImageInvocation } from './ImageToImageInvocation';
|
||||
import type { ImageToLatentsInvocation } from './ImageToLatentsInvocation';
|
||||
import type { InfillColorInvocation } from './InfillColorInvocation';
|
||||
import type { InfillPatchMatchInvocation } from './InfillPatchMatchInvocation';
|
||||
import type { InfillTileInvocation } from './InfillTileInvocation';
|
||||
import type { InpaintInvocation } from './InpaintInvocation';
|
||||
import type { IterateInvocation } from './IterateInvocation';
|
||||
import type { LatentsToImageInvocation } from './LatentsToImageInvocation';
|
||||
import type { LatentsToLatentsInvocation } from './LatentsToLatentsInvocation';
|
||||
import type { LineartAnimeImageProcessorInvocation } from './LineartAnimeImageProcessorInvocation';
|
||||
import type { LineartImageProcessorInvocation } from './LineartImageProcessorInvocation';
|
||||
import type { LoadImageInvocation } from './LoadImageInvocation';
|
||||
import type { MaskFromAlphaInvocation } from './MaskFromAlphaInvocation';
|
||||
import type { MediapipeFaceProcessorInvocation } from './MediapipeFaceProcessorInvocation';
|
||||
import type { MidasDepthImageProcessorInvocation } from './MidasDepthImageProcessorInvocation';
|
||||
import type { MlsdImageProcessorInvocation } from './MlsdImageProcessorInvocation';
|
||||
import type { MultiplyInvocation } from './MultiplyInvocation';
|
||||
import type { NoiseInvocation } from './NoiseInvocation';
|
||||
import type { NormalbaeImageProcessorInvocation } from './NormalbaeImageProcessorInvocation';
|
||||
import type { OpenposeImageProcessorInvocation } from './OpenposeImageProcessorInvocation';
|
||||
import type { ParamFloatInvocation } from './ParamFloatInvocation';
|
||||
import type { ParamIntInvocation } from './ParamIntInvocation';
|
||||
import type { PidiImageProcessorInvocation } from './PidiImageProcessorInvocation';
|
||||
import type { RandomIntInvocation } from './RandomIntInvocation';
|
||||
import type { RandomRangeInvocation } from './RandomRangeInvocation';
|
||||
import type { RangeInvocation } from './RangeInvocation';
|
||||
import type { RangeOfSizeInvocation } from './RangeOfSizeInvocation';
|
||||
import type { ResizeLatentsInvocation } from './ResizeLatentsInvocation';
|
||||
import type { RestoreFaceInvocation } from './RestoreFaceInvocation';
|
||||
import type { ScaleLatentsInvocation } from './ScaleLatentsInvocation';
|
||||
import type { ShowImageInvocation } from './ShowImageInvocation';
|
||||
import type { StepParamEasingInvocation } from './StepParamEasingInvocation';
|
||||
import type { SubtractInvocation } from './SubtractInvocation';
|
||||
import type { TextToImageInvocation } from './TextToImageInvocation';
|
||||
import type { TextToLatentsInvocation } from './TextToLatentsInvocation';
|
||||
import type { UpscaleInvocation } from './UpscaleInvocation';
|
||||
import type { ZoeDepthImageProcessorInvocation } from './ZoeDepthImageProcessorInvocation';
|
||||
|
||||
export type Graph = {
|
||||
/**
|
||||
* The id of this graph
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* The nodes in this graph
|
||||
*/
|
||||
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>;
|
||||
};
|
||||
@@ -1,62 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { CollectInvocationOutput } from './CollectInvocationOutput';
|
||||
import type { CompelOutput } from './CompelOutput';
|
||||
import type { ControlOutput } from './ControlOutput';
|
||||
import type { FloatCollectionOutput } from './FloatCollectionOutput';
|
||||
import type { FloatOutput } from './FloatOutput';
|
||||
import type { Graph } from './Graph';
|
||||
import type { GraphInvocationOutput } from './GraphInvocationOutput';
|
||||
import type { ImageOutput } from './ImageOutput';
|
||||
import type { IntCollectionOutput } from './IntCollectionOutput';
|
||||
import type { IntOutput } from './IntOutput';
|
||||
import type { IterateInvocationOutput } from './IterateInvocationOutput';
|
||||
import type { LatentsOutput } from './LatentsOutput';
|
||||
import type { MaskOutput } from './MaskOutput';
|
||||
import type { NoiseOutput } from './NoiseOutput';
|
||||
import type { PromptCollectionOutput } from './PromptCollectionOutput';
|
||||
import type { PromptOutput } from './PromptOutput';
|
||||
|
||||
/**
|
||||
* Tracks the state of a graph execution
|
||||
*/
|
||||
export type GraphExecutionState = {
|
||||
/**
|
||||
* The id of the execution state
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* The graph being executed
|
||||
*/
|
||||
graph: Graph;
|
||||
/**
|
||||
* The expanded graph of activated and executed nodes
|
||||
*/
|
||||
execution_graph: Graph;
|
||||
/**
|
||||
* The set of node ids that have been executed
|
||||
*/
|
||||
executed: Array<string>;
|
||||
/**
|
||||
* The list of node ids that have been executed, in order of execution
|
||||
*/
|
||||
executed_history: Array<string>;
|
||||
/**
|
||||
* The results of node executions
|
||||
*/
|
||||
results: Record<string, (IntCollectionOutput | FloatCollectionOutput | CompelOutput | ImageOutput | MaskOutput | ControlOutput | LatentsOutput | NoiseOutput | IntOutput | FloatOutput | PromptOutput | PromptCollectionOutput | GraphInvocationOutput | IterateInvocationOutput | CollectInvocationOutput)>;
|
||||
/**
|
||||
* Errors raised when executing nodes
|
||||
*/
|
||||
errors: Record<string, string>;
|
||||
/**
|
||||
* The map of prepared nodes to original graph nodes
|
||||
*/
|
||||
prepared_source_mapping: Record<string, string>;
|
||||
/**
|
||||
* The map of original graph nodes to prepared nodes
|
||||
*/
|
||||
source_prepared_mapping: Record<string, Array<string>>;
|
||||
};
|
||||
@@ -1,24 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { Graph } from './Graph';
|
||||
|
||||
/**
|
||||
* Execute a graph
|
||||
*/
|
||||
export type GraphInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'graph';
|
||||
/**
|
||||
* The graph to run
|
||||
*/
|
||||
graph?: Graph;
|
||||
};
|
||||
@@ -1,10 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Base class for all invocation outputs
|
||||
*/
|
||||
export type GraphInvocationOutput = {
|
||||
type: 'graph_output';
|
||||
};
|
||||
@@ -1,9 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ValidationError } from './ValidationError';
|
||||
|
||||
export type HTTPValidationError = {
|
||||
detail?: Array<ValidationError>;
|
||||
};
|
||||
@@ -1,36 +0,0 @@
|
||||
/* 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;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'hed_image_processor';
|
||||
/**
|
||||
* The image to process
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The pixel resolution for detection
|
||||
*/
|
||||
detect_resolution?: number;
|
||||
/**
|
||||
* The pixel resolution for the output image
|
||||
*/
|
||||
image_resolution?: number;
|
||||
/**
|
||||
* Whether to use scribble mode
|
||||
*/
|
||||
scribble?: boolean;
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Blurs an image
|
||||
*/
|
||||
export type ImageBlurInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'img_blur';
|
||||
/**
|
||||
* The image to blur
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The blur radius
|
||||
*/
|
||||
radius?: number;
|
||||
/**
|
||||
* The type of blur
|
||||
*/
|
||||
blur_type?: 'gaussian' | 'box';
|
||||
};
|
||||
@@ -1,14 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* The category of an image.
|
||||
*
|
||||
* - GENERAL: The image is an output, init image, or otherwise an image without a specialized purpose.
|
||||
* - MASK: The image is a mask image.
|
||||
* - CONTROL: The image is a ControlNet control image.
|
||||
* - USER: The image is a user-provide image.
|
||||
* - OTHER: The image is some other type of image with a specialized purpose. To be used by external nodes.
|
||||
*/
|
||||
export type ImageCategory = 'general' | 'mask' | 'control' | 'user' | 'other';
|
||||
@@ -1,28 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Gets a channel from an image.
|
||||
*/
|
||||
export type ImageChannelInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'img_chan';
|
||||
/**
|
||||
* The image to get the channel from
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The channel to get
|
||||
*/
|
||||
channel?: 'A' | 'R' | 'G' | 'B';
|
||||
};
|
||||
@@ -1,28 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Converts an image to a different mode.
|
||||
*/
|
||||
export type ImageConvertInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'img_conv';
|
||||
/**
|
||||
* The image to convert
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The mode to convert to
|
||||
*/
|
||||
mode?: 'L' | 'RGB' | 'RGBA' | 'CMYK' | 'YCbCr' | 'LAB' | 'HSV' | 'I' | 'F';
|
||||
};
|
||||
@@ -1,40 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Crops an image to a specified box. The box can be outside of the image.
|
||||
*/
|
||||
export type ImageCropInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'img_crop';
|
||||
/**
|
||||
* The image to crop
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The left x coordinate of the crop rectangle
|
||||
*/
|
||||
'x'?: number;
|
||||
/**
|
||||
* The top y coordinate of the crop rectangle
|
||||
*/
|
||||
'y'?: number;
|
||||
/**
|
||||
* The width of the crop rectangle
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* The height of the crop rectangle
|
||||
*/
|
||||
height?: number;
|
||||
};
|
||||
@@ -1,69 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageCategory } from './ImageCategory';
|
||||
import type { ImageMetadata } from './ImageMetadata';
|
||||
import type { ResourceOrigin } from './ResourceOrigin';
|
||||
|
||||
/**
|
||||
* Deserialized image record, enriched for the frontend with URLs.
|
||||
*/
|
||||
export type ImageDTO = {
|
||||
/**
|
||||
* The unique name of the image.
|
||||
*/
|
||||
image_name: string;
|
||||
/**
|
||||
* The URL of the image.
|
||||
*/
|
||||
image_url: string;
|
||||
/**
|
||||
* The URL of the image's thumbnail.
|
||||
*/
|
||||
thumbnail_url: string;
|
||||
/**
|
||||
* The type of the image.
|
||||
*/
|
||||
image_origin: ResourceOrigin;
|
||||
/**
|
||||
* The category of the image.
|
||||
*/
|
||||
image_category: ImageCategory;
|
||||
/**
|
||||
* The width of the image in px.
|
||||
*/
|
||||
width: number;
|
||||
/**
|
||||
* The height of the image in px.
|
||||
*/
|
||||
height: number;
|
||||
/**
|
||||
* The created timestamp of the image.
|
||||
*/
|
||||
created_at: string;
|
||||
/**
|
||||
* The updated timestamp of the image.
|
||||
*/
|
||||
updated_at: string;
|
||||
/**
|
||||
* The deleted timestamp of the image.
|
||||
*/
|
||||
deleted_at?: string;
|
||||
/**
|
||||
* Whether this is an intermediate image.
|
||||
*/
|
||||
is_intermediate: boolean;
|
||||
/**
|
||||
* The session ID that generated this image, if it is a generated image.
|
||||
*/
|
||||
session_id?: string;
|
||||
/**
|
||||
* The node ID that generated this image, if it is a generated image.
|
||||
*/
|
||||
node_id?: string;
|
||||
/**
|
||||
* A limited subset of the image's generation metadata. Retrieve the image's session for full metadata.
|
||||
*/
|
||||
metadata?: ImageMetadata;
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* An image field used for passing image objects between invocations
|
||||
*/
|
||||
export type ImageField = {
|
||||
/**
|
||||
* The name of the image
|
||||
*/
|
||||
image_name: string;
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Inverse linear interpolation of all pixels of an image
|
||||
*/
|
||||
export type ImageInverseLerpInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'img_ilerp';
|
||||
/**
|
||||
* The image to lerp
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The minimum input value
|
||||
*/
|
||||
min?: number;
|
||||
/**
|
||||
* The maximum input value
|
||||
*/
|
||||
max?: number;
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Linear interpolation of all pixels of an image
|
||||
*/
|
||||
export type ImageLerpInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'img_lerp';
|
||||
/**
|
||||
* The image to lerp
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The minimum output value
|
||||
*/
|
||||
min?: number;
|
||||
/**
|
||||
* The maximum output value
|
||||
*/
|
||||
max?: number;
|
||||
};
|
||||
@@ -1,80 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Core generation metadata for an image/tensor generated in InvokeAI.
|
||||
*
|
||||
* Also includes any metadata from the image's PNG tEXt chunks.
|
||||
*
|
||||
* Generated by traversing the execution graph, collecting the parameters of the nearest ancestors
|
||||
* of a given node.
|
||||
*
|
||||
* Full metadata may be accessed by querying for the session in the `graph_executions` table.
|
||||
*/
|
||||
export type ImageMetadata = {
|
||||
/**
|
||||
* The type of the ancestor node of the image output node.
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The positive conditioning.
|
||||
*/
|
||||
positive_conditioning?: string;
|
||||
/**
|
||||
* The negative conditioning.
|
||||
*/
|
||||
negative_conditioning?: string;
|
||||
/**
|
||||
* Width of the image/latents in pixels.
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* Height of the image/latents in pixels.
|
||||
*/
|
||||
height?: number;
|
||||
/**
|
||||
* The seed used for noise generation.
|
||||
*/
|
||||
seed?: number;
|
||||
/**
|
||||
* The classifier-free guidance scale.
|
||||
*/
|
||||
cfg_scale?: (number | Array<number>);
|
||||
/**
|
||||
* The number of steps used for inference.
|
||||
*/
|
||||
steps?: number;
|
||||
/**
|
||||
* The scheduler used for inference.
|
||||
*/
|
||||
scheduler?: string;
|
||||
/**
|
||||
* The model used for inference.
|
||||
*/
|
||||
model?: string;
|
||||
/**
|
||||
* The strength used for image-to-image/latents-to-latents.
|
||||
*/
|
||||
strength?: number;
|
||||
/**
|
||||
* The ID of the initial latents.
|
||||
*/
|
||||
latents?: string;
|
||||
/**
|
||||
* The VAE used for decoding.
|
||||
*/
|
||||
vae?: string;
|
||||
/**
|
||||
* The UNet used dor inference.
|
||||
*/
|
||||
unet?: string;
|
||||
/**
|
||||
* The CLIP Encoder used for conditioning.
|
||||
*/
|
||||
clip?: string;
|
||||
/**
|
||||
* Uploaded image metadata, extracted from the PNG tEXt chunk.
|
||||
*/
|
||||
extra?: string;
|
||||
};
|
||||
@@ -1,28 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Multiplies two images together using `PIL.ImageChops.multiply()`.
|
||||
*/
|
||||
export type ImageMultiplyInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'img_mul';
|
||||
/**
|
||||
* The first image to multiply
|
||||
*/
|
||||
image1?: ImageField;
|
||||
/**
|
||||
* The second image to multiply
|
||||
*/
|
||||
image2?: ImageField;
|
||||
};
|
||||
@@ -1,24 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Base class for invocations that output an image
|
||||
*/
|
||||
export type ImageOutput = {
|
||||
type: 'image_output';
|
||||
/**
|
||||
* The output image
|
||||
*/
|
||||
image: ImageField;
|
||||
/**
|
||||
* The width of the image in pixels
|
||||
*/
|
||||
width: number;
|
||||
/**
|
||||
* The height of the image in pixels
|
||||
*/
|
||||
height: number;
|
||||
};
|
||||
@@ -1,40 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Pastes an image into another image.
|
||||
*/
|
||||
export type ImagePasteInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'img_paste';
|
||||
/**
|
||||
* The base image
|
||||
*/
|
||||
base_image?: ImageField;
|
||||
/**
|
||||
* The image to paste
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The mask to use when pasting
|
||||
*/
|
||||
mask?: ImageField;
|
||||
/**
|
||||
* The left x coordinate at which to paste the image
|
||||
*/
|
||||
'x'?: number;
|
||||
/**
|
||||
* The top y coordinate at which to paste the image
|
||||
*/
|
||||
'y'?: number;
|
||||
};
|
||||
@@ -1,24 +0,0 @@
|
||||
/* 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;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'image_processor';
|
||||
/**
|
||||
* The image to process
|
||||
*/
|
||||
image?: ImageField;
|
||||
};
|
||||
@@ -1,28 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageCategory } from './ImageCategory';
|
||||
|
||||
/**
|
||||
* A set of changes to apply to an image record.
|
||||
*
|
||||
* Only limited changes are valid:
|
||||
* - `image_category`: change the category of an image
|
||||
* - `session_id`: change the session associated with an image
|
||||
* - `is_intermediate`: change the image's `is_intermediate` flag
|
||||
*/
|
||||
export type ImageRecordChanges = {
|
||||
/**
|
||||
* The image's new category.
|
||||
*/
|
||||
image_category?: ImageCategory;
|
||||
/**
|
||||
* The image's new session ID.
|
||||
*/
|
||||
session_id?: string;
|
||||
/**
|
||||
* The image's new `is_intermediate` flag.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
};
|
||||
@@ -1,36 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Resizes an image to specific dimensions
|
||||
*/
|
||||
export type ImageResizeInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'img_resize';
|
||||
/**
|
||||
* The image to resize
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The width to resize to (px)
|
||||
*/
|
||||
width: number;
|
||||
/**
|
||||
* The height to resize to (px)
|
||||
*/
|
||||
height: number;
|
||||
/**
|
||||
* The resampling mode
|
||||
*/
|
||||
resample_mode?: 'nearest' | 'box' | 'bilinear' | 'hamming' | 'bicubic' | 'lanczos';
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Scales an image by a factor
|
||||
*/
|
||||
export type ImageScaleInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'img_scale';
|
||||
/**
|
||||
* The image to scale
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The factor by which to scale the image
|
||||
*/
|
||||
scale_factor: number;
|
||||
/**
|
||||
* The resampling mode
|
||||
*/
|
||||
resample_mode?: 'nearest' | 'box' | 'bilinear' | 'hamming' | 'bicubic' | 'lanczos';
|
||||
};
|
||||
@@ -1,76 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Generates an image using img2img.
|
||||
*/
|
||||
export type ImageToImageInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'img2img';
|
||||
/**
|
||||
* The prompt to generate an image from
|
||||
*/
|
||||
prompt?: string;
|
||||
/**
|
||||
* The seed to use (omit for random)
|
||||
*/
|
||||
seed?: number;
|
||||
/**
|
||||
* The number of steps to use to generate the image
|
||||
*/
|
||||
steps?: number;
|
||||
/**
|
||||
* The width of the resulting image
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* The height of the resulting image
|
||||
*/
|
||||
height?: number;
|
||||
/**
|
||||
* The Classifier-Free Guidance, higher values may result in a result closer to the prompt
|
||||
*/
|
||||
cfg_scale?: number;
|
||||
/**
|
||||
* The scheduler to use
|
||||
*/
|
||||
scheduler?: 'ddim' | 'ddpm' | 'deis' | 'lms' | 'pndm' | 'heun' | 'heun_k' | 'euler' | 'euler_k' | 'euler_a' | 'kdpm_2' | 'kdpm_2_a' | 'dpmpp_2s' | 'dpmpp_2m' | 'dpmpp_2m_k' | 'unipc';
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The strength of the original image
|
||||
*/
|
||||
strength?: number;
|
||||
/**
|
||||
* Whether or not the result should be fit to the aspect ratio of the input image
|
||||
*/
|
||||
fit?: boolean;
|
||||
};
|
||||
@@ -1,28 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Encodes an image into latents.
|
||||
*/
|
||||
export type ImageToLatentsInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'i2l';
|
||||
/**
|
||||
* The image to encode
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The model to use
|
||||
*/
|
||||
model?: string;
|
||||
};
|
||||
@@ -1,21 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* The URLs for an image and its thumbnail.
|
||||
*/
|
||||
export type ImageUrlsDTO = {
|
||||
/**
|
||||
* The unique name of the image.
|
||||
*/
|
||||
image_name: string;
|
||||
/**
|
||||
* The URL of the image.
|
||||
*/
|
||||
image_url: string;
|
||||
/**
|
||||
* The URL of the image's thumbnail.
|
||||
*/
|
||||
thumbnail_url: string;
|
||||
};
|
||||
@@ -1,29 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ColorField } from './ColorField';
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Infills transparent areas of an image with a solid color
|
||||
*/
|
||||
export type InfillColorInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'infill_rgba';
|
||||
/**
|
||||
* The image to infill
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The color to use to infill
|
||||
*/
|
||||
color?: ColorField;
|
||||
};
|
||||
@@ -1,24 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Infills transparent areas of an image using the PatchMatch algorithm
|
||||
*/
|
||||
export type InfillPatchMatchInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'infill_patchmatch';
|
||||
/**
|
||||
* The image to infill
|
||||
*/
|
||||
image?: ImageField;
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Infills transparent areas of an image with tiles of the image
|
||||
*/
|
||||
export type InfillTileInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'infill_tile';
|
||||
/**
|
||||
* The image to infill
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The tile size (px)
|
||||
*/
|
||||
tile_size?: number;
|
||||
/**
|
||||
* The seed to use for tile generation (omit for random)
|
||||
*/
|
||||
seed?: number;
|
||||
};
|
||||
@@ -1,121 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ColorField } from './ColorField';
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Generates an image using inpaint.
|
||||
*/
|
||||
export type InpaintInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'inpaint';
|
||||
/**
|
||||
* The prompt to generate an image from
|
||||
*/
|
||||
prompt?: string;
|
||||
/**
|
||||
* The seed to use (omit for random)
|
||||
*/
|
||||
seed?: number;
|
||||
/**
|
||||
* The number of steps to use to generate the image
|
||||
*/
|
||||
steps?: number;
|
||||
/**
|
||||
* The width of the resulting image
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* The height of the resulting image
|
||||
*/
|
||||
height?: number;
|
||||
/**
|
||||
* The Classifier-Free Guidance, higher values may result in a result closer to the prompt
|
||||
*/
|
||||
cfg_scale?: number;
|
||||
/**
|
||||
* The scheduler to use
|
||||
*/
|
||||
scheduler?: 'ddim' | 'ddpm' | 'deis' | 'lms' | 'pndm' | 'heun' | 'heun_k' | 'euler' | 'euler_k' | 'euler_a' | 'kdpm_2' | 'kdpm_2_a' | 'dpmpp_2s' | 'dpmpp_2m' | 'dpmpp_2m_k' | 'unipc';
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The strength of the original image
|
||||
*/
|
||||
strength?: number;
|
||||
/**
|
||||
* Whether or not the result should be fit to the aspect ratio of the input image
|
||||
*/
|
||||
fit?: boolean;
|
||||
/**
|
||||
* The mask
|
||||
*/
|
||||
mask?: ImageField;
|
||||
/**
|
||||
* The seam inpaint size (px)
|
||||
*/
|
||||
seam_size?: number;
|
||||
/**
|
||||
* The seam inpaint blur radius (px)
|
||||
*/
|
||||
seam_blur?: number;
|
||||
/**
|
||||
* The seam inpaint strength
|
||||
*/
|
||||
seam_strength?: number;
|
||||
/**
|
||||
* The number of steps to use for seam inpaint
|
||||
*/
|
||||
seam_steps?: number;
|
||||
/**
|
||||
* The tile infill method size (px)
|
||||
*/
|
||||
tile_size?: number;
|
||||
/**
|
||||
* The method used to infill empty regions (px)
|
||||
*/
|
||||
infill_method?: 'patchmatch' | 'tile' | 'solid';
|
||||
/**
|
||||
* The width of the inpaint region (px)
|
||||
*/
|
||||
inpaint_width?: number;
|
||||
/**
|
||||
* The height of the inpaint region (px)
|
||||
*/
|
||||
inpaint_height?: number;
|
||||
/**
|
||||
* The solid infill method color
|
||||
*/
|
||||
inpaint_fill?: ColorField;
|
||||
/**
|
||||
* The amount by which to replace masked areas with latent noise
|
||||
*/
|
||||
inpaint_replace?: number;
|
||||
};
|
||||
@@ -1,14 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* A collection of integers
|
||||
*/
|
||||
export type IntCollectionOutput = {
|
||||
type?: 'int_collection';
|
||||
/**
|
||||
* The int collection
|
||||
*/
|
||||
collection?: Array<number>;
|
||||
};
|
||||
@@ -1,14 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* An integer output
|
||||
*/
|
||||
export type IntOutput = {
|
||||
type?: 'int_output';
|
||||
/**
|
||||
* The output integer
|
||||
*/
|
||||
'a'?: number;
|
||||
};
|
||||
@@ -1,26 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Iterates over a list of items
|
||||
*/
|
||||
export type IterateInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'iterate';
|
||||
/**
|
||||
* The list of items to iterate over
|
||||
*/
|
||||
collection?: Array<any>;
|
||||
/**
|
||||
* The index, will be provided on executed iterators
|
||||
*/
|
||||
index?: number;
|
||||
};
|
||||
@@ -1,14 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Used to connect iteration outputs. Will be expanded to a specific output.
|
||||
*/
|
||||
export type IterateInvocationOutput = {
|
||||
type: 'iterate_output';
|
||||
/**
|
||||
* The item being iterated over
|
||||
*/
|
||||
item: any;
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* A latents field used for passing latents between invocations
|
||||
*/
|
||||
export type LatentsField = {
|
||||
/**
|
||||
* The name of the latents
|
||||
*/
|
||||
latents_name: string;
|
||||
};
|
||||
@@ -1,24 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { LatentsField } from './LatentsField';
|
||||
|
||||
/**
|
||||
* Base class for invocations that output latents
|
||||
*/
|
||||
export type LatentsOutput = {
|
||||
type?: 'latents_output';
|
||||
/**
|
||||
* The output latents
|
||||
*/
|
||||
latents?: LatentsField;
|
||||
/**
|
||||
* The width of the latents in pixels
|
||||
*/
|
||||
width: number;
|
||||
/**
|
||||
* The height of the latents in pixels
|
||||
*/
|
||||
height: number;
|
||||
};
|
||||
@@ -1,28 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { LatentsField } from './LatentsField';
|
||||
|
||||
/**
|
||||
* Generates an image from latents.
|
||||
*/
|
||||
export type LatentsToImageInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'l2i';
|
||||
/**
|
||||
* The latents to generate an image from
|
||||
*/
|
||||
latents?: LatentsField;
|
||||
/**
|
||||
* The model to use
|
||||
*/
|
||||
model?: string;
|
||||
};
|
||||
@@ -1,62 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ConditioningField } from './ConditioningField';
|
||||
import type { ControlField } from './ControlField';
|
||||
import type { LatentsField } from './LatentsField';
|
||||
|
||||
/**
|
||||
* Generates latents using latents as base image.
|
||||
*/
|
||||
export type LatentsToLatentsInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'l2l';
|
||||
/**
|
||||
* Positive conditioning for generation
|
||||
*/
|
||||
positive_conditioning?: ConditioningField;
|
||||
/**
|
||||
* Negative conditioning for generation
|
||||
*/
|
||||
negative_conditioning?: ConditioningField;
|
||||
/**
|
||||
* The noise to use
|
||||
*/
|
||||
noise?: LatentsField;
|
||||
/**
|
||||
* The number of steps to use to generate the image
|
||||
*/
|
||||
steps?: number;
|
||||
/**
|
||||
* The Classifier-Free Guidance, higher values may result in a result closer to the prompt
|
||||
*/
|
||||
cfg_scale?: (number | Array<number>);
|
||||
/**
|
||||
* The scheduler to use
|
||||
*/
|
||||
scheduler?: 'ddim' | 'ddpm' | 'deis' | 'lms' | 'pndm' | 'heun' | 'heun_k' | 'euler' | 'euler_k' | 'euler_a' | 'kdpm_2' | 'kdpm_2_a' | 'dpmpp_2s' | 'dpmpp_2m' | 'dpmpp_2m_k' | 'unipc';
|
||||
/**
|
||||
* The model to use (currently ignored)
|
||||
*/
|
||||
model?: string;
|
||||
/**
|
||||
* The control to use
|
||||
*/
|
||||
control?: (ControlField | Array<ControlField>);
|
||||
/**
|
||||
* The latents to use as a base image
|
||||
*/
|
||||
latents?: LatentsField;
|
||||
/**
|
||||
* The strength of the latents to use
|
||||
*/
|
||||
strength?: number;
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
/* 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;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'lineart_anime_image_processor';
|
||||
/**
|
||||
* The image to process
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The pixel resolution for detection
|
||||
*/
|
||||
detect_resolution?: number;
|
||||
/**
|
||||
* The pixel resolution for the output image
|
||||
*/
|
||||
image_resolution?: number;
|
||||
};
|
||||
@@ -1,36 +0,0 @@
|
||||
/* 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;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'lineart_image_processor';
|
||||
/**
|
||||
* The image to process
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The pixel resolution for detection
|
||||
*/
|
||||
detect_resolution?: number;
|
||||
/**
|
||||
* The pixel resolution for the output image
|
||||
*/
|
||||
image_resolution?: number;
|
||||
/**
|
||||
* Whether to use coarse mode
|
||||
*/
|
||||
coarse?: boolean;
|
||||
};
|
||||
@@ -1,24 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Load an image and provide it as output.
|
||||
*/
|
||||
export type LoadImageInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'load_image';
|
||||
/**
|
||||
* The image to load
|
||||
*/
|
||||
image?: ImageField;
|
||||
};
|
||||
@@ -1,28 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Extracts the alpha channel of an image as a mask.
|
||||
*/
|
||||
export type MaskFromAlphaInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'tomask';
|
||||
/**
|
||||
* The image to create the mask from
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* Whether or not to invert the mask
|
||||
*/
|
||||
invert?: boolean;
|
||||
};
|
||||
@@ -1,24 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Base class for invocations that output a mask
|
||||
*/
|
||||
export type MaskOutput = {
|
||||
type: 'mask';
|
||||
/**
|
||||
* The output mask
|
||||
*/
|
||||
mask: ImageField;
|
||||
/**
|
||||
* The width of the mask in pixels
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* The height of the mask in pixels
|
||||
*/
|
||||
height?: number;
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageField } from './ImageField';
|
||||
|
||||
/**
|
||||
* Applies mediapipe face processing to image
|
||||
*/
|
||||
export type MediapipeFaceProcessorInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'mediapipe_face_processor';
|
||||
/**
|
||||
* The image to process
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* Maximum number of faces to detect
|
||||
*/
|
||||
max_faces?: number;
|
||||
/**
|
||||
* Minimum confidence for face detection
|
||||
*/
|
||||
min_confidence?: number;
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
/* 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;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'midas_depth_image_processor';
|
||||
/**
|
||||
* The image to process
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* Midas parameter `a_mult` (a = a_mult * PI)
|
||||
*/
|
||||
a_mult?: number;
|
||||
/**
|
||||
* Midas parameter `bg_th`
|
||||
*/
|
||||
bg_th?: number;
|
||||
};
|
||||
@@ -1,40 +0,0 @@
|
||||
/* 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;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'mlsd_image_processor';
|
||||
/**
|
||||
* The image to process
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The pixel resolution for detection
|
||||
*/
|
||||
detect_resolution?: number;
|
||||
/**
|
||||
* The pixel resolution for the output image
|
||||
*/
|
||||
image_resolution?: number;
|
||||
/**
|
||||
* MLSD parameter `thr_v`
|
||||
*/
|
||||
thr_v?: number;
|
||||
/**
|
||||
* MLSD parameter `thr_d`
|
||||
*/
|
||||
thr_d?: number;
|
||||
};
|
||||
@@ -1,10 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { CkptModelInfo } from './CkptModelInfo';
|
||||
import type { DiffusersModelInfo } from './DiffusersModelInfo';
|
||||
|
||||
export type ModelsList = {
|
||||
models: Record<string, (CkptModelInfo | DiffusersModelInfo)>;
|
||||
};
|
||||
@@ -1,26 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Multiplies two numbers
|
||||
*/
|
||||
export type MultiplyInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'mul';
|
||||
/**
|
||||
* The first number
|
||||
*/
|
||||
'a'?: number;
|
||||
/**
|
||||
* The second number
|
||||
*/
|
||||
'b'?: number;
|
||||
};
|
||||
@@ -1,30 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Generates latent noise.
|
||||
*/
|
||||
export type NoiseInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'noise';
|
||||
/**
|
||||
* The seed to use
|
||||
*/
|
||||
seed?: number;
|
||||
/**
|
||||
* The width of the resulting noise
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* The height of the resulting noise
|
||||
*/
|
||||
height?: number;
|
||||
};
|
||||
@@ -1,24 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { LatentsField } from './LatentsField';
|
||||
|
||||
/**
|
||||
* Invocation noise output
|
||||
*/
|
||||
export type NoiseOutput = {
|
||||
type?: 'noise_output';
|
||||
/**
|
||||
* The output noise
|
||||
*/
|
||||
noise?: LatentsField;
|
||||
/**
|
||||
* The width of the noise in pixels
|
||||
*/
|
||||
width: number;
|
||||
/**
|
||||
* The height of the noise in pixels
|
||||
*/
|
||||
height: number;
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
/* 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;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'normalbae_image_processor';
|
||||
/**
|
||||
* The image to process
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The pixel resolution for detection
|
||||
*/
|
||||
detect_resolution?: number;
|
||||
/**
|
||||
* The pixel resolution for the output image
|
||||
*/
|
||||
image_resolution?: number;
|
||||
};
|
||||
@@ -1,27 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ImageDTO } from './ImageDTO';
|
||||
|
||||
/**
|
||||
* Offset-paginated results
|
||||
*/
|
||||
export type OffsetPaginatedResults_ImageDTO_ = {
|
||||
/**
|
||||
* Items
|
||||
*/
|
||||
items: Array<ImageDTO>;
|
||||
/**
|
||||
* Offset from which to retrieve items
|
||||
*/
|
||||
offset: number;
|
||||
/**
|
||||
* Limit of items to get
|
||||
*/
|
||||
limit: number;
|
||||
/**
|
||||
* Total number of items in result
|
||||
*/
|
||||
total: number;
|
||||
};
|
||||
@@ -1,36 +0,0 @@
|
||||
/* 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;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'openpose_image_processor';
|
||||
/**
|
||||
* The image to process
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* Whether to use hands and face mode
|
||||
*/
|
||||
hand_and_face?: boolean;
|
||||
/**
|
||||
* The pixel resolution for detection
|
||||
*/
|
||||
detect_resolution?: number;
|
||||
/**
|
||||
* The pixel resolution for the output image
|
||||
*/
|
||||
image_resolution?: number;
|
||||
};
|
||||
@@ -1,31 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { GraphExecutionState } from './GraphExecutionState';
|
||||
|
||||
/**
|
||||
* Paginated results
|
||||
*/
|
||||
export type PaginatedResults_GraphExecutionState_ = {
|
||||
/**
|
||||
* Items
|
||||
*/
|
||||
items: Array<GraphExecutionState>;
|
||||
/**
|
||||
* Current Page
|
||||
*/
|
||||
page: number;
|
||||
/**
|
||||
* Total number of pages
|
||||
*/
|
||||
pages: number;
|
||||
/**
|
||||
* Number of items per page
|
||||
*/
|
||||
per_page: number;
|
||||
/**
|
||||
* Total number of items in result
|
||||
*/
|
||||
total: number;
|
||||
};
|
||||
@@ -1,22 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* A float parameter
|
||||
*/
|
||||
export type ParamFloatInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'param_float';
|
||||
/**
|
||||
* The float value
|
||||
*/
|
||||
param?: number;
|
||||
};
|
||||
@@ -1,22 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* An integer parameter
|
||||
*/
|
||||
export type ParamIntInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'param_int';
|
||||
/**
|
||||
* The integer value
|
||||
*/
|
||||
'a'?: number;
|
||||
};
|
||||
@@ -1,40 +0,0 @@
|
||||
/* 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;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'pidi_image_processor';
|
||||
/**
|
||||
* The image to process
|
||||
*/
|
||||
image?: ImageField;
|
||||
/**
|
||||
* The pixel resolution for detection
|
||||
*/
|
||||
detect_resolution?: number;
|
||||
/**
|
||||
* The pixel resolution for the output image
|
||||
*/
|
||||
image_resolution?: number;
|
||||
/**
|
||||
* Whether to use safe mode
|
||||
*/
|
||||
safe?: boolean;
|
||||
/**
|
||||
* Whether to use scribble mode
|
||||
*/
|
||||
scribble?: boolean;
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Base class for invocations that output a collection of prompts
|
||||
*/
|
||||
export type PromptCollectionOutput = {
|
||||
type: 'prompt_collection_output';
|
||||
/**
|
||||
* The output prompt collection
|
||||
*/
|
||||
prompt_collection: Array<string>;
|
||||
/**
|
||||
* The size of the prompt collection
|
||||
*/
|
||||
count: number;
|
||||
};
|
||||
@@ -1,14 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Base class for invocations that output a prompt
|
||||
*/
|
||||
export type PromptOutput = {
|
||||
type: 'prompt';
|
||||
/**
|
||||
* The output prompt
|
||||
*/
|
||||
prompt: string;
|
||||
};
|
||||
@@ -1,26 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Outputs a single random integer.
|
||||
*/
|
||||
export type RandomIntInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'rand_int';
|
||||
/**
|
||||
* The inclusive low value
|
||||
*/
|
||||
low?: number;
|
||||
/**
|
||||
* The exclusive high value
|
||||
*/
|
||||
high?: number;
|
||||
};
|
||||
@@ -1,34 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Creates a collection of random numbers
|
||||
*/
|
||||
export type RandomRangeInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'random_range';
|
||||
/**
|
||||
* The inclusive low value
|
||||
*/
|
||||
low?: number;
|
||||
/**
|
||||
* The exclusive high value
|
||||
*/
|
||||
high?: number;
|
||||
/**
|
||||
* The number of values to generate
|
||||
*/
|
||||
size?: number;
|
||||
/**
|
||||
* The seed for the RNG (omit for random)
|
||||
*/
|
||||
seed?: number;
|
||||
};
|
||||
@@ -1,30 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Creates a range of numbers from start to stop with step
|
||||
*/
|
||||
export type RangeInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'range';
|
||||
/**
|
||||
* The start of the range
|
||||
*/
|
||||
start?: number;
|
||||
/**
|
||||
* The stop of the range
|
||||
*/
|
||||
stop?: number;
|
||||
/**
|
||||
* The step of the range
|
||||
*/
|
||||
step?: number;
|
||||
};
|
||||
@@ -1,30 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* Creates a range from start to start + size with step
|
||||
*/
|
||||
export type RangeOfSizeInvocation = {
|
||||
/**
|
||||
* The id of this node. Must be unique among all nodes.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether or not this node is an intermediate node.
|
||||
*/
|
||||
is_intermediate?: boolean;
|
||||
type?: 'range_of_size';
|
||||
/**
|
||||
* The start of the range
|
||||
*/
|
||||
start?: number;
|
||||
/**
|
||||
* The number of values
|
||||
*/
|
||||
size?: number;
|
||||
/**
|
||||
* The step of the range
|
||||
*/
|
||||
step?: number;
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user