Skip to content
KoboldCpp
GitHub

Won't start or closes straight away

Most start problems print an error in the console window. If the window closes too fast to read it, start with the first section.

KoboldCpp crashed, and the console window closed before you could read the error. KoboldCpp writes no log file, so run it from a terminal, where the message stays on screen.

  1. Open Command Prompt.

  2. Go to the folder with KoboldCpp and start it:

    Command Prompt
    cd C:\mystuff
    koboldcpp.exe

Look up the error on this page or in Model won't load. Errors from the launcher itself appear in a message box instead.

Antivirus or Windows blocks or deletes the file

Section titled “Antivirus or Windows blocks or deletes the file”

What you may see:

  • Microsoft Defender or another antivirus reports a trojan, for example:

    Trojan:Win32/Sabsik.FL.A!ml
    Trojan:Script/Wacatac.B!ml
  • "Windows protected your PC" (SmartScreen).

  • The exe shrinks to 0 bytes, or this error appears:

    Failed to extract koboldcpp_vulkan_noavx2.dll: decompression resulted in return code -3!

The exe is not code-signed and unpacks its libraries into a temporary folder when it starts. Heuristic and machine-learning scanners flag this. For a file from the official releases, it is a false positive.

  1. Check that the file came from the official GitHub releases. See Staying safe.
  2. For SmartScreen, click More info, then Run anyway.
  3. For an antivirus, add the file to its exceptions and report the false positive to the vendor.
  4. If the file was quarantined, shrank or fails to extract, download it again.

Smart App Control has no exception list. It blocks KoboldCpp for as long as it is turned on.

OSError: [WinError 1114] A dynamic link library (DLL) initialization routine failed

This appears after Initializing dynamic library: …. Related errors are 0xc0000142 and Failed to execute script 'koboldcpp' due to unhandled exception!.

Common causes: the processor lacks AVX2, the NVIDIA driver is too old for the CUDA 12 build, or an antivirus removed a library.

  1. If your processor or NVIDIA card is older, use koboldcpp-oldpc.exe (CUDA 11, needs only AVX1). See Download KoboldCpp
  2. Otherwise, update your NVIDIA driver. nvidia-smi in Command Prompt shows the installed driver.
  3. Rule out your antivirus: download the file again and add an exception.

Failed to execute script 'koboldcpp' also follows other errors, such as a port in use. Read the lines above it.

Illegal instruction (core dumped)

On Windows the error code is 0xc000001d. Your processor lacks an instruction set (AVX2 or AVX) that the selected backend needs. KoboldCpp normally detects this and picks a compatible mode, but a backend chosen by hand or saved in a config file overrides the detection.

  1. In the launcher, set Backend: to an option marked (Old CPU), for example Use CPU (Old CPU) or Use Vulkan (Old CPU). On the command line, add --noavx2.
  2. If it still crashes, your processor has no AVX either. Use Failsafe Mode (Older CPU) (--failsafe), which uses no graphics card.
  3. To use a graphics card on a processor without AVX, download the oldpc file and choose Use Vulkan (Older CPU) (--usevulkan --failsafe).

See Processor requirements for which build contains which mode. On Android, see OS-specific problems.

The console stays blank and the launcher never opens

Section titled “The console stays blank and the launcher never opens”

The exe could not unpack itself into the temporary folder. It needs about 1 GB of free space on the system drive, and an antivirus can block the unpacking.

  1. Free up space on the system drive.
  2. Check your antivirus (see above).
  3. Try the smaller koboldcpp-nocuda.exe.
  4. Or unpack KoboldCpp once and start it from the unpacked folder; see Unpack for faster startup.
Warning: Port 5001 already appears to be in use by another program.
OSError: Cannot start the server: no socket could bind.

Another KoboldCpp, or another program, already uses the port. KoboldCpp loads the whole model first and fails only when it starts the server.

  1. Close the other KoboldCpp window.
  2. Or use a different port: Port: on the Network tab, or --port 5002.

To let a new KoboldCpp replace a running one automatically, start both with SingleInstance Mode (Admin tab) or --singleinstance. The new instance then asks the old one on the same port to shut down.

Warning, GUI failed to start: Reason: no display name and no $DISPLAY environment variable
File selection GUI unsupported.
customtkinter python module required!

The launcher could not open a window. Usually there is no display (a server or SSH session), or, when you run from source, the tkinter or customtkinter Python module is missing.

  1. Start KoboldCpp without the launcher by giving it a model: --model mymodel.gguf, or a config file with --config mysettings.kcpps.
  2. When running from source, install tkinter and customtkinter to get the launcher back.

--skiplauncher on its own does not help: without --model it exits with an error. See Headless use.

Cannot find text model file: C:\models\mymodel.gguf
Specified kcpp config file invalid or not found.
No gguf model or kcpps file was selected. Exiting.

The path is wrong, or the file has moved.

  1. Check the path and file name. Put paths with spaces in quotes on the command line.
  2. Use folder and file names with plain ASCII characters. Umlauts and other accented letters in a model path can break loading.
  3. For a config file, open it with Load Config in the launcher to check it.
KoboldCPP couldn't locate any backends to use (i.e Default, Vulkan, CUDA).

You started koboldcpp.py from source code without compiling it first. Run make in the folder; see Build from source.