mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-27 02:04:09 +00:00
node model metadata edit popover
This commit is contained in:
@@ -47,6 +47,26 @@ export const isLGraphGroup = (item: unknown): item is LGraphGroup => {
|
||||
return item instanceof LGraphGroup
|
||||
}
|
||||
|
||||
const modelOutputTypes = new Set([
|
||||
'MODEL',
|
||||
'CLIP',
|
||||
'VAE',
|
||||
'CONTROL_NET',
|
||||
'UPSCALE_MODEL',
|
||||
'CLIP_VISION',
|
||||
'STYLE_MODEL',
|
||||
'GLIGEN',
|
||||
'HOOKS',
|
||||
'UPSCALE_MODEL',
|
||||
'PHOTOMAKER',
|
||||
'SAM_MODEL'
|
||||
])
|
||||
|
||||
export const isModelNode = (node: LGraphNode): boolean => {
|
||||
if (!node?.outputs?.length) return false
|
||||
return node.outputs.some((output) => modelOutputTypes.has(`${output.type}`))
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the color option of all canvas items if they are all the same.
|
||||
* @param items - The items to get the color option of.
|
||||
|
||||
Reference in New Issue
Block a user