diff --git a/koboldcpp.py b/koboldcpp.py index 7e834aac5..d6f90405f 100644 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -61,7 +61,7 @@ logit_bias_max = 512 dry_seq_break_max = 128 # global vars -KcppVersion = "1.94" +KcppVersion = "1.94.1" showdebug = True kcpp_instance = None #global running instance global_memory = {"tunnel_url": "", "restart_target":"", "input_to_exit":False, "load_complete":False, "restart_override_config_target":""} @@ -899,6 +899,26 @@ def dump_gguf_metadata(file_path): #if you're gonna copy this into your own proj str_val = val_bytes.split(b'\0', 1)[0].decode('utf-8') fptr += str_len return str_val + if datatype == "u16": + val_bytes = data[fptr:fptr + 2] + val = struct.unpack('prompt.find("img") == std::string::npos) { sd_params->prompt += " img"; + } else if (sd_params->prompt.rfind("img", 0) == 0) { + // "img" found at the start of the string (position 0), which is not allowed. Add some text before it + sd_params->prompt = "person " + sd_params->prompt; } }