Files
Bjornulf_custom_nodes/web/js/random_line_from_input.js.txt
justumen 74f801d62a ...
2024-11-02 18:41:13 +01:00

15 lines
439 B
Plaintext

import { app } from "../../../scripts/app.js";
app.registerExtension({
name: "Bjornulf.RandomLineFromInput",
async nodeCreated(node) {
if (node.comfyClass === "Bjornulf_RandomLineFromInput") {
// Set seed widget to hidden input
const seedWidget = node.widgets.find(w => w.name === "seed");
if (seedWidget) {
seedWidget.type = "HIDDEN";
}
}
}
});