ComfyUI/web/extensions/core/uploadImage.js

13 lines
333 B
JavaScript
Raw Normal View History

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