mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-01 19:20:10 +00:00
feat: support dev-only nodes (#8359)
## Summary Support `dev_only` property to node definitions that hides nodes from search and menus unless dev mode is enabled. Dev-only nodes display a "DEV" badge when visible. This functionality is primarily intended to support unit-testing nodes on Comfy Cloud, but also has other uses. ## Changes - **What**: Nodes flagged as dev_only in the node schema will only appear in search and menus if Dev Mode is on. ## Screenshots (if applicable) With Dev Mode off: <img width="2189" height="1003" alt="image" src="https://github.com/user-attachments/assets/a08e1fd7-dca9-4ce1-9964-5f4f3b7b95ac" /> With Dev Mode on: <img width="2201" height="1066" alt="image" src="https://github.com/user-attachments/assets/7fe6cd1f-f774-4f48-b604-a528e286b584" /> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8359-feat-support-dev-only-nodes-2f66d73d36508102839ee7cd66a26129) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -261,7 +261,7 @@ export const useLitegraphService = () => {
|
||||
static comfyClass: string
|
||||
static override title: string
|
||||
static override category: string
|
||||
static nodeData: ComfyNodeDefV1 & ComfyNodeDefV2
|
||||
static override nodeData: ComfyNodeDefV1 & ComfyNodeDefV2
|
||||
|
||||
_initialMinSize = { width: 1, height: 1 }
|
||||
|
||||
@@ -394,7 +394,7 @@ export const useLitegraphService = () => {
|
||||
static comfyClass: string
|
||||
static override title: string
|
||||
static override category: string
|
||||
static nodeData: ComfyNodeDefV1 & ComfyNodeDefV2
|
||||
static override nodeData: ComfyNodeDefV1 & ComfyNodeDefV2
|
||||
|
||||
_initialMinSize = { width: 1, height: 1 }
|
||||
|
||||
@@ -496,6 +496,13 @@ export const useLitegraphService = () => {
|
||||
// because `registerNodeType` will overwrite the assignments.
|
||||
node.category = nodeDef.category
|
||||
node.title = nodeDef.display_name || nodeDef.name
|
||||
|
||||
// Set skip_list for dev-only nodes based on current DevMode setting
|
||||
// This ensures nodes registered after initial load respect the current setting
|
||||
if (nodeDef.dev_only) {
|
||||
const settingStore = useSettingStore()
|
||||
node.skip_list = !settingStore.get('Comfy.DevMode')
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user