Model or dataset
xhongc/ai_story avatar
xhongc/ai_story

AI Story: A Docker-Deployed Pipeline That Turns a Topic into a Story Video

AI视频, AI动漫,AI 短剧,AI漫剧自动化生成工具

1,701 stars343 forksPythonLicense varies

At a glance

What is it?
AI Story is a Python platform that automates the entire path from a story topic to a finished video: script writing, storyboard generation, image creation, camera movement planning, and video assembly. It runs as a Docker Compose application with a Django backend, Celery task queue, and a frontend on port 3000, and is licensed under CC BY-NC-SA 4.0 for non-commercial use only.
Who is it for?
AI Story fits individual creators and hobbyists who want a self-hosted, fully automated path from a topic to a short story video without manually managing each production step. The CC BY-NC-SA 4.0 licence prohibits commercial use without a separate commercial licence from the author.
Can I use it commercially?
Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
Is it still maintained?
Yes. The repository last received commits 13 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What AI Story Automates and Who It Is For

AI Story addresses a specific production problem: assembling a short story video requires a script, scene breakdowns, images for each scene, and then video clips from those images. Doing each step manually across separate tools takes hours. AI Story automates all of them in a single workflow triggered by entering a topic.

The README describes the intended scenarios: short-form content for platforms like Douyin and Kuaishou, illustrated children's stories, visual concept prototypes, and personal creative projects. The platform targets content creators who already have access to the underlying AI APIs but want a single interface that runs the whole pipeline without manual handoffs between tools.

The workflow is: input topic, then script writing, then storyboard generation, then image generation, then camera movement planning, then video generation, then a finished output. Each stage shows real-time progress and supports pausing, resuming, and retrying any individual step.

Architecture: Django, Celery, Redis, and Docker

AI Story's backend runs on Django 3.2 with Django REST Framework. Asynchronous task processing uses Celery with Redis as the broker and result backend. The frontend is served as a separate container on port 3000.

The Docker Compose configuration defines three services: a Redis container for the message queue, a Django backend container running Gunicorn with gevent workers, and a Celery worker container. A separate Docker Compose file (docker-compose-deploy.yml) is provided for production deployment. The production backend connects to a MySQL database configured through environment variables.

The pyproject.toml lists the core dependencies: Django 3.2.15, celery 5.5.0b2, daphne 4.2.1 for WebSocket support, gunicorn 25.0.3, and mysqlclient 2.2.7 for the production database. The development environment uses SQLite.

The module for video editing output uses pyjianyingdraft 0.2.5, which generates CapCut-compatible draft files, allowing the generated video project to be opened and refined in that editor.

Starting AI Story with Docker Compose

The README provides a minimal Docker Compose file for local deployment. The deployment uses pre-built images from Docker Hub:

yaml
services:
  redis:
    image: redis:7-alpine
    restart: unless-stopped
  backend:
    image: xhongc/ai_story-backend
    restart: unless-stopped
    volumes:
      - ./data/backend:/app/backend/data
      - ./storage:/app/storage
    environment:
      - DJANGO_SETTINGS_MODULE=config.settings.production
      - REDIS_HOST=redis
    depends_on:
      - redis
  celery:
    image: xhongc/ai_story-backend
    working_dir: /app/backend
    command: celery -A config worker -l info -P gevent
    restart: unless-stopped
    depends_on:
      - redis

After creating a docker-compose.yml with this content, start the services and create an admin account:

bash
docker-compose up -d
docker-compose exec backend python backend/manage.py createsuperuser

The README notes that the Celery service must be started from the /app/backend working directory; the compose file sets this with working_dir. The frontend is then accessible at http://localhost:3000.

The Eight Core Features

The README documents eight functional modules in the platform.

Script writing takes a topic or outline and produces a video-ready script in one of several styles (narrative, educational, emotional). Multiple AI models are configurable, including OpenAI and Claude, and the platform saves version history for comparison.

