Skip to content

Repository files navigation

Synes AutoDrama(通感自动剧场)

一键全自动并发生成漫剧与短剧 · ComfyUI + API 双兼容

Synes AutoDrama 是一个面向 AI 漫剧和短剧创作的全自动并发生成工作台。它能从剧本出发,统一调度角色、场景、分镜、视频、配音、音频后期和剪辑任务,并同时兼容本地 ComfyUI 工作流与云端 API Provider。

One-click, fully automated parallel generation for AI motion comics and short dramas, with both local ComfyUI workflows and cloud API providers. This repository contains the React frontend and Supabase Edge Functions.

在线体验 · English Overview · 快速开始 · 安全说明

实际运行界面

以下截图来自 synes.org 实际运行环境。

项目首页

Synes AutoDrama 项目首页

新建项目与多引擎选择

新建漫剧或短剧项目

模型配置与一键自动化

剧本、绘图和视频模型配置 一键自动并发生成资源
独立选择剧本、绘图与视频模型 自动生成分镜、角色与视频

生成资产库

AI 漫剧分镜资产库

剪辑时间线

视频剪辑与音频时间线

English Overview

Synes AutoDrama is a browser-based production workspace for generating AI motion comics and short dramas from a script. It coordinates script analysis, character and location design, storyboards, video generation, voice production, audio post-processing, timeline editing, and export in one workflow.

Why Synes AutoDrama

  • One-click automation: run a project and automatically fill in missing characters, locations, storyboards, and video assets.
  • Parallel generation: process independent creative tasks concurrently instead of waiting for every shot sequentially.
  • ComfyUI + API support: use local ComfyUI workflows, Google Gemini / Veo, or OpenAI-compatible API providers in the same project.
  • Motion comics and live-action shorts: switch between anime, cinematic, photorealistic, 3D, watercolor, and other visual styles.
  • End-to-end workspace: move from script breakdown to generated assets, voice, editing, and final export without switching tools.
  • Local-first with optional cloud sync: keep project data in IndexedDB and optionally sync through Supabase and Cloudflare R2.

Typical Workflow

  1. Create a motion-comic or short-drama project and paste in your script.
  2. Choose a local ComfyUI workflow or cloud API provider for text, image, and video generation.
  3. Configure the models, visual style, aspect ratio, and automation options.
  4. Run One-click Automation to generate all missing assets in parallel.
  5. Review or refine characters, locations, storyboards, prompts, and voice tracks.
  6. Arrange the generated clips on the timeline and export the finished video.

Quick Start

Requirements: Node.js 20+ and npm.

git clone https://github.com/weicool123/synes-autodrama.git
cd synes-autodrama
npm install
cp .env.example .env.local
npm run dev

Set VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY in .env.local before starting the app. Configure AI providers from the in-app settings page. Never place service-role keys, payment secrets, or storage secrets in VITE_* variables.

This repository currently includes the React frontend and Supabase Edge Functions. A reproducible database migration baseline is not included yet, so a complete cloud deployment requires your own Supabase schema, Row Level Security policies, storage configuration, and provider credentials.

功能

  • 一键自动执行项目,并发补全所有缺失的角色、场景、分镜和视频资源
  • 同时面向 AI 漫剧与真人/电影感短剧制作
  • 同时兼容本地 ComfyUI、Google Gemini / Veo 和 OpenAI 兼容 API
  • 用 AI 拆分剧本、提取角色和地点,生成分镜素材
  • 角色与场景参考图、素材库、时间线与批量导出
  • 字幕提取、声音克隆、逐句配音和 ffmpeg.wasm 混音
  • IndexedDB 本地数据,可选 Supabase 同步与 Cloudflare R2 对象存储
  • 中英文界面、明暗主题和可配置的 AI Provider

技术栈

React 19、TypeScript、Vite、Supabase、Cloudflare R2、ffmpeg.wasm、ComfyUI。

快速开始

前置条件:Node.js 20+ 和 npm。

git clone https://github.com/weicool123/synes-autodrama.git
cd synes-autodrama
npm install
cp .env.example .env.local

.env.local 中填入你自己的 Supabase 项目信息:

VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key

然后启动开发服务器:

npm run dev

打开终端输出的本地地址。首次使用时,在界面的「设置」中选择 AI Provider,配置自己的 API Key 或 ComfyUI 地址。前端设置保存在浏览器本地;不要在共享设备上保存敏感密钥。

基本使用流程

  1. 注册或登录,在首页创建漫剧或短剧项目。
  2. 粘贴剧本,选择本地 ComfyUI 或 API 作为文本、图像和视频 Provider。
  3. 在项目配置中选择「一键自动化」,系统会并发生成所有缺失资源。
  4. 必要时手动检查或调整角色、场景、分镜和配音。
  5. 在剪辑器中调整时间线并导出成片。

AI 任务会产生第三方费用。批量生成前请先用单个镜头验证 Provider、模型和计费设置。

配置 Supabase

.env.example 只包含可以公开到前端的 Supabase URL 和 anon key 占位符。所有服务端密钥必须在 Supabase Dashboard 或 CLI 中设置,不得放入 VITE_* 变量。

主要 Edge Function 密钥:

变量 用途
GOOGLE_API_KEY Gemini / Veo
ZHENZHEN_API_KEY, ZHENZHEN_BASE_URL 自定义 AI 网关
CLOUDFLARE_R2_* R2 公开素材桶
R2_* R2 私有用户素材桶
REPLICATE_API_TOKEN 可选音频处理
ALIPAY_*, XUNHU_* 可选支付功能
SERVICE_ROLE_KEY / SUPABASE_SERVICE_ROLE_KEY 仅 Edge Functions 使用的服务端权限

代码引用了 profilesprojectsassetstransactionsrecharge_requestsasync_taskscaptcha_codesapp_bannersapp_config 等表。当前仓库尚未提供可复现的数据库 migration 基线,因此完整云端能力不是一键部署。自建时请根据调用建表,并为每张用户表启用 RLS。欢迎贡献一套经过审计的 migration。

管理员界面仅在 Supabase JWT 的 app_metadata.roleadmin 时显示。这只是 UI 便利功能;真正的权限必须由 RLS、数据库函数或 Edge Function 在服务端校验。

开发与验证

npm run typecheck
npm run build
# 或一次执行
npm run check

产物输出到 dist/,可使用 npm run preview 本地预览。

项目结构

components/          React 界面和编辑器组件
hooks/               认证、项目、场景与 AI 任务状态
services/            Supabase、存储、AI、音频和 ffmpeg 适配层
supabase/functions/  Supabase Edge Functions
utils/               凭据选择与中英文翻译

安全

请勿提交 .env.local、API Key、service role key、支付私钥或 R2 secret。Supabase anon key 本身是前端公开凭据,但它必须与严格的 RLS 配合。漏洞报告方式见 SECURITY.md

贡献

欢迎 Issue 和 Pull Request。提交前请阅读 CONTRIBUTING.md,并执行 npm run check

许可证

MIT © Synes AutoDrama contributors

About

One-click, fully automated parallel AI motion-comic & short-drama generator. Supports local ComfyUI workflows and cloud APIs.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages