Convert stories into anime-style scenes using AI
AnimeGen is an AI-powered tool that takes a written story as input, automatically splits it into meaningful scenes, and generates anime-style images for each scene. It then displays these images in a slideshow, creating a visual storytelling experience.
main.py.-.Animegen.-.Visual.Studio.Code.2025-03-05.22-01-32.mp4
git clone https://github.com/ABarpanda/Animegen.git
cd animegen
Install the required dependencies from requirements.txt:
pip install -r requirements.txt
To avoid conflicts with other Python projects, you can set up a virtual environment:
# Create a virtual environment
python -m venv venv
# Activate the virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install dependencies within the virtual environment
pip install -r requirements.txt
Write your story in the story.txt file located in the root directory of the project.
Run the src/main.py script to generate anime-style scenes from your story:
python src/main.py
The generated anime-style scenes will be saved in the output/ directory.
AnimeGen requires Pinecone for scene similarity calculations and Together AI for text-to-image generation.
Create a Pinecone Index
-
Sign up at Pinecone and create an index named
animegen
with the following settings:- Metric: Cosine
- Dimension: 384
- Pod Type: Starter (or higher)
-
Get your Pinecone API key from the dashboard.
Get a Together AI API Key
- Sign up at Together AI and generate an API key.
Store API Keys in .env
Create a .env
file in the project root and add:
PINECONE_ANIMEGEN_API_KEY=your_pinecone_api_key_here
TOGETHER_AI_API_KEY=your_together_ai_key_here
Contributions are welcome! If you'd like to contribute, please follow these steps:
Fork the repository.
Create a new branch for your feature or bugfix.
Submit a pull request with a detailed description of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
Thanks to Hugging Face for providing pre-trained models.
Inspired by the growing interest in AI-generated art and storytelling.