Skip to content

Commit c07b976

Browse files
committed
Full Asset Selection Experience (Assets API) (#5900)
Full Integration of Asset Browsing and Selection when Assets API is enabled. 1. Replace Model Left Side Tab with experience 2. Configurable titles for the Asset Browser Modal 3. Refactors to simplify callback code 4. Refactor to make modal filters reactive (they change their values based on assets displayed) 5. Add `browse()` mode with ability to create node directly from the Asset Browser Modal (in `browse()` mode) Demo of many different types of Nodes getting configured by the Modal https://github.com/user-attachments/assets/34f9c964-cdf2-4c5d-86a9-a8e7126a7de9 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5900-Feat-asset-selection-cloud-integration-2816d73d365081ccb4aeecdc14b0e5d3) by [Unito](https://www.unito.io)
1 parent 5a10900 commit c07b976

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

src/composables/useCoreCommands.ts

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,23 +1068,9 @@ export function useCoreCommands(): ComfyCommand[] {
10681068
{
10691069
id: 'Comfy.BrowseModelAssets',
10701070
icon: 'pi pi-folder-open',
1071-
label: 'Experimental: Browse Model Assets',
1071+
label: 'Browse Model Assets',
10721072
versionAdded: '1.28.3',
10731073
function: async () => {
1074-
if (!useSettingStore().get('Comfy.Assets.UseAssetAPI')) {
1075-
const confirmed = await dialogService.confirm({
1076-
title: 'Enable Asset API',
1077-
message:
1078-
'The Asset API is currently disabled. Would you like to enable it?',
1079-
type: 'default'
1080-
})
1081-
1082-
if (!confirmed) return
1083-
1084-
const settingStore = useSettingStore()
1085-
await settingStore.set('Comfy.Assets.UseAssetAPI', true)
1086-
await workflowService.reloadCurrentWorkflow()
1087-
}
10881074
const assetBrowserDialog = useAssetBrowserDialog()
10891075
await assetBrowserDialog.browse({
10901076
assetType: 'models',
@@ -1102,22 +1088,6 @@ export function useCoreCommands(): ComfyCommand[] {
11021088
}
11031089
})
11041090
}
1105-
},
1106-
{
1107-
id: 'Comfy.ToggleAssetAPI',
1108-
icon: 'pi pi-database',
1109-
label: () =>
1110-
`Experimental: ${
1111-
useSettingStore().get('Comfy.Assets.UseAssetAPI')
1112-
? 'Disable'
1113-
: 'Enable'
1114-
} AssetAPI`,
1115-
function: async () => {
1116-
const settingStore = useSettingStore()
1117-
const current = settingStore.get('Comfy.Assets.UseAssetAPI') ?? false
1118-
await settingStore.set('Comfy.Assets.UseAssetAPI', !current)
1119-
await useWorkflowService().reloadCurrentWorkflow() // ensure changes take effect immediately
1120-
}
11211091
}
11221092
]
11231093

0 commit comments

Comments
 (0)