diff --git a/invokeai/app/services/events/events_common.py b/invokeai/app/services/events/events_common.py index 373b422863..f7264e2341 100644 --- a/invokeai/app/services/events/events_common.py +++ b/invokeai/app/services/events/events_common.py @@ -275,7 +275,7 @@ class SessionCanceledEvent(SessionEvent): @payload_schema.register # pyright: ignore [reportUnknownMemberType] -class QueueItemStatusChangedEvent(QueueItemEvent): +class QueueItemStatusChangedEvent(SessionEvent): """Emitted when a queue item's status changes""" __event_name__ = "queue_item_status_changed" @@ -299,6 +299,7 @@ class QueueItemStatusChangedEvent(QueueItemEvent): queue_id=queue_item.queue_id, item_id=queue_item.item_id, batch_id=queue_item.batch_id, + session_id=queue_item.session_id, status=queue_item.status, error_type=queue_item.error_type, error_message=queue_item.error_message, diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/index.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/index.ts index 77345be5d3..62298a106c 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/index.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/index.ts @@ -35,6 +35,7 @@ import { addImageUploadedFulfilledListener } from 'app/store/middleware/listener import { addModelSelectedListener } from 'app/store/middleware/listenerMiddleware/listeners/modelSelected'; import { addModelsLoadedListener } from 'app/store/middleware/listenerMiddleware/listeners/modelsLoaded'; import { addDynamicPromptsListener } from 'app/store/middleware/listenerMiddleware/listeners/promptChanged'; +import { addSetDefaultSettingsListener } from 'app/store/middleware/listenerMiddleware/listeners/setDefaultSettings'; import { addSocketConnectedEventListener } from 'app/store/middleware/listenerMiddleware/listeners/socketio/socketConnected'; import { addSocketDisconnectedEventListener } from 'app/store/middleware/listenerMiddleware/listeners/socketio/socketDisconnected'; import { addGeneratorProgressEventListener } from 'app/store/middleware/listenerMiddleware/listeners/socketio/socketGeneratorProgress'; @@ -53,8 +54,6 @@ import { addUpscaleRequestedListener } from 'app/store/middleware/listenerMiddle import { addWorkflowLoadRequestedListener } from 'app/store/middleware/listenerMiddleware/listeners/workflowLoadRequested'; import type { AppDispatch, RootState } from 'app/store/store'; -import { addSetDefaultSettingsListener } from './listeners/setDefaultSettings'; - export const listenerMiddleware = createListenerMiddleware(); export type AppStartListening = TypedStartListening; diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/bulkDownload.tsx b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/bulkDownload.tsx index 51945081ea..489f218370 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/bulkDownload.tsx +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/bulkDownload.tsx @@ -5,8 +5,8 @@ import { toast } from 'features/toast/toast'; import { t } from 'i18next'; import { imagesApi } from 'services/api/endpoints/images'; import { - socketBulkDownloadCompleted, - socketBulkDownloadFailed, + socketBulkDownloadComplete, + socketBulkDownloadError, socketBulkDownloadStarted, } from 'services/events/actions'; @@ -54,7 +54,7 @@ export const addBulkDownloadListeners = (startAppListening: AppStartListening) = }); startAppListening({ - actionCreator: socketBulkDownloadCompleted, + actionCreator: socketBulkDownloadComplete, effect: async (action) => { log.debug(action.payload.data, 'Bulk download preparation completed'); @@ -80,7 +80,7 @@ export const addBulkDownloadListeners = (startAppListening: AppStartListening) = }); startAppListening({ - actionCreator: socketBulkDownloadFailed, + actionCreator: socketBulkDownloadError, effect: async (action) => { log.debug(action.payload.data, 'Bulk download preparation failed'); diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/controlNetImageProcessed.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/controlNetImageProcessed.ts index a48756787f..1e485b31d5 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/controlNetImageProcessed.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/controlNetImageProcessed.ts @@ -69,8 +69,8 @@ export const addControlNetImageProcessedListener = (startAppListening: AppStartL const [invocationCompleteAction] = await take( (action): action is ReturnType => socketInvocationComplete.match(action) && - action.payload.data.queue_batch_id === enqueueResult.batch.batch_id && - action.payload.data.source_node_id === nodeId + action.payload.data.batch_id === enqueueResult.batch.batch_id && + action.payload.data.invocation_source_id === nodeId ); // We still have to check the output type diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationComplete.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationComplete.ts index 06dc08d846..3d00e2b4a6 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationComplete.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationComplete.ts @@ -29,12 +29,12 @@ export const addInvocationCompleteEventListener = (startAppListening: AppStartLi actionCreator: socketInvocationComplete, effect: async (action, { dispatch, getState }) => { const { data } = action.payload; - log.debug({ data: parseify(data) }, `Invocation complete (${action.payload.data.node.type})`); + log.debug({ data: parseify(data) }, `Invocation complete (${data.invocation_type})`); - const { result, node, queue_batch_id, source_node_id } = data; + const { result, invocation_source_id } = data; // This complete event has an associated image output - if (isImageOutput(result) && !nodeTypeDenylist.includes(node.type)) { - const { image_name } = result.image; + if (isImageOutput(data.result) && !nodeTypeDenylist.includes(data.invocation_type)) { + const { image_name } = data.result.image; const { canvas, gallery } = getState(); // This populates the `getImageDTO` cache @@ -48,7 +48,7 @@ export const addInvocationCompleteEventListener = (startAppListening: AppStartLi imageDTORequest.unsubscribe(); // Add canvas images to the staging area - if (canvas.batchIds.includes(queue_batch_id) && data.source_node_id === CANVAS_OUTPUT) { + if (canvas.batchIds.includes(data.batch_id) && data.invocation_source_id === CANVAS_OUTPUT) { dispatch(addImageToStagingArea(imageDTO)); } @@ -114,7 +114,7 @@ export const addInvocationCompleteEventListener = (startAppListening: AppStartLi } } - const nes = deepClone($nodeExecutionStates.get()[source_node_id]); + const nes = deepClone($nodeExecutionStates.get()[invocation_source_id]); if (nes) { nes.status = zNodeStatus.enum.COMPLETED; if (nes.progress !== null) { diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationError.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationError.ts index df1759f3a9..41c2afd08d 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationError.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationError.ts @@ -11,9 +11,9 @@ export const addInvocationErrorEventListener = (startAppListening: AppStartListe startAppListening({ actionCreator: socketInvocationError, effect: (action) => { - log.error(action.payload, `Invocation error (${action.payload.data.node.type})`); - const { source_node_id, error_type, error_message, error_traceback } = action.payload.data; - const nes = deepClone($nodeExecutionStates.get()[source_node_id]); + const { invocation_source_id, invocation_type, error_type, error_message, error_traceback } = action.payload.data; + log.error(action.payload, `Invocation error (${invocation_type})`); + const nes = deepClone($nodeExecutionStates.get()[invocation_source_id]); if (nes) { nes.status = zNodeStatus.enum.FAILED; nes.progress = null; diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationStarted.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationStarted.ts index 9d6e0ac14d..7221589fcb 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationStarted.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationStarted.ts @@ -11,9 +11,9 @@ export const addInvocationStartedEventListener = (startAppListening: AppStartLis startAppListening({ actionCreator: socketInvocationStarted, effect: (action) => { - log.debug(action.payload, `Invocation started (${action.payload.data.node.type})`); - const { source_node_id } = action.payload.data; - const nes = deepClone($nodeExecutionStates.get()[source_node_id]); + log.debug(action.payload, `Invocation started (${action.payload.data.invocation_type})`); + const { invocation_source_id } = action.payload.data; + const nes = deepClone($nodeExecutionStates.get()[invocation_source_id]); if (nes) { nes.status = zNodeStatus.enum.IN_PROGRESS; upsertExecutionState(nes.nodeId, nes); diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketModelInstall.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketModelInstall.ts index f474c2736b..7fafb8302c 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketModelInstall.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketModelInstall.ts @@ -3,14 +3,14 @@ import { api, LIST_TAG } from 'services/api'; import { modelsApi } from 'services/api/endpoints/models'; import { socketModelInstallCancelled, - socketModelInstallCompleted, - socketModelInstallDownloading, + socketModelInstallComplete, + socketModelInstallDownloadProgress, socketModelInstallError, } from 'services/events/actions'; export const addModelInstallEventListener = (startAppListening: AppStartListening) => { startAppListening({ - actionCreator: socketModelInstallDownloading, + actionCreator: socketModelInstallDownloadProgress, effect: async (action, { dispatch }) => { const { bytes, total_bytes, id } = action.payload.data; @@ -29,7 +29,7 @@ export const addModelInstallEventListener = (startAppListening: AppStartListenin }); startAppListening({ - actionCreator: socketModelInstallCompleted, + actionCreator: socketModelInstallComplete, effect: (action, { dispatch }) => { const { id } = action.payload.data; diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketModelLoad.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketModelLoad.ts index 4f4ec7635e..f6d917dff1 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketModelLoad.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketModelLoad.ts @@ -1,6 +1,6 @@ import { logger } from 'app/logging/logger'; import type { AppStartListening } from 'app/store/middleware/listenerMiddleware'; -import { socketModelLoadCompleted, socketModelLoadStarted } from 'services/events/actions'; +import { socketModelLoadComplete, socketModelLoadStarted } from 'services/events/actions'; const log = logger('socketio'); @@ -8,10 +8,11 @@ export const addModelLoadEventListener = (startAppListening: AppStartListening) startAppListening({ actionCreator: socketModelLoadStarted, effect: (action) => { - const { model_config, submodel_type } = action.payload.data; - const { name, base, type } = model_config; + const { config, submodel_type } = action.payload.data; + const { name, base, type } = config; const extras: string[] = [base, type]; + if (submodel_type) { extras.push(submodel_type); } @@ -23,16 +24,15 @@ export const addModelLoadEventListener = (startAppListening: AppStartListening) }); startAppListening({ - actionCreator: socketModelLoadCompleted, + actionCreator: socketModelLoadComplete, effect: (action) => { - const { model_config, submodel_type } = action.payload.data; - const { name, base, type } = model_config; + const { config, submodel_type } = action.payload.data; + const { name, base, type } = config; const extras: string[] = [base, type]; if (submodel_type) { extras.push(submodel_type); } - const message = `Model load complete: ${name} (${extras.join(', ')})`; log.debug(action.payload, message); diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketQueueItemStatusChanged.tsx b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketQueueItemStatusChanged.tsx index 7ec8b7ed06..8a83609b3c 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketQueueItemStatusChanged.tsx +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketQueueItemStatusChanged.tsx @@ -16,16 +16,36 @@ export const addSocketQueueItemStatusChangedEventListener = (startAppListening: actionCreator: socketQueueItemStatusChanged, effect: async (action, { dispatch, getState }) => { // we've got new status for the queue item, batch and queue - const { queue_item, batch_status, queue_status } = action.payload.data; + const { + item_id, + session_id, + status, + started_at, + updated_at, + completed_at, + batch_status, + queue_status, + error_type, + error_message, + error_traceback, + } = action.payload.data; - log.debug(action.payload, `Queue item ${queue_item.item_id} status updated: ${queue_item.status}`); + log.debug(action.payload, `Queue item ${item_id} status updated: ${status}`); // Update this specific queue item in the list of queue items (this is the queue item DTO, without the session) dispatch( queueApi.util.updateQueryData('listQueueItems', undefined, (draft) => { queueItemsAdapter.updateOne(draft, { - id: String(queue_item.item_id), - changes: queue_item, + id: String(item_id), + changes: { + status, + started_at, + updated_at: updated_at ?? undefined, + completed_at: completed_at ?? undefined, + error_type, + error_message, + error_traceback, + }, }); }) ); @@ -52,11 +72,11 @@ export const addSocketQueueItemStatusChangedEventListener = (startAppListening: 'CurrentSessionQueueItem', 'NextSessionQueueItem', 'InvocationCacheStatus', - { type: 'SessionQueueItem', id: queue_item.item_id }, + { type: 'SessionQueueItem', id: item_id }, ]) ); - if (queue_item.status === 'in_progress') { + if (status === 'in_progress') { forEach($nodeExecutionStates.get(), (nes) => { if (!nes) { return; @@ -69,8 +89,7 @@ export const addSocketQueueItemStatusChangedEventListener = (startAppListening: clone.outputs = []; $nodeExecutionStates.setKey(clone.nodeId, clone); }); - } else if (queue_item.status === 'failed' && queue_item.error_type) { - const { error_type, error_message, session_id } = queue_item; + } else if (status === 'failed' && error_type) { const isLocal = getState().config.isLocal ?? true; const sessionId = session_id; diff --git a/invokeai/frontend/web/src/features/system/store/systemSlice.ts b/invokeai/frontend/web/src/features/system/store/systemSlice.ts index 4d87b2c4ec..db14b7f186 100644 --- a/invokeai/frontend/web/src/features/system/store/systemSlice.ts +++ b/invokeai/frontend/web/src/features/system/store/systemSlice.ts @@ -1,7 +1,6 @@ import type { PayloadAction } from '@reduxjs/toolkit'; import { createSlice } from '@reduxjs/toolkit'; import type { PersistConfig, RootState } from 'app/store/store'; -import { calculateStepPercentage } from 'features/system/util/calculateStepPercentage'; import type { LogLevelName } from 'roarr'; import { socketConnected, @@ -10,7 +9,7 @@ import { socketGraphExecutionStateComplete, socketInvocationComplete, socketInvocationStarted, - socketModelLoadCompleted, + socketModelLoadComplete, socketModelLoadStarted, socketQueueItemStatusChanged, } from 'services/events/actions'; @@ -98,14 +97,7 @@ export const systemSlice = createSlice({ * Generator Progress */ builder.addCase(socketGeneratorProgress, (state, action) => { - const { - step, - total_steps, - order, - progress_image, - graph_execution_state_id: session_id, - queue_batch_id: batch_id, - } = action.payload.data; + const { step, total_steps, progress_image, session_id, batch_id } = action.payload.data; if (state.cancellations.includes(session_id)) { // Do not update the progress if this session has been cancelled. This prevents a race condition where we get a @@ -116,8 +108,7 @@ export const systemSlice = createSlice({ state.denoiseProgress = { step, total_steps, - order, - percentage: calculateStepPercentage(step, total_steps, order), + percentage: step / total_steps, progress_image, session_id, batch_id, @@ -146,15 +137,15 @@ export const systemSlice = createSlice({ state.status = 'LOADING_MODEL'; }); - builder.addCase(socketModelLoadCompleted, (state) => { + builder.addCase(socketModelLoadComplete, (state) => { state.status = 'CONNECTED'; }); builder.addCase(socketQueueItemStatusChanged, (state, action) => { - if (['completed', 'canceled', 'failed'].includes(action.payload.data.queue_item.status)) { + if (['completed', 'canceled', 'failed'].includes(action.payload.data.status)) { state.status = 'CONNECTED'; state.denoiseProgress = null; - state.cancellations.push(action.payload.data.queue_item.session_id); + state.cancellations.push(action.payload.data.session_id); } }); }, diff --git a/invokeai/frontend/web/src/features/system/store/types.ts b/invokeai/frontend/web/src/features/system/store/types.ts index e0fa5634a2..d896dee5f5 100644 --- a/invokeai/frontend/web/src/features/system/store/types.ts +++ b/invokeai/frontend/web/src/features/system/store/types.ts @@ -10,7 +10,6 @@ type DenoiseProgress = { progress_image: ProgressImage | null | undefined; step: number; total_steps: number; - order: number; percentage: number; }; diff --git a/invokeai/frontend/web/src/services/api/schema.ts b/invokeai/frontend/web/src/services/api/schema.ts index b2cbcd036e..767fa4f4b7 100644 --- a/invokeai/frontend/web/src/services/api/schema.ts +++ b/invokeai/frontend/web/src/services/api/schema.ts @@ -4273,7 +4273,7 @@ export type components = { * @description The nodes in this graph */ nodes: { - [key: string]: components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["ColorMapImageProcessorInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["DepthAnythingImageProcessorInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["DWOpenposeImageProcessorInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"]; + [key: string]: components["schemas"]["IdealSizeInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["ColorMapImageProcessorInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["DepthAnythingImageProcessorInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["DWOpenposeImageProcessorInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["NoiseInvocation"]; }; /** * Edges @@ -4310,7 +4310,7 @@ export type components = { * @description The results of node executions */ results: { - [key: string]: components["schemas"]["CLIPSkipInvocationOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["LoRALoaderOutput"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["BooleanOutput"] | components["schemas"]["StringOutput"] | components["schemas"]["SDXLRefinerModelLoaderOutput"] | components["schemas"]["BooleanCollectionOutput"] | components["schemas"]["StringPosNegOutput"] | components["schemas"]["SchedulerOutput"] | components["schemas"]["VAEOutput"] | components["schemas"]["ColorOutput"] | components["schemas"]["IPAdapterOutput"] | components["schemas"]["IdealSizeOutput"] | components["schemas"]["LoRASelectorOutput"] | components["schemas"]["ModelIdentifierOutput"] | components["schemas"]["IntegerOutput"] | components["schemas"]["GradientMaskOutput"] | components["schemas"]["T2IAdapterOutput"] | components["schemas"]["ImageCollectionOutput"] | components["schemas"]["FaceOffOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["MetadataItemOutput"] | components["schemas"]["FaceMaskOutput"] | components["schemas"]["ConditioningCollectionOutput"] | components["schemas"]["StringCollectionOutput"] | components["schemas"]["SDXLLoRALoaderOutput"] | components["schemas"]["ImageOutput"] | components["schemas"]["IntegerCollectionOutput"] | components["schemas"]["SeamlessModeOutput"] | components["schemas"]["CollectInvocationOutput"] | components["schemas"]["CLIPOutput"] | components["schemas"]["ConditioningOutput"] | components["schemas"]["String2Output"] | components["schemas"]["MaskOutput"] | components["schemas"]["LatentsCollectionOutput"] | components["schemas"]["CalculateImageTilesOutput"] | components["schemas"]["TileToPropertiesOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["DenoiseMaskOutput"] | components["schemas"]["MetadataOutput"] | components["schemas"]["PairTileImageOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["SDXLModelLoaderOutput"] | components["schemas"]["UNetOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["ColorCollectionOutput"]; + [key: string]: components["schemas"]["StringOutput"] | components["schemas"]["ColorCollectionOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["ConditioningCollectionOutput"] | components["schemas"]["StringPosNegOutput"] | components["schemas"]["SeamlessModeOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["IntegerOutput"] | components["schemas"]["TileToPropertiesOutput"] | components["schemas"]["CalculateImageTilesOutput"] | components["schemas"]["ModelIdentifierOutput"] | components["schemas"]["ImageCollectionOutput"] | components["schemas"]["SchedulerOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["ConditioningOutput"] | components["schemas"]["UNetOutput"] | components["schemas"]["MaskOutput"] | components["schemas"]["PairTileImageOutput"] | components["schemas"]["IPAdapterOutput"] | components["schemas"]["SDXLModelLoaderOutput"] | components["schemas"]["CollectInvocationOutput"] | components["schemas"]["StringCollectionOutput"] | components["schemas"]["ImageOutput"] | components["schemas"]["CLIPOutput"] | components["schemas"]["IntegerCollectionOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["MetadataItemOutput"] | components["schemas"]["VAEOutput"] | components["schemas"]["FaceOffOutput"] | components["schemas"]["SDXLRefinerModelLoaderOutput"] | components["schemas"]["LoRALoaderOutput"] | components["schemas"]["LoRASelectorOutput"] | components["schemas"]["DenoiseMaskOutput"] | components["schemas"]["SDXLLoRALoaderOutput"] | components["schemas"]["BooleanOutput"] | components["schemas"]["IdealSizeOutput"] | components["schemas"]["BooleanCollectionOutput"] | components["schemas"]["CLIPSkipInvocationOutput"] | components["schemas"]["LatentsCollectionOutput"] | components["schemas"]["String2Output"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["MetadataOutput"] | components["schemas"]["FaceMaskOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["T2IAdapterOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["ColorOutput"] | components["schemas"]["GradientMaskOutput"]; }; /** * Errors @@ -11987,144 +11987,144 @@ export type components = { */ UIType: "MainModelField" | "SDXLMainModelField" | "SDXLRefinerModelField" | "ONNXModelField" | "VAEModelField" | "LoRAModelField" | "ControlNetModelField" | "IPAdapterModelField" | "T2IAdapterModelField" | "SchedulerField" | "AnyField" | "CollectionField" | "CollectionItemField" | "DEPRECATED_Boolean" | "DEPRECATED_Color" | "DEPRECATED_Conditioning" | "DEPRECATED_Control" | "DEPRECATED_Float" | "DEPRECATED_Image" | "DEPRECATED_Integer" | "DEPRECATED_Latents" | "DEPRECATED_String" | "DEPRECATED_BooleanCollection" | "DEPRECATED_ColorCollection" | "DEPRECATED_ConditioningCollection" | "DEPRECATED_ControlCollection" | "DEPRECATED_FloatCollection" | "DEPRECATED_ImageCollection" | "DEPRECATED_IntegerCollection" | "DEPRECATED_LatentsCollection" | "DEPRECATED_StringCollection" | "DEPRECATED_BooleanPolymorphic" | "DEPRECATED_ColorPolymorphic" | "DEPRECATED_ConditioningPolymorphic" | "DEPRECATED_ControlPolymorphic" | "DEPRECATED_FloatPolymorphic" | "DEPRECATED_ImagePolymorphic" | "DEPRECATED_IntegerPolymorphic" | "DEPRECATED_LatentsPolymorphic" | "DEPRECATED_StringPolymorphic" | "DEPRECATED_UNet" | "DEPRECATED_Vae" | "DEPRECATED_CLIP" | "DEPRECATED_Collection" | "DEPRECATED_CollectionItem" | "DEPRECATED_Enum" | "DEPRECATED_WorkflowField" | "DEPRECATED_IsIntermediate" | "DEPRECATED_BoardField" | "DEPRECATED_MetadataItem" | "DEPRECATED_MetadataItemCollection" | "DEPRECATED_MetadataItemPolymorphic" | "DEPRECATED_MetadataDict"; InvocationOutputMap: { - calculate_image_tiles_min_overlap: components["schemas"]["CalculateImageTilesOutput"]; - img_crop: components["schemas"]["ImageOutput"]; - img_nsfw: components["schemas"]["ImageOutput"]; - face_identifier: components["schemas"]["ImageOutput"]; - string_join: components["schemas"]["StringOutput"]; - rand_int: components["schemas"]["IntegerOutput"]; - normalbae_image_processor: components["schemas"]["ImageOutput"]; - infill_cv2: components["schemas"]["ImageOutput"]; - rectangle_mask: components["schemas"]["MaskOutput"]; - sdxl_model_loader: components["schemas"]["SDXLModelLoaderOutput"]; - img_conv: components["schemas"]["ImageOutput"]; - infill_patchmatch: components["schemas"]["ImageOutput"]; - cv_inpaint: components["schemas"]["ImageOutput"]; - float_to_int: components["schemas"]["IntegerOutput"]; - latents_collection: components["schemas"]["LatentsCollectionOutput"]; - compel: components["schemas"]["ConditioningOutput"]; - lineart_image_processor: components["schemas"]["ImageOutput"]; - infill_rgba: components["schemas"]["ImageOutput"]; - tile_to_properties: components["schemas"]["TileToPropertiesOutput"]; - range: components["schemas"]["IntegerCollectionOutput"]; - tile_image_processor: components["schemas"]["ImageOutput"]; - merge_metadata: components["schemas"]["MetadataOutput"]; - model_identifier: components["schemas"]["ModelIdentifierOutput"]; - color_map_image_processor: components["schemas"]["ImageOutput"]; - lscale: components["schemas"]["LatentsOutput"]; - float_range: components["schemas"]["FloatCollectionOutput"]; - sdxl_refiner_model_loader: components["schemas"]["SDXLRefinerModelLoaderOutput"]; - esrgan: components["schemas"]["ImageOutput"]; - face_off: components["schemas"]["FaceOffOutput"]; - dynamic_prompt: components["schemas"]["StringCollectionOutput"]; - calculate_image_tiles_even_split: components["schemas"]["CalculateImageTilesOutput"]; - img_paste: components["schemas"]["ImageOutput"]; - i2l: components["schemas"]["LatentsOutput"]; - calculate_image_tiles: components["schemas"]["CalculateImageTilesOutput"]; - heuristic_resize: components["schemas"]["ImageOutput"]; - lora_collection_loader: components["schemas"]["LoRALoaderOutput"]; - mask_combine: components["schemas"]["ImageOutput"]; - integer: components["schemas"]["IntegerOutput"]; - t2i_adapter: components["schemas"]["T2IAdapterOutput"]; - img_lerp: components["schemas"]["ImageOutput"]; - lblend: components["schemas"]["LatentsOutput"]; - canny_image_processor: components["schemas"]["ImageOutput"]; - save_image: components["schemas"]["ImageOutput"]; - lresize: components["schemas"]["LatentsOutput"]; - sdxl_lora_collection_loader: components["schemas"]["SDXLLoRALoaderOutput"]; - img_channel_offset: components["schemas"]["ImageOutput"]; - leres_image_processor: components["schemas"]["ImageOutput"]; + ideal_size: components["schemas"]["IdealSizeOutput"]; boolean_collection: components["schemas"]["BooleanCollectionOutput"]; - merge_tiles_to_image: components["schemas"]["ImageOutput"]; - mask_edge: components["schemas"]["ImageOutput"]; - mediapipe_face_processor: components["schemas"]["ImageOutput"]; - string: components["schemas"]["StringOutput"]; - lora_selector: components["schemas"]["LoRASelectorOutput"]; - lora_loader: components["schemas"]["LoRALoaderOutput"]; - sdxl_lora_loader: components["schemas"]["SDXLLoRALoaderOutput"]; - string_replace: components["schemas"]["StringOutput"]; - pidi_image_processor: components["schemas"]["ImageOutput"]; - img_watermark: components["schemas"]["ImageOutput"]; - infill_tile: components["schemas"]["ImageOutput"]; - content_shuffle_image_processor: components["schemas"]["ImageOutput"]; - metadata: components["schemas"]["MetadataOutput"]; - image: components["schemas"]["ImageOutput"]; - image_collection: components["schemas"]["ImageCollectionOutput"]; - boolean: components["schemas"]["BooleanOutput"]; - rand_float: components["schemas"]["FloatOutput"]; - string_collection: components["schemas"]["StringCollectionOutput"]; - segment_anything_processor: components["schemas"]["ImageOutput"]; + latents_collection: components["schemas"]["LatentsCollectionOutput"]; canvas_paste_back: components["schemas"]["ImageOutput"]; img_channel_multiply: components["schemas"]["ImageOutput"]; - step_param_easing: components["schemas"]["FloatCollectionOutput"]; + boolean: components["schemas"]["BooleanOutput"]; img_pad_crop: components["schemas"]["ImageOutput"]; - depth_anything_image_processor: components["schemas"]["ImageOutput"]; - mul: components["schemas"]["IntegerOutput"]; unsharp_mask: components["schemas"]["ImageOutput"]; color_correct: components["schemas"]["ImageOutput"]; - image_mask_to_tensor: components["schemas"]["MaskOutput"]; - string_join_three: components["schemas"]["StringOutput"]; - float: components["schemas"]["FloatOutput"]; - alpha_mask_to_tensor: components["schemas"]["MaskOutput"]; - round_float: components["schemas"]["FloatOutput"]; - clip_skip: components["schemas"]["CLIPSkipInvocationOutput"]; mask_from_id: components["schemas"]["ImageOutput"]; - dw_openpose_image_processor: components["schemas"]["ImageOutput"]; - conditioning: components["schemas"]["ConditioningOutput"]; - main_model_loader: components["schemas"]["ModelLoaderOutput"]; - vae_loader: components["schemas"]["VAEOutput"]; - img_scale: components["schemas"]["ImageOutput"]; - tomask: components["schemas"]["ImageOutput"]; - random_range: components["schemas"]["IntegerCollectionOutput"]; - sub: components["schemas"]["IntegerOutput"]; - show_image: components["schemas"]["ImageOutput"]; - ideal_size: components["schemas"]["IdealSizeOutput"]; - img_resize: components["schemas"]["ImageOutput"]; - l2i: components["schemas"]["ImageOutput"]; - integer_math: components["schemas"]["IntegerOutput"]; - add: components["schemas"]["IntegerOutput"]; - iterate: components["schemas"]["IterateInvocationOutput"]; - img_blur: components["schemas"]["ImageOutput"]; - range_of_size: components["schemas"]["IntegerCollectionOutput"]; - integer_collection: components["schemas"]["IntegerCollectionOutput"]; - img_ilerp: components["schemas"]["ImageOutput"]; - ip_adapter: components["schemas"]["IPAdapterOutput"]; - conditioning_collection: components["schemas"]["ConditioningCollectionOutput"]; - string_split: components["schemas"]["String2Output"]; - div: components["schemas"]["IntegerOutput"]; - seamless: components["schemas"]["SeamlessModeOutput"]; - prompt_from_file: components["schemas"]["StringCollectionOutput"]; - crop_latents: components["schemas"]["LatentsOutput"]; - freeu: components["schemas"]["UNetOutput"]; - invert_tensor_mask: components["schemas"]["MaskOutput"]; - collect: components["schemas"]["CollectInvocationOutput"]; - float_collection: components["schemas"]["FloatCollectionOutput"]; - pair_tile_image: components["schemas"]["PairTileImageOutput"]; latents: components["schemas"]["LatentsOutput"]; - noise: components["schemas"]["NoiseOutput"]; - float_math: components["schemas"]["FloatOutput"]; + conditioning_collection: components["schemas"]["ConditioningCollectionOutput"]; + crop_latents: components["schemas"]["LatentsOutput"]; + show_image: components["schemas"]["ImageOutput"]; + img_scale: components["schemas"]["ImageOutput"]; + dynamic_prompt: components["schemas"]["StringCollectionOutput"]; + rand_float: components["schemas"]["FloatOutput"]; color: components["schemas"]["ColorOutput"]; - img_mul: components["schemas"]["ImageOutput"]; + range: components["schemas"]["IntegerCollectionOutput"]; + metadata: components["schemas"]["MetadataOutput"]; + string_replace: components["schemas"]["StringOutput"]; + image_mask_to_tensor: components["schemas"]["MaskOutput"]; + img_resize: components["schemas"]["ImageOutput"]; + mul: components["schemas"]["IntegerOutput"]; + ip_adapter: components["schemas"]["IPAdapterOutput"]; + seamless: components["schemas"]["SeamlessModeOutput"]; + denoise_latents: components["schemas"]["LatentsOutput"]; + freeu: components["schemas"]["UNetOutput"]; + alpha_mask_to_tensor: components["schemas"]["MaskOutput"]; + img_blur: components["schemas"]["ImageOutput"]; create_denoise_mask: components["schemas"]["DenoiseMaskOutput"]; + round_float: components["schemas"]["FloatOutput"]; + create_gradient_mask: components["schemas"]["GradientMaskOutput"]; + controlnet: components["schemas"]["ControlOutput"]; + img_ilerp: components["schemas"]["ImageOutput"]; + string_join_three: components["schemas"]["StringOutput"]; + sub: components["schemas"]["IntegerOutput"]; + scheduler: components["schemas"]["SchedulerOutput"]; + zoe_depth_image_processor: components["schemas"]["ImageOutput"]; + integer_collection: components["schemas"]["IntegerCollectionOutput"]; + hed_image_processor: components["schemas"]["ImageOutput"]; + add: components["schemas"]["IntegerOutput"]; + integer_math: components["schemas"]["IntegerOutput"]; + sdxl_model_loader: components["schemas"]["SDXLModelLoaderOutput"]; + midas_depth_image_processor: components["schemas"]["ImageOutput"]; + string_split: components["schemas"]["String2Output"]; + clip_skip: components["schemas"]["CLIPSkipInvocationOutput"]; + lineart_anime_image_processor: components["schemas"]["ImageOutput"]; + pair_tile_image: components["schemas"]["PairTileImageOutput"]; + img_mul: components["schemas"]["ImageOutput"]; + mlsd_image_processor: components["schemas"]["ImageOutput"]; + lora_collection_loader: components["schemas"]["LoRALoaderOutput"]; + infill_lama: components["schemas"]["ImageOutput"]; + float_range: components["schemas"]["FloatCollectionOutput"]; + normalbae_image_processor: components["schemas"]["ImageOutput"]; + face_mask_detection: components["schemas"]["FaceMaskOutput"]; + model_identifier: components["schemas"]["ModelIdentifierOutput"]; + string: components["schemas"]["StringOutput"]; + sdxl_refiner_model_loader: components["schemas"]["SDXLRefinerModelLoaderOutput"]; + img_chan: components["schemas"]["ImageOutput"]; + div: components["schemas"]["IntegerOutput"]; + float: components["schemas"]["FloatOutput"]; + lresize: components["schemas"]["LatentsOutput"]; + tile_image_processor: components["schemas"]["ImageOutput"]; + invert_tensor_mask: components["schemas"]["MaskOutput"]; + step_param_easing: components["schemas"]["FloatCollectionOutput"]; + color_map_image_processor: components["schemas"]["ImageOutput"]; + blank_image: components["schemas"]["ImageOutput"]; + img_hue_adjust: components["schemas"]["ImageOutput"]; + i2l: components["schemas"]["LatentsOutput"]; + img_nsfw: components["schemas"]["ImageOutput"]; + face_identifier: components["schemas"]["ImageOutput"]; + lineart_image_processor: components["schemas"]["ImageOutput"]; + img_crop: components["schemas"]["ImageOutput"]; + image: components["schemas"]["ImageOutput"]; + iterate: components["schemas"]["IterateInvocationOutput"]; + image_collection: components["schemas"]["ImageCollectionOutput"]; + sdxl_lora_loader: components["schemas"]["SDXLLoRALoaderOutput"]; + calculate_image_tiles_min_overlap: components["schemas"]["CalculateImageTilesOutput"]; + infill_cv2: components["schemas"]["ImageOutput"]; + t2i_adapter: components["schemas"]["T2IAdapterOutput"]; + string_collection: components["schemas"]["StringCollectionOutput"]; + lblend: components["schemas"]["LatentsOutput"]; string_split_neg: components["schemas"]["StringPosNegOutput"]; metadata_item: components["schemas"]["MetadataItemOutput"]; - face_mask_detection: components["schemas"]["FaceMaskOutput"]; - controlnet: components["schemas"]["ControlOutput"]; - create_gradient_mask: components["schemas"]["GradientMaskOutput"]; - infill_lama: components["schemas"]["ImageOutput"]; - zoe_depth_image_processor: components["schemas"]["ImageOutput"]; - hed_image_processor: components["schemas"]["ImageOutput"]; - midas_depth_image_processor: components["schemas"]["ImageOutput"]; - img_chan: components["schemas"]["ImageOutput"]; - img_hue_adjust: components["schemas"]["ImageOutput"]; - mlsd_image_processor: components["schemas"]["ImageOutput"]; - scheduler: components["schemas"]["SchedulerOutput"]; - lineart_anime_image_processor: components["schemas"]["ImageOutput"]; - denoise_latents: components["schemas"]["LatentsOutput"]; + lscale: components["schemas"]["LatentsOutput"]; + infill_patchmatch: components["schemas"]["ImageOutput"]; + random_range: components["schemas"]["IntegerCollectionOutput"]; + sdxl_lora_collection_loader: components["schemas"]["SDXLLoRALoaderOutput"]; + img_conv: components["schemas"]["ImageOutput"]; + lora_selector: components["schemas"]["LoRASelectorOutput"]; + infill_rgba: components["schemas"]["ImageOutput"]; + cv_inpaint: components["schemas"]["ImageOutput"]; + esrgan: components["schemas"]["ImageOutput"]; + heuristic_resize: components["schemas"]["ImageOutput"]; + tile_to_properties: components["schemas"]["TileToPropertiesOutput"]; + leres_image_processor: components["schemas"]["ImageOutput"]; + lora_loader: components["schemas"]["LoRALoaderOutput"]; + mediapipe_face_processor: components["schemas"]["ImageOutput"]; core_metadata: components["schemas"]["MetadataOutput"]; - blank_image: components["schemas"]["ImageOutput"]; + canny_image_processor: components["schemas"]["ImageOutput"]; + float_math: components["schemas"]["FloatOutput"]; + range_of_size: components["schemas"]["IntegerCollectionOutput"]; + collect: components["schemas"]["CollectInvocationOutput"]; + img_paste: components["schemas"]["ImageOutput"]; + calculate_image_tiles_even_split: components["schemas"]["CalculateImageTilesOutput"]; + face_off: components["schemas"]["FaceOffOutput"]; + rand_int: components["schemas"]["IntegerOutput"]; + calculate_image_tiles: components["schemas"]["CalculateImageTilesOutput"]; + content_shuffle_image_processor: components["schemas"]["ImageOutput"]; + img_lerp: components["schemas"]["ImageOutput"]; + float_to_int: components["schemas"]["IntegerOutput"]; + save_image: components["schemas"]["ImageOutput"]; + mask_combine: components["schemas"]["ImageOutput"]; + img_channel_offset: components["schemas"]["ImageOutput"]; + pidi_image_processor: components["schemas"]["ImageOutput"]; + merge_metadata: components["schemas"]["MetadataOutput"]; + vae_loader: components["schemas"]["VAEOutput"]; + segment_anything_processor: components["schemas"]["ImageOutput"]; + rectangle_mask: components["schemas"]["MaskOutput"]; + depth_anything_image_processor: components["schemas"]["ImageOutput"]; + mask_edge: components["schemas"]["ImageOutput"]; + prompt_from_file: components["schemas"]["StringCollectionOutput"]; + integer: components["schemas"]["IntegerOutput"]; + merge_tiles_to_image: components["schemas"]["ImageOutput"]; sdxl_compel_prompt: components["schemas"]["ConditioningOutput"]; + conditioning: components["schemas"]["ConditioningOutput"]; sdxl_refiner_compel_prompt: components["schemas"]["ConditioningOutput"]; + tomask: components["schemas"]["ImageOutput"]; + l2i: components["schemas"]["ImageOutput"]; + main_model_loader: components["schemas"]["ModelLoaderOutput"]; + string_join: components["schemas"]["StringOutput"]; + compel: components["schemas"]["ConditioningOutput"]; + img_watermark: components["schemas"]["ImageOutput"]; + infill_tile: components["schemas"]["ImageOutput"]; + dw_openpose_image_processor: components["schemas"]["ImageOutput"]; + float_collection: components["schemas"]["FloatCollectionOutput"]; + noise: components["schemas"]["NoiseOutput"]; }; /** * InvocationStartedEvent @@ -12464,6 +12464,11 @@ export type components = { * @description The ID of the queue batch */ batch_id: string; + /** + * Session Id + * @description The ID of the session (aka graph execution state) + */ + session_id: string; /** * Status * @description The new status of the queue item diff --git a/invokeai/frontend/web/src/services/events/actions.ts b/invokeai/frontend/web/src/services/events/actions.ts index 8dd1cfd4fa..7c0cad28bb 100644 --- a/invokeai/frontend/web/src/services/events/actions.ts +++ b/invokeai/frontend/web/src/services/events/actions.ts @@ -1,22 +1,21 @@ import { createAction } from '@reduxjs/toolkit'; import type { - BulkDownloadCompletedEvent, + BulkDownloadCompleteEvent, BulkDownloadFailedEvent, BulkDownloadStartedEvent, - GeneratorProgressEvent, - GraphExecutionStateCompleteEvent, InvocationCompleteEvent, + InvocationDenoiseProgressEvent, InvocationErrorEvent, - InvocationRetrievalErrorEvent, InvocationStartedEvent, ModelInstallCancelledEvent, - ModelInstallCompletedEvent, - ModelInstallDownloadingEvent, + ModelInstallCompleteEvent, + ModelInstallDownloadProgressEvent, ModelInstallErrorEvent, - ModelLoadCompletedEvent, + ModelInstallStartedEvent, + ModelLoadCompleteEvent, ModelLoadStartedEvent, QueueItemStatusChangedEvent, - SessionRetrievalErrorEvent, + SessionCompleteEvent, } from 'services/events/types'; // Create actions for each socket @@ -45,28 +44,32 @@ export const socketInvocationError = createAction<{ }>('socket/socketInvocationError'); export const socketGraphExecutionStateComplete = createAction<{ - data: GraphExecutionStateCompleteEvent; + data: SessionCompleteEvent; }>('socket/socketGraphExecutionStateComplete'); export const socketGeneratorProgress = createAction<{ - data: GeneratorProgressEvent; + data: InvocationDenoiseProgressEvent; }>('socket/socketGeneratorProgress'); export const socketModelLoadStarted = createAction<{ data: ModelLoadStartedEvent; }>('socket/socketModelLoadStarted'); -export const socketModelLoadCompleted = createAction<{ - data: ModelLoadCompletedEvent; -}>('socket/socketModelLoadCompleted'); +export const socketModelLoadComplete = createAction<{ + data: ModelLoadCompleteEvent; +}>('socket/socketModelLoadComplete'); -export const socketModelInstallDownloading = createAction<{ - data: ModelInstallDownloadingEvent; -}>('socket/socketModelInstallDownloading'); +export const socketModelInstallStarted = createAction<{ + data: ModelInstallStartedEvent; +}>('socket/socketModelInstallStarted'); -export const socketModelInstallCompleted = createAction<{ - data: ModelInstallCompletedEvent; -}>('socket/socketModelInstallCompleted'); +export const socketModelInstallDownloadProgress = createAction<{ + data: ModelInstallDownloadProgressEvent; +}>('socket/socketModelInstallDownloadProgress'); + +export const socketModelInstallComplete = createAction<{ + data: ModelInstallCompleteEvent; +}>('socket/socketModelInstallComplete'); export const socketModelInstallError = createAction<{ data: ModelInstallErrorEvent; @@ -76,14 +79,6 @@ export const socketModelInstallCancelled = createAction<{ data: ModelInstallCancelledEvent; }>('socket/socketModelInstallCancelled'); -export const socketSessionRetrievalError = createAction<{ - data: SessionRetrievalErrorEvent; -}>('socket/socketSessionRetrievalError'); - -export const socketInvocationRetrievalError = createAction<{ - data: InvocationRetrievalErrorEvent; -}>('socket/socketInvocationRetrievalError'); - export const socketQueueItemStatusChanged = createAction<{ data: QueueItemStatusChangedEvent; }>('socket/socketQueueItemStatusChanged'); @@ -92,10 +87,10 @@ export const socketBulkDownloadStarted = createAction<{ data: BulkDownloadStartedEvent; }>('socket/socketBulkDownloadStarted'); -export const socketBulkDownloadCompleted = createAction<{ - data: BulkDownloadCompletedEvent; -}>('socket/socketBulkDownloadCompleted'); +export const socketBulkDownloadComplete = createAction<{ + data: BulkDownloadCompleteEvent; +}>('socket/socketBulkDownloadComplete'); -export const socketBulkDownloadFailed = createAction<{ +export const socketBulkDownloadError = createAction<{ data: BulkDownloadFailedEvent; -}>('socket/socketBulkDownloadFailed'); +}>('socket/socketBulkDownloadError'); diff --git a/invokeai/frontend/web/src/services/events/types.ts b/invokeai/frontend/web/src/services/events/types.ts index e1dea1563b..98f1b36b3f 100644 --- a/invokeai/frontend/web/src/services/events/types.ts +++ b/invokeai/frontend/web/src/services/events/types.ts @@ -1,278 +1,59 @@ -import type { components } from 'services/api/schema'; -import type { AnyModelConfig, Graph, GraphExecutionState, SubModelType } from 'services/api/types'; - -/** - * A progress image, we get one for each step in the generation - */ -export type ProgressImage = { - dataURL: string; - width: number; - height: number; -}; +import type { Graph, GraphExecutionState, S } from 'services/api/types'; export type AnyInvocation = NonNullable[string]>; export type AnyResult = NonNullable; -type BaseNode = { - id: string; - type: string; - [key: string]: AnyInvocation[keyof AnyInvocation]; -}; +export type ModelLoadStartedEvent = S['ModelLoadStartedEvent']; +export type ModelLoadCompleteEvent = S['ModelLoadCompleteEvent']; -export type ModelLoadStartedEvent = { - queue_id: string; - queue_item_id: number; - queue_batch_id: string; - graph_execution_state_id: string; - model_config: AnyModelConfig; - submodel_type?: SubModelType | null; -}; +export type InvocationStartedEvent = S['InvocationStartedEvent']; +export type InvocationDenoiseProgressEvent = S['InvocationDenoiseProgressEvent']; +export type InvocationCompleteEvent = Omit & { result: AnyResult }; +export type InvocationErrorEvent = S['InvocationErrorEvent']; +export type ProgressImage = InvocationDenoiseProgressEvent['progress_image']; -export type ModelLoadCompletedEvent = { - queue_id: string; - queue_item_id: number; - queue_batch_id: string; - graph_execution_state_id: string; - model_config: AnyModelConfig; - submodel_type?: SubModelType | null; -}; +export type ModelInstallDownloadProgressEvent = S['ModelInstallDownloadProgressEvent']; +export type ModelInstallCompleteEvent = S['ModelInstallCompleteEvent']; +export type ModelInstallErrorEvent = S['ModelInstallErrorEvent']; +export type ModelInstallStartedEvent = S['ModelInstallStartedEvent']; +export type ModelInstallCancelledEvent = S['ModelInstallCancelledEvent']; -export type ModelInstallDownloadingEvent = { - bytes: number; - local_path: string; - source: string; - timestamp: number; - total_bytes: number; - id: number; -}; +export type SessionCompleteEvent = S['SessionCompleteEvent']; +export type SessionCanceledEvent = S['SessionCanceledEvent']; -export type ModelInstallCompletedEvent = { - key: number; - source: string; - timestamp: number; - id: number; -}; +export type QueueItemStatusChangedEvent = S['QueueItemStatusChangedEvent']; -export type ModelInstallErrorEvent = { - error: string; - error_type: string; - source: string; - timestamp: number; - id: number; -}; - -export type ModelInstallCancelledEvent = { - source: string; - timestamp: number; - id: number; -}; - -/** - * A `generator_progress` socket.io event. - * - * @example socket.on('generator_progress', (data: GeneratorProgressEvent) => { ... } - */ -export type GeneratorProgressEvent = { - queue_id: string; - queue_item_id: number; - queue_batch_id: string; - graph_execution_state_id: string; - node_id: string; - source_node_id: string; - progress_image?: ProgressImage; - step: number; - order: number; - total_steps: number; -}; - -/** - * A `invocation_complete` socket.io event. - * - * `result` is a discriminated union with a `type` property as the discriminant. - * - * @example socket.on('invocation_complete', (data: InvocationCompleteEvent) => { ... } - */ -export type InvocationCompleteEvent = { - queue_id: string; - queue_item_id: number; - queue_batch_id: string; - graph_execution_state_id: string; - node: BaseNode; - source_node_id: string; - result: AnyResult; -}; - -/** - * A `invocation_error` socket.io event. - * - * @example socket.on('invocation_error', (data: InvocationErrorEvent) => { ... } - */ -export type InvocationErrorEvent = { - queue_id: string; - queue_item_id: number; - queue_batch_id: string; - graph_execution_state_id: string; - node: BaseNode; - source_node_id: string; - error_type: string; - error_message: string; - error_traceback: string; -}; - -/** - * A `invocation_started` socket.io event. - * - * @example socket.on('invocation_started', (data: InvocationStartedEvent) => { ... } - */ -export type InvocationStartedEvent = { - queue_id: string; - queue_item_id: number; - queue_batch_id: string; - graph_execution_state_id: string; - node: BaseNode; - source_node_id: string; -}; - -/** - * A `graph_execution_state_complete` socket.io event. - * - * @example socket.on('graph_execution_state_complete', (data: GraphExecutionStateCompleteEvent) => { ... } - */ -export type GraphExecutionStateCompleteEvent = { - queue_id: string; - queue_item_id: number; - queue_batch_id: string; - graph_execution_state_id: string; -}; - -/** - * A `session_retrieval_error` socket.io event. - * - * @example socket.on('session_retrieval_error', (data: SessionRetrievalErrorEvent) => { ... } - */ -export type SessionRetrievalErrorEvent = { - queue_id: string; - queue_item_id: number; - queue_batch_id: string; - graph_execution_state_id: string; - error_type: string; - error: string; -}; - -/** - * A `invocation_retrieval_error` socket.io event. - * - * @example socket.on('invocation_retrieval_error', (data: InvocationRetrievalErrorEvent) => { ... } - */ -export type InvocationRetrievalErrorEvent = { - queue_id: string; - queue_item_id: number; - queue_batch_id: string; - graph_execution_state_id: string; - node_id: string; - error_type: string; - error: string; -}; - -/** - * A `queue_item_status_changed` socket.io event. - * - * @example socket.on('queue_item_status_changed', (data: QueueItemStatusChangedEvent) => { ... } - */ -export type QueueItemStatusChangedEvent = { - queue_id: string; - queue_item: { - queue_id: string; - item_id: number; - batch_id: string; - session_id: string; - status: components['schemas']['SessionQueueItemDTO']['status']; - error_type?: string | null; - error_message?: string | null; - error_traceback?: string | null; - created_at: string; - updated_at: string; - started_at: string | undefined; - completed_at: string | undefined; - }; - batch_status: { - queue_id: string; - batch_id: string; - pending: number; - in_progress: number; - completed: number; - failed: number; - canceled: number; - total: number; - }; - queue_status: { - queue_id: string; - item_id?: number; - batch_id?: string; - session_id?: string; - pending: number; - in_progress: number; - completed: number; - failed: number; - canceled: number; - total: number; - }; -}; +export type BulkDownloadStartedEvent = S['BulkDownloadStartedEvent']; +export type BulkDownloadCompleteEvent = S['BulkDownloadCompleteEvent']; +export type BulkDownloadFailedEvent = S['BulkDownloadErrorEvent']; type ClientEmitSubscribeQueue = { queue_id: string; }; - -type ClientEmitUnsubscribeQueue = { - queue_id: string; -}; - -export type BulkDownloadStartedEvent = { - bulk_download_id: string; - bulk_download_item_id: string; - bulk_download_item_name: string; -}; - -export type BulkDownloadCompletedEvent = { - bulk_download_id: string; - bulk_download_item_id: string; - bulk_download_item_name: string; -}; - -export type BulkDownloadFailedEvent = { - bulk_download_id: string; - bulk_download_item_id: string; - bulk_download_item_name: string; - error: string; -}; - -type ClientEmitSubscribeBulkDownload = { - bulk_download_id: string; -}; - -type ClientEmitUnsubscribeBulkDownload = { +export type ClientEmitUnsubscribeQueue = ClientEmitSubscribeQueue; +export type ClientEmitSubscribeBulkDownload = { bulk_download_id: string; }; +export type ClientEmitUnsubscribeBulkDownload = ClientEmitSubscribeBulkDownload; export type ServerToClientEvents = { - generator_progress: (payload: GeneratorProgressEvent) => void; + invocation_denoise_progress: (payload: InvocationDenoiseProgressEvent) => void; invocation_complete: (payload: InvocationCompleteEvent) => void; invocation_error: (payload: InvocationErrorEvent) => void; invocation_started: (payload: InvocationStartedEvent) => void; - graph_execution_state_complete: (payload: GraphExecutionStateCompleteEvent) => void; + session_complete: (payload: SessionCompleteEvent) => void; model_load_started: (payload: ModelLoadStartedEvent) => void; - model_load_completed: (payload: ModelLoadCompletedEvent) => void; - model_install_downloading: (payload: ModelInstallDownloadingEvent) => void; - model_install_completed: (payload: ModelInstallCompletedEvent) => void; + model_install_started: (payload: ModelInstallStartedEvent) => void; + model_install_download_progress: (payload: ModelInstallDownloadProgressEvent) => void; + model_install_complete: (payload: ModelInstallCompleteEvent) => void; model_install_error: (payload: ModelInstallErrorEvent) => void; - model_install_canceled: (payload: ModelInstallCancelledEvent) => void; - session_retrieval_error: (payload: SessionRetrievalErrorEvent) => void; - invocation_retrieval_error: (payload: InvocationRetrievalErrorEvent) => void; + model_install_cancelled: (payload: ModelInstallCancelledEvent) => void; + model_load_complete: (payload: ModelLoadCompleteEvent) => void; queue_item_status_changed: (payload: QueueItemStatusChangedEvent) => void; bulk_download_started: (payload: BulkDownloadStartedEvent) => void; - bulk_download_completed: (payload: BulkDownloadCompletedEvent) => void; - bulk_download_failed: (payload: BulkDownloadFailedEvent) => void; + bulk_download_complete: (payload: BulkDownloadCompleteEvent) => void; + bulk_download_error: (payload: BulkDownloadFailedEvent) => void; }; export type ClientToServerEvents = { diff --git a/invokeai/frontend/web/src/services/events/util/setEventListeners.ts b/invokeai/frontend/web/src/services/events/util/setEventListeners.ts index 446a3e8a4b..22124766db 100644 --- a/invokeai/frontend/web/src/services/events/util/setEventListeners.ts +++ b/invokeai/frontend/web/src/services/events/util/setEventListeners.ts @@ -4,8 +4,8 @@ import { $queueId } from 'app/store/nanostores/queueId'; import type { AppDispatch } from 'app/store/store'; import { toast } from 'features/toast/toast'; import { - socketBulkDownloadCompleted, - socketBulkDownloadFailed, + socketBulkDownloadComplete, + socketBulkDownloadError, socketBulkDownloadStarted, socketConnected, socketDisconnected, @@ -13,15 +13,15 @@ import { socketGraphExecutionStateComplete, socketInvocationComplete, socketInvocationError, - socketInvocationRetrievalError, socketInvocationStarted, - socketModelInstallCompleted, - socketModelInstallDownloading, + socketModelInstallCancelled, + socketModelInstallComplete, + socketModelInstallDownloadProgress, socketModelInstallError, - socketModelLoadCompleted, + socketModelInstallStarted, + socketModelLoadComplete, socketModelLoadStarted, socketQueueItemStatusChanged, - socketSessionRetrievalError, } from 'services/events/actions'; import type { ClientToServerEvents, ServerToClientEvents } from 'services/events/types'; import type { Socket } from 'socket.io-client'; @@ -61,131 +61,55 @@ export const setEventListeners = (arg: SetEventListenersArg) => { } }); - /** - * Disconnect - */ socket.on('disconnect', () => { dispatch(socketDisconnected()); }); - - /** - * Invocation started - */ socket.on('invocation_started', (data) => { dispatch(socketInvocationStarted({ data })); }); - /** - * Generator progress - */ - socket.on('generator_progress', (data) => { + socket.on('invocation_denoise_progress', (data) => { dispatch(socketGeneratorProgress({ data })); }); - /** - * Invocation error - */ socket.on('invocation_error', (data) => { dispatch(socketInvocationError({ data })); }); - /** - * Invocation complete - */ socket.on('invocation_complete', (data) => { - dispatch( - socketInvocationComplete({ - data, - }) - ); + dispatch(socketInvocationComplete({ data })); }); - /** - * Graph complete - */ - socket.on('graph_execution_state_complete', (data) => { - dispatch( - socketGraphExecutionStateComplete({ - data, - }) - ); + socket.on('session_complete', (data) => { + dispatch(socketGraphExecutionStateComplete({ data })); }); - /** - * Model load started - */ socket.on('model_load_started', (data) => { - dispatch( - socketModelLoadStarted({ - data, - }) - ); + dispatch(socketModelLoadStarted({ data })); }); - /** - * Model load completed - */ - socket.on('model_load_completed', (data) => { - dispatch( - socketModelLoadCompleted({ - data, - }) - ); + socket.on('model_load_complete', (data) => { + dispatch(socketModelLoadComplete({ data })); }); - /** - * Model Install Downloading - */ - socket.on('model_install_downloading', (data) => { - dispatch( - socketModelInstallDownloading({ - data, - }) - ); + socket.on('model_install_started', (data) => { + dispatch(socketModelInstallStarted({ data })); }); - /** - * Model Install Completed - */ - socket.on('model_install_completed', (data) => { - dispatch( - socketModelInstallCompleted({ - data, - }) - ); + socket.on('model_install_download_progress', (data) => { + dispatch(socketModelInstallDownloadProgress({ data })); + }); + + socket.on('model_install_complete', (data) => { + dispatch(socketModelInstallComplete({ data })); }); - /** - * Model Install Error - */ socket.on('model_install_error', (data) => { - dispatch( - socketModelInstallError({ - data, - }) - ); + dispatch(socketModelInstallError({ data })); }); - /** - * Session retrieval error - */ - socket.on('session_retrieval_error', (data) => { - dispatch( - socketSessionRetrievalError({ - data, - }) - ); - }); - - /** - * Invocation retrieval error - */ - socket.on('invocation_retrieval_error', (data) => { - dispatch( - socketInvocationRetrievalError({ - data, - }) - ); + socket.on('model_install_cancelled', (data) => { + dispatch(socketModelInstallCancelled({ data })); }); socket.on('queue_item_status_changed', (data) => { @@ -196,11 +120,11 @@ export const setEventListeners = (arg: SetEventListenersArg) => { dispatch(socketBulkDownloadStarted({ data })); }); - socket.on('bulk_download_completed', (data) => { - dispatch(socketBulkDownloadCompleted({ data })); + socket.on('bulk_download_complete', (data) => { + dispatch(socketBulkDownloadComplete({ data })); }); - socket.on('bulk_download_failed', (data) => { - dispatch(socketBulkDownloadFailed({ data })); + socket.on('bulk_download_error', (data) => { + dispatch(socketBulkDownloadError({ data })); }); };