Skip to content

Conversation

@inoribea
Copy link

@inoribea inoribea commented Dec 30, 2025

Summary

This PR adds complete support for Doubao (豆包) API, including Seedance (video generation) and Seedream (image generation) capabilities.

Changes

Core API Clients

  • Seedance API: Added src/api/seedance.ts with full video generation API integration
    • Text-to-video generation
    • Image-to-video generation
    • First & last frame video generation
  • Seedream API: Added src/api/seedream.ts with full image generation API integration
    • Text-to-image generation
    • Image-to-image editing
    • Multi-image fusion
    • Group image generation
    • Image editing with mask support

Components

  • Seedance:
    • src/views/video/seedanceInput.vue - User input component
    • src/views/video/seedancePage.vue - Main page component
  • Seedream:
    • src/views/mj/aiSeedream.vue - Complete UI component with all modes

Routing & Integration

  • Added /seedance route for Seedance feature
  • Integrated Seedream into src/api/openapi.ts:
    • handleSeedream() - Process text/multi-image generation
    • handleSeedreamEdit() - Process image editing with mask
  • Added action handlers: gpt.seedream and gpt.seedream.edit

Templates & Configuration

  • Added two Seedance video generation templates:
    • doubao-seedance-1-0-pro-250528 - Pro version with extended options
    • doubao-seedance-1-0-lite-i2v-250428 - Lite version for image-to-video
  • Added environment variables:
    • DOUBAO_SERVER - Doubao API endpoint
    • DOUBAO_KEY - Doubao API key
    • Smart fallback to OPENAI_API_BASE_URL and OPENAI_API_KEY

i18n & Documentation

  • Added comprehensive Chinese and English translations for both features
  • Updated README with:
    • Feature descriptions
    • Configuration guide
    • Docker deployment examples

Seedance Features

  • ✅ Text-to-video generation
  • ✅ Image-to-video generation (first frame)
  • ✅ First & last frame video generation
  • ✅ Configurable resolution (720p/1080p)
  • ✅ Configurable aspect ratio (16:9/9:16/1:1)
  • ✅ Configurable duration (5s/8s/10s/12s for pro, 5s/8s/10s for lite)
  • ✅ FPS selection (24/30 fps)
  • ✅ Camera fixed mode toggle
  • ✅ Watermark control
  • ✅ Custom seed support
  • ✅ Model list caching (10 minutes TTL)

Seedream Features

  • ✅ Text-to-image generation
  • ✅ Image-to-image editing
  • ✅ Multi-image fusion (up to 14 reference images)
  • ✅ Group image generation (multiple coherent images)
  • ✅ Image editing with mask support
  • ✅ Configurable resolution (1K/2K/4K)
  • ✅ Response format selection (URL/Base64)
  • ✅ Watermark control
  • ✅ Prompt optimization
  • ✅ Model list caching (10 minutes TTL)

@vercel
Copy link

vercel bot commented Dec 30, 2025

@inoribea is attempting to deploy a commit to the dooy's projects Team on Vercel.

A member of the Team first needs to authorize it.

- Add Seedance API client (src/api/seedance.ts)
- Add Seedream API client (src/api/seedream.ts)
- Add Seedance components (seedanceInput.vue, seedancePage.vue)
- Add Seedream component (aiSeedream.vue)
- Add /seedance route
- Integrate Seedream into openapi (handleSeedream, handleSeedreamEdit)
- Add video generation templates (text-to-video, image-to-video, first/last frame)
- Add comprehensive i18n support (zh-CN, en-US)
- Add DOUBAO environment variables (DOUBAO_SERVER, DOUBAO_KEY)
- Add DOUBAO configuration with fallback to OPENAI_API settings
- Update README with complete Doubao documentation

Seedance Features:
- Text-to-video generation
- Image-to-video generation (first frame)
- First & last frame video generation
- Configurable resolution (720p/1080p)
- Configurable aspect ratio (16:9/9:16/1:1)
- Configurable duration (5s/8s/10s/12s)
- FPS selection (24/30)
- Camera fixed mode
- Watermark toggle
- Seed customization

Seedream Features:
- Text-to-image generation
- Image-to-image editing
- Multi-image fusion (up to 14 reference images)
- Group image generation (multiple coherent images)
- Image editing with mask support
- Configurable resolution (1K/2K/4K)
- Response format selection (URL/Base64)
- Watermark control
- Prompt optimization
- Model list caching (10 minutes TTL)
@inoribea inoribea force-pushed the feat/seedance-video-generation branch from a67a0d8 to b1bd699 Compare December 30, 2025 02:43
@inoribea inoribea changed the title feat: Add Doubao Seedance video generation support feat: Add complete Doubao API support (Seedance + Seedream) Dec 30, 2025
- 修复 nano-banana-2 模型首次生成时 aspect_ratio 无效的问题
- 删除与 aspect_ratio 冲突的 size 参数
- 优化模型切换时 aspect_ratio 的重置逻辑
- 修改默认绘图类型从 midjourney 改为 general
- 优化环境变量初始化逻辑,避免覆盖用户配置
- 添加环境变量调试日志
- 后端新增 USER_AVATAR 和 SITE_TITLE 环境变量读取
- 前端支持动态设置网站标题和用户默认头像
- 更新 README.md 添加配置说明
- 更新 .env.example 示例配置
- 添加 vite.config.ts 中的 HTML 转换钩子,在构建时替换标题
- Vercel 部署需使用 VITE_SITE_TITLE 环境变量
- Docker 部署使用 SITE_TITLE 环境变量
- 添加详细的调试日志用于排查配置问题
- 更新 README 说明不同部署方式的配置差异
- 修改 defaultSetting() 使用环境变量的头像作为默认值
- 优化头像应用逻辑,只在首次访问时应用环境变量
- 保持用户在前端设置中的自定义头像选择
- 检查 localStorage 判断是否为首次访问
- 后端添加 USER_NAME 环境变量读取和返回
- 前端支持动态设置用户默认名称
- 只在首次访问时应用环境变量名称
- 保持用户在前端设置中的自定义名称选择
- 更新 README 和 .env.example 配置文档
- 更新 api/session.js 添加所有新环境变量的读取
- 添加 USER_AVATAR, USER_NAME, SITE_TITLE 支持
- 添加 BACKGROUND_IMAGE, OPENAI_API_BASE_URL, MJ_SERVER 支持
- Vercel 部署使用 api/session.js 而非 service/src/index.ts
- 修正前端主题处理逻辑,正确识别 auto、light、dark 三种模式
- SYS_THEME=auto 时保持 auto 状态,由系统根据 prefers-color-scheme 自动判断
- SYS_THEME=light 或 dark 时强制使用指定主题
- 修复之前错误地将 auto 强制设置为 dark 的问题
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant