animate-x http args, refactor job

This commit is contained in:
Brandon Thomas committed 2025-02-05 14:35:42 -05:00
1 parent d0a3c02c00
commit 7a1ce7c9fd
8 files changed
+22 -6

No files matched your search

@@ -38,4 +38,12 @@ pub struct StudioGen2Payload {
#[serde(rename = "fp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fps: Option<u64>,
#[serde(rename = "mf")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_frames: Option<u64>,
#[serde(rename = "rnd")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rounds: Option<u64>,
}
@@ -1,6 +1,7 @@
pub mod animate_x;
pub mod download_file_for_studio;
pub mod process_single_studio_gen2_job;
pub mod stable_animator_command;
pub mod stable_animator;
pub mod studio_gen2_dependencies;
pub mod studio_gen2_dirs;
pub mod validate_and_save_results;
@@ -1,7 +1,7 @@
use crate::job::job_loop::job_success_result::{JobSuccessResult, ResultEntity};
use crate::job::job_loop::process_single_job_error::ProcessSingleJobError;
use crate::job::job_types::studio_gen2::download_file_for_studio::{download_file_for_studio, DownloadFileForStudioArgs};
use crate::job::job_types::studio_gen2::stable_animator_command::InferenceArgs;
use crate::job::job_types::studio_gen2::stable_animator::stable_animator_command::InferenceArgs;
use crate::job::job_types::studio_gen2::studio_gen2_dirs::StudioGen2Dirs;
use crate::job::job_types::studio_gen2::validate_and_save_results::{validate_and_save_results, SaveResultsArgs};
use crate::job::job_types::workflow::face_fusion::process_face_fusion_job::process_face_fusion_job;
@@ -19,6 +19,8 @@ use crate::job::job_types::workflow::video_style_transfer::util::process_preview
use crate::job::job_types::workflow::video_style_transfer::util::video_pathing::{PrimaryInputVideoAndPaths, SecondaryInputVideoAndPaths, VideoPathing};
use crate::job::job_types::workflow::video_style_transfer::util::write_workflow_prompt::{write_workflow_prompt, WorkflowPromptArgs};
use crate::state::job_dependencies::JobDependencies;
use crate::util::common_commands::ffmpeg::ffmpeg_audio_replace_args::FfmpegAudioReplaceArgs;
use crate::util::common_commands::ffmpeg::ffmpeg_resample_fps_args::FfmpegResampleFpsArgs;
use anyhow::anyhow;
use bucket_paths::legacy::remote_file_manager_paths::remote_cloud_bucket_details::RemoteCloudBucketDetails;
use bucket_paths::legacy::typified_paths::public::media_files::bucket_directory::MediaFileBucketDirectory;
@@ -43,13 +45,11 @@ use std::io::{stdout, BufReader};
use std::path::{Path, PathBuf};
use std::thread;
use std::time::{Duration, Instant};
use subprocess_common::command_runner::command_runner_args::{RunAsSubprocessArgs, StreamRedirection};
use tokens::tokens::media_files::MediaFileToken;
use tokio::sync::oneshot;
use tokio::sync::oneshot::channel;
use subprocess_common::command_runner::command_runner_args::{RunAsSubprocessArgs, StreamRedirection};
use videos::ffprobe_get_dimensions::ffprobe_get_dimensions;
use crate::util::common_commands::ffmpeg::ffmpeg_audio_replace_args::FfmpegAudioReplaceArgs;
use crate::util::common_commands::ffmpeg::ffmpeg_resample_fps_args::FfmpegResampleFpsArgs;
pub async fn process_single_studio_gen2_job(
deps: &JobDependencies,
@@ -0,0 +1 @@
pub mod stable_animator_command;
@@ -1,4 +1,4 @@
use crate::job::job_types::studio_gen2::stable_animator_command::StableAnimatorCommand;
use crate::job::job_types::studio_gen2::stable_animator::stable_animator_command::StableAnimatorCommand;
use crate::state::common::watermark_configs::WatermarkConfigs;
use errors::AnyhowResult;
use std::path::{Path, PathBuf};
@@ -70,6 +70,10 @@ pub struct EnqueueStudioGen2Request {
pub output_width: Option<u64>,
pub output_height: Option<u64>,
pub fps: Option<u64>,
// TODO
pub max_frames: Option<u64>,
pub rounds: Option<u64>,
}
#[derive(Serialize, ToSchema)]
@@ -257,6 +261,8 @@ pub async fn enqueue_studio_gen2_handler(
output_width: request.output_width,
output_height: request.output_height,
fps: request.fps,
max_frames: request.max_frames,
rounds: request.rounds,
};
info!("Creating ComfyUI job record...");