Allow director width and height input links

This commit is contained in:
OpenClaw Agent
2026-07-17 08:10:29 +00:00
parent ab6415caa4
commit c782f3263b
2 changed files with 29 additions and 10 deletions

View File

@@ -12097,9 +12097,28 @@ app.registerExtension({
setTimeout(refreshFromWidgets, 60);
setTimeout(refreshFromWidgets, 250);
// Keep width/height as regular widgets on the node so they can be used like
// standard Comfy fields instead of being panel-only controls.
const ensureVisibleResolutionWidgets = () => {
const isLiteGraph = !window.LiteGraph || !window.LiteGraph.vueNodesMode;
for (const name of ["custom_width", "custom_height"]) {
const w = getW(name);
if (!w) continue;
showWidget(w);
if (isLiteGraph && w.type === "converted-widget" && node.inputs) {
if (!node.inputs.find(i => i.name === name)) {
const slot = node.addInput(name, "INT");
if (slot != null) {
const inp = node.inputs[node.inputs.length - 1];
if (inp) inp.widget = { name };
}
}
}
}
};
// Keep width/height as regular widgets on the node while also allowing
// them to behave as standard automation inputs.
["frame_rate", "resize_method", "reference_strength"].forEach(n => { hideWidget(getW(n)); });
ensureVisibleResolutionWidgets();
ensureTimingHidden();
};
const settingsContainer = document.createElement("div");