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, 60);
setTimeout(refreshFromWidgets, 250); setTimeout(refreshFromWidgets, 250);
// Keep width/height as regular widgets on the node so they can be used like const ensureVisibleResolutionWidgets = () => {
// standard Comfy fields instead of being panel-only controls. 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)); }); ["frame_rate", "resize_method", "reference_strength"].forEach(n => { hideWidget(getW(n)); });
ensureVisibleResolutionWidgets();
ensureTimingHidden(); ensureTimingHidden();
}; };
const settingsContainer = document.createElement("div"); const settingsContainer = document.createElement("div");

View File

@@ -1977,11 +1977,11 @@ class LTXDirector(io.ComfyNode):
tooltip="Auto-populated from the timeline editor (comma-separated guide strengths for image segments).", tooltip="Auto-populated from the timeline editor (comma-separated guide strengths for image segments).",
), ),
io.Int.Input( io.Int.Input(
"custom_width", default=0, min=0, max=8192, step=1, optional=True, "custom_width", default=0, min=0, max=8192, step=1, optional=True, force_input=True,
tooltip="Target output width for all image segments. Set to 0 to use the original image width.", tooltip="Target output width for all image segments. Set to 0 to use the original image width.",
), ),
io.Int.Input( io.Int.Input(
"custom_height", default=0, min=0, max=8192, step=1, optional=True, "custom_height", default=0, min=0, max=8192, step=1, optional=True, force_input=True,
tooltip="Target output height for all image segments. Set to 0 to use the original image height.", tooltip="Target output height for all image segments. Set to 0 to use the original image height.",
), ),
io.Combo.Input( io.Combo.Input(