mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-10 03:51:25 +00:00
remove cropping arg from comfyui
This commit is contained in:
1 parent
061cae7378
commit
54f08192ed
4 files changed
+25
-25
No files matched your search
@@ -72,11 +72,11 @@ pub struct WorkflowArgs {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub target_fps: Option<u32>,
|
||||
|
||||
#[serde(rename = "sw")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub scale_width: Option<u32>,
|
||||
|
||||
#[serde(rename = "sh")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub scale_height: Option<u32>
|
||||
// #[serde(rename = "sw")]
|
||||
// #[serde(skip_serializing_if = "Option::is_none")]
|
||||
// pub scale_width: Option<u32>,
|
||||
//
|
||||
// #[serde(rename = "sh")]
|
||||
// #[serde(skip_serializing_if = "Option::is_none")]
|
||||
// pub scale_height: Option<u32>
|
||||
}
|
||||
@@ -316,8 +316,8 @@ pub async fn process_job(args: ComfyProcessJobArgs<'_>) -> Result<JobSuccessResu
|
||||
// ========================= PROCESS VIDEO ======================== //
|
||||
|
||||
// get params from comfy args
|
||||
let vid_max_height = comfy_args.scale_width.unwrap_or(768);
|
||||
let vid_max_width = comfy_args.scale_height.unwrap_or(768);
|
||||
// let vid_max_height = comfy_args.scale_width.unwrap_or(768);
|
||||
// let vid_max_width = comfy_args.scale_height.unwrap_or(768);
|
||||
let target_fps = comfy_args.target_fps.unwrap_or(24);
|
||||
let trim_start_seconds = comfy_args.trim_start_seconds.unwrap_or(0);
|
||||
let trim_end_seconds = comfy_args.trim_end_seconds.unwrap_or(3);
|
||||
@@ -327,7 +327,7 @@ pub async fn process_job(args: ComfyProcessJobArgs<'_>) -> Result<JobSuccessResu
|
||||
let output = Command::new("python3")
|
||||
.arg(video_processing_script)
|
||||
.arg(input_path.clone())
|
||||
.arg(format!("{:?}x{:?}", vid_max_width, vid_max_height))
|
||||
// .arg(format!("{:?}x{:?}", vid_max_width, vid_max_height))
|
||||
.arg(format!("{:?}", trim_start_seconds * 1000))
|
||||
.arg(format!("{:?}", trim_end_seconds * 1000))
|
||||
.arg(format!("{:?}", target_fps))
|
||||
|
||||
+13
-13
@@ -58,8 +58,8 @@ pub struct EnqueueComfyRequest {
|
||||
maybe_trim_end_seconds: Option<u32>,
|
||||
|
||||
maybe_target_fps: Option<u32>,
|
||||
maybe_scale_width: Option<u32>,
|
||||
maybe_scale_height: Option<u32>,
|
||||
// maybe_scale_width: Option<u32>,
|
||||
// maybe_scale_height: Option<u32>,
|
||||
|
||||
creator_set_visibility: Option<Visibility>,
|
||||
}
|
||||
@@ -222,15 +222,15 @@ pub async fn enqueue_comfy_ui_handler(
|
||||
target_fps = 24;
|
||||
}
|
||||
|
||||
let mut scale_width = request.maybe_scale_width.unwrap_or(1024);
|
||||
let mut scale_height = request.maybe_scale_height.unwrap_or(1024);
|
||||
|
||||
if scale_width < 768 || scale_width > 1024 {
|
||||
scale_width = 768;
|
||||
}
|
||||
if scale_height < 768 || scale_height > 1024 {
|
||||
scale_height = 768;
|
||||
}
|
||||
// let mut scale_width = request.maybe_scale_width.unwrap_or(1024);
|
||||
// let mut scale_height = request.maybe_scale_height.unwrap_or(1024);
|
||||
//
|
||||
// if scale_width < 768 || scale_width > 1024 {
|
||||
// scale_width = 768;
|
||||
// }
|
||||
// if scale_height < 768 || scale_height > 1024 {
|
||||
// scale_height = 768;
|
||||
// }
|
||||
|
||||
// Plan should handle "first anonymous use" and "investor" cases.
|
||||
let plan = get_correct_plan_for_session(
|
||||
@@ -266,8 +266,8 @@ pub async fn enqueue_comfy_ui_handler(
|
||||
trim_start_seconds: Some(trim_start_seconds),
|
||||
trim_end_seconds: Some(trim_end_seconds),
|
||||
target_fps:Some(target_fps),
|
||||
scale_width:Some(scale_width),
|
||||
scale_height:Some(scale_height)
|
||||
// scale_width:Some(scale_width),
|
||||
// scale_height:Some(scale_height)
|
||||
};
|
||||
|
||||
info!("Creating ComfyUI job record...");
|
||||
|
||||
+2
-2
@@ -238,8 +238,8 @@ pub async fn enqueue_workflow_upload_request(
|
||||
trim_start_seconds: None,
|
||||
trim_end_seconds: None,
|
||||
target_fps: None,
|
||||
scale_width: None,
|
||||
scale_height: None,
|
||||
// scale_width: None,
|
||||
// scale_height: None,
|
||||
};
|
||||
|
||||
// create the inference args here
|
||||
|
||||
Reference in new issue
Block a user