display current strategy

This commit is contained in:
josc146 2023-06-03 19:38:24 +08:00
parent 966b912013
commit ced0966ffc
2 changed files with 11 additions and 4 deletions

View File

@ -137,5 +137,6 @@
"MacOS is not supported yet, please convert manually.": "暂不支持MacOS, 请手动转换", "MacOS is not supported yet, please convert manually.": "暂不支持MacOS, 请手动转换",
"Microsoft Visual C++ Redistributable is not installed, would you like to download it?": "微软VC++组件未安装, 是否下载?", "Microsoft Visual C++ Redistributable is not installed, would you like to download it?": "微软VC++组件未安装, 是否下载?",
"Path Cannot Contain Space": "路径不能包含空格", "Path Cannot Contain Space": "路径不能包含空格",
"Failed to switch model, please try starting the program with administrator privileges.": "切换模型失败, 请尝试以管理员权限启动程序" "Failed to switch model, please try starting the program with administrator privileges.": "切换模型失败, 请尝试以管理员权限启动程序",
"Current Strategy": "当前Strategy"
} }

View File

@ -12,7 +12,8 @@ import {
Label, Label,
Option, Option,
Select, Select,
Switch Switch,
Text
} from '@fluentui/react-components'; } from '@fluentui/react-components';
import { import {
AddCircle20Regular, AddCircle20Regular,
@ -895,9 +896,14 @@ export const Configs: FC = observer(() => {
</Dropdown> </Dropdown>
} /> } />
} }
{selectedConfig.modelParameters.device == 'CUDA' && <div />}
{ {
selectedConfig.modelParameters.device == 'CUDA' && <Labeled label={t('Stored Layers')} selectedConfig.modelParameters.device == 'CUDA' &&
<Labeled label={t('Current Strategy')}
content={<Text> {getStrategy(selectedConfig)} </Text>} />
}
{
selectedConfig.modelParameters.device == 'CUDA' &&
<Labeled label={t('Stored Layers')}
desc={t('Number of the neural network layers loaded into VRAM, the more you load, the faster the speed, but it consumes more VRAM.')} desc={t('Number of the neural network layers loaded into VRAM, the more you load, the faster the speed, but it consumes more VRAM.')}
content={ content={
<ValuedSlider value={selectedConfig.modelParameters.storedLayers} min={0} <ValuedSlider value={selectedConfig.modelParameters.storedLayers} min={0}