feat(ui): disable invoke button when t2i adapter used w/ image dims that are not multiples of 64

This commit is contained in:
psychedelicious
2024-05-10 16:35:04 +10:00
parent 2656f13a4a
commit d9ce9c62ac
2 changed files with 6 additions and 1 deletions

View File

@ -29,6 +29,7 @@ const selector = createMemoizedSelector(
],
(controlAdapters, generation, system, nodes, dynamicPrompts, controlLayers, activeTabName) => {
const { model } = generation;
const { size } = controlLayers.present;
const { positivePrompt } = controlLayers.present;
const { isConnected } = system;
@ -143,6 +144,9 @@ const selector = createMemoizedSelector(
})
);
}
if (ca.type === 't2i_adapter' && (size.width % 64 !== 0 || size.height % 64 !== 0)) {
reasons.push(i18n.t('parameters.invoke.t2iAdapterMismatchedDimensions'));
}
});
} else {
// Handling for all other tabs