Preserve mask when sending output into image upload
This commit is contained in:
@@ -99,9 +99,9 @@ export default class ComfyPickImageNode extends ComfyGraphNode {
|
||||
override onExecute() {
|
||||
const data = this.getInputData(0)
|
||||
let index = this.getInputData(1);
|
||||
if (this.properties.imageTagFilter && Array.isArray(data))
|
||||
if (this.properties.imageTagFilter != "" && Array.isArray(data))
|
||||
index = data.findIndex(i => i.tags?.includes(this.properties.imageTagFilter))
|
||||
else
|
||||
else if (index == null)
|
||||
index = 0;
|
||||
this.setValue(data, index);
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import ImageUploadWidget from "$lib/widgets/ImageUploadWidget.svelte";
|
||||
import type { ComfyWidgetProperties } from "./ComfyWidgetNode";
|
||||
import ComfyWidgetNode from "./ComfyWidgetNode";
|
||||
import { get, writable, type Writable } from "svelte/store";
|
||||
import { type LineGroup } from "$lib/components/MaskCanvas.svelte"
|
||||
|
||||
export interface ComfyImageUploadNodeProperties extends ComfyWidgetProperties {
|
||||
maskCount: number
|
||||
|
||||
Reference in New Issue
Block a user