Serialize node links instead of widget values
Syncing litegraph widget state is kinda annoying, and unnecessary since everything will be moved to separate UI component nodes. Instead I modified the input slot type to store the min/max/step to be copied into the default UI node later. Now nothing uses litegraph's widgets anymore
This commit is contained in:
16
src/lib/IComfyInputSlot.ts
Normal file
16
src/lib/IComfyInputSlot.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import type { INodeInputSlot } from "@litegraph-ts/core";
|
||||
|
||||
export type ComfyInputConfig = {
|
||||
min?: number,
|
||||
max?: number,
|
||||
step?: number,
|
||||
precision?: number,
|
||||
defaultValue?: any,
|
||||
values?: any[],
|
||||
multiline?: boolean
|
||||
}
|
||||
|
||||
export default interface IComfyInputSlot extends INodeInputSlot {
|
||||
serialize: boolean
|
||||
config: ComfyInputConfig // stores range min/max/step, etc.
|
||||
}
|
||||
Reference in New Issue
Block a user