2023-07-10 09:09:03 +00:00
|
|
|
import { app } from "../../scripts/app.js";
|
2023-03-08 22:07:44 +00:00
|
|
|
|
2023-03-09 17:57:59 +00:00
|
|
|
// Adds an upload button to the nodes
|
|
|
|
|
2023-03-08 22:07:44 +00:00
|
|
|
app.registerExtension({
|
|
|
|
name: "Comfy.UploadImage",
|
|
|
|
async beforeRegisterNodeDef(nodeType, nodeData, app) {
|
2023-08-22 23:41:49 +00:00
|
|
|
if (nodeData?.input?.required?.image?.[1]?.image_upload === true) {
|
2023-03-08 22:07:44 +00:00
|
|
|
nodeData.input.required.upload = ["IMAGEUPLOAD"];
|
|
|
|
}
|
|
|
|
},
|
|
|
|
});
|