mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-19 10:57:03 +08:00
* batch support enhance
- pick index based on imageIndex on copy action * paste fix on batch image node
This commit is contained in:
parent
60b0d2067e
commit
0876f752d3
@ -84,12 +84,17 @@ export class ComfyApp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var selectedIndex = 0;
|
||||||
|
if(node.imageIndex) {
|
||||||
|
selectedIndex = node.imageIndex;
|
||||||
|
}
|
||||||
|
|
||||||
ComfyApp.clipspace = {
|
ComfyApp.clipspace = {
|
||||||
'widgets': widgets,
|
'widgets': widgets,
|
||||||
'imgs': imgs,
|
'imgs': imgs,
|
||||||
'original_imgs': orig_imgs,
|
'original_imgs': orig_imgs,
|
||||||
'images': node.images,
|
'images': node.images,
|
||||||
'selectedIndex': 0,
|
'selectedIndex': selectedIndex,
|
||||||
'img_paste_mode': 'selected' // reset to default im_paste_mode state on copy action
|
'img_paste_mode': 'selected' // reset to default im_paste_mode state on copy action
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -118,6 +123,7 @@ export class ComfyApp {
|
|||||||
const img = new Image();
|
const img = new Image();
|
||||||
img.src = ComfyApp.clipspace.imgs[ComfyApp.clipspace['selectedIndex']].src;
|
img.src = ComfyApp.clipspace.imgs[ComfyApp.clipspace['selectedIndex']].src;
|
||||||
node.imgs = [img];
|
node.imgs = [img];
|
||||||
|
node.imageIndex = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const imgs = [];
|
const imgs = [];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user