feat: 添加宠物手办模板
- 新增PetFigurineTemplate模板类 - 模板代码: pet_figurine_v1 - 支持图生图+生视频功能 - 使用gemini-2.5-flash-image模型生成1/7比例宠物手办 - 使用302/MiniMax-Hailuo-02模型生成手办把玩视频 - 图片生成提示词: 创建商业化宠物手办,展示在电脑桌上 - 包含透明亚克力底座 - MacBook Pro屏幕显示ZBrush建模过程 - BANDAI风格包装盒展示原画 - 视频生成提示词: 一双手拿起手办展示把玩 - 积分消耗: 30分 - 视频时长: 6秒,竖屏比例9:16 - 更新模板导出和注册配置 - 提供完整的示例图片和视频链接
This commit is contained in:
parent
2a2f5b5536
commit
f2f39fa8ba
|
|
@ -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'; // 竖屏比例
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
export * from './PhotoRestoreTemplate';
|
export * from './PhotoRestoreTemplate';
|
||||||
export * from './close-eyes.template';
|
export * from './close-eyes.template';
|
||||||
export * from './CosplayRealPersonTemplate';
|
export * from './CosplayRealPersonTemplate';
|
||||||
|
export * from './PetFigurineTemplate';
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { Injectable, OnModuleInit, Logger } from '@nestjs/common';
|
import { Injectable, OnModuleInit, Logger } from '@nestjs/common';
|
||||||
import { TemplateManager, Template } from './types';
|
import { TemplateManager, Template } from './types';
|
||||||
import { CloseEyesTemplate, PhotoRestoreTemplate, CosplayRealPersonTemplate } from './n8nTemplates';
|
import { CloseEyesTemplate, PhotoRestoreTemplate, CosplayRealPersonTemplate, PetFigurineTemplate } from './n8nTemplates';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class TemplateService implements OnModuleInit {
|
export class TemplateService implements OnModuleInit {
|
||||||
|
|
@ -73,6 +73,7 @@ export class TemplateService implements OnModuleInit {
|
||||||
new PhotoRestoreTemplate(),
|
new PhotoRestoreTemplate(),
|
||||||
new CloseEyesTemplate(),
|
new CloseEyesTemplate(),
|
||||||
new CosplayRealPersonTemplate(),
|
new CosplayRealPersonTemplate(),
|
||||||
|
new PetFigurineTemplate(),
|
||||||
]);
|
]);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.logger.error('模板初始化失败:', error);
|
this.logger.error('模板初始化失败:', error);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue