mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-30 04:50:04 +00:00
15 lines
382 B
TypeScript
15 lines
382 B
TypeScript
import { ComfyNodeDef } from '@/types/apiTypes'
|
|
|
|
import { app } from '../../scripts/app'
|
|
|
|
// Adds an upload button to the nodes
|
|
|
|
app.registerExtension({
|
|
name: 'Comfy.UploadImage',
|
|
beforeRegisterNodeDef(nodeType, nodeData: ComfyNodeDef) {
|
|
if (nodeData?.input?.required?.image?.[1]?.image_upload === true) {
|
|
nodeData.input.required.upload = ['IMAGEUPLOAD']
|
|
}
|
|
}
|
|
})
|