mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Horde Fix
This commit is contained in:
@@ -1866,6 +1866,7 @@ def load_model(use_gpu=True, gpu_layers=None, disk_layers=None, initial_load=Fal
|
|||||||
global GPT2TokenizerFast
|
global GPT2TokenizerFast
|
||||||
global tokenizer
|
global tokenizer
|
||||||
koboldai_vars.aibusy = True
|
koboldai_vars.aibusy = True
|
||||||
|
koboldai_vars.horde_share = False
|
||||||
if(initial_load):
|
if(initial_load):
|
||||||
use_breakmodel_args = True
|
use_breakmodel_args = True
|
||||||
reset_model_settings()
|
reset_model_settings()
|
||||||
|
@@ -799,17 +799,18 @@ class system_settings(settings):
|
|||||||
if self.on_colab == False:
|
if self.on_colab == False:
|
||||||
if os.path.exists("./KoboldAI-Horde"):
|
if os.path.exists("./KoboldAI-Horde"):
|
||||||
if value == True:
|
if value == True:
|
||||||
import subprocess
|
if self._horde_pid is None:
|
||||||
import random
|
import subprocess
|
||||||
random.seed()
|
import random
|
||||||
if os.path.exists('./KoboldAI-Horde/venv/scripts/python.exe'):
|
random.seed()
|
||||||
self._horde_pid = subprocess.Popen(['./KoboldAI-Horde/venv/scripts/python.exe', './KoboldAI-Horde/bridge.py',
|
if os.path.exists('./KoboldAI-Horde/venv/scripts/python.exe'):
|
||||||
'--username', '{}'.format(random.randint(-1000000000000, 1000000000000)), '--password', '{}'.format(random.randint(-1000000000000, 1000000000000)),
|
self._horde_pid = subprocess.Popen(['./KoboldAI-Horde/venv/scripts/python.exe', './KoboldAI-Horde/bridge.py',
|
||||||
'--kai_name', '{}'.format(random.randint(-1000000000000, 1000000000000)), '--kai_url', 'http://127.0.0.1:{}'.format(self.port), '--cluster_url', "http://koboldai.net"])
|
'--username', '{}'.format(random.randint(-1000000000000, 1000000000000)), '--password', '{}'.format(random.randint(-1000000000000, 1000000000000)),
|
||||||
else:
|
'--kai_name', '{}'.format(random.randint(-1000000000000, 1000000000000)), '--kai_url', 'http://127.0.0.1:{}'.format(self.port), '--cluster_url', "http://koboldai.net"])
|
||||||
self._horde_pid = subprocess.Popen(['./KoboldAI-Horde/venv/bin/python', './KoboldAI-Horde/bridge.py',
|
else:
|
||||||
'--username', '{}'.format(random.randint(-1000000000000, 1000000000000)), '--password', '{}'.format(random.randint(-1000000000000, 1000000000000)),
|
self._horde_pid = subprocess.Popen(['./KoboldAI-Horde/venv/bin/python', './KoboldAI-Horde/bridge.py',
|
||||||
'--kai_name', '{}'.format(random.randint(-1000000000000, 1000000000000)), '--kai_url', 'http://127.0.0.1:{}'.format(self.port), '--cluster_url', "http://koboldai.net"])
|
'--username', '{}'.format(random.randint(-1000000000000, 1000000000000)), '--password', '{}'.format(random.randint(-1000000000000, 1000000000000)),
|
||||||
|
'--kai_name', '{}'.format(random.randint(-1000000000000, 1000000000000)), '--kai_url', 'http://127.0.0.1:{}'.format(self.port), '--cluster_url', "http://koboldai.net"])
|
||||||
else:
|
else:
|
||||||
if self._horde_pid is not None:
|
if self._horde_pid is not None:
|
||||||
print("kill bridge")
|
print("kill bridge")
|
||||||
|
Reference in New Issue
Block a user