[Cleanup] Remove deprecated: node def validation (#4038)

This commit is contained in:
filtered
2025-07-24 17:54:29 +10:00
committed by GitHub
parent 78fc86d153
commit 4d0ba197a8
10 changed files with 4 additions and 71 deletions

View File

@@ -511,15 +511,6 @@ export const CORE_SETTINGS: SettingParams[] = [
defaultValue: [] as string[],
versionAdded: '1.3.11'
},
{
id: 'Comfy.Validation.NodeDefs',
name: 'Validate node definitions (slow)',
type: 'boolean',
tooltip:
'Recommended for node developers. This will validate all node definitions on startup.',
defaultValue: false,
versionAdded: '1.3.14'
},
{
id: 'Comfy.LinkRenderMode',
category: ['LiteGraph', 'Graph', 'LinkRenderMode'],

View File

@@ -329,10 +329,6 @@
"Bottom": "Bottom"
}
},
"Comfy_Validation_NodeDefs": {
"name": "Validate node definitions (slow)",
"tooltip": "Recommended for node developers. This will validate all node definitions on startup."
},
"Comfy_Validation_Workflows": {
"name": "Validate workflows"
},

View File

@@ -329,10 +329,6 @@
},
"tooltip": "Posición de la barra de menú. En dispositivos móviles, el menú siempre se muestra en la parte superior."
},
"Comfy_Validation_NodeDefs": {
"name": "Validar definiciones de nodos (lento)",
"tooltip": "Recomendado para desarrolladores de nodos. Esto validará todas las definiciones de nodos al iniciar."
},
"Comfy_Validation_Workflows": {
"name": "Validar flujos de trabajo"
},

View File

@@ -329,10 +329,6 @@
},
"tooltip": "Position de la barre de menu. Sur les appareils mobiles, le menu est toujours affiché en haut."
},
"Comfy_Validation_NodeDefs": {
"name": "Valider les définitions de nœuds (lent)",
"tooltip": "Recommandé pour les développeurs de nœuds. Cela validera toutes les définitions de nœuds au démarrage."
},
"Comfy_Validation_Workflows": {
"name": "Valider les flux de travail"
},

View File

@@ -329,10 +329,6 @@
},
"tooltip": "メニューバーの位置。モバイルデバイスでは、メニューは常に上部に表示されます。"
},
"Comfy_Validation_NodeDefs": {
"name": "ノード定義を検証(遅い)",
"tooltip": "ノード開発者に推奨されます。これにより、起動時にすべてのノード定義が検証されます。"
},
"Comfy_Validation_Workflows": {
"name": "ワークフローを検証"
},

View File

@@ -329,10 +329,6 @@
},
"tooltip": "메뉴 바 위치입니다. 모바일 기기에서는 메뉴가 항상 상단에 표시됩니다."
},
"Comfy_Validation_NodeDefs": {
"name": "노드 정의 유효성 검사 (느림)",
"tooltip": "노드 개발자에게 권장됩니다. 시작 시 모든 노드 정의를 유효성 검사합니다."
},
"Comfy_Validation_Workflows": {
"name": "워크플로 유효성 검사"
},

View File

@@ -329,10 +329,6 @@
},
"tooltip": "Расположение панели меню. На мобильных устройствах меню всегда отображается вверху."
},
"Comfy_Validation_NodeDefs": {
"name": "Проверка определений нод (медленно)",
"tooltip": "Рекомендуется для разработчиков нод. Это проверит все определения нод при запуске."
},
"Comfy_Validation_Workflows": {
"name": "Проверка рабочих процессов"
},

View File

@@ -329,10 +329,6 @@
},
"tooltip": "選單列位置。在行動裝置上,選單始終顯示於頂端。"
},
"Comfy_Validation_NodeDefs": {
"name": "校验节点定义(慢)",
"tooltip": "推荐给节点开发者。开启后会在 ComfyUI 启动时校验全部节点定义。"
},
"Comfy_Validation_Workflows": {
"name": "校验工作流"
},

View File

@@ -34,10 +34,7 @@ import type {
ComfyWorkflowJSON,
NodeId
} from '@/schemas/comfyWorkflowSchema'
import {
type ComfyNodeDef,
validateComfyNodeDef
} from '@/schemas/nodeDefSchema'
import type { ComfyNodeDef } from '@/schemas/nodeDefSchema'
import { WorkflowTemplates } from '@/types/workflowTemplateTypes'
interface QueuePromptRequestBody {
@@ -605,31 +602,9 @@ export class ComfyApi extends EventTarget {
* Loads node object definitions for the graph
* @returns The node definitions
*/
async getNodeDefs({ validate = false }: { validate?: boolean } = {}): Promise<
Record<string, ComfyNodeDef>
> {
async getNodeDefs(): Promise<Record<string, ComfyNodeDef>> {
const resp = await this.fetchApi('/object_info', { cache: 'no-store' })
const objectInfoUnsafe = await resp.json()
if (!validate) {
return objectInfoUnsafe
}
// Validate node definitions against zod schema. (slow)
const objectInfo: Record<string, ComfyNodeDef> = {}
for (const key in objectInfoUnsafe) {
const validatedDef = validateComfyNodeDef(
objectInfoUnsafe[key],
/* onError=*/ (errorMessage: string) => {
console.warn(
`Skipping invalid node definition: ${key}. See debug log for more information.`
)
console.debug(errorMessage)
}
)
if (validatedDef !== null) {
objectInfo[key] = validatedDef
}
}
return objectInfo
return await resp.json()
}
/**

View File

@@ -937,12 +937,7 @@ export class ComfyApp {
.join('/')
})
return _.mapValues(
await api.getNodeDefs({
validate: useSettingStore().get('Comfy.Validation.NodeDefs')
}),
(def) => translateNodeDef(def)
)
return _.mapValues(await api.getNodeDefs(), (def) => translateNodeDef(def))
}
/**