chore(ui): tidy after rebase

This commit is contained in:
psychedelicious 2024-03-10 19:54:50 +11:00
parent a1c4ef55d7
commit c725851c64
4 changed files with 136 additions and 147 deletions

View File

@ -1,13 +0,0 @@
export const calculateStepPercentage = (step: number, total_steps: number, order: number) => {
if (total_steps === 0) {
return 0;
}
// we add one extra to step so that the progress bar will be full when denoise completes
if (order === 2) {
return Math.floor((step + 1 + 1) / 2) / Math.floor((total_steps + 1) / 2);
}
return (step + 1 + 1) / (total_steps + 1);
};

File diff suppressed because one or more lines are too long

View File

@ -39,7 +39,6 @@ export type OffsetPaginatedResults_ImageDTO_ = S['OffsetPaginatedResults_ImageDT
// Models
export type ModelType = S['ModelType'];
export type SubModelType = S['SubModelType'];
export type BaseModelType = S['BaseModelType'];
// Model Configs

View File

@ -19,8 +19,9 @@ export type ModelInstallErrorEvent = S['ModelInstallErrorEvent'];
export type ModelInstallStartedEvent = S['ModelInstallStartedEvent'];
export type ModelInstallCancelledEvent = S['ModelInstallCancelledEvent'];
type SessionStartedEvent = S['SessionStartedEvent'];
export type SessionCompleteEvent = S['SessionCompleteEvent'];
export type SessionCanceledEvent = S['SessionCanceledEvent'];
type SessionCanceledEvent = S['SessionCanceledEvent'];
export type QueueItemStatusChangedEvent = S['QueueItemStatusChangedEvent'];
@ -28,21 +29,23 @@ export type BulkDownloadStartedEvent = S['BulkDownloadStartedEvent'];
export type BulkDownloadCompleteEvent = S['BulkDownloadCompleteEvent'];
export type BulkDownloadFailedEvent = S['BulkDownloadErrorEvent'];
export type ClientEmitSubscribeQueue = {
type ClientEmitSubscribeQueue = {
queue_id: string;
};
export type ClientEmitUnsubscribeQueue = ClientEmitSubscribeQueue;
export type ClientEmitSubscribeBulkDownload = {
type ClientEmitUnsubscribeQueue = ClientEmitSubscribeQueue;
type ClientEmitSubscribeBulkDownload = {
bulk_download_id: string;
};
export type ClientEmitUnsubscribeBulkDownload = ClientEmitSubscribeBulkDownload;
type ClientEmitUnsubscribeBulkDownload = ClientEmitSubscribeBulkDownload;
export type ServerToClientEvents = {
invocation_denoise_progress: (payload: InvocationDenoiseProgressEvent) => void;
invocation_complete: (payload: InvocationCompleteEvent) => void;
invocation_error: (payload: InvocationErrorEvent) => void;
invocation_started: (payload: InvocationStartedEvent) => void;
session_started: (payload: SessionStartedEvent) => void;
session_complete: (payload: SessionCompleteEvent) => void;
session_canceled: (payload: SessionCanceledEvent) => void;
model_load_started: (payload: ModelLoadStartedEvent) => void;
model_install_started: (payload: ModelInstallStartedEvent) => void;
model_install_download_progress: (payload: ModelInstallDownloadProgressEvent) => void;