The project's README from github.com/yogendra-yatnalkar/storyboard-ai. As one markdown file: README.md.
[!NOTE] Latest Release: SAM3 object segmentation is now completely optional, allowing you to run the entire pipeline directly with just your Gemini API key (running whiteboard animations in single-pass mode).
An intelligent agentic pipeline that automates the creation of high-quality, fully narrated whiteboard animation videos from a simple text prompt.
Storyboard AI is a complete end-to-end framework. It takes in a high-level topic or context and handles everything: researching the topic, writing a compelling narrative script, planning the visual storyboard, generating custom whiteboard-style artwork, animating the drawing process, synthesizing voiceover narration, and burning perfectly timed subtitles.
It operates autonomously using an agentic approach, meaning the Director Agent breaks down the user request into manageable scenes, delegates tasks to specialized sub-agents/tools, and finally stitches everything back together.
[!IMPORTANT] The entire demo video below was generated automatically from a single input prompt/instruction: the title itself.
https://github.com/user-attachments/assets/433e86bc-7ad4-433b-8b09-117e1f3af9e9
Major Pipeline Steps Executed:
.env)Create a .env file in the genai-pipeline folder (or copy genai-pipeline/.env.example) and configure the following variables:
# Google API Key for LLM, TTS, Image Gen, and Veo Video Gen
GOOGLE_API_KEY="your-google-api-key-here"
# Hugging Face Access Token (Optional: Only required to download SAM 3 model weights if hosting SAM3 yourself)
# HF_API_KEY="your-huggingface-token-here"
# Set to TRUE if using Vertex AI, or FALSE to use Google Developer API (default)
GOOGLE_GENAI_USE_VERTEXAI=FALSE
The whiteboard drawing sequence generator can utilize instance segmentation for advanced multi-pass drawing. We host a self-contained FastAPI server that wraps the Segment Anything Model 3 (SAM 3).
SAM_API_URL is provided, the pipeline will skip the segmentation phase and run the whiteboard animation in single-pass mode. This allows new users to start running the pipeline directly using just their Gemini API key.sam3-hosting/ folder.config.py)Core configuration parameters are set in genai-pipeline/config.py:
SAM_API_URL: Set this to your deployed SAM 3 Cloud Run endpoint (e.g., https://sam3-service-xxxx-xx.a.run.app/predict). If left as an empty string "", SAM3 segmentation is skipped, and whiteboard animations are drawn in single-pass mode.MODEL_NAME: The model used for the Director Agent (default: gemini-2.5-pro).IMAGE_GEN_MODEL: The image generation model used for drawing line art (default: gemini-3-pro-image).VEO_MODEL: The video generation model (default: veo-3.1-generate-preview).Set up your Python environment (Conda environment recommended) and install the verified dependencies:
Depending on the component you are running, install the appropriate requirements:
For the Core GenAI Pipeline: Install the main dependencies in your Python/Conda environment using the root requirements.txt:
pip install -r requirements.txt
For the SAM 3 Self-Hosting Server: If you are running or building the SAM 3 endpoint locally (instead of using the pre-configured Dockerfile), install the dependencies listed in sam3-hosting/requirements.txt:
pip install -r sam3-hosting/requirements.txt
# Navigate to the core agent directory
cd genai-pipeline
# Run the interactive pipeline script
python pipeline.py
The CLI will guide you through:
[1] Deep Research, [2] Web Search (Fast), or [3] None.Y/n).Y/n).hindi or english).y/N).All intermediate assets and final outputs are saved under the genai-pipeline/output/run_<timestamp>/ folder:
storyboard_final_video.mp4: The completed, stitched whiteboard animation video with narration, background drawing paths, and burned subtitles.scene_<N>/: Individual folders for each scene containing the raw generated images, voiceover audio (.mp3), SAM 3 segmentation masks, subtitles, and scene-level sketch videos.This release marks the official launch of Storyboard AI v1.0.0! With this launch, the agentic whiteboard generation pipeline is fully operational with complete end-to-end automation, multimodal asset generation (images, speech pacing, video stitching), and optional GPU-accelerated SAM 3 segments hosting on GCP Cloud Run.
We are actively developing new features to expand compatibility and ease of deployment:
SAM_API_URL is provided, it skips the SAM3 model server requirement and automatically runs whiteboard drawing in single-pass mode.