Fix load of string node id workflow (#744)

* Update litegraph

* Fix string node id

* Add playwright test

* Update test expectations [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2024-09-05 08:16:41 -07:00
committed by GitHub
parent 9d855d637e
commit 38c957d3a9
8 changed files with 393 additions and 10 deletions

View File

@@ -2804,7 +2804,7 @@ export class ComfyApp {
this.changeWorkflow(() => {
for (const id of ids) {
const data = apiData[id]
const node = app.graph.getNodeById(Number.parseInt(id))
const node = app.graph.getNodeById(id)
for (const input in data.inputs ?? {}) {
const value = data.inputs[input]
if (value instanceof Array) {
@@ -2839,7 +2839,7 @@ export class ComfyApp {
for (const id of ids) {
const data = apiData[id]
const node = app.graph.getNodeById(Number.parseInt(id))
const node = app.graph.getNodeById(id)
for (const input in data.inputs ?? {}) {
const value = data.inputs[input]
if (value instanceof Array) {
@@ -3009,7 +3009,6 @@ export class ComfyApp {
}
public goToNode(nodeId: NodeId) {
// @ts-expect-error TODO: Update litegraph's nodeId type to string | number
const graphNode = this.graph.getNodeById(nodeId)
if (!graphNode) return
this.canvas.centerOnNode(graphNode)