Add multimodal support (llama.cpp) (#7027)

This commit is contained in:
oobabooga 2025-08-10 01:27:25 -03:00 committed by GitHub
parent eb16f64017
commit d86b0ec010
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 86 additions and 18 deletions

View file

@ -154,6 +154,19 @@ def get_available_ggufs():
return sorted(model_list, key=natural_keys)
def get_available_mmproj():
mmproj_dir = Path('user_data/mmproj')
if not mmproj_dir.exists():
return ['None']
mmproj_files = []
for item in mmproj_dir.iterdir():
if item.is_file() and item.suffix.lower() in ('.gguf', '.bin'):
mmproj_files.append(item.name)
return ['None'] + sorted(mmproj_files, key=natural_keys)
def get_available_presets():
return sorted(set((k.stem for k in Path('user_data/presets').glob('*.yaml'))), key=natural_keys)