Transform your stories into stunning manga panels with AI! MangakAI is an intelligent manga generation tool that converts written narratives into visual manga-style panels using Google's Gemini AI models.
- 🎨 AI-Powered Generation: Convert stories into professional manga panels with scene intelligence
- 🎭 Style Customization: Multiple art styles, moods, color palettes, and composition options
- 🔄 Panel Management: Regenerate specific panels with custom modifications and reference images
- 📋 Custom Templates: Upload your own panel layouts for personalized manga creation
- 📁 Export Options: Generate PDFs and organize panels with version control
- 🖥️ Web Interface: User-friendly Gradio interface with text/file input and example stories
- Python 3.11 or higher
- Google Gemini API key
- UV package manager (recommended) or pip
-
Clone the repository
git clone https://github.com/Shiva4113/MangakAI.git cd MangakAI -
Install dependencies
# Using UV (recommended) uv sync -
Set up environment variables
# Create .env file echo "GEMINI_API_KEY=your_gemini_api_key_here" > .env
-
Run the application
uv run app.py
-
Access the interface Open your browser and navigate to
http://localhost:7860
- Enter your story in the text area
- Select number of scenes (1-10 panels)
- Choose style preferences (optional)
- Upload custom template (optional)
- Click "Generate Manga"
- Upload a .txt story file
- Configure settings and generate
- Select panel number to modify
- Enter modification instructions
- Upload reference image (optional)
- Choose to replace original or keep both
- Generate your manga first
- Go to "Download PDF" tab and click "Create PDF"
MangakAI/
├── app.py # Main Gradio interface
├── manga.py # Core manga generation logic
├── utils.py # Utility functions and prompts
├── main.py # Entry point
├── pyproject.toml # Project configuration
├── .env # Environment variables (create this)
├── data/
│ ├── examples/ # Example manga panels
│ │ ├── LittleLantern/
│ │ ├── PaperKite/
│ │ └── StrayPuppy/
│ ├── output/ # Generated manga panels
│ ├── stories/ # Story text files
│ └── templates/ # Panel templates
└── README.md
Create a .env file with the following variables:
GEMINI_API_KEY=your_gemini_api_key_here
TEMPLATE_PATH=data/templates/template1.png
OUTPUT_DIR=data/output
STORIES_DIR=data/stories
IMAGE_MODEL_NAME=gemini-2.5-flash-image-preview
SCENE_MODEL_NAME=gemini-2.0-flash- Get Gemini API Key:
- Visit Google AI Studio
- Create a new API key
- Add it to your
.envfile
Choose from various art styles (Traditional Manga, Shonen, Shoujo, Seinen, Chibi, Cyberpunk, Fantasy, Horror), moods (Epic, Dark, Light, Dramatic, Action-packed), color palettes, character styles, and composition options to create your unique manga aesthetic.
- Smart Prompts: Analyzes story structure and maintains character consistency
- Custom Templates: Upload your own panel layouts with automatic AI adaptation
- Reference Images: Guide style, composition, and character appearance
The project includes three example stories with generated panels:
- The Little Lantern: A heartwarming tale of courage and kindness
- The Paper Kite: A story about letting go and finding wonder
- The Stray Puppy: A touching story of compassion and friendship
Transform your imagination into visual stories with the power of AI!