33800 Docs

← Retour

Proposition : Fix TripoSR + Intégration Wan2.1/Applio/SadTalker

Date : 18/01/2026 14:30 Auteur : Claude Status : En attente de validation


Contexte

4 outils IA sur win11 nécessitent des corrections :

  1. TripoSR - Cassé (torchmcubes manquant)
  2. Wan2.1 - Mode passthrough (pas d'executor)
  3. Applio - Mode passthrough (API complexe)
  4. SadTalker - Mode passthrough (pas d'executor)

Diagnostic

Outil Problème Solution
TripoSR pip show torchmcubes → NOT INSTALLED Installer depuis GitHub
Wan2.1 Pas d'executor dans ai-orchestrator Ajouter execute_wan21_job()
Applio Pas d'executor, API 60+ params Ajouter execute_applio_job() simplifié
SadTalker Pas d'executor Ajouter execute_sadtalker_job()

Plan d'implémentation

Phase 1 : Fix TripoSR (5 min)

# Sur win11
ssh gouro@192.168.1.30
cd I:\TripoSR
venv\Scripts\pip.exe install git+https://github.com/tatsy/torchmcubes.git
# Test
venv\Scripts\python.exe -c "import torchmcubes; print('OK')"

Phase 2 : Ajouter executors dans ai-orchestrator

Fichier : /stock_8to/33800-stack/projects/ai-orchestrator/app/main.py

2.1 Executor Wan2.1

async def execute_wan21_job(params: Dict, job_id: str) -> Dict:
    """Execute Wan2.1 text-to-video job"""
    prompt = params.get("prompt", "")
    resolution = params.get("resolution", "480*832")  # WxH
    steps = params.get("steps", 50)
    guide_scale = params.get("guide_scale", 6.0)
    shift_scale = params.get("shift_scale", 8.0)
    seed = params.get("seed", -1)
    negative_prompt = params.get("negative_prompt", "")

    import aiohttp
    async with aiohttp.ClientSession() as session:
        # Submit via Gradio API
        async with session.post(
            f"http://{WIN11_HOST}:7860/gradio_api/call/t2v_generation",
            json={"data": [prompt, resolution, steps, guide_scale, shift_scale, seed, negative_prompt]},
            timeout=aiohttp.ClientTimeout(total=60)
        ) as resp:
            event_data = await resp.json()
            event_id = event_data.get("event_id")

        # Wait for result (video gen takes time)
        async with session.get(
            f"http://{WIN11_HOST}:7860/gradio_api/call/t2v_generation/{event_id}",
            timeout=aiohttp.ClientTimeout(total=600)  # 10 min max
        ) as resp:
            async for line in resp.content:
                line = line.decode().strip()
                if line.startswith("data: "):
                    data = json.loads(line[6:])
                    if isinstance(data, list) and len(data) > 0:
                        video_info = data[0]
                        # Download and save video
                        # ... (similar to bark executor)

Paramètres simplifiés :

2.2 Executor SadTalker

async def execute_sadtalker_job(params: Dict, job_id: str) -> Dict:
    """Execute SadTalker talking face job"""
    source_image = params.get("source_image")  # Path or base64
    driven_audio = params.get("driven_audio")  # Path or base64
    preprocess = params.get("preprocess", "crop")  # crop|resize|full
    still_mode = params.get("still_mode", False)
    enhancer = params.get("enhancer", False)  # GFPGAN
    size = params.get("size", 256)  # 256 or 512
    pose_style = params.get("pose_style", 0)  # 0-46

    # Upload files if base64, then call Gradio API
    # ...

Paramètres simplifiés :

2.3 Executor Applio

async def execute_applio_job(params: Dict, job_id: str) -> Dict:
    """Execute Applio RVC voice conversion job"""
    input_audio = params.get("input_audio")  # Path or base64
    model_name = params.get("model_name")  # Nom du modèle RVC
    pitch = params.get("pitch", 0)  # -12 to +12
    f0_method = params.get("f0_method", "rmvpe")  # rmvpe|crepe|harvest
    index_rate = params.get("index_rate", 0.75)  # 0-1
    protect = params.get("protect", 0.33)  # 0-0.5

    # Call Applio inference endpoint
    # ...

Paramètres simplifiés :

2.4 Executor TripoSR

async def execute_triposr_job(params: Dict, job_id: str) -> Dict:
    """Execute TripoSR image-to-3D job"""
    input_image = params.get("input_image")  # Path or base64
    remove_background = params.get("remove_background", True)
    foreground_ratio = params.get("foreground_ratio", 0.85)
    mc_resolution = params.get("mc_resolution", 256)  # 32-320
    output_format = params.get("output_format", "glb")  # obj|glb

    # Call TripoSR Gradio API
    # ...

Paramètres simplifiés :


Résumé des modifications

Fichier Action
win11: I:\TripoSR\venv pip install git+https://github.com/tatsy/torchmcubes.git
ai-orchestrator/app/main.py Ajouter 4 executors (wan21, sadtalker, applio, triposr)
ai-orchestrator/app/main.py Modifier SKIP_AUTO_START pour retirer wan21, sadtalker, triposr

Tests prévus

  1. TripoSR : Démarrer via orchestrator, soumettre job image → mesh
  2. Wan2.1 : Soumettre job prompt → vidéo
  3. SadTalker : Soumettre job image+audio → vidéo talking face
  4. Applio : Soumettre job audio+model → audio converti

Risques


Validation requise

Temps estimé : 30-45 min total