1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-03 23:49:57 +08:00

Fix extension widgets not working.

This commit is contained in:
comfyanonymous
2023-12-01 04:13:04 -05:00
parent 5d5c320054
commit ec7a00aa96
3 changed files with 17 additions and 18 deletions

View File

@@ -23,20 +23,6 @@ function getNumberDefaults(inputData, defaultStep, precision, enable_rounding) {
return { val: defaultVal, config: { min, max, step: 10.0 * step, round, precision } };
}
export function getWidgetType(inputData, inputName) {
const type = inputData[0];
if (Array.isArray(type)) {
return "COMBO";
} else if (`${type}:${inputName}` in ComfyWidgets) {
return `${type}:${inputName}`;
} else if (type in ComfyWidgets) {
return type;
} else {
return null;
}
}
export function addValueControlWidget(node, targetWidget, defaultValue = "randomize", values, widgetName, inputData) {
let name = inputData[1]?.control_after_generate;
if(typeof name !== "string") {