From 254aa024f63516e91104754e63aa784f1254093d Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Thu, 20 Apr 2023 23:21:29 +0900 Subject: [PATCH] Do deep copy for imgs on copy to clipspace. --- web/scripts/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/scripts/app.js b/web/scripts/app.js index 7c679a2f1..057d35eef 100644 --- a/web/scripts/app.js +++ b/web/scripts/app.js @@ -146,7 +146,10 @@ export class ComfyApp { if(this.widgets) { widgets = this.widgets.map(({ type, name, value }) => ({ type, name, value })); } - ComfyApp.clipspace = { 'widgets': widgets, 'imgs': this.imgs, 'images': this.images }; + + let img = new Image(); + img.src = this.imgs[0].src; + ComfyApp.clipspace = { 'widgets': widgets, 'imgs': [img], 'images': this.images }; } }, {