8000 GitHub - MasteraSnackin/ChooseFrame
[go: up one dir, main page]

Skip to content

MasteraSnackin/ChooseFrame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ChooseFrame

AI-Powered Interactive Comic Story Generator

License: MIT Python 3.10+ Next.js FastAPI GitHub Stars GitHub Forks GitHub Issues PRs Welcome

Transform your imagination into dynamic visual stories with AI-powered narratives and stunning comic panels and animated videos

Features β€’ Demo β€’ Quick Start β€’ Architecture β€’ Documentation

πŸ“‹ Table of Contents


🎬 Demo

Visual Showcase

ChooseFrame Interface

Interactive comic generation with branching narratives and AI-powered visuals

See It In Action

πŸ‘‰ Try the Live Demo (Coming Soon)

πŸŽ₯ Watch Video Demo (Coming Soon)

Sample Outputs

πŸ–ΌοΈ Static Comic Panel

High-quality AI-generated artwork

🎬 Animated Video

5-10 second cinematic clips


πŸ“– Overview

ChooseFrame is an interactive comic generator that combines the narrative power of Claude AI with the visual capabilities of Runware SDXL. Create unique characters, make meaningful choices, and watch your story unfold through dynamically generated comic panels and animated videos.

Screenshot 2026-01-24 164556

🎯 Key Highlights

  • AI Story Generation - Powered by Anthropic's Claude for rich, adaptive narratives
  • Dynamic Visuals - High-quality comic panels via Runware SDXL API
  • 🎬 Video Animation - NEW! Animate any panel into 5-10 second videos
  • Branching Narratives - Your choices shape the story in real-time
  • Character Consistency - Reference system ensures visual continuity
  • Multiple Art Styles - Noir, Manga, Superhero, Fantasy, and Cyberpunk
  • Export & Share - Save your stories as PDF comics or video clips

Video

Recording.2026-01-25.123132.mp4

✨ Features

🎨 Character Creation

  • Generate character reference images from natural language

  • Choose from 5 distinct art styles

  • Visual consistency across all story panels

    4fa06a54-6a3d-4a31-8768-a4ded2d4ed8a

πŸ“š Story Generation

  • Claude AI-powered adaptive storytelling
  • Branching decision trees with meaningful choices
  • Adjustable tone controls (humor, drama, action, romance, suspense)
  • Multiple genres: Noir, Sci-Fi, Fantasy, Romance, Horror, Comedy zxc

πŸ–ΌοΈ Comic Panels & Video Animation

  • AI-generated panel imagery with SDXL
  • 🎬 NEW: Video Animation - Transform static panels into animated videos
    • 5 or 10 second video clips from any panel
    • Runware video inference with Kling AI
    • Cinematic camera movements and effects
    • Download as MP4 format
  • Dynamic speech bubbles and dialogue overlays
  • Panel transitions and visual effects
  • Immersive reading mode

ezgif-33973a4f5ba395d7

⚑ User Experience

  • Story history navigation and undo system
  • Keyboard shortcuts for power users
  • Dark/Light theme support
  • Voice narration (text-to-speech)
  • PDF export functionality

πŸ—οΈ Architecture

ChooseFrame follows a modern client-server architecture with specialized AI service integrations.

graph TD
    subgraph Frontend_NextJS
        UI[React UI Components]
        State[React Context / Hooks]
        API_Client[Axios Client]
    end

    subgraph Backend_FastAPI
        Server[FastAPI Server]
        Auth[Auth Logic]
        Engine[Story Engine]
        PanelGen[Panel Generator]
    end

    subgraph AI_Services
        Claude[Anthropic Claude API]
        Runware[Runware SDXL API]
    end

    subgraph Storage
        Cache[Local Cache / File System]
        Export[PDF / Image Export]
    end

    UI --> State
    State --> API_Client
    API_Client --> Server
    Server --> Engine
    Server --> PanelGen
    Engine --> Claude
    PanelGen --> Runware
    Server --> Cache
    Server --> Export
Loading

Data Flow: Panel Generation

sequenceDiagram
    participant FE as Frontend
    participant BE as Backend
    participant Claude as Anthropic AI
    participant Runware as Runware AI
    
    FE->>BE: Submit Choice
    BE->>Claude: Generate Story Context
    Claude-->>BE: Story Text & Image Prompts
    BE->>Runware: Generate Panel Image
    Runware-->>BE: Image URL
    BE-->>FE: Panel Data (Text + Image)
    FE->>FE: Overlay Dialogue
Loading

πŸš€ Quick Start

Prerequisites

