mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-21 06:49:37 +00:00
Fix type on LoadClip being marked as asset (#6207)
Previously, asset conversion was performed on any combo widget on a valid node. As the `type` widget on LoadClip was also a combo widget, it was being incorrectly converted. This PR changes the isAssetBrowserEligible check to also verify the widget name is correct. <img width="694" height="174" alt="image" src="https://github.com/user-attachments/assets/a8523ade-7f59-4480-b5e6-8782fd680106" /> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6207-Fix-type-on-LoadClip-being-marked-as-asset-2946d73d3650811690f8d3a221a5b76d) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -25,12 +25,12 @@ export const useModelToNodeStore = defineStore('modelToNode', () => {
|
||||
const haveDefaultsLoaded = ref(false)
|
||||
|
||||
/** Internal computed for reactive caching of registered node types */
|
||||
const registeredNodeTypes = computed(() => {
|
||||
return new Set(
|
||||
const registeredNodeTypes = computed<Record<string, string>>(() => {
|
||||
return Object.fromEntries(
|
||||
Object.values(modelToNodeMap.value)
|
||||
.flat()
|
||||
.filter((provider) => !!provider.nodeDef)
|
||||
.map((provider) => provider.nodeDef.name)
|
||||
.map((provider) => [provider.nodeDef.name, provider.key])
|
||||
)
|
||||
})
|
||||
|
||||
@@ -51,7 +51,7 @@ export const useModelToNodeStore = defineStore('modelToNode', () => {
|
||||
})
|
||||
|
||||
/** Get set of all registered node types for efficient lookup */
|
||||
function getRegisteredNodeTypes(): Set<string> {
|
||||
function getRegisteredNodeTypes(): Record<string, string> {
|
||||
registerDefaults()
|
||||
return registeredNodeTypes.value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user