Compare commits

...

2 Commits

Author SHA1 Message Date
杨明明 f2f39fa8ba feat: 添加宠物手办模板
- 新增PetFigurineTemplate模板类
  - 模板代码: pet_figurine_v1
  - 支持图生图+生视频功能
  - 使用gemini-2.5-flash-image模型生成1/7比例宠物手办
  - 使用302/MiniMax-Hailuo-02模型生成手办把玩视频
- 图片生成提示词: 创建商业化宠物手办,展示在电脑桌上
  - 包含透明亚克力底座
  - MacBook Pro屏幕显示ZBrush建模过程
  - BANDAI风格包装盒展示原画
- 视频生成提示词: 一双手拿起手办展示把玩
- 积分消耗: 30分
- 视频时长: 6秒,竖屏比例9:16
- 更新模板导出和注册配置
- 提供完整的示例图片和视频链接
2025-09-03 19:15:52 +08:00
杨明明 2a2f5b5536 feat: 添加cos真人模板
- 新增CosplayRealPersonTemplate模板类
  - 模板代码: cosplay_real_person_v1
  - 支持图生图+生视频功能
  - 使用gemini-2.5-flash-image模型生成cosplay真人照片
  - 使用302/MiniMax-Hailuo-02模型生成动作视频
- 图片生成提示词: 生成cosplay插图的真人照片,背景设置在Comiket
- 视频生成提示词: cosplay人物做经典动作的动态视频
- 积分消耗: 25分
- 视频时长: 6秒,竖屏比例9:16
- 更新模板导出和注册配置
- 提供完整的示例图片和视频链接
2025-09-03 19:03:19 +08:00
4 changed files with 52 additions and 2 deletions

View File

@ -0,0 +1,23 @@
import { N8nVideoGenerateTemplate } from '../n8nTemplate';
// cos真人模板
export class CosplayRealPersonTemplate extends N8nVideoGenerateTemplate {
readonly code = 'cosplay_real_person_v1';
readonly name = 'cos真人';
readonly description = '生成cosplay这张插图的真人照片背景设置在Comiket并生成cosplay人物做经典动作的视频';
readonly creditCost = 25;
readonly version = '1.0.0';
readonly input = 'https://cdn.roasmax.cn/upload/c69a847f8e8740f594f731ef502c4054.png'; // 原始插图示例
readonly output = 'https://file.302.ai/gpt/imgs/20250903/376c2ee8e6bc06598b34cc43ce649aae.jpg'; // 输出图片示例
readonly tags = ['cosplay', '真人', 'Comiket', '动漫', '二次元', '视频生成'];
// N8n模板特定属性 - 图片生成
readonly imageModel = 'gemini-2.5-flash-image'; // 根据要求使用 gemini-2.5-flash-image
readonly imagePrompt = '生成一张cosplay这张插图的照片背景设置在Comiket插图主体大一些';
// N8n模板特定属性 - 视频生成
readonly videoModel = '302/MiniMax-Hailuo-02';
readonly videoPrompt = '图片里的cosplay人物动起来做出这个cosplay人物的经典动作';
readonly duration = 6; // 6秒视频
readonly aspectRatio = '9:16'; // 竖屏比例
}

View File

@ -0,0 +1,23 @@
import { N8nVideoGenerateTemplate } from '../n8nTemplate';
// 宠物手办模板
export class PetFigurineTemplate extends N8nVideoGenerateTemplate {
readonly code = 'pet_figurine_v1';
readonly name = '宠物手办';
readonly description = '将宠物插图制作成1/7比例的商业化手办展示在电脑桌上并生成手办把玩视频';
readonly creditCost = 30;
readonly version = '1.0.0';
readonly input = 'https://cdn.roasmax.cn/upload/7cc18d70e9ba48bc8cadff7d3cdf62e1.png'; // 原始宠物插图示例
readonly output = 'https://cdn.roasmax.cn/upload/02f5c251162043f28e9da8d984546f40.png'; // 输出手办图片示例
readonly tags = ['宠物', '手办', '模型', '收藏', 'BANDAI', 'ZBrush', '视频生成'];
// N8n模板特定属性 - 图片生成
readonly imageModel = 'gemini-2.5-flash-image'; // nano banana 模型
readonly imagePrompt = 'Create a 1/7 scale commercialized figure of the animal in the illustration, in a realistic style and environment. Place the figure on a computer desk, using a circular transparent acrylic base without any text. On the Macbook Pro screen, display the ZBrush modeling process of the figure in line mode. Next to the computer screen, place a BANDAI-style toy packaging box printed with the original artwork.';
// N8n模板特定属性 - 视频生成
readonly videoModel = '302/MiniMax-Hailuo-02';
readonly videoPrompt = '一双手拿起手办,在手里展示把玩';
readonly duration = 6; // 6秒视频
readonly aspectRatio = '9:16'; // 竖屏比例
}

View File

@ -1,2 +1,4 @@
export * from './PhotoRestoreTemplate';
export * from './close-eyes.template';
export * from './close-eyes.template';
export * from './CosplayRealPersonTemplate';
export * from './PetFigurineTemplate';

View File

@ -1,6 +1,6 @@
import { Injectable, OnModuleInit, Logger } from '@nestjs/common';
import { TemplateManager, Template } from './types';
import { CloseEyesTemplate, PhotoRestoreTemplate } from './n8nTemplates';
import { CloseEyesTemplate, PhotoRestoreTemplate, CosplayRealPersonTemplate, PetFigurineTemplate } from './n8nTemplates';
@Injectable()
export class TemplateService implements OnModuleInit {
@ -72,6 +72,8 @@ export class TemplateService implements OnModuleInit {
this.templateManager.registerTemplates([
new PhotoRestoreTemplate(),
new CloseEyesTemplate(),
new CosplayRealPersonTemplate(),
new PetFigurineTemplate(),
]);
} catch (error) {
this.logger.error('模板初始化失败:', error);