From b7f4dd835e4c1e3deda3660e1d6de85049b2a0e3 Mon Sep 17 00:00:00 2001 From: josc146 Date: Fri, 29 Dec 2023 00:38:33 +0800 Subject: [PATCH] chore --- backend-python/rwkv_pip/beta/model.py | 2 +- backend-python/rwkv_pip/model.py | 2 +- frontend/src/_locales/ja/main.json | 3 ++- frontend/src/_locales/zh-hans/main.json | 3 ++- frontend/src/components/RunButton.tsx | 3 ++- frontend/src/startup.ts | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/backend-python/rwkv_pip/beta/model.py b/backend-python/rwkv_pip/beta/model.py index 1c90fbf..f38038f 100644 --- a/backend-python/rwkv_pip/beta/model.py +++ b/backend-python/rwkv_pip/beta/model.py @@ -251,7 +251,7 @@ class RWKV(MyModule): ) assert ( w["_strategy"] == args.strategy_string - ) # if you are using a new strategy, re-convert the model + ), "model has been converted and does not match current strategy; if you are using a new strategy, re-convert the model" assert ( float(w["_version"]) >= 0.7 ) # sometimes you should re-convert using latest convert_model.py diff --git a/backend-python/rwkv_pip/model.py b/backend-python/rwkv_pip/model.py index cdfec6c..dccfc08 100644 --- a/backend-python/rwkv_pip/model.py +++ b/backend-python/rwkv_pip/model.py @@ -342,7 +342,7 @@ class RWKV(MyModule): ) assert ( w["_strategy"] == args.strategy_string - ) # if you are using a new strategy, re-convert the model + ), "model has been converted and does not match current strategy; if you are using a new strategy, re-convert the model" assert ( float(w["_version"]) >= 0.7 ) # sometimes you should re-convert using latest convert_model.py diff --git a/frontend/src/_locales/ja/main.json b/frontend/src/_locales/ja/main.json index e028cb0..d2b4f4a 100644 --- a/frontend/src/_locales/ja/main.json +++ b/frontend/src/_locales/ja/main.json @@ -323,5 +323,6 @@ "Core API URL": "コアAPI URL", "Override core API URL(/chat/completions and /completions). If you don't know what this is, leave it blank.": "コアAPI URLを上書きします(/chat/completions と /completions)。何であるかわからない場合は空白のままにしてください。", "Please change Strategy to CPU (rwkv.cpp) to use ggml format": "StrategyをCPU (rwkv.cpp)に変更して、ggml形式を使用してください", - "Only Auto Play Generated Content": "生成されたコンテンツのみ自動再生" + "Only Auto Play Generated Content": "生成されたコンテンツのみ自動再生", + "Model has been converted and does not match current strategy. If you are using a new strategy, re-convert the model.": "モデルが変換され、現在の戦略と一致しません。新しい戦略を使用している場合は、モデルを再変換してください。" } \ No newline at end of file diff --git a/frontend/src/_locales/zh-hans/main.json b/frontend/src/_locales/zh-hans/main.json index 8818af0..c6611f6 100644 --- a/frontend/src/_locales/zh-hans/main.json +++ b/frontend/src/_locales/zh-hans/main.json @@ -323,5 +323,6 @@ "Core API URL": "核心 API URL", "Override core API URL(/chat/completions and /completions). If you don't know what this is, leave it blank.": "覆盖核心的 API URL (/chat/completions 和 /completions)。如果你不知道这是什么,请留空", "Please change Strategy to CPU (rwkv.cpp) to use ggml format": "请将Strategy改为CPU (rwkv.cpp)以使用ggml格式", - "Only Auto Play Generated Content": "仅自动播放新生成的内容" + "Only Auto Play Generated Content": "仅自动播放新生成的内容", + "Model has been converted and does not match current strategy. If you are using a new strategy, re-convert the model.": "所选模型已被转换过,并且不匹配当前的Strategy。如果你正在使用新的Strategy,请重新转换模型" } \ No newline at end of file diff --git a/frontend/src/components/RunButton.tsx b/frontend/src/components/RunButton.tsx index e41fd39..9c1cb97 100644 --- a/frontend/src/components/RunButton.tsx +++ b/frontend/src/components/RunButton.tsx @@ -282,7 +282,8 @@ export const RunButton: FC<{ onClickRun?: MouseEventHandler, iconMode?: boolean 'invalid header or archive is corrupted': 'The model file is corrupted, please download again.', 'no NVIDIA driver': 'Found no NVIDIA driver, please install the latest driver. If you are not using an Nvidia GPU, please switch the \'Strategy\' to WebGPU or CPU in the Configs page.', 'CUDA out of memory': 'VRAM is not enough, please reduce stored layers or use a lower precision in Configs page.', - 'Ninja is required to load C++ extensions': 'Failed to enable custom CUDA kernel, ninja is required to load C++ extensions. You may be using the CPU version of PyTorch, please reinstall PyTorch with CUDA. Or if you are using a custom Python interpreter, you must compile the CUDA kernel by yourself or disable Custom CUDA kernel acceleration.' + 'Ninja is required to load C++ extensions': 'Failed to enable custom CUDA kernel, ninja is required to load C++ extensions. You may be using the CPU version of PyTorch, please reinstall PyTorch with CUDA. Or if you are using a custom Python interpreter, you must compile the CUDA kernel by yourself or disable Custom CUDA kernel acceleration.', + 're-convert the model': 'Model has been converted and does not match current strategy. If you are using a new strategy, re-convert the model.' }; const matchedError = Object.entries(errorsMap).find(([key, _]) => error.includes(key)); const message = matchedError ? t(matchedError[1]) : error; diff --git a/frontend/src/startup.ts b/frontend/src/startup.ts index 03b94d7..de0100c 100644 --- a/frontend/src/startup.ts +++ b/frontend/src/startup.ts @@ -49,7 +49,7 @@ export async function startup() { async function initRemoteText() { await fetch('https://cdn.jsdelivr.net/gh/josstorer/RWKV-Runner@master/manifest.json', { cache: 'no-cache' }) .then(r => r.json()).then((data) => { - if (data.version > manifest.version) { + if (data.version >= manifest.version) { if (data.introduction) commonStore.setIntroduction(data.introduction); if (data.about)