mirror of
https://github.com/storytold/artcraft.git
synced 2026-10-31 15:37:49 +00:00
fix frontend bug sending empty IPA tokens to VST
This commit is contained in:
1 parent
4def6ebd47
commit
3a3e85abd0
3 files changed
+26
-1
No files matched your search
@@ -0,0 +1,15 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
select *
|
||||
from generic_inference_jobs
|
||||
where job_type = 'comfy_ui'
|
||||
and status NOT IN (
|
||||
'pending',
|
||||
'started',
|
||||
'complete_success'
|
||||
)
|
||||
order by id desc
|
||||
limit 5\G
|
||||
|
||||
@@ -9,6 +9,15 @@ pub trait TrimOrEmptyable {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Can't create this due to conflicting implementations
|
||||
// impl<T> TrimOrEmptyable for T
|
||||
// where T: AsRef<str>
|
||||
// {
|
||||
// fn trim_or_empty(&self) -> Option<&str> {
|
||||
// self.as_ref().trim_or_empty()
|
||||
// }
|
||||
// }
|
||||
|
||||
impl TrimOrEmptyable for Option<&str> {
|
||||
fn trim_or_empty(&self) -> Option<&str> {
|
||||
self.map(|s| s.trim())
|
||||
|
||||
+2
-1
@@ -355,7 +355,8 @@ pub async fn enqueue_video_style_transfer_handler(
|
||||
negative_prompt: request.negative_prompt.new_string_trim_or_empty(),
|
||||
global_ip_adapter_token: request.global_ipa_media_token
|
||||
.as_ref()
|
||||
.trim_or_empty()
|
||||
// NB: Frontend is mistakenly sending empty string - ignore it
|
||||
.filter(|t| t.as_str().trim_or_empty().is_some())
|
||||
.map(|t| t.clone()),
|
||||
strength: maybe_strength,
|
||||
|
||||
|
||||
Reference in new issue
Block a user