2022-11-23 23:08:00 -07:00
|
|
|
export interface PromptInput {
|
|
|
|
prompt: string;
|
2022-11-24 00:23:34 -07:00
|
|
|
seed?: number;
|
2022-11-23 23:08:00 -07:00
|
|
|
denoising?: number;
|
|
|
|
guidance?: number;
|
2022-11-30 12:53:40 -07:00
|
|
|
|
|
|
|
// promptsInput is assigned a transitionCounter equal to the result.counter upon first being played
|
|
|
|
transitionCounter?: number;
|
2022-11-23 23:08:00 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface InferenceInput {
|
|
|
|
alpha: number;
|
2022-11-25 22:17:29 -07:00
|
|
|
num_inference_steps?: number;
|
2022-11-26 12:30:42 -07:00
|
|
|
seed_image_id?: string;
|
2022-11-25 22:17:29 -07:00
|
|
|
mask_image_id?: string;
|
2022-11-23 23:08:00 -07:00
|
|
|
|
|
|
|
start: PromptInput;
|
|
|
|
end: PromptInput;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface InferenceResult {
|
|
|
|
input: InferenceInput;
|
|
|
|
|
2022-11-24 01:00:06 -07:00
|
|
|
counter: number;
|
|
|
|
|
2022-11-30 12:53:40 -07:00
|
|
|
// Binary played status (true = played or playing, false = not played)
|
|
|
|
played: boolean;
|
|
|
|
|
2022-11-23 23:08:00 -07:00
|
|
|
// URL of the image
|
|
|
|
image: string;
|
|
|
|
|
|
|
|
// URL of the audio
|
|
|
|
audio: string;
|
2022-11-27 14:53:22 -07:00
|
|
|
|
|
|
|
// Duration of the audio in seconds
|
|
|
|
duration_s: number;
|
2022-11-23 23:08:00 -07:00
|
|
|
}
|
2022-11-27 16:38:00 -07:00
|
|
|
|
|
|
|
// High-level state of the interactive app
|
|
|
|
export enum AppState {
|
|
|
|
UNINITIALIZED = "UNINITIALIZED",
|
|
|
|
SAME_PROMPT = "SAME_PROMPT",
|
|
|
|
TRANSITION = "TRANSITION",
|
|
|
|
}
|