feat(pixelle): 加 serde_yaml + Pixelle config 路径配置项

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
boos
2026-06-18 11:43:55 +08:00
parent 284cf84a47
commit 96b8d2c399
3 changed files with 35 additions and 0 deletions
Generated
+20
View File
@@ -413,6 +413,7 @@ dependencies = [
"rstest",
"serde",
"serde_json",
"serde_yaml",
"sha2",
"sqlx",
"tempfile",
@@ -2528,6 +2529,19 @@ dependencies = [
"serde",
]
[[package]]
name = "serde_yaml"
version = "0.9.34+deprecated"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
dependencies = [
"indexmap",
"itoa",
"ryu",
"serde",
"unsafe-libyaml",
]
[[package]]
name = "sha1"
version = "0.10.6"
@@ -3457,6 +3471,12 @@ version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
[[package]]
name = "unsafe-libyaml"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
[[package]]
name = "untrusted"
version = "0.9.0"
+1
View File
@@ -32,6 +32,7 @@ lettre = { version = "0.11", default-features = false, features = ["builder", "h
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.9"
regex = "1"
# Auth
+14
View File
@@ -98,6 +98,10 @@ pub struct PixelleVideoConfig {
pub video_fps: i64,
pub poll_interval_secs: u64,
pub timeout_secs: u64,
#[serde(default = "default_pixelle_config_path")]
pub config_path: String,
#[serde(default = "default_pixelle_compose_dir")]
pub compose_dir: String,
}
#[derive(Debug, Deserialize, Clone)]
@@ -165,6 +169,14 @@ fn default_pixelle_backend_provider() -> String {
"comfy".to_string()
}
fn default_pixelle_config_path() -> String {
"/opt/Pixelle-Video/config.yaml".to_string()
}
fn default_pixelle_compose_dir() -> String {
"/opt/Pixelle-Video".to_string()
}
fn default_workflow_points_cost() -> f64 {
10.0
}
@@ -217,6 +229,8 @@ impl Default for PixelleVideoConfig {
video_fps: 30,
poll_interval_secs: 5,
timeout_secs: 900,
config_path: default_pixelle_config_path(),
compose_dir: default_pixelle_compose_dir(),
}
}
}