From 98f9504bdd043e928e6dd6f4306512330bfc91c4 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Wed, 24 Jun 2026 13:56:56 -0400 Subject: [PATCH] video models list refactor (#1692) --- .../src/configs/omni_gen/video_models.rs | 894 ------------------ .../video_models/by_type/grok_video_models.rs | 90 ++ .../by_type/happy_horse_video_models.rs | 39 + .../by_type/kling_video_models.rs | 209 ++++ .../omni_gen/video_models/by_type/mod.rs | 7 + .../by_type/seedance_1x_video_models.rs | 77 ++ .../by_type/seedance_2p0_video_models.rs | 293 ++++++ .../video_models/by_type/sora_video_models.rs | 53 ++ .../video_models/by_type/veo_video_models.rs | 129 +++ .../src/configs/omni_gen/video_models/mod.rs | 2 + .../omni_gen/video_models/video_models.rs | 118 +++ .../video/omni_gen_video_models_handler.rs | 2 +- 12 files changed, 1018 insertions(+), 895 deletions(-) delete mode 100644 crates/service/web/storyteller_web/src/configs/omni_gen/video_models.rs create mode 100644 crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/grok_video_models.rs create mode 100644 crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/happy_horse_video_models.rs create mode 100644 crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/kling_video_models.rs create mode 100644 crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/mod.rs create mode 100644 crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/seedance_1x_video_models.rs create mode 100644 crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/seedance_2p0_video_models.rs create mode 100644 crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/sora_video_models.rs create mode 100644 crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/veo_video_models.rs create mode 100644 crates/service/web/storyteller_web/src/configs/omni_gen/video_models/mod.rs create mode 100644 crates/service/web/storyteller_web/src/configs/omni_gen/video_models/video_models.rs 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 deleted file mode 100644 index c229c8d4f5..0000000000 --- a/crates/service/web/storyteller_web/src/configs/omni_gen/video_models.rs +++ /dev/null @@ -1,894 +0,0 @@ -use artcraft_api_defs::omni_gen::models::omni_gen_video_models::{OmniGenVideoModelDetails, OmniGenVideoModelProviderDetails, OmniGenVideoModelsResponse, OmniGenVideoProviderModelDetails}; -use enums::common::generation::common_aspect_ratio::CommonAspectRatio; -use enums::common::generation::common_resolution::CommonResolution; -use enums::common::generation::common_video_model::CommonVideoModel; -use enums::common::generation::model_creator::ModelCreator; -use enums::common::generation_provider::GenerationProvider; -use once_cell::sync::Lazy; -use enums::common::generation::common_bitrate::CommonBitrate; - -pub const OMNI_GEN_VIDEO_MODELS_AND_PROVIDERS: Lazy = Lazy::new(|| { - let models = build_omni_gen_video_models(); - let providers= build_omni_gen_video_model_providers(); - OmniGenVideoModelsResponse { - success: true, - models, - providers, - } -}); - -fn build_omni_gen_video_models() -> Vec { - let mut models = Vec::new(); - - models.push(OmniGenVideoModelDetails { - model: CommonVideoModel::GrokImagineVideo, - model_creator: Some(ModelCreator::Grok), - full_name: Some("Grok Imagine".to_string()), - text_prompt_supported: Some(true), - starting_keyframe_supported: Some(true), - ending_keyframe_supported: Some(false), - image_references_supported: Some(true), - image_references_max: Some(7), - //video_references_supported: Some(false), - //video_references_max: Some(3), - //video_references_max_total_duration_seconds: Some(15), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::Auto, - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::WideFourByThree, - CommonAspectRatio::WideThreeByTwo, - CommonAspectRatio::Square, - CommonAspectRatio::TallTwoByThree, - 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(1), - duration_seconds_max: Some(15), - duration_seconds_max_with_image_references: Some(10), - duration_seconds_default: Some(8), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - model: CommonVideoModel::GrokImagineVideo1p5, - model_creator: Some(ModelCreator::Grok), - full_name: Some("Grok Imagine 1.5 Preview".to_string()), - extra_info: Some("Fast and high quality".to_string()), - extra_info_short: Some("Fast and high quality".to_string()), - text_to_video_supported: Some(false), // NB: This might be temporary - text_prompt_supported: Some(true), - text_prompt_max_length: Some(4096), - starting_keyframe_supported: Some(true), - ending_keyframe_supported: Some(false), - image_references_supported: Some(false), - //image_references_max: Some(7), - //video_references_supported: Some(false), - //video_references_max: Some(3), - //video_references_max_total_duration_seconds: Some(15), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::Auto, - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::WideFourByThree, - CommonAspectRatio::WideThreeByTwo, - CommonAspectRatio::Square, - CommonAspectRatio::TallTwoByThree, - 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(1), - duration_seconds_max: Some(15), - duration_seconds_max_with_image_references: Some(10), - duration_seconds_default: Some(8), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - model: CommonVideoModel::HappyHorse1p0, - model_creator: Some(ModelCreator::Alibaba), - full_name: Some("Happy Horse 1.0".to_string()), - text_prompt_supported: Some(true), - starting_keyframe_supported: Some(true), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::WideFourByThree, - CommonAspectRatio::Square, - CommonAspectRatio::TallThreeByFour, - CommonAspectRatio::TallNineBySixteen, - ]), - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - resolution_options: Some(vec![ - 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(3), - duration_seconds_max: Some(15), - duration_seconds_default: Some(5), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - model: CommonVideoModel::Kling16Pro, - model_creator: Some(ModelCreator::Kling), - full_name: Some("Kling 1.6 Pro".to_string()), - text_prompt_supported: Some(true), - starting_keyframe_supported: Some(true), - ending_keyframe_supported: Some(true), - image_references_supported: Some(true), // NB: 1.6 Elements! - image_references_max: Some(4), // NB: 1.6 Elements! - aspect_ratio_options: Some(vec![ - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::Square, - CommonAspectRatio::TallNineBySixteen, - ]), - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - duration_seconds_options: Some(vec![5, 10]), - duration_seconds_default: Some(5), - ..Default::default() - }); - - // TODO: Kling 2.5 doesn't let you control aspect ratio for image-to-video - models.push(OmniGenVideoModelDetails { - model: CommonVideoModel::Kling2p5TurboPro, - model_creator: Some(ModelCreator::Kling), - full_name: Some("Kling 2.5 Turbo Pro".to_string()), - text_prompt_supported: Some(true), - starting_keyframe_supported: Some(true), - ending_keyframe_supported: Some(true), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::Square, - CommonAspectRatio::TallNineBySixteen, - ]), - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - duration_seconds_options: Some(vec![5, 10]), - duration_seconds_default: Some(5), - ..Default::default() - }); - - // TODO: Kling 2.6 doesn't let you control aspect ratio for image-to-video - models.push(OmniGenVideoModelDetails { - model: CommonVideoModel::Kling2p6Pro, - model_creator: Some(ModelCreator::Kling), - full_name: Some("Kling 2.6 Pro".to_string()), - text_prompt_supported: Some(true), - starting_keyframe_supported: Some(true), - ending_keyframe_supported: Some(true), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::Square, - CommonAspectRatio::TallNineBySixteen, - ]), - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - duration_seconds_options: Some(vec![5, 10]), - duration_seconds_default: Some(5), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - model: CommonVideoModel::Seedance1p5Pro, - model_creator: Some(ModelCreator::Bytedance), - full_name: Some("Seedance 1.5 Pro".to_string()), - text_prompt_supported: Some(true), - starting_keyframe_supported: Some(true), - ending_keyframe_supported: Some(true), - show_generate_with_sound_toggle: Some(true), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::WideTwentyOneByNine, - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::WideFourByThree, - CommonAspectRatio::Square, - CommonAspectRatio::TallThreeByFour, - CommonAspectRatio::TallNineBySixteen, - CommonAspectRatio::Auto, - ]), - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - resolution_options: Some(vec![ - CommonResolution::FourEightyP, - CommonResolution::SevenTwentyP, - CommonResolution::TenEightyP, - ]), - resolution_default: Some(CommonResolution::TenEightyP), - duration_seconds_min: Some(4), - duration_seconds_max: Some(12), - duration_seconds_default: Some(8), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - model: CommonVideoModel::Seedance2p0, - model_creator: Some(ModelCreator::Bytedance), - full_name: Some("Seedance 2.0".to_string()), - extra_info: Some("The Chinese Volcengine (ByteDance China API platform) version of Seedance 2.0. Checkpoint is from January 2026. This may be better at some characters than the other Seedance models.".to_string()), - extra_info_short: Some("Original Seedance 2.0".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), - bitrate_options: Some(vec![ - CommonBitrate::Normal, - CommonBitrate::High, - ]), - bitrate_default: Some(CommonBitrate::Normal), - 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::Seedance2p0Fast, - model_creator: Some(ModelCreator::Bytedance), - full_name: Some("Seedance 2.0 Fast".to_string()), - extra_info: Some("The Chinese Volcengine (ByteDance China API platform) version of Seedance 2.0 Fast. Checkpoint is from January 2026. This may be better at some characters than the other Seedance models.".to_string()), - extra_info_short: Some("Original Seedance 2.0 Fast".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), - bitrate_options: Some(vec![ - CommonBitrate::Normal, - CommonBitrate::High, - ]), - bitrate_default: Some(CommonBitrate::Normal), - 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::Seedance2p0BytePlus, - model_creator: Some(ModelCreator::Bytedance), - full_name: Some("Seedance 2.0 Plus".to_string()), - extra_info: Some("The Chinese BytePlus (ByteDance's Western API platform) version of Seedance 2.0. This has fewer restrictions on faces and IP.".to_string()), - extra_info_short: Some("Seedance 2.0 (BytePlus version)".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(false), // TODO - 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), - bitrate_options: Some(vec![ - CommonBitrate::Normal, - CommonBitrate::High, - ]), - bitrate_default: Some(CommonBitrate::Normal), - 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::Seedance2p0BytePlusFast, - model_creator: Some(ModelCreator::Bytedance), - full_name: Some("Seedance 2.0 Plus Fast".to_string()), - extra_info: Some("The Chinese BytePlus (ByteDance's Western API platform) version of Seedance 2.0 Fast. This has fewer restrictions on faces and IP.".to_string()), - extra_info_short: Some("Seedance 2.0 Fast (BytePlus version)".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(false), // TODO - 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), - bitrate_options: Some(vec![ - CommonBitrate::Normal, - CommonBitrate::High, - ]), - bitrate_default: Some(CommonBitrate::Normal), - 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::Seedance2p0BytePlusUltra, - model_creator: Some(ModelCreator::Bytedance), - full_name: Some("Seedance 2.0 Plus Ultra".to_string()), - extra_info: Some("This is the same BytePlus version of Seedance 2.0, but with even fewer restrictions around content. Horror movies, action movie violence, and more is possible.".to_string()), - extra_info_short: Some("Seedance 2.0 (BytePlus version); less filtered".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(false), // TODO - 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), - bitrate_options: Some(vec![ - CommonBitrate::Normal, - CommonBitrate::High, - ]), - bitrate_default: Some(CommonBitrate::Normal), - 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::Seedance2p0BytePlusUltraFast, - model_creator: Some(ModelCreator::Bytedance), - full_name: Some("Seedance 2.0 Plus Ultra Fast".to_string()), - extra_info: Some("This is the same BytePlus version of Seedance 2.0 Fast, but with even fewer restrictions around content. Horror movies, action movie violence, and more is possible.".to_string()), - extra_info_short: Some("Seedance 2.0 Fast (BytePlus version); less filtered".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(false), // TODO - 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), - bitrate_options: Some(vec![ - CommonBitrate::Normal, - CommonBitrate::High, - ]), - 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() - }); - - // TODO(bt,2026-04-10): Veo 2 image-to-video doesn't support aspect ratio - models.push(OmniGenVideoModelDetails { - is_disabled: Some(true), // TODO: Temporarily disable - model: CommonVideoModel::Veo2, - model_creator: Some(ModelCreator::Google), - full_name: Some("Veo 2".to_string()), - text_prompt_supported: Some(true), - starting_keyframe_supported: Some(true), - // TODO(bt,2026-04-10): Veo 2 image-to-video doesn't support aspect ratio - aspect_ratio_options: Some(vec![ - CommonAspectRatio::Auto, - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::TallNineBySixteen, - ]), - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - duration_seconds_min: Some(5), - duration_seconds_max: Some(8), - duration_seconds_default: Some(5), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - is_disabled: Some(true), // TODO: Temporarily disable - model: CommonVideoModel::Veo3, - model_creator: Some(ModelCreator::Google), - full_name: Some("Veo 3".to_string()), - text_prompt_supported: Some(true), - starting_keyframe_supported: Some(true), - show_generate_with_sound_toggle: Some(true), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::TallNineBySixteen, - CommonAspectRatio::Auto, // TODO: Only for image-to-video - ]), - // TODO: image-to-video aspect ratio options - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - resolution_options: Some(vec![ - CommonResolution::SevenTwentyP, - CommonResolution::TenEightyP, - ]), - resolution_default: Some(CommonResolution::TenEightyP), - duration_seconds_min: Some(4), - duration_seconds_max: Some(8), - duration_seconds_default: Some(8), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - model: CommonVideoModel::Veo3Fast, - model_creator: Some(ModelCreator::Google), - full_name: Some("Veo 3 Fast".to_string()), - text_prompt_supported: Some(true), - starting_keyframe_supported: Some(true), - show_generate_with_sound_toggle: Some(true), - resolution_options: Some(vec![ - CommonResolution::SevenTwentyP, - CommonResolution::TenEightyP, - ]), - resolution_default: Some(CommonResolution::TenEightyP), - duration_seconds_min: Some(4), - duration_seconds_max: Some(8), - duration_seconds_default: Some(8), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - is_disabled: Some(true), // TODO: Temporarily disable - model: CommonVideoModel::Veo3p1, - model_creator: Some(ModelCreator::Google), - full_name: Some("Veo 3.1".to_string()), - text_prompt_supported: Some(true), - starting_keyframe_supported: Some(true), - ending_keyframe_supported: Some(true), - show_generate_with_sound_toggle: Some(true), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::Auto, - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::TallNineBySixteen, - ]), - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - resolution_options: Some(vec![ - CommonResolution::SevenTwentyP, - CommonResolution::TenEightyP, - ]), - resolution_default: Some(CommonResolution::TenEightyP), - duration_seconds_min: Some(4), - duration_seconds_max: Some(8), - duration_seconds_default: Some(8), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - is_disabled: Some(true), // TODO: Temporarily disable - model: CommonVideoModel::Veo3p1Fast, - model_creator: Some(ModelCreator::Google), - full_name: Some("Veo 3.1 Fast".to_string()), - text_prompt_supported: Some(true), - starting_keyframe_supported: Some(true), - ending_keyframe_supported: Some(true), - show_generate_with_sound_toggle: Some(true), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::Auto, - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::TallNineBySixteen, - ]), - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - resolution_options: Some(vec![ - CommonResolution::SevenTwentyP, - CommonResolution::TenEightyP, - ]), - resolution_default: Some(CommonResolution::TenEightyP), - duration_seconds_min: Some(4), - duration_seconds_max: Some(8), - duration_seconds_default: Some(8), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - is_disabled: Some(true), // TODO: Temporarily disable - model: CommonVideoModel::Kling16Pro, - model_creator: Some(ModelCreator::Kling), - full_name: Some("Kling 1.6 Pro".to_string()), - starting_keyframe_supported: Some(true), - ending_keyframe_supported: Some(true), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::Square, - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::TallNineBySixteen, - ]), - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - duration_seconds_options: Some(vec![5, 10]), - duration_seconds_default: Some(5), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - is_disabled: Some(true), // TODO: Temporarily disable - model: CommonVideoModel::Kling21Pro, - model_creator: Some(ModelCreator::Kling), - full_name: Some("Kling 2.1 Pro".to_string()), - starting_keyframe_supported: Some(true), - ending_keyframe_supported: Some(true), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::Square, - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::TallNineBySixteen, - ]), - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - duration_seconds_options: Some(vec![5, 10]), - duration_seconds_default: Some(5), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - is_disabled: Some(true), // TODO: Temporarily disable - model: CommonVideoModel::Kling21Master, - model_creator: Some(ModelCreator::Kling), - full_name: Some("Kling 2.1 Master".to_string()), - starting_keyframe_supported: Some(true), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::Square, - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::TallNineBySixteen, - ]), - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - duration_seconds_options: Some(vec![5, 10]), - duration_seconds_default: Some(5), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - is_disabled: Some(true), // TODO: Temporarily disable - model: CommonVideoModel::Kling2p5TurboPro, - model_creator: Some(ModelCreator::Kling), - full_name: Some("Kling 2.5 Turbo Pro".to_string()), - text_prompt_supported: Some(true), - starting_keyframe_supported: Some(true), - ending_keyframe_supported: Some(true), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::Square, - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::TallNineBySixteen, - ]), - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - duration_seconds_options: Some(vec![5, 10]), - duration_seconds_default: Some(5), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - is_disabled: Some(true), // TODO: Temporarily disable - model: CommonVideoModel::Kling2p6Pro, - model_creator: Some(ModelCreator::Kling), - full_name: Some("Kling 2.6 Pro".to_string()), - text_prompt_supported: Some(true), - starting_keyframe_supported: Some(true), - show_generate_with_sound_toggle: Some(true), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::Square, - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::TallNineBySixteen, - ]), - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - duration_seconds_options: Some(vec![5, 10]), - duration_seconds_default: Some(5), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - is_disabled: Some(true), // TODO: Temporarily disable - model: CommonVideoModel::Kling3p0Pro, - model_creator: Some(ModelCreator::Kling), - full_name: Some("Kling 3.0 Pro".to_string()), - text_prompt_supported: Some(true), - starting_keyframe_supported: Some(true), - ending_keyframe_supported: Some(true), - show_generate_with_sound_toggle: Some(true), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::Square, - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::TallNineBySixteen, - ]), - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - duration_seconds_min: Some(3), - duration_seconds_max: Some(15), - duration_seconds_default: Some(5), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - is_disabled: Some(true), // TODO: Temporarily disable - model: CommonVideoModel::Kling3p0Standard, - model_creator: Some(ModelCreator::Kling), - full_name: Some("Kling 3.0 Standard".to_string()), - text_prompt_supported: Some(true), - starting_keyframe_supported: Some(true), - ending_keyframe_supported: Some(true), - show_generate_with_sound_toggle: Some(true), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::Square, - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::TallNineBySixteen, - ]), - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - duration_seconds_min: Some(3), - duration_seconds_max: Some(15), - duration_seconds_default: Some(5), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - is_disabled: Some(true), // TODO: Temporarily disable - model: CommonVideoModel::Seedance10Lite, - model_creator: Some(ModelCreator::Bytedance), - full_name: Some("Seedance 1.0 Lite".to_string()), - starting_keyframe_supported: Some(true), - ending_keyframe_supported: Some(true), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::Auto, - 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), - duration_seconds_options: Some(vec![5, 10]), - duration_seconds_default: Some(5), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - is_disabled: Some(true), // TODO: Temporarily disable - model: CommonVideoModel::Sora2, - model_creator: Some(ModelCreator::OpenAi), - full_name: Some("Sora 2".to_string()), - text_prompt_supported: Some(true), - starting_keyframe_supported: Some(true), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::TallNineBySixteen, - ]), - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - resolution_options: Some(vec![CommonResolution::SevenTwentyP]), - resolution_default: Some(CommonResolution::SevenTwentyP), - duration_seconds_options: Some(vec![4, 8, 12]), - duration_seconds_default: Some(4), - ..Default::default() - }); - - models.push(OmniGenVideoModelDetails { - is_disabled: Some(true), // TODO: Temporarily disable - model: CommonVideoModel::Sora2Pro, - model_creator: Some(ModelCreator::OpenAi), - full_name: Some("Sora 2 Pro".to_string()), - text_prompt_supported: Some(true), - starting_keyframe_supported: Some(true), - aspect_ratio_options: Some(vec![ - CommonAspectRatio::WideSixteenByNine, - CommonAspectRatio::TallNineBySixteen, - ]), - aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), - resolution_options: Some(vec![ - CommonResolution::SevenTwentyP, - CommonResolution::TenEightyP, - ]), - resolution_default: Some(CommonResolution::TenEightyP), - duration_seconds_options: Some(vec![4, 8, 12]), - duration_seconds_default: Some(4), - ..Default::default() - }); - - models -} - -fn build_omni_gen_video_model_providers() -> Vec { - let mut providers = Vec::new(); - - providers.push(OmniGenVideoModelProviderDetails { - provider: GenerationProvider::Artcraft, - models: vec![ - OmniGenVideoProviderModelDetails { - model: CommonVideoModel::Seedance1p5Pro, - overrides: None, - }, - OmniGenVideoProviderModelDetails { - model: CommonVideoModel::Seedance2p0, - overrides: None, - }, - OmniGenVideoProviderModelDetails { - model: CommonVideoModel::Seedance10Lite, - overrides: None, - }, - OmniGenVideoProviderModelDetails { - model: CommonVideoModel::Sora2, - overrides: None, - }, - OmniGenVideoProviderModelDetails { - model: CommonVideoModel::Sora2Pro, - overrides: None, - }, - OmniGenVideoProviderModelDetails { - model: CommonVideoModel::Veo2, - overrides: None, - }, - OmniGenVideoProviderModelDetails { - model: CommonVideoModel::Veo3, - overrides: None, - }, - OmniGenVideoProviderModelDetails { - model: CommonVideoModel::Veo3Fast, - overrides: None, - }, - OmniGenVideoProviderModelDetails { - model: CommonVideoModel::Veo3p1, - overrides: None, - }, - OmniGenVideoProviderModelDetails { - model: CommonVideoModel::Veo3p1Fast, - overrides: None, - }, - OmniGenVideoProviderModelDetails { - model: CommonVideoModel::Kling16Pro, - overrides: None, - }, - OmniGenVideoProviderModelDetails { - model: CommonVideoModel::Kling21Pro, - overrides: None, - }, - OmniGenVideoProviderModelDetails { - model: CommonVideoModel::Kling21Master, - overrides: None, - }, - OmniGenVideoProviderModelDetails { - model: CommonVideoModel::Kling2p5TurboPro, - overrides: None, - }, - OmniGenVideoProviderModelDetails { - model: CommonVideoModel::Kling2p6Pro, - overrides: None, - }, - OmniGenVideoProviderModelDetails { - model: CommonVideoModel::Kling3p0Pro, - overrides: None, - }, - OmniGenVideoProviderModelDetails { - model: CommonVideoModel::Kling3p0Standard, - overrides: None, - }, - ], - }); - - providers -} diff --git a/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/grok_video_models.rs b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/grok_video_models.rs new file mode 100644 index 0000000000..6a9457d166 --- /dev/null +++ b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/grok_video_models.rs @@ -0,0 +1,90 @@ +use artcraft_api_defs::omni_gen::models::omni_gen_video_models::OmniGenVideoModelDetails; +use enums::common::generation::common_aspect_ratio::CommonAspectRatio; +use enums::common::generation::common_resolution::CommonResolution; +use enums::common::generation::common_video_model::CommonVideoModel; +use enums::common::generation::model_creator::ModelCreator; + +/// Grok Imagine video models. +pub fn grok_video_models() -> Vec { + let mut models = Vec::new(); + + models.push(OmniGenVideoModelDetails { + model: CommonVideoModel::GrokImagineVideo, + model_creator: Some(ModelCreator::Grok), + full_name: Some("Grok Imagine".to_string()), + text_prompt_supported: Some(true), + starting_keyframe_supported: Some(true), + ending_keyframe_supported: Some(false), + image_references_supported: Some(true), + image_references_max: Some(7), + //video_references_supported: Some(false), + //video_references_max: Some(3), + //video_references_max_total_duration_seconds: Some(15), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::Auto, + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::WideFourByThree, + CommonAspectRatio::WideThreeByTwo, + CommonAspectRatio::Square, + CommonAspectRatio::TallTwoByThree, + 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(1), + duration_seconds_max: Some(15), + duration_seconds_max_with_image_references: Some(10), + duration_seconds_default: Some(8), + ..Default::default() + }); + + models.push(OmniGenVideoModelDetails { + model: CommonVideoModel::GrokImagineVideo1p5, + model_creator: Some(ModelCreator::Grok), + full_name: Some("Grok Imagine 1.5 Preview".to_string()), + extra_info: Some("Fast and high quality".to_string()), + extra_info_short: Some("Fast and high quality".to_string()), + text_to_video_supported: Some(false), // NB: This might be temporary + text_prompt_supported: Some(true), + text_prompt_max_length: Some(4096), + starting_keyframe_supported: Some(true), + ending_keyframe_supported: Some(false), + image_references_supported: Some(false), + //image_references_max: Some(7), + //video_references_supported: Some(false), + //video_references_max: Some(3), + //video_references_max_total_duration_seconds: Some(15), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::Auto, + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::WideFourByThree, + CommonAspectRatio::WideThreeByTwo, + CommonAspectRatio::Square, + CommonAspectRatio::TallTwoByThree, + 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(1), + duration_seconds_max: Some(15), + duration_seconds_max_with_image_references: Some(10), + duration_seconds_default: Some(8), + ..Default::default() + }); + + models +} diff --git a/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/happy_horse_video_models.rs b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/happy_horse_video_models.rs new file mode 100644 index 0000000000..2b11b19e7b --- /dev/null +++ b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/happy_horse_video_models.rs @@ -0,0 +1,39 @@ +use artcraft_api_defs::omni_gen::models::omni_gen_video_models::OmniGenVideoModelDetails; +use enums::common::generation::common_aspect_ratio::CommonAspectRatio; +use enums::common::generation::common_resolution::CommonResolution; +use enums::common::generation::common_video_model::CommonVideoModel; +use enums::common::generation::model_creator::ModelCreator; + +/// Happy Horse video models. +pub fn happy_horse_video_models() -> Vec { + let mut models = Vec::new(); + + models.push(OmniGenVideoModelDetails { + model: CommonVideoModel::HappyHorse1p0, + model_creator: Some(ModelCreator::Alibaba), + full_name: Some("Happy Horse 1.0".to_string()), + text_prompt_supported: Some(true), + starting_keyframe_supported: Some(true), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::WideFourByThree, + CommonAspectRatio::Square, + CommonAspectRatio::TallThreeByFour, + CommonAspectRatio::TallNineBySixteen, + ]), + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + resolution_options: Some(vec![ + 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(3), + duration_seconds_max: Some(15), + duration_seconds_default: Some(5), + ..Default::default() + }); + + models +} diff --git a/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/kling_video_models.rs b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/kling_video_models.rs new file mode 100644 index 0000000000..04de31dcc0 --- /dev/null +++ b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/kling_video_models.rs @@ -0,0 +1,209 @@ +use artcraft_api_defs::omni_gen::models::omni_gen_video_models::OmniGenVideoModelDetails; +use enums::common::generation::common_aspect_ratio::CommonAspectRatio; +use enums::common::generation::common_video_model::CommonVideoModel; +use enums::common::generation::model_creator::ModelCreator; + +/// Active Kling video models (shown in the list). +pub fn kling_video_models() -> Vec { + let mut models = Vec::new(); + + models.push(OmniGenVideoModelDetails { + model: CommonVideoModel::Kling16Pro, + model_creator: Some(ModelCreator::Kling), + full_name: Some("Kling 1.6 Pro".to_string()), + text_prompt_supported: Some(true), + starting_keyframe_supported: Some(true), + ending_keyframe_supported: Some(true), + image_references_supported: Some(true), // NB: 1.6 Elements! + image_references_max: Some(4), // NB: 1.6 Elements! + aspect_ratio_options: Some(vec![ + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::Square, + CommonAspectRatio::TallNineBySixteen, + ]), + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + duration_seconds_options: Some(vec![5, 10]), + duration_seconds_default: Some(5), + ..Default::default() + }); + + // TODO: Kling 2.5 doesn't let you control aspect ratio for image-to-video + models.push(OmniGenVideoModelDetails { + model: CommonVideoModel::Kling2p5TurboPro, + model_creator: Some(ModelCreator::Kling), + full_name: Some("Kling 2.5 Turbo Pro".to_string()), + text_prompt_supported: Some(true), + starting_keyframe_supported: Some(true), + ending_keyframe_supported: Some(true), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::Square, + CommonAspectRatio::TallNineBySixteen, + ]), + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + duration_seconds_options: Some(vec![5, 10]), + duration_seconds_default: Some(5), + ..Default::default() + }); + + // TODO: Kling 2.6 doesn't let you control aspect ratio for image-to-video + models.push(OmniGenVideoModelDetails { + model: CommonVideoModel::Kling2p6Pro, + model_creator: Some(ModelCreator::Kling), + full_name: Some("Kling 2.6 Pro".to_string()), + text_prompt_supported: Some(true), + starting_keyframe_supported: Some(true), + ending_keyframe_supported: Some(true), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::Square, + CommonAspectRatio::TallNineBySixteen, + ]), + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + duration_seconds_options: Some(vec![5, 10]), + duration_seconds_default: Some(5), + ..Default::default() + }); + + models +} + +/// Disabled (coming-soon / hidden) Kling video models. +pub fn kling_disabled_video_models() -> Vec { + let mut models = Vec::new(); + + models.push(OmniGenVideoModelDetails { + is_disabled: Some(true), // TODO: Temporarily disable + model: CommonVideoModel::Kling16Pro, + model_creator: Some(ModelCreator::Kling), + full_name: Some("Kling 1.6 Pro".to_string()), + starting_keyframe_supported: Some(true), + ending_keyframe_supported: Some(true), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::Square, + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::TallNineBySixteen, + ]), + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + duration_seconds_options: Some(vec![5, 10]), + duration_seconds_default: Some(5), + ..Default::default() + }); + + models.push(OmniGenVideoModelDetails { + is_disabled: Some(true), // TODO: Temporarily disable + model: CommonVideoModel::Kling21Pro, + model_creator: Some(ModelCreator::Kling), + full_name: Some("Kling 2.1 Pro".to_string()), + starting_keyframe_supported: Some(true), + ending_keyframe_supported: Some(true), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::Square, + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::TallNineBySixteen, + ]), + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + duration_seconds_options: Some(vec![5, 10]), + duration_seconds_default: Some(5), + ..Default::default() + }); + + models.push(OmniGenVideoModelDetails { + is_disabled: Some(true), // TODO: Temporarily disable + model: CommonVideoModel::Kling21Master, + model_creator: Some(ModelCreator::Kling), + full_name: Some("Kling 2.1 Master".to_string()), + starting_keyframe_supported: Some(true), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::Square, + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::TallNineBySixteen, + ]), + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + duration_seconds_options: Some(vec![5, 10]), + duration_seconds_default: Some(5), + ..Default::default() + }); + + models.push(OmniGenVideoModelDetails { + is_disabled: Some(true), // TODO: Temporarily disable + model: CommonVideoModel::Kling2p5TurboPro, + model_creator: Some(ModelCreator::Kling), + full_name: Some("Kling 2.5 Turbo Pro".to_string()), + text_prompt_supported: Some(true), + starting_keyframe_supported: Some(true), + ending_keyframe_supported: Some(true), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::Square, + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::TallNineBySixteen, + ]), + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + duration_seconds_options: Some(vec![5, 10]), + duration_seconds_default: Some(5), + ..Default::default() + }); + + models.push(OmniGenVideoModelDetails { + is_disabled: Some(true), // TODO: Temporarily disable + model: CommonVideoModel::Kling2p6Pro, + model_creator: Some(ModelCreator::Kling), + full_name: Some("Kling 2.6 Pro".to_string()), + text_prompt_supported: Some(true), + starting_keyframe_supported: Some(true), + show_generate_with_sound_toggle: Some(true), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::Square, + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::TallNineBySixteen, + ]), + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + duration_seconds_options: Some(vec![5, 10]), + duration_seconds_default: Some(5), + ..Default::default() + }); + + models.push(OmniGenVideoModelDetails { + is_disabled: Some(true), // TODO: Temporarily disable + model: CommonVideoModel::Kling3p0Pro, + model_creator: Some(ModelCreator::Kling), + full_name: Some("Kling 3.0 Pro".to_string()), + text_prompt_supported: Some(true), + starting_keyframe_supported: Some(true), + ending_keyframe_supported: Some(true), + show_generate_with_sound_toggle: Some(true), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::Square, + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::TallNineBySixteen, + ]), + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + duration_seconds_min: Some(3), + duration_seconds_max: Some(15), + duration_seconds_default: Some(5), + ..Default::default() + }); + + models.push(OmniGenVideoModelDetails { + is_disabled: Some(true), // TODO: Temporarily disable + model: CommonVideoModel::Kling3p0Standard, + model_creator: Some(ModelCreator::Kling), + full_name: Some("Kling 3.0 Standard".to_string()), + text_prompt_supported: Some(true), + starting_keyframe_supported: Some(true), + ending_keyframe_supported: Some(true), + show_generate_with_sound_toggle: Some(true), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::Square, + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::TallNineBySixteen, + ]), + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + duration_seconds_min: Some(3), + duration_seconds_max: Some(15), + duration_seconds_default: Some(5), + ..Default::default() + }); + + models +} diff --git a/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/mod.rs b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/mod.rs new file mode 100644 index 0000000000..9883503012 --- /dev/null +++ b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/mod.rs @@ -0,0 +1,7 @@ +pub mod grok_video_models; +pub mod happy_horse_video_models; +pub mod kling_video_models; +pub mod seedance_1x_video_models; +pub mod seedance_2p0_video_models; +pub mod sora_video_models; +pub mod veo_video_models; diff --git a/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/seedance_1x_video_models.rs b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/seedance_1x_video_models.rs new file mode 100644 index 0000000000..9ace3e728e --- /dev/null +++ b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/seedance_1x_video_models.rs @@ -0,0 +1,77 @@ +use artcraft_api_defs::omni_gen::models::omni_gen_video_models::OmniGenVideoModelDetails; +use enums::common::generation::common_aspect_ratio::CommonAspectRatio; +use enums::common::generation::common_resolution::CommonResolution; +use enums::common::generation::common_video_model::CommonVideoModel; +use enums::common::generation::model_creator::ModelCreator; + +/// Seedance 1.5 video models. +pub fn seedance_1p5_video_models() -> Vec { + let mut models = Vec::new(); + + models.push(OmniGenVideoModelDetails { + model: CommonVideoModel::Seedance1p5Pro, + model_creator: Some(ModelCreator::Bytedance), + full_name: Some("Seedance 1.5 Pro".to_string()), + text_prompt_supported: Some(true), + starting_keyframe_supported: Some(true), + ending_keyframe_supported: Some(true), + show_generate_with_sound_toggle: Some(true), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::WideTwentyOneByNine, + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::WideFourByThree, + CommonAspectRatio::Square, + CommonAspectRatio::TallThreeByFour, + CommonAspectRatio::TallNineBySixteen, + CommonAspectRatio::Auto, + ]), + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + resolution_options: Some(vec![ + CommonResolution::FourEightyP, + CommonResolution::SevenTwentyP, + CommonResolution::TenEightyP, + ]), + resolution_default: Some(CommonResolution::TenEightyP), + duration_seconds_min: Some(4), + duration_seconds_max: Some(12), + duration_seconds_default: Some(8), + ..Default::default() + }); + + models +} + +/// Seedance 1.0 video models. +pub fn seedance_1p0_video_models() -> Vec { + let mut models = Vec::new(); + + models.push(OmniGenVideoModelDetails { + is_disabled: Some(true), // TODO: Temporarily disable + model: CommonVideoModel::Seedance10Lite, + model_creator: Some(ModelCreator::Bytedance), + full_name: Some("Seedance 1.0 Lite".to_string()), + starting_keyframe_supported: Some(true), + ending_keyframe_supported: Some(true), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::Auto, + 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), + duration_seconds_options: Some(vec![5, 10]), + duration_seconds_default: Some(5), + ..Default::default() + }); + + models +} diff --git a/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/seedance_2p0_video_models.rs b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/seedance_2p0_video_models.rs new file mode 100644 index 0000000000..aeb9207f0f --- /dev/null +++ b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/seedance_2p0_video_models.rs @@ -0,0 +1,293 @@ +use artcraft_api_defs::omni_gen::models::omni_gen_video_models::OmniGenVideoModelDetails; +use enums::common::generation::common_aspect_ratio::CommonAspectRatio; +use enums::common::generation::common_bitrate::CommonBitrate; +use enums::common::generation::common_resolution::CommonResolution; +use enums::common::generation::common_video_model::CommonVideoModel; +use enums::common::generation::model_creator::ModelCreator; + +/// The Seedance 2.0 family of video models, in display order: +/// Seedance 2.0, Seedance 2.0 Fast, Seedance 2.0 BytePlus, Seedance 2.0 BytePlus +/// Fast, Seedance 2.0 BytePlus Ultra, Seedance 2.0 BytePlus Ultra Fast. +pub fn seedance_2p0_video_models() -> Vec { + let mut models = Vec::new(); + + models.push(OmniGenVideoModelDetails { + model: CommonVideoModel::Seedance2p0, + model_creator: Some(ModelCreator::Bytedance), + full_name: Some("Seedance 2.0".to_string()), + extra_info: Some("The Chinese Volcengine (ByteDance China API platform) version of Seedance 2.0. Checkpoint is from January 2026. This may be better at some characters than the other Seedance models.".to_string()), + extra_info_short: Some("Original Seedance 2.0".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), + bitrate_options: Some(vec![ + CommonBitrate::Normal, + CommonBitrate::High, + ]), + bitrate_default: Some(CommonBitrate::Normal), + 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::Seedance2p0Fast, + model_creator: Some(ModelCreator::Bytedance), + full_name: Some("Seedance 2.0 Fast".to_string()), + extra_info: Some("The Chinese Volcengine (ByteDance China API platform) version of Seedance 2.0 Fast. Checkpoint is from January 2026. This may be better at some characters than the other Seedance models.".to_string()), + extra_info_short: Some("Original Seedance 2.0 Fast".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), + bitrate_options: Some(vec![ + CommonBitrate::Normal, + CommonBitrate::High, + ]), + bitrate_default: Some(CommonBitrate::Normal), + 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::Seedance2p0BytePlus, + model_creator: Some(ModelCreator::Bytedance), + full_name: Some("Seedance 2.0 Plus".to_string()), + extra_info: Some("The Chinese BytePlus (ByteDance's Western API platform) version of Seedance 2.0. This has fewer restrictions on faces and IP.".to_string()), + extra_info_short: Some("Seedance 2.0 (BytePlus version)".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(false), // TODO + 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), + bitrate_options: Some(vec![ + CommonBitrate::Normal, + CommonBitrate::High, + ]), + bitrate_default: Some(CommonBitrate::Normal), + 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::Seedance2p0BytePlusFast, + model_creator: Some(ModelCreator::Bytedance), + full_name: Some("Seedance 2.0 Plus Fast".to_string()), + extra_info: Some("The Chinese BytePlus (ByteDance's Western API platform) version of Seedance 2.0 Fast. This has fewer restrictions on faces and IP.".to_string()), + extra_info_short: Some("Seedance 2.0 Fast (BytePlus version)".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(false), // TODO + 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), + bitrate_options: Some(vec![ + CommonBitrate::Normal, + CommonBitrate::High, + ]), + bitrate_default: Some(CommonBitrate::Normal), + 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::Seedance2p0BytePlusUltra, + model_creator: Some(ModelCreator::Bytedance), + full_name: Some("Seedance 2.0 Plus Ultra".to_string()), + extra_info: Some("This is the same BytePlus version of Seedance 2.0, but with even fewer restrictions around content. Horror movies, action movie violence, and more is possible.".to_string()), + extra_info_short: Some("Seedance 2.0 (BytePlus version); less filtered".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(false), // TODO + 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), + bitrate_options: Some(vec![ + CommonBitrate::Normal, + CommonBitrate::High, + ]), + bitrate_default: Some(CommonBitrate::Normal), + 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::Seedance2p0BytePlusUltraFast, + model_creator: Some(ModelCreator::Bytedance), + full_name: Some("Seedance 2.0 Plus Ultra Fast".to_string()), + extra_info: Some("This is the same BytePlus version of Seedance 2.0 Fast, but with even fewer restrictions around content. Horror movies, action movie violence, and more is possible.".to_string()), + extra_info_short: Some("Seedance 2.0 Fast (BytePlus version); less filtered".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(false), // TODO + 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), + bitrate_options: Some(vec![ + CommonBitrate::Normal, + CommonBitrate::High, + ]), + 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 +} diff --git a/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/sora_video_models.rs b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/sora_video_models.rs new file mode 100644 index 0000000000..7ff2b64c42 --- /dev/null +++ b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/sora_video_models.rs @@ -0,0 +1,53 @@ +use artcraft_api_defs::omni_gen::models::omni_gen_video_models::OmniGenVideoModelDetails; +use enums::common::generation::common_aspect_ratio::CommonAspectRatio; +use enums::common::generation::common_resolution::CommonResolution; +use enums::common::generation::common_video_model::CommonVideoModel; +use enums::common::generation::model_creator::ModelCreator; + +/// Sora (OpenAI) video models. +pub fn sora_video_models() -> Vec { + let mut models = Vec::new(); + + models.push(OmniGenVideoModelDetails { + is_disabled: Some(true), // TODO: Temporarily disable + model: CommonVideoModel::Sora2, + model_creator: Some(ModelCreator::OpenAi), + full_name: Some("Sora 2".to_string()), + text_prompt_supported: Some(true), + starting_keyframe_supported: Some(true), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::TallNineBySixteen, + ]), + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + resolution_options: Some(vec![CommonResolution::SevenTwentyP]), + resolution_default: Some(CommonResolution::SevenTwentyP), + duration_seconds_options: Some(vec![4, 8, 12]), + duration_seconds_default: Some(4), + ..Default::default() + }); + + models.push(OmniGenVideoModelDetails { + is_disabled: Some(true), // TODO: Temporarily disable + model: CommonVideoModel::Sora2Pro, + model_creator: Some(ModelCreator::OpenAi), + full_name: Some("Sora 2 Pro".to_string()), + text_prompt_supported: Some(true), + starting_keyframe_supported: Some(true), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::TallNineBySixteen, + ]), + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + resolution_options: Some(vec![ + CommonResolution::SevenTwentyP, + CommonResolution::TenEightyP, + ]), + resolution_default: Some(CommonResolution::TenEightyP), + duration_seconds_options: Some(vec![4, 8, 12]), + duration_seconds_default: Some(4), + ..Default::default() + }); + + models +} diff --git a/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/veo_video_models.rs b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/veo_video_models.rs new file mode 100644 index 0000000000..950de8f659 --- /dev/null +++ b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/by_type/veo_video_models.rs @@ -0,0 +1,129 @@ +use artcraft_api_defs::omni_gen::models::omni_gen_video_models::OmniGenVideoModelDetails; +use enums::common::generation::common_aspect_ratio::CommonAspectRatio; +use enums::common::generation::common_resolution::CommonResolution; +use enums::common::generation::common_video_model::CommonVideoModel; +use enums::common::generation::model_creator::ModelCreator; + +/// Veo (Google) video models. +pub fn veo_video_models() -> Vec { + let mut models = Vec::new(); + + // TODO(bt,2026-04-10): Veo 2 image-to-video doesn't support aspect ratio + models.push(OmniGenVideoModelDetails { + is_disabled: Some(true), // TODO: Temporarily disable + model: CommonVideoModel::Veo2, + model_creator: Some(ModelCreator::Google), + full_name: Some("Veo 2".to_string()), + text_prompt_supported: Some(true), + starting_keyframe_supported: Some(true), + // TODO(bt,2026-04-10): Veo 2 image-to-video doesn't support aspect ratio + aspect_ratio_options: Some(vec![ + CommonAspectRatio::Auto, + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::TallNineBySixteen, + ]), + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + duration_seconds_min: Some(5), + duration_seconds_max: Some(8), + duration_seconds_default: Some(5), + ..Default::default() + }); + + models.push(OmniGenVideoModelDetails { + is_disabled: Some(true), // TODO: Temporarily disable + model: CommonVideoModel::Veo3, + model_creator: Some(ModelCreator::Google), + full_name: Some("Veo 3".to_string()), + text_prompt_supported: Some(true), + starting_keyframe_supported: Some(true), + show_generate_with_sound_toggle: Some(true), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::TallNineBySixteen, + CommonAspectRatio::Auto, // TODO: Only for image-to-video + ]), + // TODO: image-to-video aspect ratio options + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + resolution_options: Some(vec![ + CommonResolution::SevenTwentyP, + CommonResolution::TenEightyP, + ]), + resolution_default: Some(CommonResolution::TenEightyP), + duration_seconds_min: Some(4), + duration_seconds_max: Some(8), + duration_seconds_default: Some(8), + ..Default::default() + }); + + models.push(OmniGenVideoModelDetails { + model: CommonVideoModel::Veo3Fast, + model_creator: Some(ModelCreator::Google), + full_name: Some("Veo 3 Fast".to_string()), + text_prompt_supported: Some(true), + starting_keyframe_supported: Some(true), + show_generate_with_sound_toggle: Some(true), + resolution_options: Some(vec![ + CommonResolution::SevenTwentyP, + CommonResolution::TenEightyP, + ]), + resolution_default: Some(CommonResolution::TenEightyP), + duration_seconds_min: Some(4), + duration_seconds_max: Some(8), + duration_seconds_default: Some(8), + ..Default::default() + }); + + models.push(OmniGenVideoModelDetails { + is_disabled: Some(true), // TODO: Temporarily disable + model: CommonVideoModel::Veo3p1, + model_creator: Some(ModelCreator::Google), + full_name: Some("Veo 3.1".to_string()), + text_prompt_supported: Some(true), + starting_keyframe_supported: Some(true), + ending_keyframe_supported: Some(true), + show_generate_with_sound_toggle: Some(true), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::Auto, + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::TallNineBySixteen, + ]), + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + resolution_options: Some(vec![ + CommonResolution::SevenTwentyP, + CommonResolution::TenEightyP, + ]), + resolution_default: Some(CommonResolution::TenEightyP), + duration_seconds_min: Some(4), + duration_seconds_max: Some(8), + duration_seconds_default: Some(8), + ..Default::default() + }); + + models.push(OmniGenVideoModelDetails { + is_disabled: Some(true), // TODO: Temporarily disable + model: CommonVideoModel::Veo3p1Fast, + model_creator: Some(ModelCreator::Google), + full_name: Some("Veo 3.1 Fast".to_string()), + text_prompt_supported: Some(true), + starting_keyframe_supported: Some(true), + ending_keyframe_supported: Some(true), + show_generate_with_sound_toggle: Some(true), + aspect_ratio_options: Some(vec![ + CommonAspectRatio::Auto, + CommonAspectRatio::WideSixteenByNine, + CommonAspectRatio::TallNineBySixteen, + ]), + aspect_ratio_default: Some(CommonAspectRatio::WideSixteenByNine), + resolution_options: Some(vec![ + CommonResolution::SevenTwentyP, + CommonResolution::TenEightyP, + ]), + resolution_default: Some(CommonResolution::TenEightyP), + duration_seconds_min: Some(4), + duration_seconds_max: Some(8), + duration_seconds_default: Some(8), + ..Default::default() + }); + + models +} diff --git a/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/mod.rs b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/mod.rs new file mode 100644 index 0000000000..f76d659572 --- /dev/null +++ b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/mod.rs @@ -0,0 +1,2 @@ +pub mod video_models; +mod by_type; diff --git a/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/video_models.rs b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/video_models.rs new file mode 100644 index 0000000000..05794c6753 --- /dev/null +++ b/crates/service/web/storyteller_web/src/configs/omni_gen/video_models/video_models.rs @@ -0,0 +1,118 @@ +use artcraft_api_defs::omni_gen::models::omni_gen_video_models::{OmniGenVideoModelDetails, OmniGenVideoModelProviderDetails, OmniGenVideoModelsResponse, OmniGenVideoProviderModelDetails}; +use enums::common::generation::common_video_model::CommonVideoModel; +use enums::common::generation_provider::GenerationProvider; +use once_cell::sync::Lazy; + +use super::by_type::grok_video_models::grok_video_models; +use super::by_type::happy_horse_video_models::happy_horse_video_models; +use super::by_type::kling_video_models::{kling_disabled_video_models, kling_video_models}; +use super::by_type::seedance_1x_video_models::{seedance_1p0_video_models, seedance_1p5_video_models}; +use super::by_type::seedance_2p0_video_models::seedance_2p0_video_models; +use super::by_type::sora_video_models::sora_video_models; +use super::by_type::veo_video_models::veo_video_models; + +pub const OMNI_GEN_VIDEO_MODELS_AND_PROVIDERS: Lazy = Lazy::new(|| { + let models = build_omni_gen_video_models(); + let providers= build_omni_gen_video_model_providers(); + OmniGenVideoModelsResponse { + success: true, + models, + providers, + } +}); + +fn build_omni_gen_video_models() -> Vec { + let mut models = Vec::new(); + + models.extend(grok_video_models()); + models.extend(happy_horse_video_models()); + models.extend(kling_video_models()); + models.extend(kling_disabled_video_models()); + models.extend(seedance_1p0_video_models()); + models.extend(seedance_1p5_video_models()); + models.extend(seedance_2p0_video_models()); + models.extend(sora_video_models()); + models.extend(veo_video_models()); + + models +} + +fn build_omni_gen_video_model_providers() -> Vec { + let mut providers = Vec::new(); + + providers.push(OmniGenVideoModelProviderDetails { + provider: GenerationProvider::Artcraft, + models: vec![ + OmniGenVideoProviderModelDetails { + model: CommonVideoModel::Seedance1p5Pro, + overrides: None, + }, + OmniGenVideoProviderModelDetails { + model: CommonVideoModel::Seedance2p0, + overrides: None, + }, + OmniGenVideoProviderModelDetails { + model: CommonVideoModel::Seedance10Lite, + overrides: None, + }, + OmniGenVideoProviderModelDetails { + model: CommonVideoModel::Sora2, + overrides: None, + }, + OmniGenVideoProviderModelDetails { + model: CommonVideoModel::Sora2Pro, + overrides: None, + }, + OmniGenVideoProviderModelDetails { + model: CommonVideoModel::Veo2, + overrides: None, + }, + OmniGenVideoProviderModelDetails { + model: CommonVideoModel::Veo3, + overrides: None, + }, + OmniGenVideoProviderModelDetails { + model: CommonVideoModel::Veo3Fast, + overrides: None, + }, + OmniGenVideoProviderModelDetails { + model: CommonVideoModel::Veo3p1, + overrides: None, + }, + OmniGenVideoProviderModelDetails { + model: CommonVideoModel::Veo3p1Fast, + overrides: None, + }, + OmniGenVideoProviderModelDetails { + model: CommonVideoModel::Kling16Pro, + overrides: None, + }, + OmniGenVideoProviderModelDetails { + model: CommonVideoModel::Kling21Pro, + overrides: None, + }, + OmniGenVideoProviderModelDetails { + model: CommonVideoModel::Kling21Master, + overrides: None, + }, + OmniGenVideoProviderModelDetails { + model: CommonVideoModel::Kling2p5TurboPro, + overrides: None, + }, + OmniGenVideoProviderModelDetails { + model: CommonVideoModel::Kling2p6Pro, + overrides: None, + }, + OmniGenVideoProviderModelDetails { + model: CommonVideoModel::Kling3p0Pro, + overrides: None, + }, + OmniGenVideoProviderModelDetails { + model: CommonVideoModel::Kling3p0Standard, + overrides: None, + }, + ], + }); + + providers +} diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/omni_gen/models/video/omni_gen_video_models_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/omni_gen/models/video/omni_gen_video_models_handler.rs index d50f5f7c48..29dfa7f6f8 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/omni_gen/models/video/omni_gen_video_models_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/omni_gen/models/video/omni_gen_video_models_handler.rs @@ -1,6 +1,6 @@ use std::sync::Arc; -use crate::configs::omni_gen::video_models::OMNI_GEN_VIDEO_MODELS_AND_PROVIDERS; +use crate::configs::omni_gen::video_models::video_models::OMNI_GEN_VIDEO_MODELS_AND_PROVIDERS; use crate::http_server::common_responses::common_web_error::CommonWebError; use crate::http_server::user_lookup::user_session::session_utils::lookup::user_session_feature_flags::UserSessionFeatureFlags; use crate::state::server_state::ServerState;