Skip to content

Commit

Permalink
fix(ui): invoke tooltip for invalid/empty batches
Browse files Browse the repository at this point in the history
  • Loading branch information
psychedelicious committed Jan 17, 2025
1 parent 6f5b893 commit 8b04688
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions invokeai/frontend/web/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 8b04688

Please sign in to comment.