ComfyUI/web/extensions/core/uploadImage.js
pythongosssss 99abc0eb2e Changed to upload to input dir
Fixed jpg
Added dupe support
Changed to use existing nodes
2023-03-09 17:57:59 +00:00

13 lines
328 B
JavaScript

import { app } from "/scripts/app.js";
// Adds an upload button to the nodes
app.registerExtension({
name: "Comfy.UploadImage",
async beforeRegisterNodeDef(nodeType, nodeData, app) {
if (nodeData.name === "LoadImage" || nodeData.name === "LoadImageMask") {
nodeData.input.required.upload = ["IMAGEUPLOAD"];
}
},
});