Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -2850,5 +2850,15 @@
"label": "Preview Version",
"tooltip": "You are using a nightly version of ComfyUI. Please use the feedback button to share your thoughts about these features."
}
},
"nodeFilters": {
"hideDeprecated": "Hide Deprecated Nodes",
"hideDeprecatedDescription": "Hides nodes marked as deprecated unless explicitly enabled",
"hideExperimental": "Hide Experimental Nodes",
"hideExperimentalDescription": "Hides nodes marked as experimental unless explicitly enabled",
"hideDevOnly": "Hide Dev-Only Nodes",
"hideDevOnlyDescription": "Hides nodes marked as dev-only unless dev mode is enabled",
"hideSubgraph": "Hide Subgraph Nodes",
"hideSubgraphDescription": "Temporarily hides subgraph nodes from node library and search"
}
}
19 changes: 9 additions & 10 deletions src/stores/nodeDefStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import _ from 'es-toolkit/compat'
import { defineStore } from 'pinia'
import { computed, ref, watchEffect } from 'vue'

import { t } from '@/i18n'
import { isProxyWidget } from '@/core/graph/subgraph/proxyWidget'
import { LiteGraph } from '@/lib/litegraph/src/litegraph'
import type { LGraphNode } from '@/lib/litegraph/src/litegraph'
Expand Down Expand Up @@ -428,35 +429,33 @@ export const useNodeDefStore = defineStore('nodeDef', () => {
// Deprecated nodes filter
registerNodeDefFilter({
id: 'core.deprecated',
name: 'Hide Deprecated Nodes',
description: 'Hides nodes marked as deprecated unless explicitly enabled',
name: t('nodeFilters.hideDeprecated'),
description: t('nodeFilters.hideDeprecatedDescription'),
predicate: (nodeDef) => showDeprecated.value || !nodeDef.deprecated
})

// Experimental nodes filter
registerNodeDefFilter({
id: 'core.experimental',
name: 'Hide Experimental Nodes',
description:
'Hides nodes marked as experimental unless explicitly enabled',
name: t('nodeFilters.hideExperimental'),
description: t('nodeFilters.hideExperimentalDescription'),
predicate: (nodeDef) => showExperimental.value || !nodeDef.experimental
})

// Dev-only nodes filter
registerNodeDefFilter({
id: 'core.dev_only',
name: 'Hide Dev-Only Nodes',
description: 'Hides nodes marked as dev-only unless dev mode is enabled',
name: t('nodeFilters.hideDevOnly'),
description: t('nodeFilters.hideDevOnlyDescription'),
predicate: (nodeDef) => showDevOnly.value || !nodeDef.dev_only
})

// Subgraph nodes filter
// Filter out litegraph typed subgraphs, saved blueprints are added in separately
registerNodeDefFilter({
id: 'core.subgraph',
name: 'Hide Subgraph Nodes',
description:
'Temporarily hides subgraph nodes from node library and search',
name: t('nodeFilters.hideSubgraph'),
description: t('nodeFilters.hideSubgraphDescription'),
predicate: (nodeDef) => {
// Hide subgraph nodes (identified by category='subgraph' and python_module='nodes')
return !(
Expand Down
Loading