Automatic storyboarding divides the script into scenes, generates image prompts for each scene, sets scene duration, and allows manual reordering. Image generation calls an image API (Stable Diffusion, DALL-E, or Midjourney, depending on configuration) for each scene prompt, with batch generation, progress display, and automatic retry on failure.

Camera movement planning assigns a camera motion type to each scene (zoom, pan, static, and others) based on the scene content, with a preset library and adjustable parameters.

The image-to-video step sends each static image with its camera motion parameters to a video generation platform (Runway or Pika, according to the README) and produces a video clip per scene. Project management tracks the state of each stage, supports pausing and resuming, and includes stage rollback.

Prompt management stores reusable prompt templates with variable substitution and version history. Model configuration centralises all AI service credentials and supports load balancing across multiple model instances with configurable strategies: round-robin, random, weighted, and least-loaded.

Limitations: Dependencies, Costs, and Licence Restrictions

AI Story does not include any AI models. Every generation step calls an external API: a text LLM for scripts, an image generation service for scene images, and a video generation platform for clips. Each of those services has its own pricing, API key requirements, and rate limits. The README lists the supported services but does not provide cost estimates or a recommended combination.

The Celery task queue is the only concurrency mechanism. The platform does not support horizontal scaling across multiple machines in the default configuration. Long video projects that queue many image or video generation tasks will process them serially through the Celery worker.

The licence is CC BY-NC-SA 4.0. The README states explicitly that commercial use is prohibited without a separate commercial licence from the author (contact [email protected]). Permitted uses are personal learning, non-commercial projects, and modifications shared under the same licence. Anyone building a product or service on top of AI Story must obtain a commercial licence first.

The .env.example includes LINKNOW_REGISTRATION_INVITE_CODE, AGENT_MODEL_PROVIDER_ID, and several LINKNOW_* variables that are not explained in the README. These appear to be for an integrated service called linknow that is part of the broader platform, but the README does not document what it does or whether it is required for the core video pipeline.

Comparison with Manual Tool Chains

A common alternative to AI Story is a manual pipeline: write the script in a text editor, generate images in a dedicated image generation tool like ComfyUI or a web-based Midjourney interface, apply motion in a separate video tool, and assemble the clips in a video editor. This gives finer control at each step but requires switching tools and manually transferring outputs.

ComfyUI, as one comparison point, is an open-source node-based workflow builder for image and video generation. It handles the generation side but has no script writing module and no end-to-end project tracking. AI Story trades that granular control for a pipeline that runs without manual intervention once configured.

Maintenance Status and Licence

The last push to the repository was on 2026-09-17, and the repository is not archived. The project has no GitHub releases and no formal version tag in the repository. The pyproject.toml lists version 0.1.0.

The project is licensed under CC BY-NC-SA 4.0. Commercial use requires a separate licence from the author. The repository provides contact information in the README for commercial licence enquiries.

Editorial conclusion

AI Story fits individual creators and hobbyists who want a self-hosted, fully automated path from a topic to a short story video without manually managing each production step. The CC BY-NC-SA 4.0 licence prohibits commercial use without a separate commercial licence from the author. Before deploying, verify that the AI image and video generation services you plan to connect (Stable Diffusion, Runway, Pika, and others) have their own API accounts and costs, since AI Story is an orchestration layer and does not include any generation models itself.

Frequently asked questions

What is AI Story?

AI Story is a self-hosted Python platform that automates the full process of turning a text topic into a short story video, covering script writing, scene storyboarding, AI image generation, camera movement planning, and video assembly. It runs as a Docker Compose application.

Is AI Story free to use for commercial projects?

No. The repository is licensed under CC BY-NC-SA 4.0, which prohibits commercial use. A separate commercial licence is required; the README provides a contact email for that enquiry.

Which AI services does AI Story support for image and video generation?

The README lists Stable Diffusion, DALL-E, and Midjourney for image generation, and Runway and Pika for video generation. Text scripts can use OpenAI, Claude, and other configurable LLM providers.

Official sources

  1. Issues
  2. README
  3. xhongc/ai_story on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/xhongc-ai-story.svg)](https://hysenlabs.com/projects/xhongc-ai-story)