Auto transforms bugged node pos (#712)

This commit is contained in:
Chenlei Hu
2024-09-02 14:41:45 -04:00
committed by GitHub
parent 9d69db6db7
commit 51b7467012
2 changed files with 21 additions and 1 deletions

View File

@@ -69,6 +69,23 @@ describe('parseComfyWorkflow', () => {
workflow.nodes[0].pos = { 0: 3, 1: 4 }
validatedWorkflow = await validateComfyWorkflow(workflow)
expect(validatedWorkflow.nodes[0].pos).toEqual([3, 4])
// Should accept the legacy bugged format object.
// https://github.com/Comfy-Org/ComfyUI_frontend/issues/710
workflow.nodes[0].pos = {
'0': 600,
'1': 340,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0
}
validatedWorkflow = await validateComfyWorkflow(workflow)
expect(validatedWorkflow.nodes[0].pos).toEqual([600, 340])
})
it('workflow.nodes.widget_values', async () => {