From 4ba7a7da63e01236becd57a63ec04c59cfbabafb Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Mon, 18 May 2026 09:13:26 -0400 Subject: [PATCH] preview model --- .../src/configs/omni_gen/video_models.rs | 91 +++++++++++++++++-- .../video/estimate_video_cost_handler.rs | 2 + 2 files changed, 87 insertions(+), 6 deletions(-) diff --git a/crates/service/web/storyteller_web/src/configs/omni_gen/video_models.rs b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models.rs index f5f98bc71d..425881dca7 100644 --- a/crates/service/web/storyteller_web/src/configs/omni_gen/video_models.rs +++ b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models.rs @@ -155,10 +155,89 @@ fn build_omni_gen_video_models() -> Vec { ..Default::default() }); +// models.push(OmniGenVideoModelDetails { +// model: CommonVideoModel::Seedance2p0Global, +// model_creator: Some(ModelCreator::Bytedance), +// full_name: Some("Seedance 2.0 (Global)".to_string()), +// text_prompt_supported: Some(true), +// starting_keyframe_supported: Some(true), +// ending_keyframe_supported: Some(true), +// image_references_supported: Some(true), +// image_references_max: Some(9), +// audio_references_supported: Some(true), +// audio_references_max: Some(3), +// audio_references_max_total_duration_seconds: Some(15), +// video_references_supported: Some(true), +// video_references_max: Some(3), +// video_references_max_total_duration_seconds: Some(15), +// character_references_supported: Some(true), +// character_references_max: Some(9), +// aspect_ratio_options: Some(vec![ +// CommonAspectRatio::WideTwentyOneByNine, +// CommonAspectRatio::WideSixteenByNine, +// CommonAspectRatio::WideFourByThree, +// CommonAspectRatio::Square, +// CommonAspectRatio::TallThreeByFour, +// CommonAspectRatio::TallNineBySixteen, +// ]), +// aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), +// resolution_options: Some(vec![ +// CommonResolution::FourEightyP, +// CommonResolution::SevenTwentyP, +// CommonResolution::TenEightyP, +// ]), +// resolution_default: Some(CommonResolution::SevenTwentyP), +// batch_size_options: Some(vec![1, 2, 4]), +// batch_size_default: Some(1), +// duration_seconds_min: Some(4), +// duration_seconds_max: Some(15), +// duration_seconds_default: Some(5), +// ..Default::default() +// }); +// +// models.push(OmniGenVideoModelDetails { +// model: CommonVideoModel::Seedance2p0FastGlobal, +// model_creator: Some(ModelCreator::Bytedance), +// full_name: Some("Seedance 2.0 Fast (Global)".to_string()), +// text_prompt_supported: Some(true), +// starting_keyframe_supported: Some(true), +// ending_keyframe_supported: Some(true), +// image_references_supported: Some(true), +// image_references_max: Some(9), +// audio_references_supported: Some(true), +// audio_references_max: Some(3), +// audio_references_max_total_duration_seconds: Some(15), +// video_references_supported: Some(true), +// video_references_max: Some(3), +// video_references_max_total_duration_seconds: Some(15), +// character_references_supported: Some(true), +// character_references_max: Some(9), +// aspect_ratio_options: Some(vec![ +// CommonAspectRatio::WideTwentyOneByNine, +// CommonAspectRatio::WideSixteenByNine, +// CommonAspectRatio::WideFourByThree, +// CommonAspectRatio::Square, +// CommonAspectRatio::TallThreeByFour, +// CommonAspectRatio::TallNineBySixteen, +// ]), +// aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), +// resolution_options: Some(vec![ +// CommonResolution::FourEightyP, +// CommonResolution::SevenTwentyP, +// ]), +// resolution_default: Some(CommonResolution::SevenTwentyP), +// batch_size_options: Some(vec![1, 2, 4]), +// batch_size_default: Some(1), +// duration_seconds_min: Some(4), +// duration_seconds_max: Some(15), +// duration_seconds_default: Some(5), +// ..Default::default() +// }); + models.push(OmniGenVideoModelDetails { - model: CommonVideoModel::Seedance2p0Global, - model_creator: Some(ModelCreator::Bytedance), - full_name: Some("Seedance 2.0 (Global)".to_string()), + model: CommonVideoModel::PreviewModel, + model_creator: None, + full_name: Some("Research Preview".to_string()), text_prompt_supported: Some(true), starting_keyframe_supported: Some(true), ending_keyframe_supported: Some(true), @@ -196,9 +275,9 @@ fn build_omni_gen_video_models() -> Vec { }); models.push(OmniGenVideoModelDetails { - model: CommonVideoModel::Seedance2p0FastGlobal, - model_creator: Some(ModelCreator::Bytedance), - full_name: Some("Seedance 2.0 Fast (Global)".to_string()), + model: CommonVideoModel::PreviewModelFast, + model_creator: None, + full_name: Some("Research Preview (Fast)".to_string()), text_prompt_supported: Some(true), starting_keyframe_supported: Some(true), ending_keyframe_supported: Some(true), diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/generate/cost_estimate/video/estimate_video_cost_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/generate/cost_estimate/video/estimate_video_cost_handler.rs index 7a89620b4c..42b78ae31a 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/generate/cost_estimate/video/estimate_video_cost_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/generate/cost_estimate/video/estimate_video_cost_handler.rs @@ -151,6 +151,8 @@ fn map_video_model(model: CommonVideoModel) -> Result RouterVideoModel::Veo3Fast, CommonVideoModel::Veo3p1 => RouterVideoModel::Veo3p1, CommonVideoModel::Veo3p1Fast => RouterVideoModel::Veo3p1Fast, + CommonVideoModel::PreviewModel => RouterVideoModel::PreviewModel, + CommonVideoModel::PreviewModelFast => RouterVideoModel::PreviewModelFast, }; Ok(router_model) }