From cf3d8af2604fce427fd555c00111d7c683e78188 Mon Sep 17 00:00:00 2001 From: RockYang Date: Fri, 16 Feb 2024 18:08:29 +0800 Subject: [PATCH] fix: Upscale and Variation task overrite each other --- api/service/mj/service.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/service/mj/service.go b/api/service/mj/service.go index d354456c..8d9ec9ef 100644 --- a/api/service/mj/service.go +++ b/api/service/mj/service.go @@ -137,6 +137,12 @@ func (s *Service) Notify(data CBReq) { } else { tx = tx.Where("task_id = ?", split[0]) } + // fixed: 修复 U/V 操作任务混淆覆盖的 Bug + if strings.Contains(data.Prompt, "** - Image #") { // for upscale + tx = tx.Where("type = ?", types.TaskUpscale.String()) + } else if strings.Contains(data.Prompt, "** - Variations (Strong)") { // for Variations + tx = tx.Where("type = ?", types.TaskVariation.String()) + } res = tx.First(&job) if res.Error != nil { logger.Warn("非法任务:", res.Error)