mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge remote-tracking branch 'oldorigin/main'
This commit is contained in:
@ -215,6 +215,7 @@
|
||||
" ui1prefix = f\"{prefix} for UI 1: \"\n",
|
||||
" while True:\n",
|
||||
" line = p.stdout.readline().decode().strip()\n",
|
||||
" print(line)\n",
|
||||
" if urlprefix in line:\n",
|
||||
" url = line.split(urlprefix)[1]\n",
|
||||
" break\n",
|
||||
@ -223,7 +224,6 @@
|
||||
" break\n",
|
||||
" elif not line:\n",
|
||||
" break\n",
|
||||
" print(line)\n",
|
||||
" if \"INIT\" in line and \"Transformers\" in line:\n",
|
||||
" print(\"Model loading... (It will take 2 - 5 minutes)\")\n",
|
||||
"\n",
|
||||
@ -245,6 +245,7 @@
|
||||
"\n",
|
||||
"# ---\n",
|
||||
"# TavernAI extras\n",
|
||||
"extras_url = '(disabled)'\n",
|
||||
"params = []\n",
|
||||
"params.append('--cpu')\n",
|
||||
"ExtrasModules = []\n",
|
||||
@ -261,7 +262,6 @@
|
||||
"params.append(f'--captioning-model={Captions_Model}')\n",
|
||||
"params.append(f'--enable-modules={\",\".join(ExtrasModules)}')\n",
|
||||
"\n",
|
||||
"extras_url = '(disabled)'\n",
|
||||
"\n",
|
||||
"if UseExtrasExtensions:\n",
|
||||
" def cloneExtras():\n",
|
||||
@ -286,6 +286,7 @@
|
||||
" %env googledrive=2\n",
|
||||
"\n",
|
||||
" def setupTavernPaths():\n",
|
||||
" %cd /SillyTavern\n",
|
||||
" tdrive = \"/content/drive/MyDrive/SillyTavern\"\n",
|
||||
" create_paths([\n",
|
||||
" tdrive,\n",
|
||||
@ -306,6 +307,7 @@
|
||||
" ii.addTask(\"Setup Tavern Paths\", setupTavernPaths)\n",
|
||||
"\n",
|
||||
"def installTavernDependencies():\n",
|
||||
" %cd /SillyTavern\n",
|
||||
" !npm install\n",
|
||||
" !npm install -g localtunnel\n",
|
||||
"ii.addTask(\"Install Tavern Dependencies\", installTavernDependencies)\n",
|
||||
|
@ -1,9 +1,13 @@
|
||||
import os, time, subprocess
|
||||
import os
|
||||
import time
|
||||
import subprocess
|
||||
|
||||
|
||||
def runServer():
|
||||
cmd = f"python server.py {' '.join(params)}"
|
||||
print(cmd)
|
||||
extras_process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd='/TavernAI-extras', shell=True)
|
||||
extras_process = subprocess.Popen(
|
||||
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd='/TavernAI-extras', shell=True)
|
||||
print('processId:', extras_process.pid)
|
||||
while True:
|
||||
line = extras_process.stdout.readline().decode().strip()
|
||||
@ -14,10 +18,13 @@ def runServer():
|
||||
break
|
||||
print(line)
|
||||
|
||||
def extractUrl():
|
||||
subprocess.call('nohup lt --port 5100 > ./extras.out 2> ./extras.err &', shell=True)
|
||||
print('Waiting for lt init...')
|
||||
|
||||
def extractUrl():
|
||||
global extras_url
|
||||
subprocess.call(
|
||||
'nohup lt --port 5100 > ./extras.out 2> ./extras.err &', shell=True)
|
||||
print('Waiting for lt init...')
|
||||
time.sleep(5)
|
||||
while True:
|
||||
if (os.path.getsize('./extras.out') > 0):
|
||||
with open('./extras.out', 'r') as f:
|
||||
@ -32,4 +39,3 @@ def extractUrl():
|
||||
with open('./extras.err', 'r') as f:
|
||||
print(f.readlines())
|
||||
break
|
||||
time.sleep(1)
|
@ -19,10 +19,14 @@ Since Tavern is only a user interface, it has tiny hardware requirements, it wil
|
||||
|
||||
### I want to try self-hosted easily. Got a Google Colab?
|
||||
|
||||
Try on Colab (runs KoboldAI backend and TavernAI Extras server alongside): <a target="_blank" href="https://colab.research.google.com/github/Cohee1207/TavernAI-extras/blob/main/colab/GPU.ipynb">
|
||||
Try on Colab (runs KoboldAI backend and TavernAI Extras server alongside): <a target="_blank" href="https://colab.research.google.com/github/Cohee1207/SillyTavern/blob/main/colab/GPU.ipynb">
|
||||
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
|
||||
</a>
|
||||
|
||||
https://colab.research.google.com/github/Cohee1207/SillyTavern/blob/main/colab/GPU.ipynb
|
||||
|
||||
If that didn't work, try the legacy link:
|
||||
|
||||
https://colab.research.google.com/github/Cohee1207/TavernAI-extras/blob/main/colab/GPU.ipynb
|
||||
|
||||
## Mobile support
|
||||
|
Reference in New Issue
Block a user