add webm support
This commit is contained in:
parent
ef64ba589b
commit
0f29ba76c2
1 changed files with 6 additions and 3 deletions
|
@ -117,7 +117,7 @@ async fn send_image_to_dd(
|
|||
.await?;
|
||||
|
||||
let body = resp.text().await?;
|
||||
log::info!("body: {}", &body);
|
||||
log::info!("sd body: {}", &body);
|
||||
let json_response: WrappedResponse = serde_json::from_str(&body)?;
|
||||
|
||||
log::debug!("called!");
|
||||
|
@ -134,6 +134,8 @@ async fn send_image_to_dd(
|
|||
map.insert("image", &file_base64);
|
||||
|
||||
let serialized_map = serde_json::to_vec(&map).unwrap();
|
||||
let len = serialized_map.len();
|
||||
log::info!("wd14 request length {} bytes", len);
|
||||
|
||||
let resp = reqwest::Client::new()
|
||||
.post(format!("{}/tagger/v1/interrogate", url))
|
||||
|
@ -142,7 +144,7 @@ async fn send_image_to_dd(
|
|||
.await?;
|
||||
|
||||
let body = resp.text().await?;
|
||||
log::info!("body: {}", &body);
|
||||
log::info!("wd14 body: {}", &body);
|
||||
let json_response: WD14Response = serde_json::from_str(&body)?;
|
||||
|
||||
// turn WD14Response into WrappedResponse
|
||||
|
@ -235,7 +237,8 @@ async fn upload_file(
|
|||
let file_name = maybe_file_name.unwrap();
|
||||
let is_video = file_type.starts_with("video/")
|
||||
|| file_name.ends_with(".mp4")
|
||||
|| file_name.ends_with(".gif");
|
||||
|| file_name.ends_with(".gif")
|
||||
|| file_name.ends_with(".webm");
|
||||
if is_video {
|
||||
let mut final_tag_set = HashSet::new();
|
||||
|
||||
|
|
Loading…
Reference in a new issue