# Installation locale PPT Master (modifié) — Guide complet ## Prérequis - Windows 10/11 avec une RTX 5070 Ti - Python 3.10+ installé (https://www.python.org/downloads/) → cocher "Add to PATH" - Git installé (https://git-scm.com/downloads) - ~15 Go d'espace disque (dont ~6 Go pour un checkpoint SDXL) --- ## Étape 1 : Cloner PPT Master Ouvre un terminal (PowerShell ou CMD) : ```bash cd C:\Users\TON_USER\Documents git clone https://github.com/hugohe3/ppt-master.git cd ppt-master pip install -r requirements.txt ``` --- ## Étape 2 : Installer ComfyUI ```bash cd C:\Users\TON_USER\Documents git clone https://github.com/comfyanonymous/ComfyUI.git cd ComfyUI pip install -r requirements.txt pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128 ``` Vérifie que ta RTX est détectée : ```bash python -c "import torch; print(torch.cuda.is_available()); print(torch.cuda.get_device_name(0))" ``` Résultat attendu : ``` True NVIDIA GeForce RTX 5070 Ti ``` --- ## Étape 3 : Télécharger un modèle image Télécharge un checkpoint Stable Diffusion dans `ComfyUI/models/checkpoints/` : Option A (recommandée, qualité top) : - **Juggernaut XL** : https://civitai.com/models/133005/juggernaut-xl - Télécharge le fichier `.safetensors` et place-le dans `ComfyUI/models/checkpoints/` Option B (officiel, plus léger) : - **SDXL Base** : https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors --- ## Étape 4 : Appliquer les modifications PPT Master Copie les fichiers du dossier `modifications/` dans ton clone PPT Master : ``` modifications/backend_comfyui.py → ppt-master/skills/ppt-master/scripts/image_backends/backend_comfyui.py modifications/openrouter_llm.py → ppt-master/skills/ppt-master/scripts/openrouter_llm.py modifications/.env → ppt-master/.env ``` Puis édite `ppt-master/.env` et ajuste les chemins : ```env COMFYUI_DIR=C:\Users\TON_USER\Documents\ComfyUI COMFYUI_MODEL=juggernautXL_v9.safetensors COMFYUI_FALLBACK=error ``` --- ## Étape 5 : Modifier image_gen.py Ouvre `ppt-master/skills/ppt-master/scripts/image_gen.py` et ajoute le backend ComfyUI. Dans la section `IMAGE_ENV_PREFIXES`, ajoute `"COMFYUI_",` à la fin de la liste. Dans le dictionnaire `BACKEND_REGISTRY`, ajoute avant `"openrouter"` : ```python "comfyui": { "module": "backend_comfyui", "tier": "core", "label": "ComfyUI Local", "default_model": "local-comfyui", "key_hint": "COMFYUI_SERVER / COMFYUI_WORKFLOW / COMFYUI_MODEL", "aliases": ["comfy", "local"], }, ``` --- ## Étape 6 : Tester ### Test ComfyUI seul (lance-le d'abord) : ```bash cd C:\Users\TON_USER\Documents\ComfyUI python main.py --listen 127.0.0.1 --port 8188 ``` Tu dois voir dans la console : `To see the GUI go to: http://127.0.0.1:8188` ### Test génération d'image : Dans un autre terminal : ```bash cd C:\Users\TON_USER\Documents\ppt-master python skills/ppt-master/scripts/image_gen.py "A cinematic dark fantasy throne room" --backend comfyui --aspect_ratio 16:9 --image_size 1K -o test_images ``` ### Test LLM OpenRouter : ```bash cd C:\Users\TON_USER\Documents\ppt-master python skills/ppt-master/scripts/openrouter_llm.py "Dis bonjour" ``` --- ## Étape 7 : Utiliser PPT Master normalement PPT Master est conçu pour fonctionner dans un IDE agent (Claude Code, Cursor, etc.). L'agent lit `skills/ppt-master/SKILL.md` et suit le workflow. Mais avec les modifications, tu peux aussi l'utiliser "à la main" en suivant le pipeline : 1. `python scripts/project_manager.py init mon_projet --format ppt169` 2. Écrire `design_spec.md` et `spec_lock.md` (ou utiliser OpenRouter pour les générer) 3. Générer les images : `python scripts/image_gen.py "prompt" --backend comfyui -o mon_projet/images` 4. Créer les SVG dans `svg_output/` 5. `python scripts/total_md_split.py mon_projet` 6. `python scripts/finalize_svg.py mon_projet` 7. `python scripts/svg_to_pptx.py mon_projet` --- ## Résumé des fichiers modifiés/ajoutés | Fichier | Action | |---------|--------| | `.env` | NOUVEAU — config OpenRouter + ComfyUI | | `scripts/image_backends/backend_comfyui.py` | NOUVEAU — backend ComfyUI local | | `scripts/openrouter_llm.py` | NOUVEAU — client LLM OpenRouter | | `scripts/image_gen.py` | MODIFIÉ — ajout du backend comfyui au registre | --- ## Dépannage | Problème | Solution | |----------|----------| | `torch.cuda.is_available()` = False | Réinstalle PyTorch avec CUDA : `pip install torch --index-url https://download.pytorch.org/whl/cu128` | | ComfyUI ne démarre pas | Vérifie que le port 8188 est libre, que Python trouve torch | | Image placeholder au lieu de vraie image | Vérifie `COMFYUI_MODEL` dans `.env` et que le fichier existe dans `ComfyUI/models/checkpoints/` | | OpenRouter erreur 401 | La clé API est peut-être expirée, vérifie sur openrouter.ai | | `image_gen.py` ne trouve pas `comfyui` | Vérifie que tu as bien ajouté l'entrée dans `BACKEND_REGISTRY` de `image_gen.py` |