mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Add option to scan loaded folder again
This commit is contained in:
parent
942f029a24
commit
ad0b366e47
@ -34,6 +34,7 @@
|
||||
"checkpointFolder": "Checkpoint Folder",
|
||||
"clearCheckpointFolder": "Clear Checkpoint Folder",
|
||||
"findModels": "Find Models",
|
||||
"scanAgain": "Scan Again",
|
||||
"modelsFound": "Models Found",
|
||||
"selectFolder": "Select Folder",
|
||||
"selected": "Selected",
|
||||
|
@ -26,6 +26,7 @@ import type { ReactNode, ChangeEvent } from 'react';
|
||||
import type { FoundModel } from 'app/invokeai';
|
||||
import IAIInput from 'common/components/IAIInput';
|
||||
import { Field, Formik } from 'formik';
|
||||
import { BiReset } from 'react-icons/bi';
|
||||
|
||||
const existingModelsSelector = createSelector([systemSelector], (system) => {
|
||||
const { model_list } = system;
|
||||
@ -130,6 +131,10 @@ export default function SearchModels() {
|
||||
(state: RootState) => state.options.shouldShowExistingModelsInSearch
|
||||
);
|
||||
|
||||
const isProcessing = useAppSelector(
|
||||
(state: RootState) => state.system.isProcessing
|
||||
);
|
||||
|
||||
const [modelsToAdd, setModelsToAdd] = React.useState<string[]>([]);
|
||||
|
||||
const resetSearchModelHandler = () => {
|
||||
@ -243,6 +248,16 @@ export default function SearchModels() {
|
||||
>
|
||||
{searchFolder}
|
||||
</p>
|
||||
<IAIIconButton
|
||||
aria-label={t('modelmanager:scanAgain')}
|
||||
tooltip={t('modelmanager:scanAgain')}
|
||||
icon={<BiReset />}
|
||||
position={'absolute'}
|
||||
right={16}
|
||||
fontSize={18}
|
||||
disabled={isProcessing}
|
||||
onClick={() => dispatch(searchForModels(searchFolder))}
|
||||
/>
|
||||
<IAIIconButton
|
||||
aria-label={t('modelmanager:clearCheckpointFolder')}
|
||||
icon={<FaPlus style={{ transform: 'rotate(45deg)' }} />}
|
||||
@ -277,6 +292,7 @@ export default function SearchModels() {
|
||||
aria-label={t('modelmanager:findModels')}
|
||||
tooltip={t('modelmanager:findModels')}
|
||||
type="submit"
|
||||
disabled={isProcessing}
|
||||
/>
|
||||
</HStack>
|
||||
</form>
|
||||
|
Loading…
Reference in New Issue
Block a user