mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-19 01:05:09 +02:00
prevent segfault on load fail
This commit is contained in:
+4
-4
@@ -12360,6 +12360,10 @@ def kcpp_main_process(launch_args, g_memory=None, gui_launcher=False):
|
||||
print("WARNING: Selected Text Model does not seem to be a GGUF file! Are you sure you picked the right file?")
|
||||
loadok = load_model(modelname)
|
||||
print("Load Text Model OK: " + str(loadok))
|
||||
if not loadok:
|
||||
exitcounter = 999
|
||||
exit_with_error(3,"Could not load text model: " + modelname)
|
||||
|
||||
if args.mmproj and args.mmproj!="": # multimodal vision and audio support is only known at runtime
|
||||
has_audio_support = handle.has_audio_support()
|
||||
has_vision_support = handle.has_vision_support()
|
||||
@@ -12367,10 +12371,6 @@ def kcpp_main_process(launch_args, g_memory=None, gui_launcher=False):
|
||||
has_audio_support = False
|
||||
has_vision_support = False
|
||||
|
||||
if not loadok:
|
||||
exitcounter = 999
|
||||
exit_with_error(3,"Could not load text model: " + modelname)
|
||||
|
||||
# The chat completions adapter is a list that needs derivation from chat templates
|
||||
# Try to derive chat completions adapter from chat template, now that we have the model loaded
|
||||
if args.model_param:
|
||||
|
||||
Reference in New Issue
Block a user