Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Support number/text ids when importing API JSON (#1952)

pythongosssss4aeef781a3ca
diff --git a/web/scripts/app.js b/web/scripts/app.js
index 61b88d44b..d22b98c31 100644
--- a/web/scripts/app.js
+++ b/web/scripts/app.js
@@ -1863,7 +1863,7 @@ export class ComfyApp {
for (const id of ids) {
const data = apiData[id];
const node = LiteGraph.createNode(data.class_type);
- node.id = id;
+ node.id = isNaN(+id) ? id : +id;
graph.add(node);
}