Fix DataCloneError by excluding non-serializable cache from state

Excluded blendedImageCache and blendedImageDirty properties from layer serialization in CanvasState.ts to prevent DataCloneError when saving state. This ensures that only serializable data is sent to Web Workers, while runtime caches are regenerated as needed. Blend area performance optimization remains functional without serialization issues.
This commit is contained in:
Dariusz L
2025-08-03 02:43:30 +02:00
parent 3d6e3901d0
commit 503ec126a5
5 changed files with 243 additions and 114 deletions

View File

@@ -28,6 +28,8 @@ export interface Layer {
width: number; // szerokość widocznego obszaru
height: number; // wysokość widocznego obszaru
};
blendedImageCache?: HTMLCanvasElement; // Cache for the pre-rendered blendArea effect
blendedImageDirty?: boolean; // Flag to invalidate the cache
}
export interface ComfyNode {