Audio node widgets (#54)

* Add audio widgets

* Change rendering order

* Proper output node

* Change indent

* Fix param

* Hide audio widget when output is empty

* Load default value

* populate audio widget from history

* Prevent init if no audio selection
This commit is contained in:
Chenlei Hu
2024-06-27 09:11:31 -04:00
committed by GitHub
parent 8264eb4fee
commit d4c8992356
6 changed files with 182 additions and 4 deletions

View File

@@ -400,7 +400,7 @@ export const ComfyWidgets: Record<string, ComfyWidgetConstructor> = {
}
return res;
},
IMAGEUPLOAD(node: LGraphNode, inputName, inputData, app) {
IMAGEUPLOAD(node: LGraphNode, inputName: string, inputData, app) {
// TODO make image upload handle a custom node type?
// @ts-ignore
const imageWidget = node.widgets.find((w) => w.name === (inputData[1]?.widget ?? "image"));