fix: avoid multi-image relay requests
这个提交存在于:
父节点
0feb76f214
当前提交
b57ce466fe
共有 8 个文件被更改,包括 16 次插入 和 15 次删除
|
|
@ -1,3 +1,7 @@
|
|||
## 1.0.59
|
||||
|
||||
- Reduce grouped consensus vision calls to one representative image plus structured reports to avoid relay multi-image stalls.
|
||||
|
||||
## 1.0.58
|
||||
|
||||
- Split large style consensus requests into grouped multi-image analysis plus a compact final merge to reduce provider timeouts.
|
||||
|
|
|
|||
|
|
@ -1469,10 +1469,10 @@ class AdvancedStyleSetService:
|
|||
partial_analyses: list[dict[str, Any]] = []
|
||||
for group_index, group in enumerate(groups):
|
||||
group_reports = [item for item in source_reports if item["source_id"] in {source.source_id for source in group}]
|
||||
group_urls = [
|
||||
_storage_image_data_url(source.source_image_uri, {}, self.storage)[0]
|
||||
for source in group
|
||||
]
|
||||
# Some OpenAI-compatible relays stall on multiple image
|
||||
# parts. Keep one visual anchor and carry the remaining
|
||||
# evidence through the normalized source reports.
|
||||
group_urls = [_storage_image_data_url(group[0].source_image_uri, {}, self.storage)[0]]
|
||||
partial_request = VisionRecognitionRequest(
|
||||
display_name=f"{record.display_name} / style consensus group {group_index + 1}",
|
||||
image_uri=group_urls[0],
|
||||
|
|
@ -1529,10 +1529,7 @@ class AdvancedStyleSetService:
|
|||
)
|
||||
|
||||
representative_sources = [group[0] for group in groups[:2]]
|
||||
final_urls = [
|
||||
_storage_image_data_url(source.source_image_uri, {}, self.storage)[0]
|
||||
for source in representative_sources
|
||||
]
|
||||
final_urls = [_storage_image_data_url(representative_sources[0].source_image_uri, {}, self.storage)[0]]
|
||||
image_manifest = [
|
||||
{
|
||||
"image_index": index,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
plugin:
|
||||
name: astrbot_plugin_imagestudio
|
||||
display_name: ImageStudio
|
||||
version: 1.0.58
|
||||
version: 1.0.59
|
||||
|
||||
features:
|
||||
quick_profile: true
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ from core.runtime_paths import resolve_config_path
|
|||
from database.db_helper import load_config_payload
|
||||
|
||||
|
||||
PLUGIN_VERSION = "1.0.58"
|
||||
PLUGIN_VERSION = "1.0.59"
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
|
|
|
|||
4
frontend/package-lock.json
自动生成
4
frontend/package-lock.json
自动生成
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "astrbot-plugin-imagestudio-frontend",
|
||||
"version": "1.0.58",
|
||||
"version": "1.0.59",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "astrbot-plugin-imagestudio-frontend",
|
||||
"version": "1.0.58",
|
||||
"version": "1.0.59",
|
||||
"dependencies": {
|
||||
"@vitejs/plugin-vue": "^5.2.0",
|
||||
"pinia": "^2.3.0",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "astrbot-plugin-imagestudio-frontend",
|
||||
"version": "1.0.58",
|
||||
"version": "1.0.59",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ name: astrbot_plugin_imagestudio
|
|||
display_name: ImageStudio
|
||||
desc: AstrBot >=4.25 ImageStudio role asset and image-generation workspace for Windows, Linux, macOS and Docker.
|
||||
short_desc: AstrBot 鍐呯殑瑙掕壊璧勪骇銆佸伐浣滄祦涓庡浘鐗囩敓鎴愮鐞嗗伐浣滃彴銆?
|
||||
version: 1.0.58
|
||||
version: 1.0.59
|
||||
author: YokiiroBW
|
||||
repo: "http://192.168.31.210:18085/YokiiroBW/astrbot_plugin_imagestudio"
|
||||
astrbot_version: ">=4.25.0,<5"
|
||||
|
|
|
|||
|
|
@ -566,7 +566,7 @@ class AdvancedStyleSetWorkflowTests(unittest.TestCase):
|
|||
|
||||
consensus_requests = fixture.vision.requests[8:]
|
||||
self.assertEqual(len(consensus_requests), 3)
|
||||
self.assertEqual([1 + len(item.image_uris) for item in consensus_requests], [4, 4, 2])
|
||||
self.assertEqual([1 + len(item.image_uris) for item in consensus_requests], [1, 1, 1])
|
||||
self.assertEqual(
|
||||
[json.loads(str(item.prompt)).get("analysis_mode") for item in consensus_requests],
|
||||
["partial_style_consensus", "partial_style_consensus", "final_style_consensus"],
|
||||
|
|
|
|||
正在加载…
添加表格
在新工单中引用