diff --git a/invokeai/frontend/web/src/app/store/middleware/devtools/actionSanitizer.ts b/invokeai/frontend/web/src/app/store/middleware/devtools/actionSanitizer.ts
index 227b15d6f8..143b16594c 100644
--- a/invokeai/frontend/web/src/app/store/middleware/devtools/actionSanitizer.ts
+++ b/invokeai/frontend/web/src/app/store/middleware/devtools/actionSanitizer.ts
@@ -1,6 +1,7 @@
import { AnyAction } from '@reduxjs/toolkit';
import { isAnyGraphBuilt } from 'features/nodes/store/actions';
-import { forEach } from 'lodash-es';
+import { nodeTemplatesBuilt } from 'features/nodes/store/nodesSlice';
+import { receivedOpenAPISchema } from 'services/api/thunks/schema';
import { Graph } from 'services/api/types';
export const actionSanitizer = (action: A): A => {
@@ -8,17 +9,6 @@ export const actionSanitizer = (action: A): A => {
if (action.payload.nodes) {
const sanitizedNodes: Graph['nodes'] = {};
- // Sanitize nodes as needed
- forEach(action.payload.nodes, (node, key) => {
- // Don't log the whole freaking dataURL
- if (node.type === 'dataURL_image') {
- const { dataURL, ...rest } = node;
- sanitizedNodes[key] = { ...rest, dataURL: '' };
- } else {
- sanitizedNodes[key] = { ...node };
- }
- });
-
return {
...action,
payload: { ...action.payload, nodes: sanitizedNodes },
@@ -26,5 +16,19 @@ export const actionSanitizer = (action: A): A => {
}
}
+ if (receivedOpenAPISchema.fulfilled.match(action)) {
+ return {
+ ...action,
+ payload: '',
+ };
+ }
+
+ if (nodeTemplatesBuilt.match(action)) {
+ return {
+ ...action,
+ payload: '',
+ };
+ }
+
return action;
};