Skip to content

Commit fc60e94

Browse files
tbrandtbrandaws
andauthored
Nova Reel v1.1 Support (#989)
Co-authored-by: Taichiro Suzuki <[email protected]>
1 parent 05408b8 commit fc60e94

File tree

8 files changed

+220
-94
lines changed

8 files changed

+220
-94
lines changed

docs/en/DEPLOY_OPTION.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,7 @@ This solution supports the following video generation models:
857857

858858
```
859859
"amazon.nova-reel-v1:0",
860+
"amazon.nova-reel-v1:1",
860861
"luma.ray-v2:0"
861862
```
862863

@@ -1009,7 +1010,7 @@ const envs: Record<string, Partial<StackInput>> = {
10091010
'amazon.titan-image-generator-v1',
10101011
'stability.stable-diffusion-xl-v1',
10111012
],
1012-
videoGenerationModelIds: ['amazon.nova-reel-v1:0'],
1013+
videoGenerationModelIds: ['amazon.nova-reel-v1:1'],
10131014
},
10141015
};
10151016
```
@@ -1041,7 +1042,7 @@ const envs: Record<string, Partial<StackInput>> = {
10411042
"amazon.titan-image-generator-v1",
10421043
"stability.stable-diffusion-xl-v1"
10431044
],
1044-
"videoGenerationModelIds": ["amazon.nova-reel-v1:0"]
1045+
"videoGenerationModelIds": ["amazon.nova-reel-v1:1"]
10451046
}
10461047
}
10471048
```

docs/ja/DEPLOY_OPTION.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,7 @@ const envs: Record<string, Partial<StackInput>> = {
872872

873873
```
874874
"amazon.nova-reel-v1:0",
875+
"amazon.nova-reel-v1:1",
875876
"luma.ray-v2:0"
876877
```
877878

@@ -1018,7 +1019,7 @@ const envs: Record<string, Partial<StackInput>> = {
10181019
'amazon.titan-image-generator-v1',
10191020
'stability.stable-diffusion-xl-v1',
10201021
],
1021-
videoGenerationModelIds: ['amazon.nova-reel-v1:0'],
1022+
videoGenerationModelIds: ['amazon.nova-reel-v1:1'],
10221023
},
10231024
};
10241025
```
@@ -1050,7 +1051,7 @@ const envs: Record<string, Partial<StackInput>> = {
10501051
"amazon.titan-image-generator-v1",
10511052
"stability.stable-diffusion-xl-v1"
10521053
],
1053-
"videoGenerationModelIds": ["amazon.nova-reel-v1:0"]
1054+
"videoGenerationModelIds": ["amazon.nova-reel-v1:1"]
10541055
}
10551056
}
10561057
```

packages/cdk/lambda/utils/models.ts

+38
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,41 @@ const createBodyVideoNovaReel = (params: GenerateVideoParams) => {
719719
};
720720
};
721721

722+
const createBodyVideoNovaReelV11 = (params: GenerateVideoParams) => {
723+
if (params.taskType === 'TEXT_VIDEO') {
724+
return {
725+
taskType: 'TEXT_VIDEO',
726+
textToVideoParams: {
727+
text: params.prompt,
728+
images: params.images,
729+
},
730+
videoGenerationConfig: {
731+
durationSeconds: params.durationSeconds,
732+
fps: params.fps,
733+
dimension: params.dimension,
734+
seed: params.seed,
735+
},
736+
};
737+
} else if (params.taskType === 'MULTI_SHOT_AUTOMATED') {
738+
return {
739+
taskType: 'MULTI_SHOT_AUTOMATED',
740+
multiShotAutomatedParams: {
741+
text: params.prompt,
742+
},
743+
videoGenerationConfig: {
744+
durationSeconds: params.durationSeconds,
745+
fps: params.fps,
746+
dimension: params.dimension,
747+
seed: params.seed,
748+
},
749+
};
750+
} else if (params.taskType === 'MULTI_SHOT_MANUAL') {
751+
throw new Error('Not implemented yet');
752+
} else {
753+
throw new Error(`Unknown task type ${params.taskType}`);
754+
}
755+
};
756+
722757
const createBodyVideoLumaRayV2 = (params: GenerateVideoParams) => {
723758
return {
724759
prompt: params.prompt,
@@ -1277,6 +1312,9 @@ export const BEDROCK_VIDEO_GEN_MODELS: {
12771312
'amazon.nova-reel-v1:0': {
12781313
createBodyVideo: createBodyVideoNovaReel,
12791314
},
1315+
'amazon.nova-reel-v1:1': {
1316+
createBodyVideo: createBodyVideoNovaReelV11,
1317+
},
12801318
'luma.ray-v2:0': {
12811319
createBodyVideo: createBodyVideoLumaRayV2,
12821320
},

packages/common/src/application/model.ts

+1
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ export const modelFeatureFlags: Record<string, FeatureFlags> = {
163163
// === Video ===
164164

165165
'amazon.nova-reel-v1:0': MODEL_FEATURE.VIDEO_GEN,
166+
'amazon.nova-reel-v1:1': MODEL_FEATURE.VIDEO_GEN,
166167
'luma.ray-v2:0': MODEL_FEATURE.VIDEO_GEN,
167168

168169
// === Embedding ===

packages/types/src/video.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { PrimaryKey } from './base';
22

33
export type GenerateVideoParams = {
4+
taskType?: string;
45
prompt: string;
56
durationSeconds: number;
67
dimension?: string;

packages/web/public/locales/translation/en.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,7 @@ video:
10861086
play: Play
10871087
prompt: Prompt
10881088
status: Status
1089+
taskType: Task Type
10891090
upload: Upload
10901091
uploadImage: Upload Image
10911092
uploadImageHelp: Specify the image used in the first frame of the video.

packages/web/public/locales/translation/ja.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,7 @@ video:
949949
play: 再生
950950
prompt: プロンプト
951951
status: ステータス
952+
taskType: タスクタイプ
952953
upload: アップロード
953954
uploadImage: 画像アップロード
954955
uploadImageHelp: 動画の 1 フレーム目に使われる画像を指定できます

0 commit comments

Comments
 (0)