Changed to upload to input dir

Fixed jpg
Added dupe support
Changed to use existing nodes
This commit is contained in:
pythongosssss
2023-03-09 17:57:59 +00:00
parent 4a326a2548
commit 99abc0eb2e
4 changed files with 16 additions and 14 deletions

View File

@@ -1,9 +1,11 @@
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 === "UploadImage" || nodeData.name === "UploadImageMask") {
if (nodeData.name === "LoadImage" || nodeData.name === "LoadImageMask") {
nodeData.input.required.upload = ["IMAGEUPLOAD"];
}
},

View File

@@ -141,7 +141,7 @@ export const ComfyWidgets = {
node.imgs = [img];
app.graph.setDirtyCanvas(true);
};
img.src = `/view/${name}?type=uploads`;
img.src = `/view/${name}?type=input`;
}
// Add our own callback to the combo widget to render an image when it changes