Installation

  1. Clone the repository

    git clone https://github.com/MasteraSnackin/ChooseFrame.git
    cd ChooseFrame
  2. Install Python dependencies

    pip install -r requirements.txt
  3. Configure environment variables

    cp .env.example .env

    Edit .env and add your API keys:

    RUNWARE_API_KEY=your_runware_api_key
    ANTHROPIC_API_KEY=your_anthropic_api_key
  4. Install frontend dependencies

    cd web/frontend
    npm install
    cd ../..

Running the Application

Terminal 1 - Backend (FastAPI)

cd web/backend
python -m uvicorn main:app --reload --port 8000

Terminal 2 - Frontend (Next.js)

cd web/frontend
npm run dev

Open your browser: http://localhost:3000


🎬 Video Generation

ChooseFrame now includes AI-powered video animation to bring your comic panels to life!

How to Use Video Generation

  1. Create a story and generate comic panels
  2. Scroll down to find the "Generate Video Animation" section below each panel
  3. Adjust settings:
    • Duration: Choose 5 or 10 seconds
    • Motion Prompt (optional): Add text like "slow camera pan" or "dynamic zoom"
  4. Click "🎬 Generate Video"
  5. Wait ~4-5 minutes for the AI to create your video
  6. Preview and download your animated comic panel!

Video Features

  • βœ… Powered by Runware Video Inference (Kling AI model)
  • βœ… 5 or 10 second clips - Perfect for social media
  • βœ… Cinematic effects - Camera movements, subtle animation
  • βœ… MP4 format - Universal compatibility
  • βœ… Instant download - Save and share your animated stories

Technical Details

  • Generation time: ~4-5 minutes per video
  • Quality: 95/100 (high quality)
  • Format: MP4
  • Resolution: Matches source panel (typically 1024x1024)
  • API: Runware videoInference with Kling 1.0 Standard model

For detailed documentation, see VIDEO_GENERATION_GUIDE.md


πŸ“ Project Structure

ChooseFrame/
β”œβ”€β”€ execution/              # Core AI execution modules
β”‚   β”œβ”€β”€ cache_manager.py    # Panel and session caching
β”‚   β”œβ”€β”€ claude_story_engine.py  # Story generation
β”‚   β”œβ”€β”€ panel_generator.py  # Comic panel creation
β”‚   └── runware_client.py   # Runware API integration
β”œβ”€β”€ web/
β”‚   β”œβ”€β”€ backend/
β”‚   β”‚   └── main.py         # FastAPI server
β”‚   └── frontend/
β”‚       └── src/
β”‚           β”œβ”€β”€ app/        # Next.js pages
β”‚           β”œβ”€β”€ components/ # React components
β”‚           β”œβ”€β”€ context/    # State management
β”‚           └── hooks/      # Custom React hooks
β”œβ”€β”€ .env.example            # Environment template
β”œβ”€β”€ requirements.txt        # Python dependencies
└── README.md              # This file

πŸ› οΈ Tech Stack

Component Technology
Frontend Next.js 15, React 18, TypeScript, Tailwind CSS
Backend FastAPI, Python 3.10+, Uvicorn
Story AI Anthropic Claude API
Image AI Runware API (SDXL & Video)
Styling Framer Motion, CSS Animations

πŸ”Œ API Endpoints

Endpoint Method Description
/health GET Health check
/api/character/generate POST Generate character reference images
/api/story/start POST Start a new story
/api/story/choice POST Submit a choice and progress story
/api/video/generate POST NEW: Generate video animation from panel

βš™οΈ Configuration

Environment Variables

Variable Description Required
RUNWARE_API_KEY Runware API key for image generation Yes
ANTHROPIC_API_KEY Anthropic API key for Claude Yes

Tone Controls

Adjust story tone with sliders (0–100):

  • Humor - Witty dialogue and comedic beats
  • Drama - Emotional intensity and conflict
  • Action - Physical scenes and kinetic sequences
  • Romance - Character relationships
  • Suspense - Mystery and tension

⌨️ Keyboard Shortcuts

Key Action
← / β†’ Navigate story history
Ctrl+Z Undo last choice
1 / 2 / 3 Quick-select choices
Esc Close modals

πŸ“š Documentation

For detailed technical documentation, see:


🀝 Contributing

Contributions are welcome! Areas of focus:

  • UX polish and accessibility improvements
  • New panel effects and transitions
  • Additional genres and art styles

How to Contribute

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/AmazingFeature
  3. Commit your changes: git commit -m "Add AmazingFeature"
  4. Push to the branch: git push origin feature/AmazingFeature
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.


πŸ™ Acknowledgments


πŸ’¬ Support

If you encounter any issues or have questions, please open an issue.


Built with AI for the BFL FLUX.2 Hackathon (January 2026)

Made with ❀️ by MasteraSnackin

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0