Skip to content

Commit 693d408

Browse files
christian-byrneDrJKLactions-user
authored
filter out templates that have custom nodes when not on cloud (temporary) (#6690)
Templates are being added that have custom nodes. As a temporary measure, filter these out on local. In a followup, add a UX to allow local users to do something like opt-in to use these or to show these on the condition that the user has these custom nodes installed. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6690-filter-out-templates-that-have-custom-nodes-when-not-on-cloud-temporary-2ab6d73d3650819981c0e9b26d34acff) by [Unito](https://www.unito.io) --------- Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: GitHub Action <action@github.com>
1 parent 1feee48 commit 693d408

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/platform/workflow/templates/repositories/workflowTemplatesStore.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,17 @@ export const useWorkflowTemplatesStore = defineStore(
237237
}
238238
)
239239

240-
return allTemplates
240+
// TODO: Temporary filtering of custom node templates on local installations
241+
// Future: Add UX that allows local users to opt-in to templates with custom nodes,
242+
// potentially conditional on whether they have those specific custom nodes installed.
243+
// This would provide better template discovery while respecting local user workflows.
244+
const filteredTemplates = isCloud
245+
? allTemplates
246+
: allTemplates.filter(
247+
(template) => !template.requiresCustomNodes?.length
248+
)
249+
250+
return filteredTemplates
241251
})
242252

243253
/**

src/platform/workflow/templates/types/template.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ export interface TemplateInfo {
2727
* Whether this template uses open source models. When false, indicates partner/API node templates.
2828
*/
2929
openSource?: boolean
30+
/**
31+
* Array of custom node package IDs required for this template (from Custom Node Registry).
32+
* Templates with this field will be hidden on local installations temporarily.
33+
*/
34+
requiresCustomNodes?: string[]
3035
}
3136

3237
export interface WorkflowTemplates {

0 commit comments

Comments
 (0)