diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json index 0a47e554e81..2c560fdfe22 100644 --- a/invokeai/frontend/web/public/locales/en.json +++ b/invokeai/frontend/web/public/locales/en.json @@ -1036,6 +1036,7 @@ "missingInputForField": "missing input", "missingNodeTemplate": "Missing node template", "collectionEmpty": "empty collection", + "invalidBatchConfiguration": "Invalid batch configuration", "batchNodeNotConnected": "Batch node not connected: {{label}}", "collectionTooFewItems": "too few items, minimum {{minItems}}", "collectionTooManyItems": "too many items, maximum {{maxItems}}", diff --git a/invokeai/frontend/web/src/features/queue/components/InvokeButtonTooltip/InvokeButtonTooltip.tsx b/invokeai/frontend/web/src/features/queue/components/InvokeButtonTooltip/InvokeButtonTooltip.tsx index 391993db58c..fdb7c9d24ec 100644 --- a/invokeai/frontend/web/src/features/queue/components/InvokeButtonTooltip/InvokeButtonTooltip.tsx +++ b/invokeai/frontend/web/src/features/queue/components/InvokeButtonTooltip/InvokeButtonTooltip.tsx @@ -206,8 +206,16 @@ const QueueCountPredictionWorkflowsTab = memo(() => { const iterationsCount = useAppSelector(selectIterations); const text = useMemo(() => { - const generationCount = Math.min(batchSize * iterationsCount, 10000); const iterations = t('queue.iterations', { count: iterationsCount }); + if (batchSize === 'NO_BATCHES') { + const generationCount = Math.min(10000, iterationsCount); + const generations = t('queue.generations', { count: generationCount }); + return `${iterationsCount} ${iterations} -> ${generationCount} ${generations}`.toLowerCase(); + } + if (batchSize === 'INVALID') { + return t('parameters.invoke.invalidBatchConfiguration'); + } + const generationCount = Math.min(batchSize * iterationsCount, 10000); const generations = t('queue.generations', { count: generationCount }); return `${batchSize} ${t('queue.batchSize')} \u00d7 ${iterationsCount} ${iterations} -> ${generationCount} ${generations}`.toLowerCase(); }, [batchSize, iterationsCount, t]);