mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-16 00:12:33 +08:00
Resolve issue with sanitized node name
This commit is contained in:
parent
d0514b87bc
commit
9d41993ae8
@ -543,7 +543,7 @@ describe("group node", () => {
|
||||
});
|
||||
|
||||
expect(dialogShow).toBeCalledTimes(1);
|
||||
const call = dialogShow.mock.calls[0][0];
|
||||
const call = dialogShow.mock.calls[0][0].innerHTML;
|
||||
expect(call).toContain("the following node types were not found");
|
||||
expect(call).toContain("NotKSampler");
|
||||
expect(call).toContain("NotVAEDecode");
|
||||
|
||||
@ -198,8 +198,8 @@ describe("widget inputs", () => {
|
||||
});
|
||||
|
||||
expect(dialogShow).toBeCalledTimes(1);
|
||||
expect(dialogShow.mock.calls[0][0]).toContain("the following node types were not found");
|
||||
expect(dialogShow.mock.calls[0][0]).toContain("TestNode");
|
||||
expect(dialogShow.mock.calls[0][0].innerHTML).toContain("the following node types were not found");
|
||||
expect(dialogShow.mock.calls[0][0].innerHTML).toContain("TestNode");
|
||||
});
|
||||
|
||||
test("defaultInput widgets can be converted back to inputs", async () => {
|
||||
|
||||
@ -1511,8 +1511,8 @@ export class ComfyApp {
|
||||
|
||||
// Find missing node types
|
||||
if (!(n.type in LiteGraph.registered_node_types)) {
|
||||
n.type = sanitizeNodeName(n.type);
|
||||
missingNodeTypes.push(n.type);
|
||||
n.type = sanitizeNodeName(n.type);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1603,9 +1603,14 @@ export class ComfyApp {
|
||||
|
||||
if (missingNodeTypes.length) {
|
||||
this.ui.dialog.show(
|
||||
`When loading the graph, the following node types were not found: <ul>${Array.from(new Set(missingNodeTypes)).map(
|
||||
(t) => `<li>${t}</li>`
|
||||
).join("")}</ul>Nodes that have failed to load will show as red on the graph.`
|
||||
$el("div", [
|
||||
$el("span", { textContent: "When loading the graph, the following node types were not found: " }),
|
||||
$el(
|
||||
"ul",
|
||||
Array.from(new Set(missingNodeTypes)).map((t) => $el("li", { textContent: t }))
|
||||
),
|
||||
$el("span", { textContent: "Nodes that have failed to load will show as red on the graph." }),
|
||||
])
|
||||
);
|
||||
this.logging.addEntry("Comfy.App", "warn", {
|
||||
MissingNodes: missingNodeTypes,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user