An automated pipeline that converts TTRPG (Tabletop Role-Playing Game) audio recordings into illustrated comic books. This project uses AI for transcription, script generation, image generation, and layout to create a visual retelling of your D&D sessions.
Master's Thesis Project
git clone https://github.com/BubbleCoding/CandlekeepComicbooks.git
cd CandlekeepComicbooks
python -m venv env
# Windows
env\Scripts\activate
# Linux/Mac
source env/bin/activate
pip install -r requirements.txt
Download the required LoRA weights (if desired) and place them in assets/lora/:
See assets/lora/README.md for more details.
Download and install Ollama, then pull the llama3.1 model:
ollama pull llama3.1
For speaker diarization, you need a HuggingFace token with access to pyannote models:
# Windows PowerShell
$env:HF_TOKEN = "your_token_here"
# Linux/Mac
export HF_TOKEN="your_token_here"
Place your TTRPG session recording in the audio/ directory as a .wav file.
CandlekeepComicbooks/
โโโ main.py # Main pipeline runner
โโโ requirements.txt # Python dependencies
โโโ assets/
โ โโโ fonts/
โ โ โโโ manga-temple.ttf # Font for text overlays
โ โโโ lora/
โ โโโ *.safetensors # LoRA weights (not in repo)
โโโ audio/ # Place your .wav files here
โโโ output/ # Generated outputs (gitignored)
โ โโโ *.json # Intermediate script files
โ โโโ images/
โ โ โโโ imagesWithText/ # Final panel images
โ โ โโโ imagesWithoutText/ # Raw generated images
โ โโโ comicPages/ # Combined page layouts
โ โโโ comic.pdf # Final output
โโโ src/
โโโ transcribe.py # Audio โ Text with speakers
โโโ generate_script.py # Text โ Comic script
โโโ generate_prompts.py # Script โ SDXL prompts
โโโ generate_images.py # Prompts โ Images
โโโ AddTextToImage.py # Add dialogue to images
โโโ CreateComicPage.py # Combine panels into pages
โโโ pdfMerger.py # Pages โ PDF
python main.py
This will execute all 6 steps:
output/clean_transcript_with_speakers.jsonoutput/adaptive_comic_script.jsonoutput/adaptive_comic_script_with_prompts.jsonoutput/images/output/comicPages/output/comic.pdf# Just transcription
python -m src.transcribe
# Just image generation (requires existing script)
python -m src.generate_images
src/transcribe.py (line 165)src/generate_script.py (chunk_size parameter)src/generate_images.py (line 21)columns, rows in src/CreateComicPage.py (line 29)src/generate_prompts.py (line 66)Enable testing mode in src/generate_images.py to generate only 6 panels:
testing = True # Line 6
Out of memory errors: Reduce batch size or use smaller models
Diarization fails: Check HuggingFace token and model access
Missing font errors: Ensure manga-temple.ttf is in assets/fonts/
Import errors: Make sure you're running from project root directory
See LICENSE file for details.
Master's Thesis Project - Feel free to open issues or contribute!
An automated pipeline that converts TTRPG (Tabletop Role-Playing Game) audio recordings into illustrated comic books. This project uses AI for transcription, script generation, image generation, and layout to create a visual retelling of your D&D sessions.
Master's Thesis Project
git clone https://github.com/BubbleCoding/CandlekeepComicbooks.git
cd CandlekeepComicbooks
python -m venv env
# Windows
env\Scripts\activate
# Linux/Mac
source env/bin/activate
pip install -r requirements.txt
Download the required LoRA weights (if desired) and place them in assets/lora/:
See assets/lora/README.md for more details.
Download and install Ollama, then pull the llama3.1 model:
ollama pull llama3.1
For speaker diarization, you need a HuggingFace token with access to pyannote models:
# Windows PowerShell
$env:HF_TOKEN = "your_token_here"
# Linux/Mac
export HF_TOKEN="your_token_here"
Place your TTRPG session recording in the audio/ directory as a .wav file.
CandlekeepComicbooks/
โโโ main.py # Main pipeline runner
โโโ requirements.txt # Python dependencies
โโโ assets/
โ โโโ fonts/
โ โ โโโ manga-temple.ttf # Font for text overlays
โ โโโ lora/
โ โโโ *.safetensors # LoRA weights (not in repo)
โโโ audio/ # Place your .wav files here
โโโ output/ # Generated outputs (gitignored)
โ โโโ *.json # Intermediate script files
โ โโโ images/
โ โ โโโ imagesWithText/ # Final panel images
โ โ โโโ imagesWithoutText/ # Raw generated images
โ โโโ comicPages/ # Combined page layouts
โ โโโ comic.pdf # Final output
โโโ src/
โโโ transcribe.py # Audio โ Text with speakers
โโโ generate_script.py # Text โ Comic script
โโโ generate_prompts.py # Script โ SDXL prompts
โโโ generate_images.py # Prompts โ Images
โโโ AddTextToImage.py # Add dialogue to images
โโโ CreateComicPage.py # Combine panels into pages
โโโ pdfMerger.py # Pages โ PDF
python main.py
This will execute all 6 steps:
output/clean_transcript_with_speakers.jsonoutput/adaptive_comic_script.jsonoutput/adaptive_comic_script_with_prompts.jsonoutput/images/output/comicPages/output/comic.pdf# Just transcription
python -m src.transcribe
# Just image generation (requires existing script)
python -m src.generate_images
src/transcribe.py (line 165)src/generate_script.py (chunk_size parameter)src/generate_images.py (line 21)columns, rows in src/CreateComicPage.py (line 29)src/generate_prompts.py (line 66)Enable testing mode in src/generate_images.py to generate only 6 panels:
testing = True # Line 6
Out of memory errors: Reduce batch size or use smaller models
Diarization fails: Check HuggingFace token and model access
Missing font errors: Ensure manga-temple.ttf is in assets/fonts/
Import errors: Make sure you're running from project root directory
See LICENSE file for details.
Master's Thesis Project - Feel free to open issues or contribute!