mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-09 07:00:06 +00:00
prototype - eager execution
This commit is contained in:
@@ -50,6 +50,7 @@ import { useBottomPanelStore } from '@/stores/workspace/bottomPanelStore'
|
||||
import { useColorPaletteStore } from '@/stores/workspace/colorPaletteStore'
|
||||
import { useSearchBoxStore } from '@/stores/workspace/searchBoxStore'
|
||||
import { useWorkspaceStore } from '@/stores/workspaceStore'
|
||||
import { useEagerExecutionStore } from '@/stores/eagerExecutionStore'
|
||||
import {
|
||||
getAllNonIoNodesInSubgraph,
|
||||
getExecutionIdsForSelectedNodes
|
||||
@@ -1225,6 +1226,25 @@ export function useCoreCommands(): ComfyCommand[] {
|
||||
icon: 'pi pi-database',
|
||||
label: 'toggle linear mode',
|
||||
function: () => (canvasStore.linearMode = !canvasStore.linearMode)
|
||||
},
|
||||
{
|
||||
id: 'Comfy.ToggleEagerExecution',
|
||||
icon: 'pi pi-bolt',
|
||||
label: 'Toggle Eager Execution',
|
||||
function: () => {
|
||||
const eagerExecutionStore = useEagerExecutionStore()
|
||||
eagerExecutionStore.toggle()
|
||||
toastStore.add({
|
||||
severity: 'info',
|
||||
summary: eagerExecutionStore.enabled
|
||||
? t('Eager execution enabled')
|
||||
: t('Eager execution disabled'),
|
||||
detail: eagerExecutionStore.enabled
|
||||
? t('Nodes will auto-execute when ancestors change')
|
||||
: t('Auto-execution disabled'),
|
||||
life: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user