mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-03-01 01:47:47 +01:00
Merge pull request #216 from VE-FORBRYDERNE/merge
Merge main into united
This commit is contained in:
commit
7f5ba8a678
@ -2492,7 +2492,6 @@ def load_model(use_gpu=True, gpu_layers=None, disk_layers=None, initial_load=Fal
|
||||
try:
|
||||
tokenizer = AutoTokenizer.from_pretrained(vars.custmodpth, revision=vars.revision, cache_dir="cache")
|
||||
except Exception as e:
|
||||
pass
|
||||
try:
|
||||
tokenizer = AutoTokenizer.from_pretrained(vars.custmodpth, revision=vars.revision, cache_dir="cache", use_fast=False)
|
||||
except Exception as e:
|
||||
@ -2510,7 +2509,6 @@ def load_model(use_gpu=True, gpu_layers=None, disk_layers=None, initial_load=Fal
|
||||
try:
|
||||
tokenizer = AutoTokenizer.from_pretrained("models/{}".format(vars.model.replace('/', '_')), revision=vars.revision, cache_dir="cache")
|
||||
except Exception as e:
|
||||
pass
|
||||
try:
|
||||
tokenizer = AutoTokenizer.from_pretrained("models/{}".format(vars.model.replace('/', '_')), revision=vars.revision, cache_dir="cache", use_fast=False)
|
||||
except Exception as e:
|
||||
@ -2541,7 +2539,6 @@ def load_model(use_gpu=True, gpu_layers=None, disk_layers=None, initial_load=Fal
|
||||
try:
|
||||
tokenizer = AutoTokenizer.from_pretrained(vars.model, revision=vars.revision, cache_dir="cache")
|
||||
except Exception as e:
|
||||
pass
|
||||
try:
|
||||
tokenizer = AutoTokenizer.from_pretrained(vars.model, revision=vars.revision, cache_dir="cache", use_fast=False)
|
||||
except Exception as e:
|
||||
|
@ -1646,16 +1646,18 @@ function chunkOnBeforeInput(event) {
|
||||
if(buildChunkSetFromNodeArray(getSelectedNodes()).size === 0) {
|
||||
var s = rangy.getSelection();
|
||||
var r = s.getRangeAt(0);
|
||||
var rand = Math.random();
|
||||
if(document.queryCommandSupported && document.execCommand && document.queryCommandSupported('insertHTML')) {
|
||||
document.execCommand('insertHTML', false, '<span id="_EDITOR_SENTINEL_">|</span>');
|
||||
document.execCommand('insertHTML', false, '<span id="_EDITOR_SENTINEL_' + rand + '_">|</span>');
|
||||
} else {
|
||||
var t = document.createTextNode('|');
|
||||
var b = document.createElement('span');
|
||||
b.id = "_EDITOR_SENTINEL_";
|
||||
b.id = "_EDITOR_SENTINEL_" + rand + "_";
|
||||
b.insertNode(t);
|
||||
r.insertNode(b);
|
||||
}
|
||||
var sentinel = document.getElementById("_EDITOR_SENTINEL_");
|
||||
setTimeout(function() {
|
||||
var sentinel = document.getElementById("_EDITOR_SENTINEL_" + rand + "_");
|
||||
if(sentinel.nextSibling && sentinel.nextSibling.tagName === "CHUNK") {
|
||||
r.selectNodeContents(sentinel.nextSibling);
|
||||
r.collapse(true);
|
||||
@ -1666,6 +1668,7 @@ function chunkOnBeforeInput(event) {
|
||||
s.removeAllRanges();
|
||||
s.addRange(r);
|
||||
sentinel.parentNode.removeChild(sentinel);
|
||||
}, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
<script src="static/bootstrap.min.js"></script>
|
||||
<script src="static/bootstrap-toggle.min.js"></script>
|
||||
<script src="static/rangy-core.min.js"></script>
|
||||
<script src="static/application.js?ver=1.18.1e"></script>
|
||||
<script src="static/application.js?ver=1.18.1f"></script>
|
||||
<script src="static/favicon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -1353,7 +1353,6 @@ def load_model(path: str, driver_version="tpu_driver0.1_dev20210607", hf_checkpo
|
||||
try:
|
||||
tokenizer = AutoTokenizer.from_pretrained(vars.custmodpth, revision=vars.revision, cache_dir="cache")
|
||||
except Exception as e:
|
||||
pass
|
||||
try:
|
||||
tokenizer = AutoTokenizer.from_pretrained(vars.custmodpth, revision=vars.revision, cache_dir="cache", use_fast=False)
|
||||
except Exception as e:
|
||||
@ -1369,7 +1368,6 @@ def load_model(path: str, driver_version="tpu_driver0.1_dev20210607", hf_checkpo
|
||||
try:
|
||||
tokenizer = AutoTokenizer.from_pretrained("models/{}".format(vars.model.replace('/', '_')), revision=vars.revision, cache_dir="cache")
|
||||
except Exception as e:
|
||||
pass
|
||||
try:
|
||||
tokenizer = AutoTokenizer.from_pretrained("models/{}".format(vars.model.replace('/', '_')), revision=vars.revision, cache_dir="cache", use_fast=False)
|
||||
except Exception as e:
|
||||
@ -1385,7 +1383,6 @@ def load_model(path: str, driver_version="tpu_driver0.1_dev20210607", hf_checkpo
|
||||
try:
|
||||
tokenizer = AutoTokenizer.from_pretrained(vars.model, revision=vars.revision, cache_dir="cache")
|
||||
except Exception as e:
|
||||
pass
|
||||
try:
|
||||
tokenizer = AutoTokenizer.from_pretrained(vars.model, revision=vars.revision, cache_dir="cache", use_fast=False)
|
||||
except Exception as e:
|
||||
|
Loading…
x
Reference in New Issue
Block a user