From 79e39e198956a75f6ccecb01acedee5f5c5b1d9c Mon Sep 17 00:00:00 2001
From: Concedo <39025047+LostRuins@users.noreply.github.com>
Date: Sun, 22 Mar 2026 00:47:12 +0800
Subject: [PATCH] fixed a help menu bug, updated colab (+1 squashed commits)
Squashed commits:
[618478e00] fixed a help menu bug, updated colab
---
colab.ipynb | 31 ++++++++++++++++++++++++++++---
koboldcpp.py | 3 ++-
2 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/colab.ipynb b/colab.ipynb
index a3f4b075e..643b706c1 100644
--- a/colab.ipynb
+++ b/colab.ipynb
@@ -52,7 +52,7 @@
"#@markdown You will need to restart KoboldCpp with the play button when you make changes to these settings.\n",
"\n",
"#@markdown ### Select a quick preset template (optional)\n",
- "Template = \"Tiefighter 13B (General)\" # @param [\"None (Manual Choice)\",\"Tiefighter 13B (General)\",\"Estopia 13B (General)\",\"Qwen 3 VL (Vision)\",\"Bookadventures 8B (Writing)\",\"Cydonia 24B (Roleplay)\",\"Broken Tutu 24B (Roleplay)\",\"Dans PersonalityEngine 24B (Roleplay)\",\"Harbinger 24B (Instruct)\",\"Muse 12B (Instruct)\",\"Mistral Small 24B (Corporate)\",\"GPT OSS 20B (Corporate)\",\"Gemma 3n E4B it (Corporate)\",\"GLM4 9b chat (Corporate)\"]\n",
+ "Template = \"Tiefighter 13B (General)\" # @param [\"None (Manual Choice)\",\"Tiefighter 13B (General)\",\"Estopia 13B (General)\",\"Qwen 3 VL (Vision)\",\"Bookadventures 8B (Writing)\",\"Cydonia 24B (Roleplay)\",\"Broken Tutu 24B (Roleplay)\",\"Dans PersonalityEngine 24B (Roleplay)\",\"Harbinger 24B (Instruct)\",\"Muse 12B (Instruct)\",\"Mistral Small 24B (Corporate)\",\"GPT OSS 20B (Corporate)\",\"Gemma 3n E4B it (Corporate)\",\"GLM4 9b chat (Corporate)\",\"Z-Image Turbo (Image)\",\"Flux Klein 4B (Image)\"]\n",
"\n",
"\n",
"#@markdown ### Or choose manually (Overwrites above template!)\n",
@@ -72,6 +72,9 @@
"#@markdown
\n",
"LoadImgModel = False #@param {type:\"boolean\"}\n",
"ImgModel = \"https://huggingface.co/koboldcpp/imgmodel/resolve/main/picx_real_q4_0.gguf\" #@param [\"https://huggingface.co/koboldcpp/imgmodel/resolve/main/picx_real_q4_0.gguf\",\"https://huggingface.co/koboldcpp/imgmodel/resolve/main/imgmodel_ftuned_q4_0.gguf\"]{allow-input: true}\n",
+ "#@markdown
\n",
+ "ImgClip1 = \"\" #@param [\"\"]{allow-input: true}\n",
+ "ImgVAE = \"\" #@param [\"\"]{allow-input: true}\n",
"SCommand = \"\"\n",
"\n",
"#@markdown
\n",
@@ -119,6 +122,11 @@
"Customized = False\n",
"has_checked_box = any((LoadTextModel, LoadVisionMMProjector, LoadImgModel, LoadSpeechModel,LoadTTSModel, LoadEmbeddingsModel))\n",
"if not has_checked_box:\n",
+ " Model = \"\"\n",
+ " ImgModel = \"\"\n",
+ " ImgClip1 = \"\"\n",
+ " ImgVAE = \"\"\n",
+ " Mmproj = \"\"\n",
" if Template == \"Tiefighter 13B (General)\":\n",
" Customized = True\n",
" Model = \"https://huggingface.co/KoboldAI/LLaMA2-13B-Tiefighter-GGUF/resolve/main/LLaMA2-13B-Tiefighter.Q4_K_S.gguf\"\n",
@@ -174,13 +182,26 @@
" Customized = True\n",
" Model = \"https://huggingface.co/unsloth/GLM-4-9B-0414-GGUF/resolve/main/GLM-4-9B-0414-Q6_K.gguf\"\n",
" CustomCtxSize = \"49152\"\n",
+ " if Template == \"Z-Image Turbo (Image)\":\n",
+ " ImgModel = \"https://huggingface.co/leejet/Z-Image-Turbo-GGUF/resolve/main/z_image_turbo-Q4_0.gguf\"\n",
+ " ImgClip1 = \"https://huggingface.co/unsloth/Qwen3-4B-Instruct-2507-GGUF/resolve/main/Qwen3-4B-Instruct-2507-Q4_K_S.gguf\"\n",
+ " ImgVAE = \"https://huggingface.co/camenduru/FLUX.1-dev/resolve/main/ae.safetensors\"\n",
+ " Customized = True\n",
+ " if Template == \"Flux Klein 4B (Image)\":\n",
+ " ImgModel = \"https://huggingface.co/leejet/FLUX.2-klein-4B-GGUF/resolve/main/flux-2-klein-4b-Q4_0.gguf\"\n",
+ " ImgClip1 = \"https://huggingface.co/unsloth/Qwen3-4B-GGUF/resolve/main/Qwen3-4B-Q4_K_M.gguf\"\n",
+ " ImgVAE = \"https://huggingface.co/koboldcpp/GGUFDumps/resolve/main/flux2vae.safetensors\"\n",
+ " Customized = True\n",
"\n",
"if not Customized or Template==\"\" or Template==\"None (Manual Choice)\" or has_checked_box:\n",
" print(\"Manual override detected, using manual selection...\")\n",
"elif Customized:\n",
" print(\"Loading a quick preset template...\")\n",
- " LoadTextModel = True\n",
- " Layers = 999\n",
+ " if Model:\n",
+ " LoadTextModel = True\n",
+ " Layers = 999\n",
+ " if ImgModel:\n",
+ " LoadImgModel = True\n",
" if CustomMmproj!=\"\":\n",
" Mmproj = CustomMmproj\n",
" LoadVisionMMProjector = True\n",
@@ -228,6 +249,10 @@
" VCommand = \"\"\n",
"if ImgModel and LoadImgModel:\n",
" SCommand = f\"--sdmodel {ImgModel} --sdthreads 4 --sdquant --sdclamped\"\n",
+ " if ImgClip1 and ImgClip1!=\"\":\n",
+ " SCommand += f\" --sdclip1 {ImgClip1}\"\n",
+ " if ImgVAE and ImgVAE!=\"\":\n",
+ " SCommand += f\" --sdvae {ImgVAE}\"\n",
"else:\n",
" SCommand = \"\"\n",
"if SpeechModel and LoadSpeechModel:\n",
diff --git a/koboldcpp.py b/koboldcpp.py
index 223746746..e1554be72 100755
--- a/koboldcpp.py
+++ b/koboldcpp.py
@@ -7875,7 +7875,8 @@ def show_gui():
templatedchoice_var.set(noobmodels[0])
def load_easy_template():
nonlocal templatechoicebox, templatecatbox, newbdesc1, newbdesc2
- repo = (POPULAR_TEMPLATE_REPO if templatedchoice_var.get()==POPULAR_TEMPLATE_LBL else NEWB_TEMPLATE_REPO)
+ cat = templatecatbox.get()
+ repo = (POPULAR_TEMPLATE_REPO if cat==POPULAR_TEMPLATE_LBL else NEWB_TEMPLATE_REPO)
fname = f"https://huggingface.co/koboldcpp/{repo}/resolve/main/{templatedchoice_var.get()}.kcppt"
data = make_url_request(fname,data=None,method="GET")
if data is not None: