new features
This commit is contained in:
@@ -86,6 +86,20 @@ enum LocalModelImport: Equatable, Sendable {
|
||||
case mlx(String)
|
||||
case gguf(GGUFModelMetadata)
|
||||
|
||||
var path: String {
|
||||
switch self {
|
||||
case .mlx(let path): path
|
||||
case .gguf(let model): model.path
|
||||
}
|
||||
}
|
||||
|
||||
var format: String {
|
||||
switch self {
|
||||
case .mlx: "MLX · Safetensors"
|
||||
case .gguf(let model): "GGUF · " + model.tensorFormat
|
||||
}
|
||||
}
|
||||
|
||||
static var lmStudioFolder: URL { URL.homeDirectory.appending(path: ".lmstudio/models") }
|
||||
|
||||
static func discover(in folder: URL) throws -> [Self] {
|
||||
@@ -157,13 +171,9 @@ struct GGUFModels: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
Section {
|
||||
ModelLibrarySection("Local GGUF", key: "libraryGGUFExpanded") {
|
||||
HStack {
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Label("Local GGUF", systemImage: "cpu")
|
||||
.font(.headline)
|
||||
memorySummary
|
||||
}
|
||||
memorySummary
|
||||
Spacer()
|
||||
Button("Import…", systemImage: "plus") { showingImporter = true }
|
||||
.disabled(inspecting)
|
||||
|
||||
Reference in New Issue
Block a user