Closed
Description
Frontend Version
v1.2.46
Expected Behavior
Loading generated images with API format workflow that has non-integer node ids works fine like the legacy frontend:
Actual Behavior
All nodes are stacked ontop of each other with no connections in the new frontend:
Steps to Reproduce
Example image:
Debug Logs
N/A
Browser Logs
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'widgets')
at app.ts:2827:33
at ComfyApp.changeWorkflow (app.ts:2196:11)
at ComfyApp.loadApiJson (app.ts:2803:10)
at ComfyApp.handleFile (app.ts:2691:14)
at async HTMLDocument.<anonymous> (app.ts:1018:9)
(anonymous) @ app.ts:2827
changeWorkflow @ app.ts:2196
loadApiJson @ app.ts:2803
handleFile @ app.ts:2691
await in handleFile
PysssssWorkflows.app.handleFile @ workflows.js:212
app.handleFile @ workflowImage.js:413
(anonymous) @ app.ts:1018
app.ts:2862 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'widgets')
at ComfyApp.loadApiJson (app.ts:2862:31)
at ComfyApp.handleFile (app.ts:2691:14)
at async HTMLDocument.<anonymous> (app.ts:1018:9)
loadApiJson @ app.ts:2862
handleFile @ app.ts:2691
What browsers do you use to access the UI ?
Microsoft Edge
Other
This parseInt()
leads to the problem:
ComfyUI_frontend/src/scripts/app.ts
Line 2806 in 720e7e1
Looks like graph
uses Number
as its id type? If so, it may be hard to directly fix this problem. But I think adding a preprocess step to map string ids to integer ids will work at least.