Don't serialize huge prompts
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { LiteGraph, type ContextMenuItem, type LGraphNode, type Vector2, LConnectionKind, LLink, LGraphCanvas, type SlotType, TitleMode, type SlotLayout, BuiltInSlotType, type ITextWidget } from "@litegraph-ts/core";
|
||||
import { LiteGraph, type ContextMenuItem, type LGraphNode, type Vector2, LConnectionKind, LLink, LGraphCanvas, type SlotType, TitleMode, type SlotLayout, BuiltInSlotType, type ITextWidget, type SerializedLGraphNode } from "@litegraph-ts/core";
|
||||
import ComfyGraphNode from "./ComfyGraphNode";
|
||||
import { Watch } from "@litegraph-ts/nodes-basic";
|
||||
import type { SerializedPrompt } from "$lib/components/ComfyApp";
|
||||
@@ -33,6 +33,11 @@ export class ComfyAfterQueuedAction extends ComfyGraphNode {
|
||||
this.setProperty("value", p)
|
||||
this.triggerSlot(0, "bang")
|
||||
}
|
||||
|
||||
override onSerialize(o: SerializedLGraphNode) {
|
||||
super.onSerialize(o)
|
||||
o.properties = { prompt: null }
|
||||
}
|
||||
}
|
||||
|
||||
LiteGraph.registerNodeType({
|
||||
|
||||
@@ -33,7 +33,8 @@ export default class ComfyGraphNode extends LGraphNode {
|
||||
const ty = Object.values(LiteGraph.registered_node_types)
|
||||
.find(v => v.class === widgetNode)
|
||||
if (ty)
|
||||
(serInput as any).widgetNodeType = ty.type
|
||||
(serInput as any).widgetNodeType = ty.type;
|
||||
(serInput as any).defaultWidgetNode = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user