mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-02 08:15:08 -05:00
fix(ui): filter out batch nodes when checking readiness on workflows tab
This commit is contained in:
@@ -9,7 +9,7 @@ import { v4 as uuidv4 } from 'uuid';
|
||||
const log = logger('workflows');
|
||||
|
||||
// These nodes are not executable, they exist for the frontend only
|
||||
const filterNonExecutableNodes = (node: InvocationNode) => {
|
||||
export const filterNonExecutableNodes = (node: InvocationNode) => {
|
||||
if (node.data.type === 'image_batch') {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import {
|
||||
validateStringFieldCollectionValue,
|
||||
} from 'features/nodes/types/fieldValidators';
|
||||
import { isInvocationNode } from 'features/nodes/types/invocation';
|
||||
import { filterNonExecutableNodes } from 'features/nodes/util/graph/buildNodesGraph';
|
||||
import type { UpscaleState } from 'features/parameters/store/upscaleSlice';
|
||||
import { selectUpscaleSlice } from 'features/parameters/store/upscaleSlice';
|
||||
import { selectConfigSlice } from 'features/system/store/configSlice';
|
||||
@@ -75,11 +76,13 @@ const getReasonsWhyCannotEnqueueWorkflowsTab = (arg: {
|
||||
}
|
||||
|
||||
if (workflowSettings.shouldValidateGraph) {
|
||||
if (!nodes.nodes.length) {
|
||||
const nodesToCheck = nodes.nodes.filter(isInvocationNode).filter(filterNonExecutableNodes);
|
||||
|
||||
if (!nodesToCheck.length) {
|
||||
reasons.push({ content: i18n.t('parameters.invoke.noNodesInGraph') });
|
||||
}
|
||||
|
||||
nodes.nodes.forEach((node) => {
|
||||
nodesToCheck.forEach((node) => {
|
||||
if (!isInvocationNode(node)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user