Add extensions core

This commit is contained in:
huchenlei
2024-06-13 14:08:38 -04:00
parent 2d00a34ffd
commit 36f55018ce
24 changed files with 6716 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
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?.input?.required?.image?.[1]?.image_upload === true) {
nodeData.input.required.upload = ["IMAGEUPLOAD"];
}
},
});