mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-08 02:52:12 +00:00
kling 2.5
This commit is contained in:
1 parent
eba50a71a4
commit
a2855f423b
5 files changed
+145
No files matched your search
@@ -54,3 +54,17 @@ pub mod v1_6;
|
||||
)))
|
||||
)]
|
||||
pub mod v2_1;
|
||||
#[cfg(any(
|
||||
feature = "endpoints",
|
||||
feature = "endpoints_fal-ai",
|
||||
feature = "endpoints_fal-ai_kling-video"
|
||||
))]
|
||||
#[cfg_attr(
|
||||
docsrs,
|
||||
doc(cfg(any(
|
||||
feature = "endpoints",
|
||||
feature = "endpoints_fal-ai",
|
||||
feature = "endpoints_fal-ai_kling-video"
|
||||
)))
|
||||
)]
|
||||
pub mod v2_5;
|
||||
Vendored
+45
@@ -0,0 +1,45 @@
|
||||
use crate::prelude::{Deserialize, FalRequest, Serialize};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Default)]
|
||||
pub struct KlingV2p5TurboProImageToVideoInput {
|
||||
pub prompt: String,
|
||||
|
||||
/// Starting frame
|
||||
pub image_url: String,
|
||||
|
||||
/// Optional ending frame
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub tail_image_url: Option<String>,
|
||||
|
||||
/// Optional negative prompt
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub negative_prompt: Option<String>,
|
||||
|
||||
/// Duration in seconds
|
||||
/// Options: "5", "10"
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub duration: Option<String>,
|
||||
|
||||
/// The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to
|
||||
/// stick to your prompt.
|
||||
/// Default value: 0.5
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub cfg_scale: Option<f32>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct KlingV2p5TurboProImageToVideoOutput {
|
||||
pub video: VideoFile,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Default)]
|
||||
pub struct VideoFile {
|
||||
/// The URL where the file can be downloaded from.
|
||||
pub url: String,
|
||||
}
|
||||
|
||||
pub fn kling_v2p5_turbo_pro_image_to_video(
|
||||
params: KlingV2p5TurboProImageToVideoInput,
|
||||
) -> FalRequest<KlingV2p5TurboProImageToVideoInput, KlingV2p5TurboProImageToVideoOutput> {
|
||||
FalRequest::new("fal-ai/kling-video/v2.5-turbo/pro/image-to-video", params)
|
||||
}
|
||||
Vendored
+42
@@ -0,0 +1,42 @@
|
||||
use crate::prelude::{Deserialize, FalRequest, Serialize};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Default)]
|
||||
pub struct KlingV2p5TurboProTextToVideoInput {
|
||||
pub prompt: String,
|
||||
|
||||
/// Aspect ratio
|
||||
/// Possible enum values: "16:9", "9:16", "1:1"
|
||||
pub aspect_ratio: Option<String>,
|
||||
|
||||
/// Optional negative prompt
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub negative_prompt: Option<String>,
|
||||
|
||||
/// Duration in seconds
|
||||
/// Options: "5", "10"
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub duration: Option<String>,
|
||||
|
||||
/// The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to
|
||||
/// stick to your prompt.
|
||||
/// Default value: 0.5
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub cfg_scale: Option<f32>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct KlingV2p5TurboProTextToVideoOutput {
|
||||
pub video: VideoFile,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Default)]
|
||||
pub struct VideoFile {
|
||||
/// The URL where the file can be downloaded from.
|
||||
pub url: String,
|
||||
}
|
||||
|
||||
pub fn kling_v2p5_turbo_pro_text_to_video(
|
||||
params: KlingV2p5TurboProTextToVideoInput,
|
||||
) -> FalRequest<KlingV2p5TurboProTextToVideoInput, KlingV2p5TurboProTextToVideoOutput> {
|
||||
FalRequest::new("fal-ai/kling-video/v2.5-turbo/pro/text-to-video", params)
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
use crate::prelude::{Deserialize, FalRequest, Serialize};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Default)]
|
||||
pub struct KlingV2p5TurboStandardImageToVideoInput {
|
||||
pub prompt: String,
|
||||
|
||||
/// Starting frame
|
||||
pub image_url: String,
|
||||
|
||||
/// Optional negative prompt
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub negative_prompt: Option<String>,
|
||||
|
||||
/// Duration in seconds
|
||||
/// Options: "5", "10"
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub duration: Option<String>,
|
||||
|
||||
/// The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to
|
||||
/// stick to your prompt.
|
||||
/// Default value: 0.5
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub cfg_scale: Option<f32>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct KlingV2p5TurboStandardImageToVideoOutput {
|
||||
pub video: VideoFile,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Default)]
|
||||
pub struct VideoFile {
|
||||
/// The URL where the file can be downloaded from.
|
||||
pub url: String,
|
||||
}
|
||||
|
||||
pub fn kling_v2p5_turbo_standard_image_to_video(
|
||||
params: KlingV2p5TurboStandardImageToVideoInput,
|
||||
) -> FalRequest<KlingV2p5TurboStandardImageToVideoInput, KlingV2p5TurboStandardImageToVideoOutput> {
|
||||
FalRequest::new("fal-ai/kling-video/v2.5-turbo/standard/image-to-video", params)
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
pub mod kling_v2p5_turbo_pro_image_to_video;
|
||||
pub mod kling_v2p5_turbo_pro_text_to_video;
|
||||
pub mod kling_v2p5_turbo_standard_image_to_video;
|
||||
Reference in new issue
Block a user