small fix
This commit is contained in:
parent
79476f66a6
commit
1b3aa629da
@ -115,6 +115,8 @@ const Configs: FC = observer(() => {
|
|||||||
|
|
||||||
const onClickSave = () => {
|
const onClickSave = () => {
|
||||||
commonStore.setModelConfig(selectedIndex, selectedConfig);
|
commonStore.setModelConfig(selectedIndex, selectedConfig);
|
||||||
|
const webgpu = selectedConfig.modelParameters.device === 'WebGPU';
|
||||||
|
if (!webgpu) {
|
||||||
// When clicking RunButton in Configs page, updateConfig will be called twice,
|
// When clicking RunButton in Configs page, updateConfig will be called twice,
|
||||||
// because there are also RunButton in other pages, and the calls to updateConfig in both places are necessary.
|
// because there are also RunButton in other pages, and the calls to updateConfig in both places are necessary.
|
||||||
updateConfig({
|
updateConfig({
|
||||||
@ -137,6 +139,7 @@ const Configs: FC = observer(() => {
|
|||||||
toast(error, { type: 'error' });
|
toast(error, { type: 'error' });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
toast(t('Config Saved'), { autoClose: 300, type: 'success' });
|
toast(t('Config Saved'), { autoClose: 300, type: 'success' });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user