diff --git a/src/lib/components/ComfyApp.ts b/src/lib/components/ComfyApp.ts index e4c7625..7078f29 100644 --- a/src/lib/components/ComfyApp.ts +++ b/src/lib/components/ComfyApp.ts @@ -941,7 +941,11 @@ export default class ComfyApp { if (workflow.attrs.queuePromptButtonRunWorkflow) { // Hold control to queue at the front const num = this.ctrlDown ? -1 : 0; - this.queuePrompt(workflow, num, 1); + let tag = null; + if (workflow.attrs.queuePromptButtonDefaultWorkflow) { + tag = workflow.attrs.queuePromptButtonDefaultWorkflow + } + this.queuePrompt(workflow, num, 1, tag); } } diff --git a/src/lib/stores/layoutStates.ts b/src/lib/stores/layoutStates.ts index 0dcd911..bae1f34 100644 --- a/src/lib/stores/layoutStates.ts +++ b/src/lib/stores/layoutStates.ts @@ -681,6 +681,13 @@ const ALL_ATTRIBUTES: AttributesSpecList = [ editable: true, defaultValue: true }, + { + name: "queuePromptButtonDefaultWorkflow", + type: "string", + location: "workflow", + editable: true, + defaultValue: "" + }, { name: "showDefaultNotifications", type: "boolean", diff --git a/src/lib/stores/workflowState.ts b/src/lib/stores/workflowState.ts index c7e0707..559a969 100644 --- a/src/lib/stores/workflowState.ts +++ b/src/lib/stores/workflowState.ts @@ -57,6 +57,12 @@ export type WorkflowAttributes = { */ queuePromptButtonRunWorkflow: boolean, + /* + * Default subgraph to run if `queuePromptButtonRunWorkflow` is `true`. Set + * to blank to run the default subgraph (tagless). + */ + queuePromptButtonDefaultWorkflow: string, + /* * If true, notifications will be shown when a prompt is queued and * completed. Set to false if you need more detailed control over the