Preview image node

This commit is contained in:
space-nuko
2023-04-07 16:00:06 -05:00
parent 3d8690d6d7
commit d5a85277b7
4 changed files with 14 additions and 4 deletions

View File

@@ -10,13 +10,16 @@ export type ComfyImageExecOutput = {
images: ComfyImageResult[]
}
export default class ComfySaveImageNode extends ComfyGraphNode {
/*
* Node with a single extra image output widget
*/
class ComfyImageNode extends ComfyGraphNode {
private _imageResults: Array<ComfyImageResult> = [];
private _galleryWidget: ComfyGalleryWidget;
constructor(title?: any) {
super(title)
this._galleryWidget = new ComfyGalleryWidget("Images", this._imageResults, this);
this._galleryWidget = new ComfyGalleryWidget("Images", [], this);
this.virtualWidgets.push(this._galleryWidget)
}
@@ -32,3 +35,9 @@ export default class ComfySaveImageNode extends ComfyGraphNode {
this._galleryWidget.setValue(galleryItems)
}
}
export class ComfySaveImageNode extends ComfyImageNode {
}
export class ComfyPreviewImageNode extends ComfyImageNode {
}

View File

@@ -1,2 +1,2 @@
export { default as ComfyReroute } from "./ComfyReroute"
export { default as ComfySaveImageNode } from "./ComfySaveImageNode"
export { ComfySaveImageNode, ComfyPreviewImageNode } from "./ComfyImageNodes"