mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-08 11:01:35 +00:00
veo 3.1 first frame
This commit is contained in:
1 parent
508b3c9d4e
commit
a8d1a30547
3 files changed
+54
-5
No files matched your search
@@ -1 +1,2 @@
|
||||
pub mod veo_3p1_first_last_frame_image_to_video;
|
||||
pub mod veo_3p1_first_last_frame_image_to_video;
|
||||
pub mod veo_3p1_first_frame_image_to_video;
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
use crate::prelude::{Deserialize, FalRequest, Serialize};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Default)]
|
||||
pub struct Veo3p1FirstFrameImageToVideoInput {
|
||||
pub prompt: String,
|
||||
|
||||
/// Starting frame
|
||||
pub image_url: String,
|
||||
|
||||
/// Possible enum values: 9:16, 16:9 (NB: This differs from first-frame/last-frame)
|
||||
/// Default value "16:9"
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub aspect_ratio: Option<String>,
|
||||
|
||||
/// Duration in seconds
|
||||
/// Possible enum values: 4s, 6s, 8s
|
||||
/// Default value 8s
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub duration: Option<String>,
|
||||
|
||||
/// Generate audio
|
||||
/// Default value "true"
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub generate_audio: Option<bool>,
|
||||
|
||||
/// Possible enum values: 720p, 1080p
|
||||
/// Default value 720p
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub resolution: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct Veo3p1FirstFrameImageToVideoOutput {
|
||||
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 veo_3p1_first_frame_image_to_video(
|
||||
params: Veo3p1FirstFrameImageToVideoInput,
|
||||
) -> FalRequest<Veo3p1FirstFrameImageToVideoInput, Veo3p1FirstFrameImageToVideoOutput> {
|
||||
FalRequest::new("fal-ai/veo3.1/image-to-video", params)
|
||||
}
|
||||
Vendored
+5
-4
@@ -10,10 +10,6 @@ pub struct Veo3p1FirstLastFrameImageToVideoInput {
|
||||
/// Ending frame
|
||||
pub last_frame_url: String,
|
||||
|
||||
/// Generate audio
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub generate_audio: Option<bool>,
|
||||
|
||||
/// Duration in seconds
|
||||
/// Possible enum values: 4s, 6s, 8s
|
||||
/// Default value 8s
|
||||
@@ -29,6 +25,11 @@ pub struct Veo3p1FirstLastFrameImageToVideoInput {
|
||||
/// Default value 720p
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub resolution: Option<String>,
|
||||
|
||||
/// Generate audio
|
||||
/// Defaults to "true"
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub generate_audio: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
|
||||
Reference in new issue
Block a user