Skip to content

feat(discovery): Add Hugging Face Hub discovery filters for Video and Audio models #13

Description

@spelech

🎯 Objective & Overview

Extend model hub discovery in HuggingFaceSearchService and CivitaiSearchService to filter, search, and download weights for Video (Wan, LTX, HunyuanVideo) and Audio (Kokoro, F5-TTS, Stable Audio) models.


📂 Files & Components to Touch

  1. Search Interfaces & Services (LocalLLMServerManager.Shared/Interfaces/ & Services/):
    • IHuggingFaceSearchService.cs & HuggingFaceSearchService.cs
    • Add filter parameter: string? pipelineTag (e.g. text-to-video, image-to-video, text-to-speech, text-to-audio, automatic-speech-recognition).
  2. Endpoints (Endpoints/ModelProxyEndpoints.cs):
    • Update GET /api/hf/search: pass &pipeline_tag={tag} to the Hugging Face API (https://huggingface.co/api/models).
  3. UI Filters (LocalLLMServerManager.Shared/Views/Controls/HuggingFaceTabControl.axaml):
    • Add segmented filter bar or category dropdown:
      • [ All ] [ 🦙 LLM (GGUF) ] [ 🎬 Video ] [ 🔊 Speech/TTS ] [ 🎵 Music/SFX ] [ 📦 3D Mesh ]
  4. Download Target Resolver (Services/DownloadManager.cs / CivitaiSearchService.cs):
    • Automatically route downloaded files to their target directories (e.g., video diffusion models -> ComfyUI/models/diffusion_models, TTS checkpoints -> models/tts).

🔌 API Contract

GET /api/hf/search?q=ltx&pipeline_tag=text-to-video

[
  {
    "id": "Lightricks/LTX-Video",
    "likes": 1420,
    "downloads": 48200,
    "pipeline_tag": "text-to-video",
    "tags": ["text-to-video", "diffusers", "safetensors"]
  }
]

🛠️ Step-by-Step Implementation Guide

  1. Update IHuggingFaceSearchService.cs signature: SearchModelsAsync(string query, string? pipelineTag, CancellationToken ct).
  2. Update HuggingFaceSearchViewModel.cs with reactive filter properties and category chips.
  3. Update HuggingFaceTabControl.axaml with modern category buttons matching the design system.
  4. Add unit tests verifying query construction with pipeline tags.

🧪 Verification

  • dotnet test --filter Category!=LiveExternal
  • npm run lint & npx tsc --noEmit

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions