2023-03-08 22:07:44 +00:00
|
|
|
import { app } from "/scripts/app.js";
|
|
|
|
|
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-03-09 17:57:59 +00:00
|
|
|
if (nodeData.name === "LoadImage" || nodeData.name === "LoadImageMask") {
|
2023-03-08 22:07:44 +00:00
|
|
|
nodeData.input.required.upload = ["IMAGEUPLOAD"];
|
|
|
|
}
|
|
|
|
},
|
|
|
|
});
|