diff --git a/frontend/src/_locales/zh-hans/main.json b/frontend/src/_locales/zh-hans/main.json index 60f7684..3adc92f 100644 --- a/frontend/src/_locales/zh-hans/main.json +++ b/frontend/src/_locales/zh-hans/main.json @@ -88,6 +88,7 @@ "Downloads": "下载", "Pause": "暂停", "Continue": "继续", + "Resume": "继续", "Check": "查看", "Model file not found": "模型文件不存在", "Can not find download url": "找不到下载地址", @@ -134,9 +135,10 @@ "Advanced": "高级", "Custom Python Path": "自定义Python路径", "Custom Models Path": "自定义模型路径", - "MacOS is not supported yet, please convert manually.": "暂不支持MacOS, 请手动转换", "Microsoft Visual C++ Redistributable is not installed, would you like to download it?": "微软VC++组件未安装, 是否下载?", "Path Cannot Contain Space": "路径不能包含空格", "Failed to switch model, please try starting the program with administrator privileges.": "切换模型失败, 请尝试以管理员权限启动程序", - "Current Strategy": "当前Strategy" + "Current Strategy": "当前Strategy", + "MacOS is not yet supported for performing this operation, please do it manually.": "MacOS尚未支持此操作, 请手动执行", + "Linux is not yet supported for performing this operation, please do it manually.": "Linux尚未支持此操作, 请手动执行" } \ No newline at end of file diff --git a/frontend/src/components/RunButton.tsx b/frontend/src/components/RunButton.tsx index dd6ac67..35a312e 100644 --- a/frontend/src/components/RunButton.tsx +++ b/frontend/src/components/RunButton.tsx @@ -142,23 +142,28 @@ export const RunButton: FC<{ onClickRun?: MouseEventHandler, iconMode?: boolean }); let customCudaFile = ''; - if (modelConfig.modelParameters.device != 'CPU' && modelConfig.modelParameters.useCustomCuda) { - customCudaFile = getSupportedCustomCudaFile(); - if (customCudaFile && commonStore.platform === 'windows') { - FileExists('./py310/Lib/site-packages/rwkv/model.py').then((exist) => { - // defensive measure. As Python has already been launched, will only take effect the next time it runs. - if (!exist) CopyFile('./backend-python/wkv_cuda_utils/wkv_cuda_model.py', './py310/Lib/site-packages/rwkv/model.py'); - }); - await CopyFile(customCudaFile, './py310/Lib/site-packages/rwkv/wkv_cuda.pyd').catch(() => { - FileExists('./py310/Lib/site-packages/rwkv/wkv_cuda.pyd').then((exist) => { - if (!exist) { - customCudaFile = ''; - toast(t('Failed to copy custom cuda file'), { type: 'error' }); - } + if ((modelConfig.modelParameters.device === 'CUDA' || modelConfig.modelParameters.device === 'Custom') + && modelConfig.modelParameters.useCustomCuda) { + if (commonStore.platform === 'windows') { + customCudaFile = getSupportedCustomCudaFile(); + if (customCudaFile) { + FileExists('./py310/Lib/site-packages/rwkv/model.py').then((exist) => { + // defensive measure. As Python has already been launched, will only take effect the next time it runs. + if (!exist) CopyFile('./backend-python/wkv_cuda_utils/wkv_cuda_model.py', './py310/Lib/site-packages/rwkv/model.py'); }); - }); - } else - toast(t('Supported custom cuda file not found'), { type: 'warning' }); + await CopyFile(customCudaFile, './py310/Lib/site-packages/rwkv/wkv_cuda.pyd').catch(() => { + FileExists('./py310/Lib/site-packages/rwkv/wkv_cuda.pyd').then((exist) => { + if (!exist) { + customCudaFile = ''; + toast(t('Failed to copy custom cuda file'), { type: 'error' }); + } + }); + }); + } else + toast(t('Supported custom cuda file not found'), { type: 'warning' }); + } else { + customCudaFile = 'any'; + } } switchModel({ diff --git a/frontend/src/pages/Configs.tsx b/frontend/src/pages/Configs.tsx index 79c9e34..c59691c 100644 --- a/frontend/src/pages/Configs.tsx +++ b/frontend/src/pages/Configs.tsx @@ -840,7 +840,10 @@ export const Configs: FC = observer(() => { } /> { if (commonStore.platform == 'darwin') { - toast(t('MacOS is not supported yet, please convert manually.'), { type: 'info' }); + toast(t('MacOS is not yet supported for performing this operation, please do it manually.'), { type: 'info' }); + return; + } else if (commonStore.platform == 'linux') { + toast(t('Linux is not yet supported for performing this operation, please do it manually.'), { type: 'info' }); return; } diff --git a/frontend/src/pages/Downloads.tsx b/frontend/src/pages/Downloads.tsx index c585fd5..624f2c7 100644 --- a/frontend/src/pages/Downloads.tsx +++ b/frontend/src/pages/Downloads.tsx @@ -53,7 +53,7 @@ export const Downloads: FC = observer(() => {
{!status.done && - : } onClick={() => { if (status.downloading)