263 lines
7.1 KiB
Markdown
263 lines
7.1 KiB
Markdown
# 🎙️ Studio IA Multimodal — Architecture & Spécifications
|
|
## Version 2026 — État de l'art
|
|
|
|
---
|
|
|
|
## 1. Architecture générale
|
|
|
|
```
|
|
[Utilisateur navigateur]
|
|
↓
|
|
[Open WebUI — port 3000]
|
|
↓
|
|
[Ollama — Mistral Medium]
|
|
↓ (Tools/Functions)
|
|
┌────┴────┬──────────┬──────────┐
|
|
[Audio] [Voix] [Foley] [Image]
|
|
port 7860 port 7861 port 7862 port 8188
|
|
```
|
|
|
|
---
|
|
|
|
## 2. Pile logicielle — État de l'art 2026
|
|
|
|
### 🎵 Génération Musicale
|
|
| Modèle | Forces | VRAM | Vitesse |
|
|
|---|---|---|---|
|
|
| **Heart Mula** (Jan 2026) ⭐ | Morceaux 6 min, structure complète, qualité Suno | 12-16 Go | Lente |
|
|
| **ACE-Step 1.5** | Ultra-rapide, cohérence harmonique, idéal novices | 8-12 Go | Très rapide |
|
|
| ~~MusicGen (Meta)~~ | Boucles 30s seulement — dépassé | 8 Go | Rapide |
|
|
|
|
> **Choix recommandé :** ACE-Step 1.5 pour les novices (rapidité), Heart Mula pour la qualité maximale
|
|
|
|
---
|
|
|
|
### 🎤 Voix Off (TTS)
|
|
| Modèle | Forces | VRAM |
|
|
|---|---|---|
|
|
| **Zonos-v0.1** (Zyphra) ⭐ | 44kHz natif, tags émotion, clone voix 10s | 8-12 Go |
|
|
| **IndexTTS-2** ⭐ | Contrôle milliseconde de durée, sync animation | 8 Go |
|
|
|
|
> **Choix recommandé :** Les deux sont complémentaires et indispensables
|
|
> - Zonos pour la narration et les voix expressives
|
|
> - IndexTTS-2 pour la sync animation et le lip-sync
|
|
|
|
---
|
|
|
|
### 🔊 Bruitages & Foley
|
|
| Modèle | Forces | VRAM |
|
|
|---|---|---|
|
|
| **HunyuanVideo-Foley** ⭐ | Analyse vidéo → son synchronisé, révolutionnaire | 12-16 Go |
|
|
| ~~AudioGen (Meta)~~ | Texte seulement, pas de sync vidéo — dépassé | 8 Go |
|
|
|
|
> **Choix recommandé :** HunyuanVideo-Foley uniquement — Meta est dépassé sur ce segment
|
|
|
|
---
|
|
|
|
### 🖼️ Génération Image
|
|
| Modèle | Forces | VRAM |
|
|
|---|---|---|
|
|
| **Flux.1** | Meilleure qualité actuelle | 12-16 Go |
|
|
| **SDXL** | Rapide, bon écosystème LoRA | 8-12 Go |
|
|
|
|
---
|
|
|
|
### 💬 Chat & Code
|
|
| Modèle | Forces | VRAM |
|
|
|---|---|---|
|
|
| **Mistral Medium** (Ollama) | Chat général, orchestration outils | 8-12 Go |
|
|
| **CodeLlama** (Ollama) | Génération de code | 8 Go |
|
|
|
|
---
|
|
|
|
## 3. Ports & Services
|
|
|
|
| Service | Port | Technologie |
|
|
|---|---|---|
|
|
| Open WebUI | 3000 | Interface unifiée |
|
|
| Ollama | 11434 | LLM (Mistral + CodeLlama) |
|
|
| Musique | 7860 | ACE-Step 1.5 + Heart Mula via ComfyUI |
|
|
| Voix Off | 7861 | Zonos-v0.1 + IndexTTS-2 |
|
|
| Foley | 7862 | HunyuanVideo-Foley |
|
|
| Images | 8188 | ComfyUI (Flux.1 + SDXL) |
|
|
|
|
---
|
|
|
|
## 4. Image Docker de base
|
|
|
|
**Nom cible :** `nicoboy/studio-ai:latest`
|
|
|
|
### Dockerfile (à construire avec Gemini)
|
|
|
|
```dockerfile
|
|
FROM nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
# Python 3.11
|
|
RUN apt-get update && \
|
|
apt-get install -y software-properties-common && \
|
|
add-apt-repository ppa:deadsnakes/ppa && \
|
|
apt-get update && \
|
|
apt-get install -y \
|
|
python3.11 \
|
|
python3.11-venv \
|
|
python3.11-distutils \
|
|
python3.11-dev
|
|
|
|
# Dépendances système
|
|
RUN apt-get install -y \
|
|
ffmpeg libsndfile1 sox \
|
|
git wget curl nano screen \
|
|
nodejs npm \
|
|
libgl1 libglib2.0-0
|
|
|
|
# pip pour Python 3.11
|
|
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11
|
|
RUN python3.11 -m pip install --upgrade pip
|
|
|
|
# PyTorch CUDA 12.1
|
|
RUN python3.11 -m pip install \
|
|
torch torchvision torchaudio \
|
|
--index-url https://download.pytorch.org/whl/cu121
|
|
|
|
# Open WebUI
|
|
RUN python3.11 -m pip install open-webui
|
|
|
|
# Ollama
|
|
RUN curl -fsSL https://ollama.ai/install.sh | sh
|
|
|
|
# Dépendances audio communes
|
|
RUN python3.11 -m pip install \
|
|
gradio \
|
|
fastapi \
|
|
uvicorn \
|
|
scipy \
|
|
soundfile \
|
|
transformers \
|
|
accelerate \
|
|
diffusers
|
|
|
|
# ComfyUI dépendances
|
|
RUN python3.11 -m pip install \
|
|
einops \
|
|
kornia \
|
|
spandrel
|
|
|
|
WORKDIR /root
|
|
```
|
|
|
|
### ⚠️ Points critiques pour Gemini
|
|
1. **Python 3.11 obligatoire** — Open WebUI refuse Python 3.10
|
|
2. **Ne pas inclure les modèles** — trop lourds, téléchargés via provisioning script
|
|
3. **Image sur DockerHub public** — nécessaire pour Vast.ai
|
|
4. **CUDA 12.1** — compatible A4000 et RTX 4060 Ti
|
|
5. **Tester** : `docker build -t nicoboy/studio-ai .` puis `docker push nicoboy/studio-ai:latest`
|
|
|
|
---
|
|
|
|
## 5. Provisioning Script (1er lancement ~30-45 min)
|
|
|
|
```bash
|
|
#!/bin/bash
|
|
set -eo pipefail
|
|
|
|
# --- MUSIQUE ---
|
|
# ACE-Step 1.5
|
|
pip install ace-step
|
|
# Heart Mula via ComfyUI (custom node)
|
|
git clone https://github.com/[repo]/heart-mula /root/ComfyUI/custom_nodes/heart-mula
|
|
|
|
# --- VOIX OFF ---
|
|
# Zonos
|
|
pip install zonos
|
|
# IndexTTS-2
|
|
git clone https://github.com/index-tts/indextts /root/indextts
|
|
pip install -r /root/indextts/requirements.txt
|
|
|
|
# --- FOLEY ---
|
|
# HunyuanVideo-Foley
|
|
git clone https://github.com/Tencent/HunyuanVideo-Foley /root/hunyuan-foley
|
|
pip install -r /root/hunyuan-foley/requirements.txt
|
|
|
|
# --- IMAGES ---
|
|
git clone https://github.com/comfyanonymous/ComfyUI /root/ComfyUI
|
|
pip install -r /root/ComfyUI/requirements.txt
|
|
# Télécharger Flux.1
|
|
wget -P /root/ComfyUI/models/checkpoints/ [URL_FLUX1]
|
|
|
|
# --- LLM ---
|
|
ollama serve &
|
|
sleep 5
|
|
ollama pull mistral
|
|
ollama pull codellama
|
|
|
|
# --- LANCEMENT DES SERVICES ---
|
|
screen -dmS openwebui open-webui serve --port 3000
|
|
screen -dmS ollama ollama serve
|
|
screen -dmS audio python3.11 /root/audio-api/server.py
|
|
screen -dmS comfyui python3.11 /root/ComfyUI/main.py --listen 0.0.0.0 --port 8188
|
|
|
|
env >> /etc/environment
|
|
echo "✅ Studio IA prêt !"
|
|
```
|
|
|
|
---
|
|
|
|
## 6. Configuration Open WebUI (à faire avec Claude)
|
|
|
|
> Cette partie sera traitée après le build Docker.
|
|
|
|
### 6.1 Tools à créer
|
|
- `generate_music(prompt, duration, model)` → ACE-Step ou Heart Mula
|
|
- `generate_voice(text, emotion, duration)` → Zonos ou IndexTTS-2
|
|
- `generate_foley(video_path, prompt)` → HunyuanVideo-Foley
|
|
- `generate_image(prompt, width, height)` → ComfyUI/Flux.1
|
|
- `generate_code(prompt, language)` → CodeLlama
|
|
|
|
### 6.2 System Prompt assistant
|
|
```
|
|
Tu es un assistant créatif expert en production multimédia.
|
|
Tu guides les novices et utilises les outils appropriés :
|
|
- generate_music : composition musicale complète
|
|
- generate_voice : voix off avec émotion contrôlée
|
|
- generate_foley : bruitages synchronisés avec vidéo
|
|
- generate_image : génération d'images
|
|
- generate_code : écriture de code
|
|
|
|
Tu poses des questions précises avant de générer,
|
|
et tu proposes des ajustements après chaque création.
|
|
```
|
|
|
|
---
|
|
|
|
## 7. Estimation disque production
|
|
|
|
| Élément | Taille |
|
|
|---|---|
|
|
| Image Docker | ~15 Go |
|
|
| Modèles LLM (Mistral + CodeLlama) | ~12 Go |
|
|
| Modèles Audio (ACE-Step, Heart Mula, Zonos, IndexTTS-2) | ~15 Go |
|
|
| HunyuanVideo-Foley | ~8 Go |
|
|
| ComfyUI + Flux.1 | ~15 Go |
|
|
| Données utilisateurs + outputs | ~10 Go |
|
|
| **Total** | **~75 Go** |
|
|
|
|
> ✅ 130 Go = confortable
|
|
> ⚠️ Si on ajoute SDXL + LoRA : prévoir 200 Go
|
|
|
|
---
|
|
|
|
## 8. Checklist projet
|
|
|
|
- [x] Architecture définie
|
|
- [x] État de l'art 2026 intégré
|
|
- [ ] **Dockerfile → Gemini**
|
|
- [ ] Build + push DockerHub
|
|
- [ ] Mise à jour template Vast.ai
|
|
- [ ] Provisioning script final
|
|
- [ ] **Configuration Open WebUI → Claude**
|
|
- [ ] **Tools AudioCraft/Foley/TTS → Claude**
|
|
- [ ] **System Prompts → Claude**
|
|
- [ ] Tests utilisateur |