๐ง AI-Powered Movie GenerationMay 8, 2026โ
Tests passing
Prompt to Storyboard Generator
This tool takes a text prompt describing a movie scene and generates a storyboard with keyframes and descriptions. It leverages AI text-to-image models to create visual representations of scenes and combines them into a coherent storyboard structure, allowing developers and storytellers to prototype AI-generated videos more effectively.
What It Does
- Converts text prompts into visual storyboard frames.
- Generates scene descriptions alongside images.
- Supports customization of frame count and styles.
Installation
1. Clone the repository:
git clone <repository_url>
cd prompt_to_storyboard2. Install the required dependencies:
pip install -r requirements.txtUsage
Run the tool using the following command:
python prompt_to_storyboard.py --prompt "A spaceship lands on a mysterious planet" --frames 5 --style "cyberpunk"Arguments:
--prompt: (Required) The text prompt describing the scene.--frames: (Required) Number of frames to generate.--style: (Optional) Style of the storyboard (default: "default").--output: (Optional) Output directory for the storyboard (default: "storyboard_output").
Example:
python prompt_to_storyboard.py --prompt "A medieval knight battles a dragon" --frames 4 --style "fantasy" --output "my_storyboard"This will generate 4 frames and a description file in the my_storyboard directory.
Source Code
import os
import argparse
from PIL import Image, ImageDraw, ImageFont
import openai
def generate_storyboard(prompt, frames, style, output_dir):
"""
Generate a storyboard based on a text prompt.
Args:
prompt (str): The text prompt describing the scene.
frames (int): Number of frames to generate.
style (str): The style of the storyboard (e.g., 'cyberpunk').
output_dir (str): Directory to save the storyboard frames and descriptions.
Returns:
str: Path to the output directory containing the storyboard.
"""
if not os.path.exists(output_dir):
os.makedirs(output_dir)
descriptions = []
for i in range(frames):
frame_prompt = f"{prompt}, frame {i + 1} in {style} style"
try:
response = openai.Image.create(prompt=frame_prompt, n=1, size="256x256")
image_url = response['data'][0]['url']
# Mock downloading the image (replace with actual download code if needed)
image = Image.new('RGB', (256, 256), color=(73, 109, 137))
draw = ImageDraw.Draw(image)
draw.text((10, 10), f"Frame {i + 1}", fill="white")
image_path = os.path.join(output_dir, f"frame_{i + 1}.png")
image.save(image_path)
descriptions.append(f"Frame {i + 1}: {frame_prompt}")
except Exception as e:
print(f"Error generating frame {i + 1}: {e}")
description_file = os.path.join(output_dir, "descriptions.txt")
with open(description_file, "w") as f:
f.write("\n".join(descriptions))
return output_dir
def main():
parser = argparse.ArgumentParser(description="Prompt to Storyboard Generator")
parser.add_argument('--prompt', required=True, help='Text prompt describing the scene')
parser.add_argument('--frames', type=int, required=True, help='Number of frames to generate')
parser.add_argument('--style', default='default', help='Style of the storyboard (e.g., cyberpunk)')
parser.add_argument('--output', default='storyboard_output', help='Output directory for the storyboard')
args = parser.parse_args()
output_dir = generate_storyboard(args.prompt, args.frames, args.style, args.output)
print(f"Storyboard generated in: {output_dir}")
if __name__ == "__main__":
main()Community
Downloads
ยทยทยท
Rate this tool
No ratings yet โ be the first!
Details
- Tool Name
- prompt_to_storyboard
- Category
- AI-Powered Movie Generation
- Generated
- May 8, 2026
- Tests
- Passing โ
Quick Install
Clone just this tool:
git clone --depth 1 --filter=blob:none --sparse \ https://github.com/ptulin/autoaiforge.git cd autoaiforge git sparse-checkout set generated_tools/2026-05-08/prompt_to_storyboard cd generated_tools/2026-05-08/prompt_to_storyboard pip install -r requirements.txt 2>/dev/null || true python prompt_to_storyboard.py