Skip to content

feat(installer): Add modular/optional feature packs and on-demand component installer for Video & Audio #15

Description

@spelech

🎯 Objective & Overview

Make Video and Audio generation modular, separately installable feature packs. Because DiT video models (Wan 2.2, LTX-2.5, HunyuanVideo) and voice synthesis runtimes/checkpoints (Kokoro, F5-TTS, CosyVoice, AudioCraft) require tens of gigabytes of disk space and heavy Python/CUDA dependencies, they must not bloat the core manager installation. Users should be able to opt in or install them on-demand.


📂 Files & Components to Touch

  1. Installer & Scripts (scripts/):
    • scripts/installer.iss (Inno Setup): Add [Components] / [Types] section:
      • core: Core LLM & Image Generation (Ollama + SD/Forge + 3D Studio) [Required]
      • ext_video: ComfyUI Video Generation Pack (Wan 2.2 / LTX-2.5 nodes & templates) [Optional]
      • ext_audio: Kokoro / Audio Engine Pack (FastAPI TTS server & voice models) [Optional]
    • scripts/install.ps1 & scripts/install_linux.sh: Add flags --with-video and --with-audio.
    • scripts/setup_ai_tools.ps1: Split installation logic into discrete tasks (Install-VideoPack, Install-AudioPack).
  2. Backend Component Management (Services/ComponentManagerService.cs & Interfaces/IComponentManagerService.cs):
    • Add service to query installation status of optional feature packs:
      • bool IsVideoPackInstalled { get; }
      • bool IsAudioPackInstalled { get; }
      • Task<bool> InstallComponentAsync(string componentId, IProgress<double> progress)
      • Task<bool> UninstallComponentAsync(string componentId)
  3. Endpoints (Endpoints/ComponentEndpoints.cs):
    • GET /api/components — Returns status of all optional packs (installed, missing, size on disk, update available).
    • POST /api/components/install — Triggers background download/setup with SSE progress stream.
    • POST /api/components/uninstall — Cleans up models/runtimes to reclaim disk space.
  4. UI & Graceful Fallbacks (LocalLLMServerManager.Shared/Views/Controls/):
    • When Video or Audio tabs/sub-views are opened and the component is not installed:
      • Display a lightweight, beautiful "Feature Pack Available" banner with estimated download size, hardware requirements, and an "📥 Install Feature Pack" button.
    • Settings tab: Add "Installed Components & Add-ons" management section with disk usage visualizer.

🔌 API Contract

GET /api/components

[
  {
    "id": "video-generation",
    "name": "ComfyUI Video Generation Pack",
    "description": "Enables Wan 2.2, LTX-2.5, and HunyuanVideo DiT workflows.",
    "installed": false,
    "diskSizeEstimate": "14.2 GB",
    "minVramRequired": "8 GB"
  },
  {
    "id": "audio-tts",
    "name": "Kokoro TTS & Audio Engine",
    "description": "Enables fast local text-to-speech with OpenAI /v1/audio/speech compatibility.",
    "installed": true,
    "diskSizeEstimate": "350 MB",
    "minVramRequired": "CPU / 2 GB"
  }
]

🛠️ Step-by-Step Implementation Guide

  1. Define component metadata models and interface IComponentManagerService.
  2. Implement ComponentManagerService checking directory existence (Workflows/Video, models/diffusion_models, kokoro-fastapi binaries/venv).
  3. Expose REST endpoints in Endpoints/ComponentEndpoints.cs.
  4. Update scripts/installer.iss with Inno Setup [Components] to allow choosing which packs to install during Windows setup.
  5. Build the "Install on demand" UI placeholder card for uninstalled features.

🧪 Verification

  • dotnet build
  • 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