mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix: Model Manager scan Auto Add not detecting checkpoint correctly
This commit is contained in:
parent
c3a7e35ad8
commit
d45ff7e100
@ -19,18 +19,16 @@ export default function ScanAdvancedAddModels() {
|
||||
const [advancedAddMode, setAdvancedAddMode] =
|
||||
useState<ManualAddMode>('diffusers');
|
||||
|
||||
const [isCheckpoint, setIsCheckpoint] = useState(
|
||||
advancedAddScanModel &&
|
||||
['.ckpt', '.safetensors', '.pth', '.pt'].some((ext) =>
|
||||
advancedAddScanModel.endsWith(ext)
|
||||
)
|
||||
);
|
||||
const [isCheckpoint, setIsCheckpoint] = useState<boolean>(false);
|
||||
|
||||
useEffect(() => {
|
||||
isCheckpoint
|
||||
advancedAddScanModel &&
|
||||
['.ckpt', '.safetensors', '.pth', '.pt'].some((ext) =>
|
||||
advancedAddScanModel.endsWith(ext)
|
||||
)
|
||||
? setAdvancedAddMode('checkpoint')
|
||||
: setAdvancedAddMode('diffusers');
|
||||
}, [setAdvancedAddMode, isCheckpoint]);
|
||||
}, [advancedAddScanModel, setAdvancedAddMode]);
|
||||
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user