Litegraph: Reroute support (#1420)

* Add Litegraph schema v1 support

- LLink changed from array to object
- Add reroutes
- Graph state object
- Falls back to original schema if not validated
- Add version check to schema validation pass

* Fix test schema version detection

Resolves conflict with proposed schema v1
This commit is contained in:
filtered
2024-11-10 07:46:34 +11:00
committed by GitHub
parent 8dc057517f
commit 31fac3873c
2 changed files with 76 additions and 18 deletions

View File

@@ -32,10 +32,11 @@ describe('parseComfyWorkflow', () => {
workflow.version = undefined
expect(await validateComfyWorkflow(workflow)).toBeNull()
workflow.version = '1.0.1' // Invalid format.
workflow.version = '1.0.1' // Invalid format (string)
expect(await validateComfyWorkflow(workflow)).toBeNull()
workflow.version = 1
// 2018-2024 schema: 0.4
workflow.version = 0.4
expect(await validateComfyWorkflow(workflow)).not.toBeNull()
})