mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-10 20:11:49 +00:00
veo 3.1 text to video
This commit is contained in:
1 parent
a8d1a30547
commit
cf59f03465
2 files changed
+60
-1
No files matched your search
@@ -1,2 +1,3 @@
|
||||
pub mod veo_3p1_first_last_frame_image_to_video;
|
||||
pub mod veo_3p1_first_frame_image_to_video;
|
||||
pub mod veo_3p1_first_frame_image_to_video;
|
||||
pub mod veo_3p1_text_to_video;
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
use crate::prelude::{Deserialize, FalRequest, Serialize};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Default)]
|
||||
pub struct Veo3p1TextToVideoInput {
|
||||
pub prompt: String,
|
||||
|
||||
/// Possible enum values: 9:16, 16:9, 1:1
|
||||
/// 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>,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub negative_prompt: Option<String>,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub enhance_prompt: Option<bool>,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub seed: Option<i64>,
|
||||
|
||||
/// Whether to automatically attempt to fix prompts that fail content policy or other validation checks by rewriting them
|
||||
/// Default value: true
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub auto_fix: Option<bool>,
|
||||
|
||||
/// Possible enum values: 720p, 1080p
|
||||
/// Default value 720p
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub resolution: Option<String>,
|
||||
|
||||
/// Generate audio
|
||||
/// Default value "true"
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub generate_audio: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct Veo3p1TextToVideoOutput {
|
||||
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_text_to_video(
|
||||
params: Veo3p1TextToVideoInput,
|
||||
) -> FalRequest<Veo3p1TextToVideoInput, Veo3p1TextToVideoOutput> {
|
||||
FalRequest::new("fal-ai/veo3.1", params)
|
||||
}
|
||||
Reference in new issue
Block a user