Default workflow subgraph attribute
This commit is contained in:
@@ -941,7 +941,11 @@ export default class ComfyApp {
|
|||||||
if (workflow.attrs.queuePromptButtonRunWorkflow) {
|
if (workflow.attrs.queuePromptButtonRunWorkflow) {
|
||||||
// Hold control to queue at the front
|
// Hold control to queue at the front
|
||||||
const num = this.ctrlDown ? -1 : 0;
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -681,6 +681,13 @@ const ALL_ATTRIBUTES: AttributesSpecList = [
|
|||||||
editable: true,
|
editable: true,
|
||||||
defaultValue: true
|
defaultValue: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "queuePromptButtonDefaultWorkflow",
|
||||||
|
type: "string",
|
||||||
|
location: "workflow",
|
||||||
|
editable: true,
|
||||||
|
defaultValue: ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "showDefaultNotifications",
|
name: "showDefaultNotifications",
|
||||||
type: "boolean",
|
type: "boolean",
|
||||||
|
|||||||
@@ -57,6 +57,12 @@ export type WorkflowAttributes = {
|
|||||||
*/
|
*/
|
||||||
queuePromptButtonRunWorkflow: boolean,
|
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
|
* If true, notifications will be shown when a prompt is queued and
|
||||||
* completed. Set to false if you need more detailed control over the
|
* completed. Set to false if you need more detailed control over the
|
||||||
|
|||||||
Reference in New Issue
Block a user