You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
print(f"KoboldCpp will be extracted to {destpath}\nThis process may take several seconds to complete.")
411
+
else:
412
+
messagebox.showinfo("Unpack Starting", f"KoboldCpp will be extracted to {destpath}\nThis process may take several seconds to complete.")
413
+
foriteminos.listdir(srcpath):
414
+
s=os.path.join(srcpath, item)
415
+
d=os.path.join(destpath, item)
416
+
ifos.path.isdir(s):
417
+
shutil.copytree(s, d, False, None)
418
+
else:
419
+
shutil.copy2(s, d)
420
+
ifcliunpack:
421
+
print(f"KoboldCpp successfully extracted to {destpath}")
422
+
else:
423
+
messagebox.showinfo("KoboldCpp Unpack Success", f"KoboldCpp successfully extracted to {destpath}")
424
+
exceptExceptionase:
425
+
ifcliunpack:
426
+
print(f"An error occurred while unpacking: {e}")
427
+
else:
428
+
messagebox.showerror("Error", f"An error occurred while unpacking: {e}")
429
+
else:
430
+
ifcliunpack:
431
+
print(f"The target folder is not empty or invalid. Please select an empty folder.")
432
+
else:
433
+
messagebox.showwarning("Invalid Selection", "The target folder is not empty or invalid. Please select an empty folder.")
434
+
394
435
defload_model(model_filename):
395
436
globalargs
396
437
inputs=load_model_inputs()
@@ -2466,30 +2507,6 @@ def toggletaesd(a,b,c):
2466
2507
audio_tab=tabcontent["Audio"]
2467
2508
makefileentry(audio_tab, "Whisper Model (Speech-To-Text):", "Select Whisper .bin Model File", whisper_model_var, 1, width=280, filetypes=[("*.bin","*.bin")], tooltiptxt="Select a Whisper .bin model file on disk to be loaded.")
2468
2509
2469
-
defunpack_to_dir():
2470
-
fromtkinter.filedialogimportaskdirectory
2471
-
fromtkinterimportmessagebox
2472
-
importshutil
2473
-
destpath=askdirectory(title='Select an empty folder to unpack KoboldCpp')
advparser.add_argument("--quantkv", help="Sets the KV cache data type quantization, 0=f16, 1=q8, 2=q4. Requires Flash Attention, and disables context shifting.",metavar=('[quantization level 0/1/2]'), type=int, choices=[0,1,2], default=0)
3812
3833
advparser.add_argument("--forceversion", help="If the model file format detection fails (e.g. rogue modified model) you can set this to override the detected format (enter desired version, e.g. 401 for GPTNeoX-Type2).",metavar=('[version]'), type=int, default=0)
3813
3834
advparser.add_argument("--smartcontext", help="Reserving a portion of context to try processing less frequently. Outdated. Not recommended.", action='store_true')
3835
+
advparser.add_argument("--unpack", help="Extracts the file contents of the KoboldCpp binary into a target directory.", metavar=('destination'), type=str, default="")
0 commit comments