From cab76a0c4a53ba59ce9238a98d106687b3042790 Mon Sep 17 00:00:00 2001 From: Cohee Date: Wed, 26 Apr 2023 21:37:02 +0300 Subject: [PATCH 01/10] Update readme.md --- readme.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index 6561b49bf..948398feb 100644 --- a/readme.md +++ b/readme.md @@ -31,6 +31,21 @@ https://rentry.org/TAI_Termux **.webp character cards import/export is not supported in Termux. Use either JSON or PNG formats instead.** +## Questions or suggestions? + +### We now have a community Discord server! + +Get support, share favorite characters and prompts: + +### [Join](https://discord.gg/RZdyAEUPvj) + +*** + +Get in touch with the developers directly: +* Discord: Cohee#1207 or RossAscends#1779 +* Reddit: /u/RossAscends or /u/sillylossy +* [Post a GitHub issue](https://github.com/Cohee1207/SillyTavern/issues) + ## This version includes * A heavily modified TavernAI 1.2.8 (more than 50% of code rewritten or optimized) * Swipes @@ -161,11 +176,6 @@ Try enabling the No Blur Effect (Fast UI) mode on the User settings panel. 2. Send bug reports without providing any context 3. Ask the questions that were already answered numerous times -## Questions or suggestions? -Contact us on: -* Discord: Cohee#1207 or RossAscends#1779 -* Reddit: /u/RossAscends or /u/sillylossy - ## Screenshots image image From c4d49729cce3e289ba061f959275dbd53a34a215 Mon Sep 17 00:00:00 2001 From: Cohee Date: Wed, 26 Apr 2023 21:44:44 +0300 Subject: [PATCH 02/10] Update GPU.ipynb --- colab/GPU.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/colab/GPU.ipynb b/colab/GPU.ipynb index 80adbbc97..b36cfb58c 100644 --- a/colab/GPU.ipynb +++ b/colab/GPU.ipynb @@ -6,10 +6,10 @@ "metadata": {}, "source": [ "**Links**
\n", - "Cohee's TavernAI fork Github https://github.com/Cohee1207/SillyTavern
\n", - "Cohee's TavernAI Extras Github https://github.com/Cohee1207/TavernAI-extras/
\n", - "TavernAI Discord https://discord.gg/zmK2gmr45t
\n", - "Questions? Hit me up on Discord: Cohee#1207" + "SillyTavern GitHub: https://github.com/Cohee1207/SillyTavern
\n", + "Extensions API GitHub: https://github.com/Cohee1207/TavernAI-extras/
\n", + "SillyTavern community Discord (support and discussion): https://discord.gg/RZdyAEUPvj
\n", + "Contact the maintainer directly: Cohee#1207" ] }, { From e4f9c7e9c62fcca0c716c3aa2d49be3c8d71b7c3 Mon Sep 17 00:00:00 2001 From: Grzegorz Gidel Date: Wed, 26 Apr 2023 23:12:16 +0200 Subject: [PATCH 03/10] Do not delete characters on failed WebP conversion --- server.js | 11 +++++++++-- tools/charaverter/main.mjs | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/server.js b/server.js index 63888074c..d0fa59fc6 100644 --- a/server.js +++ b/server.js @@ -748,11 +748,13 @@ async function charaWrite(img_url, data, target_img, response = undefined, mes = fs.writeFileSync(charactersPath + target_img + '.png', new Buffer.from(encode(chunks))); if (response !== undefined) response.send(mes); + return true; } catch (err) { console.log(err); - if (response !== undefined) response.send(err); + if (response !== undefined) response.status(500).send(err); + return false; } } @@ -2547,7 +2549,12 @@ async function convertWebp() { await webp.dwebp(source, dest, "-o"); console.log(`Write... ${dest}`); - await charaWrite(dest, data, path.parse(dest).name); + const success = await charaWrite(dest, data, path.parse(dest).name); + + if (!success) { + console.log(`Failure on ${source} -> ${dest}`); + continue; + } console.log(`Remove... ${source}`); fs.rmSync(source); diff --git a/tools/charaverter/main.mjs b/tools/charaverter/main.mjs index c3fda1729..da7f3123d 100644 --- a/tools/charaverter/main.mjs +++ b/tools/charaverter/main.mjs @@ -71,11 +71,13 @@ async function charaWrite(img_url, data, target_img, response = undefined, mes = fs.writeFileSync(target_img, new Buffer.from(encode(chunks))); if (response !== undefined) response.send(mes); + return true; } catch (err) { console.log(err); - if (response !== undefined) response.send(err); + if (response !== undefined) response.status(500).send(err); + return false; } } @@ -102,7 +104,12 @@ async function charaWrite(img_url, data, target_img, response = undefined, mes = await webp.dwebp(source, dest, "-o") console.log(`Write... ${dest}`) - await charaWrite(dest, data, dest) + const success = await charaWrite(dest, data, path.parse(dest).name); + + if (!success) { + console.log(`Failure on ${source} -> ${dest}`); + continue; + } console.log(`Remove... ${source}`) fs.rmSync(source) From 46617fc2f544c9499d1810700b7cffa2a874b612 Mon Sep 17 00:00:00 2001 From: Grzegorz Gidel Date: Wed, 26 Apr 2023 21:16:18 +0200 Subject: [PATCH 04/10] Fix WebP character import in Docker (dwebp does not like musl) --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c19440a65..3704db7a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,10 @@ FROM node:19.1.0-alpine3.16 # Arguments ARG APP_HOME=/home/node/app +# Install system dependencies +RUN apk add gcompat tini + # Ensure proper handling of kernel signals -RUN apk add tini ENTRYPOINT [ "tini", "--" ] # Create app directory From e58da515181a7b9d1c7594941ddce8dc29f72c5d Mon Sep 17 00:00:00 2001 From: Grzegorz Gidel Date: Thu, 27 Apr 2023 01:34:21 +0200 Subject: [PATCH 05/10] Fix the warning about empty continuation lines in Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3704db7a4..6fbb44111 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,8 +27,8 @@ RUN \ mv "./public/characters" "./public/characters.default" && \ mv "./public/chats" "./public/chats.default" && \ mv "./public/User Avatars" "./public/User Avatars.default" && \ - mv "./public/settings.json" "./public/settings.json.default" && \ - + mv "./public/settings.json" "./public/settings.json.default" && \ + \ echo "*** Create symbolic links to config directory ***" && \ ln -s "${APP_HOME}/config/characters" "${APP_HOME}/public/characters" && \ ln -s "${APP_HOME}/config/chats" "${APP_HOME}/public/chats" && \ From 9d8b13604af4d79016430e0d723d521b27775f8a Mon Sep 17 00:00:00 2001 From: Cohee Date: Thu, 27 Apr 2023 15:34:06 +0300 Subject: [PATCH 06/10] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 948398feb..1c4253757 100644 --- a/readme.md +++ b/readme.md @@ -27,7 +27,7 @@ https://colab.research.google.com/github/Cohee1207/SillyTavern/blob/main/colab/G > **This fork can be run natively on Android phones using Termux. Please refer to this guide by ArroganceComplex#2659:** -https://rentry.org/TAI_Termux +https://rentry.org/STAI-Termux **.webp character cards import/export is not supported in Termux. Use either JSON or PNG formats instead.** From b83ef20c0387827ecf18e39906d55166126a59a6 Mon Sep 17 00:00:00 2001 From: Cohee Date: Thu, 27 Apr 2023 15:34:54 +0300 Subject: [PATCH 07/10] Update faq.md --- faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faq.md b/faq.md index 83b5b159f..113fb74b7 100644 --- a/faq.md +++ b/faq.md @@ -132,7 +132,7 @@ When using Poe, be careful, it's implemented in a hacky way. If you don't get an iPhones and iPads are not capable of running the whole Tavern app, but since it's just a web interface, you can run it on another computer on your home wifi, and then access in your mobile browser. Refer to https://github.com/Cohee1207/SillyTavern#remote-connections -For Android users, in addition to the above, you can run the whole Tavern directly on your phone, without needing a PC, using the Termux app. Refer to https://rentry.org/TAI_Termux . +For Android users, in addition to the above, you can run the whole Tavern directly on your phone, without needing a PC, using the Termux app. Refer to https://rentry.org/STAI-Termux . ## Q: How can I download pre-made characters to chat with? From b3b1e427550aa39b46461dc5ef8e6b95d68050c4 Mon Sep 17 00:00:00 2001 From: Grzegorz Gidel Date: Thu, 27 Apr 2023 21:07:05 +0200 Subject: [PATCH 08/10] Add .git to .dockerignore to save >100 MB on image size --- .dockerignore | 1 + Dockerfile | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 70fd3b4da..482a98310 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ +.git node_modules npm-debug.log readme* diff --git a/Dockerfile b/Dockerfile index 6fbb44111..5d7527c14 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,6 @@ RUN \ echo "*** Cleanup ***" && \ mv "./docker/docker-entrypoint.sh" "./" && \ rm -rf "./docker" && \ - rm -rf "./.git" && \ echo "*** Make docker-entrypoint.sh executable ***" && \ chmod +x "./docker-entrypoint.sh" && \ echo "*** Convert line endings to Unix format ***" && \ From 42e84643cf0d66524bb429896ded53b40366e9f3 Mon Sep 17 00:00:00 2001 From: Grzegorz Gidel Date: Fri, 28 Apr 2023 04:57:19 +0200 Subject: [PATCH 09/10] Remove npm cache in Docker to save >40 MB on image size --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5d7527c14..9fca2b46d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ WORKDIR ${APP_HOME} COPY package*.json ./ RUN \ echo "*** Install npm packages ***" && \ - npm install + npm install && npm cache clean --force # Bundle app source COPY . ./ From c3d8686c4f234fdc46f472d5623aa1dbe42b1f41 Mon Sep 17 00:00:00 2001 From: Cohee Date: Fri, 28 Apr 2023 18:34:21 +0300 Subject: [PATCH 10/10] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 1c4253757..285380369 100644 --- a/readme.md +++ b/readme.md @@ -110,7 +110,7 @@ Get in touch with the developers directly: *NOTE: This branch is intended for local install purposes, and has not been thoroughly tested on a colab or other cloud notebook service.* ### Windows - 1. install [NodeJS](https://nodejs.org/en) + 1. install [NodeJS](https://nodejs.org/en) (latest LTS version is recommended) 2. download the zip from this GitHub repo 3. unzip it into a folder of your choice 4. run start.bat via double-clicking or in a command line.