mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-09 19:41:32 +00:00
add face animation statistic to queue stats endpoint
This commit is contained in:
1 parent
699bb6a6a7
commit
f15b89cf3d
2 files changed
+9
-4
No files matched your search
+6
-4
@@ -42,9 +42,9 @@ pub struct ModernInferenceQueueStats {
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct ByQueueStats {
|
||||
pub pending_svc_jobs: u64,
|
||||
pub pending_face_animation_jobs: u64,
|
||||
pub pending_rvc_jobs: u64,
|
||||
//pub pending_face_animation_jobs: u64,
|
||||
pub pending_svc_jobs: u64,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -92,8 +92,9 @@ pub async fn get_unified_queue_stats_handler(
|
||||
total_pending_job_count: 10_000,
|
||||
pending_job_count: 10_000,
|
||||
by_queue: ByQueueStats {
|
||||
pending_svc_jobs: 10_000,
|
||||
pending_face_animation_jobs: 10_000,
|
||||
pending_rvc_jobs: 10_000,
|
||||
pending_svc_jobs: 10_000,
|
||||
}
|
||||
},
|
||||
legacy_tts: LegacyQueueDetails {
|
||||
@@ -190,8 +191,9 @@ pub async fn get_unified_queue_stats_handler(
|
||||
total_pending_job_count: cacheable_stats_result.queues.total_generic,
|
||||
pending_job_count: cacheable_stats_result.queues.total_generic,
|
||||
by_queue: ByQueueStats {
|
||||
pending_svc_jobs: cacheable_stats_result.queues.so_vits_svc,
|
||||
pending_face_animation_jobs: cacheable_stats_result.queues.sad_talker,
|
||||
pending_rvc_jobs: cacheable_stats_result.queues.rvc_v2,
|
||||
pending_svc_jobs: cacheable_stats_result.queues.so_vits_svc,
|
||||
}
|
||||
},
|
||||
legacy_tts: LegacyQueueDetails {
|
||||
|
||||
+3
@@ -24,6 +24,7 @@ pub struct Queues {
|
||||
pub legacy_tts: u64, // Tacotron2
|
||||
pub total_generic: u64, // Everything except Tacotron2 summed together
|
||||
pub rvc_v2: u64,
|
||||
pub sad_talker: u64,
|
||||
pub so_vits_svc: u64,
|
||||
}
|
||||
|
||||
@@ -40,6 +41,7 @@ pub fn database_result_to_cacheable(database_records: Vec<QueueStatsRow>) -> Cac
|
||||
}
|
||||
|
||||
let rvc_v2 = unwrap(queue_lengths.get("rvc_v2"));
|
||||
let sad_talker = unwrap(queue_lengths.get("sad_talker"));
|
||||
let so_vits_svc = unwrap(queue_lengths.get("so_vits_svc"));
|
||||
|
||||
let total_generic = rvc_v2 + so_vits_svc;
|
||||
@@ -50,6 +52,7 @@ pub fn database_result_to_cacheable(database_records: Vec<QueueStatsRow>) -> Cac
|
||||
legacy_tts: unwrap(queue_lengths.get("legacy_tts")),
|
||||
total_generic,
|
||||
rvc_v2,
|
||||
sad_talker,
|
||||
so_vits_svc,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user