Image width/height for gallery component, don't save ImageCache props
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { BuiltInSlotType, LiteGraph, type ITextWidget, type SlotLayout, clamp, type PropertyLayout, type IComboWidget } from "@litegraph-ts/core";
|
||||
import { BuiltInSlotType, LiteGraph, type ITextWidget, type SlotLayout, clamp, type PropertyLayout, type IComboWidget, type SerializedLGraphNode } from "@litegraph-ts/core";
|
||||
import ComfyGraphNode, { type ComfyGraphNodeProperties } from "./ComfyGraphNode";
|
||||
import type { GalleryOutput } from "./ComfyWidgetNodes";
|
||||
|
||||
@@ -47,6 +47,8 @@ export default class ComfyImageCacheNode extends ComfyGraphNode {
|
||||
{ name: "updateMode", defaultValue: "replace", type: "enum", options: { values: ["replace", "append"] } }
|
||||
]
|
||||
|
||||
override saveUserState = false;
|
||||
|
||||
private _uploadPromise: Promise<void> | null = null;
|
||||
|
||||
stateWidget: ITextWidget;
|
||||
@@ -124,6 +126,14 @@ export default class ComfyImageCacheNode extends ComfyGraphNode {
|
||||
this.setOutputData(1, state)
|
||||
}
|
||||
|
||||
override stripUserState(o: SerializedLGraphNode) {
|
||||
super.stripUserState(o);
|
||||
o.properties.images = null
|
||||
o.properties.index = 0
|
||||
o.properties.filenames = {}
|
||||
o.properties.genNumber = 0
|
||||
}
|
||||
|
||||
private setIndex(newIndex: number, force: boolean = false) {
|
||||
if (newIndex === this.properties.index && !force)
|
||||
return;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user