fix rebase error

This commit is contained in:
bymyself
2025-07-11 01:21:18 -07:00
committed by Jin Yi
parent e31cf997c9
commit e4e5e4d331
2 changed files with 26 additions and 3 deletions

View File

@@ -857,6 +857,27 @@ export function useCoreCommands(): ComfyCommand[] {
})
return
}
await api.freeMemory({ freeExecutionCache: false })
}
},
{
id: 'Comfy.Memory.UnloadModelsAndExecutionCache',
icon: 'mdi mdi-vacuum-outline',
label: 'Unload Models and Execution Cache',
versionAdded: '1.16.4',
function: async () => {
if (!useSettingStore().get('Comfy.Memory.AllowManualUnload')) {
useToastStore().add({
severity: 'error',
summary: t('g.error'),
detail: t('g.commandProhibited', {
command: 'Comfy.Memory.UnloadModelsAndExecutionCache'
}),
life: 3000
})
return
}
await api.freeMemory({ freeExecutionCache: true })
}
}
]

View File

@@ -84,9 +84,11 @@ describe('useUpdateAvailableNodes', () => {
}
})
mockIsSemVer.mockImplementation((version: string) => {
return !version.includes('nightly')
})
mockIsSemVer.mockImplementation(
(version: string): version is `${number}.${number}.${number}` => {
return !version.includes('nightly')
}
)
mockCompareVersions.mockImplementation(
(latest: string | undefined, installed: string | undefined) => {