File size: 5,122 Bytes
ee24687 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | # 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` |
|