From 7b213f135ec807d918b93d40ed458e0ae548f7b2 Mon Sep 17 00:00:00 2001 From: AustinMroz Date: Wed, 22 Oct 2025 18:00:02 -0700 Subject: [PATCH] Fix copying from multi-outputs with clipspace (#6210) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `copyToClipspace` sets the `paintedIndex` and `combinedIndex` regardless of if any editing was actually performed on the image. Previously, they were set to be simple increments above the currently selected image. When attempting to copy from a node previewing multiple images, these indexes may refer to images that already exist. This is resolved by instead setting the indexes to be used for paintedIndex and combinedIndex to always be beyond the range of current images. image Resolves #6202 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6210-Fix-copying-from-multi-outputs-with-clipspace-2956d73d365081c5a07be4ddb0b352a3) by [Unito](https://www.unito.io) --- src/scripts/app.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/app.ts b/src/scripts/app.ts index 9da1166122..0f82b85081 100644 --- a/src/scripts/app.ts +++ b/src/scripts/app.ts @@ -379,8 +379,8 @@ export class ComfyApp { selectedIndex = node.imageIndex } - const paintedIndex = selectedIndex + 1 - const combinedIndex = selectedIndex + 2 + const paintedIndex = imgs ? imgs.length + 1 : 1 + const combinedIndex = imgs ? imgs.length + 2 : 2 // for vueNodes mode const images =