HEL-892: pin subtitle and advanced audio reference protocols
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -0,0 +1,132 @@
|
||||
"""Verify frozen public sources and execute ONLY extracted core serialization methods.
|
||||
|
||||
No plugin imports, torch, model loading, audio encoding, service access or generation.
|
||||
Use --fetch to download the pinned Python source files into --source-dir.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import ast
|
||||
import hashlib
|
||||
import json
|
||||
from enum import Enum
|
||||
from pathlib import Path
|
||||
from types import SimpleNamespace
|
||||
from urllib.request import urlopen
|
||||
|
||||
REPO = Path(__file__).resolve().parents[2]
|
||||
CONTRACTS = REPO / "calliope-backend/src/calliope/comfyui/protocol_references.json"
|
||||
|
||||
|
||||
def verify(source_dir: Path, fetch: bool = False) -> dict:
|
||||
data = json.loads(CONTRACTS.read_text(encoding="utf-8"))
|
||||
trees = {}
|
||||
verified = []
|
||||
for source in data["sources"]:
|
||||
cache = source.get("cache_directory", source["repository"].rsplit("/", 1)[-1])
|
||||
path = source_dir / cache / source["file"]
|
||||
if fetch:
|
||||
with urlopen(source["raw_url"], timeout=30) as response:
|
||||
raw = response.read()
|
||||
if hashlib.sha256(raw).hexdigest() != source["sha256"]:
|
||||
raise ValueError(f"Source hash mismatch: {source['id']}")
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
path.write_bytes(raw)
|
||||
raw = path.read_bytes()
|
||||
if hashlib.sha256(raw).hexdigest() != source["sha256"]:
|
||||
raise ValueError(f"Source hash mismatch: {source['id']}")
|
||||
trees[source["id"]] = ast.parse(raw.decode("utf-8"))
|
||||
verified.append({"id": source["id"], "sha256": source["sha256"]})
|
||||
|
||||
# Execute only these two core dict wrappers, after full-file hash verification.
|
||||
# Enum/base stand-ins avoid importing ComfyUI or any of its dependencies.
|
||||
folder_type = Enum("FolderType", {"output": "output"})
|
||||
namespace = {"FolderType": folder_type, "_UIOutput": object}
|
||||
wrappers = [
|
||||
n
|
||||
for n in trees["core-ui"].body
|
||||
if isinstance(n, ast.ClassDef) and n.name in ("SavedResult", "SavedAudios")
|
||||
]
|
||||
module = ast.Module(
|
||||
body=[
|
||||
ast.ImportFrom(module="__future__", names=[ast.alias(name="annotations")], level=0),
|
||||
*wrappers,
|
||||
],
|
||||
type_ignores=[],
|
||||
)
|
||||
exec(compile(ast.fix_missing_locations(module), "<pinned-core-wrappers>", "exec"), namespace)
|
||||
descriptor = namespace["SavedResult"]("music_00001.mp3", "audio", folder_type.output)
|
||||
audio_ui = namespace["SavedAudios"]([descriptor]).as_dict()
|
||||
|
||||
preview = next(n for n in trees["core-preview"].body if isinstance(n, ast.ClassDef))
|
||||
method = next(n for n in preview.body if isinstance(n, ast.FunctionDef) and n.name == "main")
|
||||
namespace = {"json": json, "torch": SimpleNamespace(set_printoptions=lambda **kw: None)}
|
||||
exec(
|
||||
compile(ast.Module(body=[method], type_ignores=[]), "<pinned-core-preview>", "exec"),
|
||||
namespace,
|
||||
)
|
||||
values = ["正文", "0.00-1.20: 字幕文本", "Chinese", ""]
|
||||
preview_ui = {
|
||||
str(n): namespace["main"](None, values[slot])["ui"]
|
||||
for n, slot in [(1, 3), (2, 1), (3, 2), (4, 0)]
|
||||
}
|
||||
# The source graph claims core 0.11.0. Its preview has no result socket,
|
||||
# while the newer reference has one. Both serialize the same text UI.
|
||||
old_preview = next(n for n in trees["core-preview-v011"].body if isinstance(n, ast.ClassDef))
|
||||
old_method = next(
|
||||
n for n in old_preview.body if isinstance(n, ast.FunctionDef) and n.name == "main"
|
||||
)
|
||||
old_namespace = {"json": json}
|
||||
exec(
|
||||
compile(ast.Module(body=[old_method], type_ignores=[]), "<pinned-011-preview>", "exec"),
|
||||
old_namespace,
|
||||
)
|
||||
old_result = old_namespace["main"](None, "字幕文本")
|
||||
assert old_result == {"ui": {"text": ("字幕文本",)}}
|
||||
assert namespace["main"](None, "字幕文本")["result"] == ("字幕文本",)
|
||||
subtitle = next(
|
||||
n
|
||||
for n in trees["qwen-subtitle"].body
|
||||
if isinstance(n, ast.ClassDef) and n.name == "AILab_Qwen3ASRSubtitle"
|
||||
)
|
||||
literal_attributes = {
|
||||
n.targets[0].id: ast.literal_eval(n.value)
|
||||
for n in subtitle.body
|
||||
if isinstance(n, ast.Assign)
|
||||
and isinstance(n.targets[0], ast.Name)
|
||||
and n.targets[0].id in ("RETURN_TYPES", "RETURN_NAMES")
|
||||
}
|
||||
assert literal_attributes["RETURN_TYPES"] == ("STRING",) * 4
|
||||
assert literal_attributes["RETURN_NAMES"] == ("TEXT", "SUBTITLES", "LANGUAGE", "OUTPUT_PATH")
|
||||
return {
|
||||
"evidence_layer": "pinned_source_serialization_contract_fixture",
|
||||
"target_history_observed": False,
|
||||
"verified_sources": verified,
|
||||
"execution_boundary": "AST-extracted SavedResult/SavedAudios and PreviewAny.main "
|
||||
"(current and v0.11.0) only; "
|
||||
"torch print configuration stubbed; subtitle class parsed, never executed; "
|
||||
"no audio encoder, plugin imports, model or ComfyUI execution",
|
||||
"subtitle_return_names": literal_attributes["RETURN_NAMES"],
|
||||
"preview_v011_has_result": "result" in old_result,
|
||||
"subtitle_history_fixture": {"outputs": preview_ui},
|
||||
"audio_history_fixture": {"outputs": {"35": audio_ui}},
|
||||
}
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--source-dir", type=Path, required=True)
|
||||
parser.add_argument("--fetch", action="store_true")
|
||||
parser.add_argument("--output", type=Path, required=True)
|
||||
args = parser.parse_args()
|
||||
result = verify(args.source_dir, args.fetch)
|
||||
args.output.parent.mkdir(parents=True, exist_ok=True)
|
||||
args.output.write_text(
|
||||
json.dumps(result, ensure_ascii=False, indent=2) + "\n", encoding="utf-8"
|
||||
)
|
||||
print(f"Verified {len(result['verified_sources'])} pinned source files; serialization only")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -375,19 +375,34 @@ class ComfyUIClient:
|
||||
for node_id, node_out in (history.get("outputs") or {}).items():
|
||||
if node_kinds is not None and str(node_id) not in node_kinds:
|
||||
continue
|
||||
if not isinstance(node_out, dict):
|
||||
continue
|
||||
for key in ("images", "gifs", "videos", "audio", "audios", "files"):
|
||||
items = node_out.get(key) or []
|
||||
if not isinstance(items, list):
|
||||
continue
|
||||
for item in items:
|
||||
if not isinstance(item, dict) or not item.get("filename"):
|
||||
if not isinstance(item, dict):
|
||||
continue
|
||||
filename = item.get("filename")
|
||||
subfolder = item.get("subfolder", "")
|
||||
folder_type = item.get("type", "output")
|
||||
if (
|
||||
not isinstance(filename, str) or not filename.strip()
|
||||
or filename in (".", "..")
|
||||
or any(c in filename for c in ("/", "\\", ":", "\0"))
|
||||
or not isinstance(subfolder, str)
|
||||
or "\0" in subfolder or ":" in subfolder
|
||||
or subfolder.replace("\\", "/").startswith("/")
|
||||
or ".." in subfolder.replace("\\", "/").split("/")
|
||||
or folder_type not in ("input", "output", "temp")
|
||||
):
|
||||
continue
|
||||
filename = item["filename"]
|
||||
outputs.append(
|
||||
{
|
||||
"filename": filename,
|
||||
"subfolder": item.get("subfolder", ""),
|
||||
"type": item.get("type", "output"),
|
||||
"subfolder": subfolder,
|
||||
"type": folder_type,
|
||||
"node_id": str(node_id),
|
||||
"media_kind": self._infer_media_kind(filename, key) or "",
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import json
|
||||
from pathlib import Path
|
||||
|
||||
from calliope.comfyui.delivery_scope import exclusion_for
|
||||
from calliope.comfyui.protocol_references import companion_protocol_reference
|
||||
from calliope.comfyui.ui2api import convert
|
||||
|
||||
|
||||
@@ -214,6 +215,9 @@ def resolve_companion(record: dict, source_path: str, raw: bytes, source: dict):
|
||||
audit["comparison"] = source_comparison(source, api)
|
||||
if problem:
|
||||
return None, audit, [{"code": "companion_invalid", "message": problem}, *checked.issues]
|
||||
reference = companion_protocol_reference(binding, api)
|
||||
if reference:
|
||||
audit["output_protocol_reference"] = reference
|
||||
# Always a blocker: no snapshot or output heuristic may promote this pair to executable.
|
||||
return (
|
||||
api,
|
||||
|
||||
@@ -17,6 +17,7 @@ from calliope.comfyui.lint import workflow_warnings
|
||||
from calliope.comfyui.output_map import auto_output_map, needs_user_output_map
|
||||
from calliope.comfyui.parser import classify_usage, parse_dynamic_inputs, parse_dynamic_outputs
|
||||
from calliope.comfyui.preflight import check_workflow_against
|
||||
from calliope.comfyui.protocol_references import companion_protocol_reference
|
||||
from calliope.comfyui.source_reviews import review_for
|
||||
from calliope.comfyui.ui2api import convert
|
||||
|
||||
@@ -341,7 +342,13 @@ def import_library(
|
||||
companion = (companions or {}).get(relative)
|
||||
# Version companion documentation separately from the immutable received bytes.
|
||||
companion_sha = hashlib.sha256(
|
||||
_json({"record": companion, "doc_version": 1} if companion else None).encode()
|
||||
_json({
|
||||
"record": companion,
|
||||
"doc_version": 2,
|
||||
"output_protocol_reference": companion_protocol_reference(
|
||||
companion["binding"], json.loads(companion["raw"].lstrip("\ufeff"))
|
||||
),
|
||||
} if companion else None).encode()
|
||||
).hexdigest()
|
||||
if existing and fingerprint(dict(existing)) != existing["library_fingerprint"]:
|
||||
report["files"].append(
|
||||
@@ -450,6 +457,16 @@ def import_library(
|
||||
)
|
||||
)
|
||||
doc["steps"].insert(0, companion_audit["binding"]["instruction"])
|
||||
reference = companion_audit.get("output_protocol_reference")
|
||||
if reference:
|
||||
doc["steps"].extend(
|
||||
"公开固定版本参考(目标版本未核对):" + c["summary"]
|
||||
for c in reference["contracts"].values()
|
||||
)
|
||||
doc["steps"].extend(
|
||||
"版本差异:" + difference
|
||||
for difference in reference["binding"].get("version_differences", [])
|
||||
)
|
||||
doc["snapshot_sha"] = snapshot_sha
|
||||
doc["source_review_sha"] = review_sha
|
||||
judgment = classify_usage(prompt or {})
|
||||
|
||||
@@ -0,0 +1,641 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"authority": "reference_only_not_object_info",
|
||||
"target_version_match": "unknown",
|
||||
"target_history_observed": false,
|
||||
"sources": [
|
||||
{
|
||||
"id": "core-preview",
|
||||
"repository": "https://github.com/Comfy-Org/ComfyUI",
|
||||
"commit": "fd7639f477050e5c25b68fc38a9c2a6b6d988211",
|
||||
"file": "comfy_extras/nodes_preview_any.py",
|
||||
"lines": [
|
||||
[
|
||||
8,
|
||||
44
|
||||
]
|
||||
],
|
||||
"url": "https://github.com/Comfy-Org/ComfyUI/blob/fd7639f477050e5c25b68fc38a9c2a6b6d988211/comfy_extras/nodes_preview_any.py",
|
||||
"raw_url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/fd7639f477050e5c25b68fc38a9c2a6b6d988211/comfy_extras/nodes_preview_any.py",
|
||||
"sha256": "48cffa3b2ddd08c311af609642da8703abc9bac9e624c400c3dc41f6edcea930",
|
||||
"retrieved_at": "2026-10-29T14:42:43.157537+00:00",
|
||||
"evidence_layer": "public_reference_source",
|
||||
"target_version_match": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "core-audio",
|
||||
"repository": "https://github.com/Comfy-Org/ComfyUI",
|
||||
"commit": "fd7639f477050e5c25b68fc38a9c2a6b6d988211",
|
||||
"file": "comfy_extras/nodes_audio.py",
|
||||
"lines": [
|
||||
[
|
||||
290,
|
||||
333
|
||||
],
|
||||
[
|
||||
908,
|
||||
936
|
||||
]
|
||||
],
|
||||
"url": "https://github.com/Comfy-Org/ComfyUI/blob/fd7639f477050e5c25b68fc38a9c2a6b6d988211/comfy_extras/nodes_audio.py",
|
||||
"raw_url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/fd7639f477050e5c25b68fc38a9c2a6b6d988211/comfy_extras/nodes_audio.py",
|
||||
"sha256": "483466af050a43bf96f9fcdfa56ab2759dbf8611dd6a14a9543f6d136ecbdf43",
|
||||
"retrieved_at": "2026-10-29T14:42:43.157600+00:00",
|
||||
"evidence_layer": "public_reference_source",
|
||||
"target_version_match": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "core-ui",
|
||||
"repository": "https://github.com/Comfy-Org/ComfyUI",
|
||||
"commit": "fd7639f477050e5c25b68fc38a9c2a6b6d988211",
|
||||
"file": "comfy_api/latest/_ui.py",
|
||||
"lines": [
|
||||
[
|
||||
23,
|
||||
61
|
||||
],
|
||||
[
|
||||
256,
|
||||
385
|
||||
]
|
||||
],
|
||||
"url": "https://github.com/Comfy-Org/ComfyUI/blob/fd7639f477050e5c25b68fc38a9c2a6b6d988211/comfy_api/latest/_ui.py",
|
||||
"raw_url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/fd7639f477050e5c25b68fc38a9c2a6b6d988211/comfy_api/latest/_ui.py",
|
||||
"sha256": "339cc100b45208f83f119ca76f48050bf723aea3377003357e8928a7ef85d025",
|
||||
"retrieved_at": "2026-10-29T14:42:43.157629+00:00",
|
||||
"evidence_layer": "public_reference_source",
|
||||
"target_version_match": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "core-io",
|
||||
"repository": "https://github.com/Comfy-Org/ComfyUI",
|
||||
"commit": "fd7639f477050e5c25b68fc38a9c2a6b6d988211",
|
||||
"file": "comfy_api/latest/_io.py",
|
||||
"lines": [
|
||||
[
|
||||
1230,
|
||||
1286
|
||||
],
|
||||
[
|
||||
2095,
|
||||
2140
|
||||
]
|
||||
],
|
||||
"url": "https://github.com/Comfy-Org/ComfyUI/blob/fd7639f477050e5c25b68fc38a9c2a6b6d988211/comfy_api/latest/_io.py",
|
||||
"raw_url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/fd7639f477050e5c25b68fc38a9c2a6b6d988211/comfy_api/latest/_io.py",
|
||||
"sha256": "c2a5aded4895a1adf1acb2df6c011fdfb74e15b0d4fd331ec00ea7562d91d91d",
|
||||
"retrieved_at": "2026-10-29T14:42:43.157714+00:00",
|
||||
"evidence_layer": "public_reference_source",
|
||||
"target_version_match": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "core-history",
|
||||
"repository": "https://github.com/Comfy-Org/ComfyUI",
|
||||
"commit": "fd7639f477050e5c25b68fc38a9c2a6b6d988211",
|
||||
"file": "execution.py",
|
||||
"lines": [
|
||||
[
|
||||
361,
|
||||
423
|
||||
],
|
||||
[
|
||||
566,
|
||||
580
|
||||
],
|
||||
[
|
||||
830,
|
||||
838
|
||||
]
|
||||
],
|
||||
"url": "https://github.com/Comfy-Org/ComfyUI/blob/fd7639f477050e5c25b68fc38a9c2a6b6d988211/execution.py",
|
||||
"raw_url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/fd7639f477050e5c25b68fc38a9c2a6b6d988211/execution.py",
|
||||
"sha256": "40c5306bc8d032aea90b93a7e1ef4ca137e0cf372187132d32b99ae070ba3d87",
|
||||
"retrieved_at": "2026-10-29T14:42:43.157785+00:00",
|
||||
"evidence_layer": "public_reference_source",
|
||||
"target_version_match": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "qwen-subtitle",
|
||||
"repository": "https://github.com/1038lab/ComfyUI-QwenASR",
|
||||
"commit": "3f9a652a617e578e4e3bd090e3dbc75274bf4775",
|
||||
"file": "AILab_QwenASR.py",
|
||||
"lines": [
|
||||
[
|
||||
1021,
|
||||
1173
|
||||
]
|
||||
],
|
||||
"url": "https://github.com/1038lab/ComfyUI-QwenASR/blob/3f9a652a617e578e4e3bd090e3dbc75274bf4775/AILab_QwenASR.py",
|
||||
"raw_url": "https://raw.githubusercontent.com/1038lab/ComfyUI-QwenASR/3f9a652a617e578e4e3bd090e3dbc75274bf4775/AILab_QwenASR.py",
|
||||
"sha256": "f8cda2d0d39517f93ace1a73263146a4bea59a02604e58919a05393c45ade6b7",
|
||||
"retrieved_at": "2026-10-29T14:42:43.157828+00:00",
|
||||
"evidence_layer": "public_reference_source",
|
||||
"target_version_match": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "qwen-registration",
|
||||
"repository": "https://github.com/1038lab/ComfyUI-QwenASR",
|
||||
"commit": "3f9a652a617e578e4e3bd090e3dbc75274bf4775",
|
||||
"file": "__init__.py",
|
||||
"lines": [
|
||||
[
|
||||
17,
|
||||
41
|
||||
]
|
||||
],
|
||||
"url": "https://github.com/1038lab/ComfyUI-QwenASR/blob/3f9a652a617e578e4e3bd090e3dbc75274bf4775/__init__.py",
|
||||
"raw_url": "https://raw.githubusercontent.com/1038lab/ComfyUI-QwenASR/3f9a652a617e578e4e3bd090e3dbc75274bf4775/__init__.py",
|
||||
"sha256": "0919008142c12f8fe9a12671a1ca1de548ded128dd7287a13f6230d9729b47c2",
|
||||
"retrieved_at": "2026-10-29T14:42:43.157847+00:00",
|
||||
"evidence_layer": "public_reference_source",
|
||||
"target_version_match": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "core-preview-v011",
|
||||
"repository": "https://github.com/Comfy-Org/ComfyUI",
|
||||
"commit": "09725967cf76304371c390ca1d6483e04061da48",
|
||||
"tag": "v0.11.0",
|
||||
"cache_directory": "ComfyUI-v0.11.0",
|
||||
"file": "comfy_extras/nodes_preview_any.py",
|
||||
"lines": [
|
||||
[
|
||||
7,
|
||||
38
|
||||
]
|
||||
],
|
||||
"url": "https://github.com/Comfy-Org/ComfyUI/blob/09725967cf76304371c390ca1d6483e04061da48/comfy_extras/nodes_preview_any.py",
|
||||
"raw_url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/09725967cf76304371c390ca1d6483e04061da48/comfy_extras/nodes_preview_any.py",
|
||||
"sha256": "f8c526dbc4ec512f88a067524865f59eb24db636858f37d601e848885b2d0751",
|
||||
"retrieved_at": "2026-10-29T14:46:34.511211+00:00",
|
||||
"evidence_layer": "public_reference_source",
|
||||
"target_version_match": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "core-audio-v031",
|
||||
"repository": "https://github.com/Comfy-Org/ComfyUI",
|
||||
"commit": "43cb4fffc89bba20ab7bd61467a36d0339338dab",
|
||||
"tag": "v0.31.0",
|
||||
"cache_directory": "ComfyUI-v0.31.0",
|
||||
"file": "comfy_extras/nodes_audio.py",
|
||||
"lines": [
|
||||
[
|
||||
251,
|
||||
294
|
||||
],
|
||||
[
|
||||
869,
|
||||
896
|
||||
]
|
||||
],
|
||||
"url": "https://github.com/Comfy-Org/ComfyUI/blob/43cb4fffc89bba20ab7bd61467a36d0339338dab/comfy_extras/nodes_audio.py",
|
||||
"raw_url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/43cb4fffc89bba20ab7bd61467a36d0339338dab/comfy_extras/nodes_audio.py",
|
||||
"sha256": "82bb9dcf191a84cb0695bc2533602f7956e29a81a1176965556350b02e1bd67e",
|
||||
"retrieved_at": "2026-10-29T14:46:34.511264+00:00",
|
||||
"evidence_layer": "public_reference_source",
|
||||
"target_version_match": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "core-ui-v031",
|
||||
"repository": "https://github.com/Comfy-Org/ComfyUI",
|
||||
"commit": "43cb4fffc89bba20ab7bd61467a36d0339338dab",
|
||||
"tag": "v0.31.0",
|
||||
"cache_directory": "ComfyUI-v0.31.0",
|
||||
"file": "comfy_api/latest/_ui.py",
|
||||
"lines": [
|
||||
[
|
||||
27,
|
||||
65
|
||||
],
|
||||
[
|
||||
262,
|
||||
390
|
||||
]
|
||||
],
|
||||
"url": "https://github.com/Comfy-Org/ComfyUI/blob/43cb4fffc89bba20ab7bd61467a36d0339338dab/comfy_api/latest/_ui.py",
|
||||
"raw_url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/43cb4fffc89bba20ab7bd61467a36d0339338dab/comfy_api/latest/_ui.py",
|
||||
"sha256": "14c48175a06d4c5ad7b7dfc2e3809185f88eb93af068fe5df84703257ca66353",
|
||||
"retrieved_at": "2026-10-29T14:46:34.511291+00:00",
|
||||
"evidence_layer": "public_reference_source",
|
||||
"target_version_match": "unknown"
|
||||
}
|
||||
],
|
||||
"contracts": {
|
||||
"PreviewAny": {
|
||||
"references": [
|
||||
"core-preview",
|
||||
"core-history",
|
||||
"core-preview-v011"
|
||||
],
|
||||
"inputs": {
|
||||
"source": "ANY"
|
||||
},
|
||||
"return_types": [
|
||||
"STRING"
|
||||
],
|
||||
"ui": {
|
||||
"text": [
|
||||
"inline STRING"
|
||||
]
|
||||
},
|
||||
"history_key": "text",
|
||||
"file_descriptor": false,
|
||||
"summary": "公开参考版PreviewAny接收ANY的source并返回ui.text内联文字。原图声明的comfy-core 0.11.0对应官方tag无RETURN_TYPES出口且无result;较新固定commit增加STRING出口和result,但ui.text边界相同。原图声明不是目标机或API导出版本证明;正文、路径或看似SRT的文本均不自动转成文件。",
|
||||
"version_variants": {
|
||||
"v0.11.0": {
|
||||
"return_types": [],
|
||||
"ui": {
|
||||
"text": [
|
||||
"inline STRING"
|
||||
]
|
||||
},
|
||||
"result_present": false
|
||||
},
|
||||
"fd7639f": {
|
||||
"return_types": [
|
||||
"STRING"
|
||||
],
|
||||
"ui": {
|
||||
"text": [
|
||||
"inline STRING"
|
||||
]
|
||||
},
|
||||
"result_present": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"AILab_Qwen3ASRSubtitle": {
|
||||
"references": [
|
||||
"qwen-subtitle",
|
||||
"qwen-registration"
|
||||
],
|
||||
"inputs": {
|
||||
"audio": "AUDIO",
|
||||
"output_format": [
|
||||
"none",
|
||||
"txt",
|
||||
"srt"
|
||||
],
|
||||
"output_path": "STRING"
|
||||
},
|
||||
"return_types": [
|
||||
"STRING",
|
||||
"STRING",
|
||||
"STRING",
|
||||
"STRING"
|
||||
],
|
||||
"return_names": [
|
||||
"TEXT",
|
||||
"SUBTITLES",
|
||||
"LANGUAGE",
|
||||
"OUTPUT_PATH"
|
||||
],
|
||||
"output_node": false,
|
||||
"ui": null,
|
||||
"file_descriptor": false,
|
||||
"summary": "参考版四槽0 TEXT正文、1 SUBTITLES字幕文本、2 LANGUAGE语言、3 OUTPUT_PATH服务器路径,都是STRING。SUBTITLES为秒数区间加正文,缺时间戳时退回正文,并非SRT。output_format=none不写文件且路径为空;txt/srt分支可写服务端文件,但仅返回路径字符串,无可供/view下载的文件描述符;srt在无groups时也退回正文,不保证合法SRT。"
|
||||
},
|
||||
"SaveAudioAdvanced": {
|
||||
"references": [
|
||||
"core-audio",
|
||||
"core-ui",
|
||||
"core-io",
|
||||
"core-history",
|
||||
"core-audio-v031",
|
||||
"core-ui-v031"
|
||||
],
|
||||
"inputs": {
|
||||
"audio": "AUDIO",
|
||||
"filename_prefix": "STRING",
|
||||
"format": [
|
||||
"flac",
|
||||
"mp3",
|
||||
"opus"
|
||||
],
|
||||
"format.quality": {
|
||||
"mp3": [
|
||||
"V0",
|
||||
"128k",
|
||||
"320k"
|
||||
],
|
||||
"opus": [
|
||||
"64k",
|
||||
"96k",
|
||||
"128k",
|
||||
"192k",
|
||||
"320k"
|
||||
]
|
||||
}
|
||||
},
|
||||
"return_types": [
|
||||
"AUDIO"
|
||||
],
|
||||
"output_node": true,
|
||||
"ui": {
|
||||
"audio": [
|
||||
{
|
||||
"filename": "STRING",
|
||||
"subfolder": "STRING",
|
||||
"type": "output"
|
||||
}
|
||||
]
|
||||
},
|
||||
"history_key": "audio",
|
||||
"file_descriptor": true,
|
||||
"summary": "参考版SaveAudioAdvanced注册node_id同名;audio为AUDIO输入和透传输出,format为动态选项,API的format及format.quality经核心嵌套为format字典。execute调用AudioSaveHelper,再由SavedAudios.as_dict返回audio数组,每项有filename/subfolder/type=output。history.outputs[节点ID].audio可复用现有映射及/view收取;无需另造音频解析器。V0是MP3质量选项,真实编码、模型及目标版本尚未验证。"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"id": "02",
|
||||
"source_path": "example_ComfyUI_workflows/1-语音生成/Qwen3-ASR-Subtitle语音转字幕.json",
|
||||
"source_sha256": "47f9afa955a6a5dce37000cb6a15bac7516d26ff50b6398bda334c825552cfd8",
|
||||
"export_sha256": "daa40971b730076691721afe95e165932df94e3423f1fc44dcb7707026e7125b",
|
||||
"nodes": [
|
||||
{
|
||||
"node_id": "1",
|
||||
"class_type": "PreviewAny",
|
||||
"contract": "PreviewAny"
|
||||
},
|
||||
{
|
||||
"node_id": "2",
|
||||
"class_type": "PreviewAny",
|
||||
"contract": "PreviewAny"
|
||||
},
|
||||
{
|
||||
"node_id": "3",
|
||||
"class_type": "PreviewAny",
|
||||
"contract": "PreviewAny"
|
||||
},
|
||||
{
|
||||
"node_id": "4",
|
||||
"class_type": "PreviewAny",
|
||||
"contract": "PreviewAny"
|
||||
},
|
||||
{
|
||||
"node_id": "9",
|
||||
"class_type": "AILab_Qwen3ASRSubtitle",
|
||||
"contract": "AILab_Qwen3ASRSubtitle"
|
||||
}
|
||||
],
|
||||
"source_node_metadata": [
|
||||
{
|
||||
"node_id": "2",
|
||||
"class_type": "PreviewAny",
|
||||
"properties": {
|
||||
"Node name for S&R": "PreviewAny",
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.11.0",
|
||||
"ue_properties": {
|
||||
"widget_ue_connectable": {},
|
||||
"input_ue_unconnectable": {},
|
||||
"version": "7.5.2"
|
||||
}
|
||||
},
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"node_id": "4",
|
||||
"class_type": "PreviewAny",
|
||||
"properties": {
|
||||
"Node name for S&R": "PreviewAny",
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.11.0",
|
||||
"ue_properties": {
|
||||
"widget_ue_connectable": {},
|
||||
"input_ue_unconnectable": {},
|
||||
"version": "7.5.2"
|
||||
}
|
||||
},
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"node_id": "3",
|
||||
"class_type": "PreviewAny",
|
||||
"properties": {
|
||||
"Node name for S&R": "PreviewAny",
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.11.0",
|
||||
"ue_properties": {
|
||||
"widget_ue_connectable": {},
|
||||
"input_ue_unconnectable": {},
|
||||
"version": "7.5.2"
|
||||
}
|
||||
},
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"node_id": "1",
|
||||
"class_type": "PreviewAny",
|
||||
"properties": {
|
||||
"Node name for S&R": "PreviewAny",
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.11.0",
|
||||
"ue_properties": {
|
||||
"widget_ue_connectable": {},
|
||||
"input_ue_unconnectable": {},
|
||||
"version": "7.5.2"
|
||||
}
|
||||
},
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"node_id": "9",
|
||||
"class_type": "AILab_Qwen3ASRSubtitle",
|
||||
"properties": {
|
||||
"Node name for S&R": "AILab_Qwen3ASRSubtitle",
|
||||
"ue_properties": {
|
||||
"widget_ue_connectable": {},
|
||||
"input_ue_unconnectable": {},
|
||||
"version": "7.8"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"localized_name": "TEXT",
|
||||
"name": "TEXT",
|
||||
"type": "STRING",
|
||||
"links": [
|
||||
15
|
||||
]
|
||||
},
|
||||
{
|
||||
"localized_name": "SUBTITLES",
|
||||
"name": "SUBTITLES",
|
||||
"type": "STRING",
|
||||
"links": [
|
||||
16
|
||||
]
|
||||
},
|
||||
{
|
||||
"localized_name": "LANUGAGE",
|
||||
"name": "LANUGAGE",
|
||||
"type": "STRING",
|
||||
"links": [
|
||||
17
|
||||
]
|
||||
},
|
||||
{
|
||||
"localized_name": "OUTPUT_PATH",
|
||||
"name": "OUTPUT_PATH",
|
||||
"type": "STRING",
|
||||
"links": [
|
||||
18
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata_authority": "immutable_source_graph_claims_not_target_snapshot",
|
||||
"version_differences": [
|
||||
"原图槽名LANUGAGE拼写与公开参考版LANGUAGE不同;槽2均标STRING,不改原图。",
|
||||
"API的model/forced_aligner无-hf后缀,而参考源码默认值含-hf;不推断模型或版本相同。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "03",
|
||||
"source_path": "example_ComfyUI_workflows/2-音乐生成/minimax_music_文生音乐.json",
|
||||
"source_sha256": "0a655ead5a0da406159dceb46451439df0c02050becaaa25b3018abb41840284",
|
||||
"export_sha256": "91e6c2cea3747a03bbb71f661dbd016b28040781482b956365ff76a7a8b647ce",
|
||||
"nodes": [
|
||||
{
|
||||
"node_id": "35",
|
||||
"class_type": "SaveAudioAdvanced",
|
||||
"contract": "SaveAudioAdvanced"
|
||||
}
|
||||
],
|
||||
"source_node_metadata": [
|
||||
{
|
||||
"node_id": "35",
|
||||
"class_type": "SaveAudioAdvanced",
|
||||
"properties": {
|
||||
"Node name for S&R": "SaveAudioAdvanced",
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.31.0",
|
||||
"ue_properties": {
|
||||
"widget_ue_connectable": {},
|
||||
"version": "7.8",
|
||||
"input_ue_unconnectable": {}
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"localized_name": "audio",
|
||||
"name": "audio",
|
||||
"type": "AUDIO",
|
||||
"links": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata_authority": "immutable_source_graph_claims_not_target_snapshot",
|
||||
"version_differences": [
|
||||
"原图comfy-core ver=0.31.0可定位官方固定tag,其SaveAudioAdvanced/SavedAudios协议一致;不证明用户导出/目标机为该版本。"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "04",
|
||||
"source_path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_文生图_提示词增强.json",
|
||||
"source_sha256": "dfe10917d101bf1a8a8c20750f4360690ecd478e9eb33d16a59ea0c6f12c086c",
|
||||
"export_sha256": "2066b07b2ca5390ba3e795df6b43934dab83865b12870b6ff26d8c0ef24f091e",
|
||||
"nodes": [
|
||||
{
|
||||
"node_id": "459:472",
|
||||
"class_type": "PreviewAny",
|
||||
"contract": "PreviewAny"
|
||||
}
|
||||
],
|
||||
"source_node_metadata": [
|
||||
{
|
||||
"node_id": "459:472",
|
||||
"class_type": "PreviewAny",
|
||||
"properties": {
|
||||
"Node name for S&R": "PreviewAny",
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.38.0",
|
||||
"ue_properties": {
|
||||
"widget_ue_connectable": {},
|
||||
"version": "7.8",
|
||||
"input_ue_unconnectable": {}
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"localized_name": "字符串",
|
||||
"name": "STRING",
|
||||
"type": "STRING",
|
||||
"links": [
|
||||
687
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata_authority": "immutable_source_graph_claims_not_target_snapshot"
|
||||
},
|
||||
{
|
||||
"id": "07",
|
||||
"source_path": "example_ComfyUI_workflows/6-动作迁移/Wan_Animate2_动作迁移_for循环长视频.json",
|
||||
"source_sha256": "22b7853e22629822dd354b0b768e2961a53b4c2f480cfaceeaea9dc51c0f0d0b",
|
||||
"export_sha256": "b1b4f6a6c02d8d21701943c67b62805b1210fed17e7e26b618c58e112ea1d70d",
|
||||
"nodes": [
|
||||
{
|
||||
"node_id": "538",
|
||||
"class_type": "PreviewAny",
|
||||
"contract": "PreviewAny"
|
||||
},
|
||||
{
|
||||
"node_id": "607",
|
||||
"class_type": "PreviewAny",
|
||||
"contract": "PreviewAny"
|
||||
}
|
||||
],
|
||||
"source_node_metadata": [
|
||||
{
|
||||
"node_id": "538",
|
||||
"class_type": "PreviewAny",
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.31.1",
|
||||
"Node name for S&R": "PreviewAny",
|
||||
"ue_properties": {
|
||||
"widget_ue_connectable": {},
|
||||
"version": "7.8",
|
||||
"input_ue_unconnectable": {}
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"localized_name": "字符串",
|
||||
"name": "STRING",
|
||||
"type": "STRING",
|
||||
"links": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "607",
|
||||
"class_type": "PreviewAny",
|
||||
"properties": {
|
||||
"cnr_id": "comfy-core",
|
||||
"ver": "0.31.1",
|
||||
"Node name for S&R": "PreviewAny",
|
||||
"ue_properties": {
|
||||
"widget_ue_connectable": {},
|
||||
"input_ue_unconnectable": {},
|
||||
"version": "7.8"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"localized_name": "字符串",
|
||||
"name": "STRING",
|
||||
"type": "STRING",
|
||||
"links": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata_authority": "immutable_source_graph_claims_not_target_snapshot"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
"""Source-bound documentation references; never a registry or object_info snapshot."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def companion_protocol_reference(binding: dict, api: dict) -> dict | None:
|
||||
if not isinstance(api, dict):
|
||||
return None
|
||||
data = json.loads(Path(__file__).with_suffix(".json").read_text(encoding="utf-8"))
|
||||
case = next(
|
||||
(
|
||||
c
|
||||
for c in data["cases"]
|
||||
if all(
|
||||
c[k] == binding.get(k) for k in ("source_path", "source_sha256", "export_sha256")
|
||||
)
|
||||
),
|
||||
None,
|
||||
)
|
||||
if case is None or any(
|
||||
not isinstance(api.get(n["node_id"]), dict)
|
||||
or api[n["node_id"]].get("class_type") != n["class_type"]
|
||||
for n in case["nodes"]
|
||||
):
|
||||
return None
|
||||
names = {n["contract"] for n in case["nodes"]}
|
||||
contracts = {k: v for k, v in data["contracts"].items() if k in names}
|
||||
refs = {r for c in contracts.values() for r in c["references"]}
|
||||
return {
|
||||
"authority": data["authority"],
|
||||
"target_version_match": "unknown",
|
||||
"target_history_observed": False,
|
||||
"binding": case,
|
||||
"contracts": contracts,
|
||||
"sources": [s for s in data["sources"] if s["id"] in refs],
|
||||
"unresolved": [
|
||||
"用户导出和目标机节点包版本未知;参考源码不证明目标环境匹配",
|
||||
"尚无目标history响应;未验证实际文件、字幕格式或媒体编码",
|
||||
"源图差异/子图展开仍未证明等价;保持companion_unverified与停用",
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
"""Public-source contract fixtures, never target history or real generation evidence."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import copy
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import httpx
|
||||
import pytest
|
||||
|
||||
from calliope.comfyui.client import ComfyUIClient
|
||||
from calliope.comfyui.companions import load_companions, resolve_companion
|
||||
from calliope.comfyui.library import import_library
|
||||
from calliope.comfyui.output_map import auto_output_map
|
||||
from calliope.comfyui.protocol_references import companion_protocol_reference
|
||||
from calliope.db import get_db, migrate_db
|
||||
|
||||
REPO = Path(__file__).resolve().parents[2]
|
||||
MANIFEST = REPO / "docs/hel-892/supplied-api/manifest.json"
|
||||
ROOT = REPO / "example_ComfyUI_workflows"
|
||||
FIXTURE = json.loads((REPO / "docs/hel-892/protocol-evidence/serialization.json").read_text())
|
||||
|
||||
|
||||
async def test_core_audio_contract_reuses_download_path(tmp_path):
|
||||
client = ComfyUIClient("http://source-contract.invalid")
|
||||
await client._http.aclose()
|
||||
requests = []
|
||||
|
||||
def view(request):
|
||||
requests.append(request)
|
||||
assert request.url.path == "/view"
|
||||
assert dict(request.url.params) == {
|
||||
"filename": "music_00001.mp3",
|
||||
"subfolder": "audio",
|
||||
"type": "output",
|
||||
}
|
||||
return httpx.Response(200, content=b"contract transport fixture, not encoded audio")
|
||||
|
||||
client._http = httpx.AsyncClient(transport=httpx.MockTransport(view))
|
||||
try:
|
||||
items = client.extract_outputs(FIXTURE["audio_history_fixture"], {"35": "audio"})
|
||||
assert items == [
|
||||
{
|
||||
"filename": "music_00001.mp3",
|
||||
"subfolder": "audio",
|
||||
"type": "output",
|
||||
"node_id": "35",
|
||||
"media_kind": "audio",
|
||||
}
|
||||
]
|
||||
item = items[0]
|
||||
dest = tmp_path / item["filename"]
|
||||
await client.download_image(item["filename"], item["subfolder"], item["type"], dest)
|
||||
assert dest.read_bytes() == b"contract transport fixture, not encoded audio"
|
||||
assert len(requests) == 1
|
||||
finally:
|
||||
await client.close()
|
||||
|
||||
|
||||
async def test_inline_text_and_paths_never_become_files():
|
||||
client = ComfyUIClient()
|
||||
try:
|
||||
assert FIXTURE["target_history_observed"] is False
|
||||
assert client.extract_outputs(FIXTURE["subtitle_history_fixture"]) == []
|
||||
assert (
|
||||
client.extract_outputs(
|
||||
{
|
||||
"outputs": {
|
||||
"1": {
|
||||
"text": ["1\n00:00:00,000 --> 00:00:01,000\n字幕", "/output/test.srt"],
|
||||
"files": ["test.srt", {"text": "字幕"}],
|
||||
"mystery": [{"filename": "unknown.mp3"}],
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
== []
|
||||
)
|
||||
finally:
|
||||
await client.close()
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"item",
|
||||
[
|
||||
{},
|
||||
{"filename": ""},
|
||||
{"filename": 42},
|
||||
{"filename": ["music.mp3"]},
|
||||
{"filename": "https://elsewhere/music.mp3"},
|
||||
{"filename": "../music.mp3"},
|
||||
{"filename": "..\\music.mp3"},
|
||||
{"filename": "."},
|
||||
{"filename": "music.mp3", "subfolder": None},
|
||||
{"filename": "music.mp3", "subfolder": "../../elsewhere"},
|
||||
{"filename": "music.mp3", "subfolder": "/tmp"},
|
||||
{"filename": "music.mp3", "type": "url"},
|
||||
],
|
||||
)
|
||||
async def test_invalid_descriptors_not_collected(item):
|
||||
client = ComfyUIClient()
|
||||
try:
|
||||
assert client.extract_outputs({"outputs": {"35": {"audio": [item]}}}) == []
|
||||
finally:
|
||||
await client.close()
|
||||
|
||||
|
||||
async def test_file_audio_and_node_scope_contracts():
|
||||
client = ComfyUIClient()
|
||||
try:
|
||||
history = {
|
||||
"outputs": {
|
||||
"subtitle": {
|
||||
"files": [{"filename": "字幕.srt", "subfolder": "", "type": "output"}]
|
||||
},
|
||||
"music": {"audio": [{"filename": "music.mp3"}]},
|
||||
"bad": None,
|
||||
}
|
||||
}
|
||||
assert [r["media_kind"] for r in client.extract_outputs(history)] == ["file", "audio"]
|
||||
assert len(client.extract_outputs(history, {"music": "audio"})) == 1
|
||||
assert client.extract_outputs(history, {}) == []
|
||||
finally:
|
||||
await client.close()
|
||||
|
||||
|
||||
def test_reference_binding_never_promotes_same_name_or_changed_pair():
|
||||
for path, record in load_companions(MANIFEST).items():
|
||||
if record["binding"]["id"] not in ("02", "03", "04", "07"):
|
||||
continue
|
||||
api = json.loads(record["raw"])
|
||||
ref = companion_protocol_reference(record["binding"], api)
|
||||
assert ref["authority"] == "reference_only_not_object_info"
|
||||
assert ref["target_version_match"] == "unknown"
|
||||
assert ref["target_history_observed"] is False
|
||||
for field in ("source_path", "source_sha256", "export_sha256"):
|
||||
binding = {**record["binding"], field: "different"}
|
||||
assert companion_protocol_reference(binding, api) is None
|
||||
altered = copy.deepcopy(api)
|
||||
altered[ref["binding"]["nodes"][0]["node_id"]]["class_type"] = "AnotherNode"
|
||||
assert companion_protocol_reference(record["binding"], altered) is None
|
||||
altered[ref["binding"]["nodes"][0]["node_id"]] = None
|
||||
assert companion_protocol_reference(record["binding"], altered) is None
|
||||
assert companion_protocol_reference(record["binding"], []) is None
|
||||
raw = (REPO / path).read_bytes()
|
||||
_, audit, issues = resolve_companion(record, path, raw, json.loads(raw))
|
||||
assert audit["output_protocol_reference"] == ref
|
||||
assert issues[0]["code"] == "companion_unverified"
|
||||
# New public references must not create global auto-output recognition.
|
||||
if record["binding"]["id"] in ("02", "03"):
|
||||
assert auto_output_map(api) == []
|
||||
|
||||
|
||||
async def test_protocol_doc_refresh_preserves_user_rows_and_source_values(tmp_path, monkeypatch):
|
||||
await migrate_db(tmp_path / "catalogue.db")
|
||||
conn = get_db(tmp_path / "catalogue.db")
|
||||
records = load_companions(MANIFEST)
|
||||
try:
|
||||
# Simulate an earlier managed import before the protocol references existed.
|
||||
with monkeypatch.context() as old:
|
||||
old.setattr("calliope.comfyui.library.companion_protocol_reference", lambda *a: None)
|
||||
old.setattr("calliope.comfyui.companions.companion_protocol_reference", lambda *a: None)
|
||||
import_library(conn, ROOT, source_commit="fixture", companions=records)
|
||||
before = {r["source_repo_path"]: dict(r) for r in conn.execute("SELECT * FROM workflows")}
|
||||
user_path = next(p for p, r in records.items() if r["binding"]["id"] == "04")
|
||||
conn.execute(
|
||||
"UPDATE workflows SET description='用户保留' WHERE source_repo_path=?", (user_path,)
|
||||
)
|
||||
conn.commit()
|
||||
user_before = dict(
|
||||
conn.execute(
|
||||
"SELECT * FROM workflows WHERE source_repo_path=?", (user_path,)
|
||||
).fetchone()
|
||||
)
|
||||
updated = import_library(conn, ROOT, source_commit="fixture", companions=records)
|
||||
assert updated["counts"] == {
|
||||
"updated": 3,
|
||||
"conflict": 1,
|
||||
"skipped": 151,
|
||||
"user_excluded": 1,
|
||||
}
|
||||
for path, record in records.items():
|
||||
if record["binding"]["id"] not in ("02", "03", "07"):
|
||||
continue
|
||||
row = dict(
|
||||
conn.execute("SELECT * FROM workflows WHERE source_repo_path=?", (path,)).fetchone()
|
||||
)
|
||||
doc = json.loads(row["doc_json"])
|
||||
previous = json.loads(before[path]["doc_json"])
|
||||
assert doc["params"] == previous["params"]
|
||||
assert doc["source_review"] == previous["source_review"]
|
||||
assert row["raw_source_json"] == before[path]["raw_source_json"]
|
||||
assert json.loads(row["workflow_json"]) == json.loads(record["raw"])
|
||||
assert doc["api_companion"]["binding"] == record["binding"]
|
||||
assert doc["api_companion"]["output_protocol_reference"]
|
||||
assert any("公开固定版本参考" in s for s in doc["steps"])
|
||||
assert not row["is_enabled"] and row["import_state"] == "pending_check"
|
||||
assert row["doc_completed_at"] is row["exec_verified_at"] is None
|
||||
assert (
|
||||
dict(
|
||||
conn.execute(
|
||||
"SELECT * FROM workflows WHERE source_repo_path=?", (user_path,)
|
||||
).fetchone()
|
||||
)
|
||||
== user_before
|
||||
)
|
||||
assert import_library(conn, ROOT, source_commit="fixture", companions=records)[
|
||||
"counts"
|
||||
] == {"conflict": 1, "skipped": 154, "user_excluded": 1}
|
||||
finally:
|
||||
conn.close()
|
||||
@@ -1,3 +1,5 @@
|
||||
> 当前输出协议增量:见 `输出协议固定参考与兼容验证.md`、`protocol-evidence/` 与后台 `protocol_references.json`。case02/03及case04/07的同协议预览已补公开固定版本参考与实际说明;目标版本/history仍未验证,配套保持停用,全量目标未完成。
|
||||
|
||||
> 当前范围:源文件156 / 本次目标155 / 用户明确排除case06共1份。落实策略、协调恢复与证据见 `155份范围落地与协调恢复.md`、`scope-evidence/`;当前145份UI通用转换未证明,6份采用API配套、139份尚无配套,完整定稿/实跑为0。下面156/146及7份收件数字保留为历史范围。
|
||||
|
||||
> 当前第六批:见 `第六批真实API配套导入.md`、`supplied-api/` 和 `sixth-evidence/`。7份真实附件已收取,6份采用为停用的配套API,case06缺类型继续关闭;294项API具名现值与源侧审校分开。通用转换146份仍未证明,完整定稿/实跑仍为0,未合并部署。以下批次为历史记录。
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
Building source distribution...
|
||||
Building wheel from source distribution...
|
||||
Successfully built ../protocol-build/calliope-1.5.8.tar.gz
|
||||
Successfully built ../protocol-build/calliope-1.5.8-py3-none-any.whl
|
||||
@@ -0,0 +1,21 @@
|
||||
[
|
||||
{
|
||||
"cell": null,
|
||||
"code": "E501",
|
||||
"end_location": {
|
||||
"column": 105,
|
||||
"row": 66
|
||||
},
|
||||
"filename": "/home/xiaomo/multica_workspaces/hello-af23464d222e/hel-892-830870af070f/workdir/aigc-home/calliope-backend/src/calliope/comfyui/client.py",
|
||||
"fix": null,
|
||||
"location": {
|
||||
"column": 99,
|
||||
"row": 66
|
||||
},
|
||||
"message": "Line too long (106 > 100)",
|
||||
"name": "line-too-long",
|
||||
"noqa_row": 66,
|
||||
"severity": "error",
|
||||
"url": "https://docs.astral.sh/ruff/rules/line-too-long"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,21 @@
|
||||
[
|
||||
{
|
||||
"cell": null,
|
||||
"code": "E501",
|
||||
"end_location": {
|
||||
"column": 105,
|
||||
"row": 66
|
||||
},
|
||||
"filename": "/home/xiaomo/multica_workspaces/hello-af23464d222e/hel-892-830870af070f/workdir/aigc-home/calliope-backend/src/calliope/comfyui/client.py",
|
||||
"fix": null,
|
||||
"location": {
|
||||
"column": 99,
|
||||
"row": 66
|
||||
},
|
||||
"message": "Line too long (106 > 100)",
|
||||
"name": "line-too-long",
|
||||
"noqa_row": 66,
|
||||
"severity": "error",
|
||||
"url": "https://docs.astral.sh/ruff/rules/line-too-long"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,936 @@
|
||||
{
|
||||
"cases": [
|
||||
{
|
||||
"id": "01",
|
||||
"source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/ControlNet_aux_常用样例.json",
|
||||
"state": "pending_check",
|
||||
"adopted": true,
|
||||
"api_nodes": 22,
|
||||
"api_inputs": 57,
|
||||
"new_api_literal_params": 34,
|
||||
"field_comparison": {
|
||||
"unnamed_or_virtual_boundary_unverified": 34,
|
||||
"link_difference": 9,
|
||||
"link_equal": 14
|
||||
},
|
||||
"source_only_ids": [
|
||||
"31",
|
||||
"32",
|
||||
"24",
|
||||
"35"
|
||||
],
|
||||
"api_only_ids": [],
|
||||
"named_evidence_differences": [],
|
||||
"output_map": [
|
||||
{
|
||||
"class_type": "PreviewImage",
|
||||
"kind": "image",
|
||||
"label": "预览图像",
|
||||
"nodeId": "3"
|
||||
},
|
||||
{
|
||||
"class_type": "PreviewImage",
|
||||
"kind": "image",
|
||||
"label": "预览图像",
|
||||
"nodeId": "5"
|
||||
},
|
||||
{
|
||||
"class_type": "PreviewImage",
|
||||
"kind": "image",
|
||||
"label": "预览图像",
|
||||
"nodeId": "11"
|
||||
},
|
||||
{
|
||||
"class_type": "PreviewImage",
|
||||
"kind": "image",
|
||||
"label": "预览图像",
|
||||
"nodeId": "13"
|
||||
},
|
||||
{
|
||||
"class_type": "PreviewImage",
|
||||
"kind": "image",
|
||||
"label": "预览图像",
|
||||
"nodeId": "22"
|
||||
},
|
||||
{
|
||||
"class_type": "PreviewImage",
|
||||
"kind": "image",
|
||||
"label": "预览图像",
|
||||
"nodeId": "36"
|
||||
},
|
||||
{
|
||||
"class_type": "PreviewImage",
|
||||
"kind": "image",
|
||||
"label": "预览图像",
|
||||
"nodeId": "37"
|
||||
}
|
||||
],
|
||||
"kind": "image",
|
||||
"issues": [
|
||||
{
|
||||
"code": "companion_unverified",
|
||||
"message": "采用提供的配套API;源图差异、导出版本与真实执行尚未核验,保持停用"
|
||||
}
|
||||
],
|
||||
"general_conversion_verified": false,
|
||||
"execution_verified": false,
|
||||
"evidence_file": "01.json"
|
||||
},
|
||||
{
|
||||
"id": "02",
|
||||
"source_path": "example_ComfyUI_workflows/1-语音生成/Qwen3-ASR-Subtitle语音转字幕.json",
|
||||
"state": "pending_check",
|
||||
"adopted": true,
|
||||
"api_nodes": 6,
|
||||
"api_inputs": 21,
|
||||
"new_api_literal_params": 16,
|
||||
"field_comparison": {
|
||||
"link_equal": 5,
|
||||
"unnamed_or_virtual_boundary_unverified": 15,
|
||||
"link_difference": 1
|
||||
},
|
||||
"source_only_ids": [
|
||||
"7"
|
||||
],
|
||||
"api_only_ids": [],
|
||||
"named_evidence_differences": [],
|
||||
"output_map": [],
|
||||
"kind": "unknown",
|
||||
"issues": [
|
||||
{
|
||||
"code": "companion_unverified",
|
||||
"message": "采用提供的配套API;源图差异、导出版本与真实执行尚未核验,保持停用"
|
||||
}
|
||||
],
|
||||
"general_conversion_verified": false,
|
||||
"execution_verified": false,
|
||||
"evidence_file": "02.json"
|
||||
},
|
||||
{
|
||||
"id": "03",
|
||||
"source_path": "example_ComfyUI_workflows/2-音乐生成/minimax_music_文生音乐.json",
|
||||
"state": "pending_check",
|
||||
"adopted": true,
|
||||
"api_nodes": 12,
|
||||
"api_inputs": 40,
|
||||
"new_api_literal_params": 24,
|
||||
"field_comparison": {
|
||||
"named_equal": 16,
|
||||
"link_difference": 9,
|
||||
"link_equal": 15
|
||||
},
|
||||
"source_only_ids": [
|
||||
"39",
|
||||
"40",
|
||||
"37"
|
||||
],
|
||||
"api_only_ids": [],
|
||||
"named_evidence_differences": [
|
||||
{
|
||||
"node_id": "37:6",
|
||||
"field": "unet_name",
|
||||
"api_value": "MiniMax/minimax_music3_dit_fp16.safetensors",
|
||||
"api_type": "str",
|
||||
"named_evidence": {
|
||||
"source_value": "minimax_music3_dit_fp16.safetensors",
|
||||
"source_type": "str",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
55,
|
||||
-10,
|
||||
4,
|
||||
6,
|
||||
0,
|
||||
"COMBO"
|
||||
],
|
||||
"source_expected": [
|
||||
"37:-10",
|
||||
4
|
||||
],
|
||||
"status": "link_difference"
|
||||
},
|
||||
{
|
||||
"node_id": "37:13",
|
||||
"field": "caption",
|
||||
"api_value": "Global Metadata: Lo-fi hip-hop, chillhop. 78 BPM, D flat major, major scale with jazzy extensions. Laid-back and dreamy throughout, a gentle warm drift with a subtle late-night glow that deepens in the middle and dissolves softly at the end. Studying, raining-outside, headphones-on late-night listening. Bedroom production: muddy warm texture, heavy vinyl crackle, tape hiss and wow-flutter pitch wobble, low-passed dusty mix, soft-clipped drums, everything slightly detuned and cozy.\n\nVocal Details: Soft androgynous vocal, hushed half-sung half-spoken delivery, sitting low in the mix like another instrument, lazy behind-the-beat phrasing, gentle breathy timbre. Sparse murmured double-tracked harmonies, occasional wordless \"mmm\" and \"ooh\" hums drenched in tape delay and warm spring reverb. Long stretches with no vocals at all.\n\nArrangement: Dusty boom-bap drums with a soft thumping kick, cracked snare with lazy swing, brushed hi-hats, low round sub bass. Warm Rhodes piano chords with slow chorus wobble as the harmonic bed, mellow jazzy guitar licks answering the vocal lines, constant vinyl crackle as texture. Intro: rain and vinyl noise, solo Rhodes chords fading in, drums slipping in halfway. Verses: minimal — drums, bass, Rhodes, soft guitar fills between lines. Instrumental sections: guitar and Rhodes trade relaxed jazzy phrases over the beat, occasional muted trumpet ghost notes far in the background. Bridge: drums drop away to rain, crackle, and floating detuned Rhodes, then the beat eases back in. Outro: elements fade one by one until only vinyl crackle and a last unresolved Rhodes chord remain.",
|
||||
"api_type": "str",
|
||||
"named_evidence": {
|
||||
"source_value": "",
|
||||
"source_type": "str",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
45,
|
||||
-10,
|
||||
0,
|
||||
13,
|
||||
1,
|
||||
"STRING"
|
||||
],
|
||||
"source_expected": [
|
||||
"37:-10",
|
||||
0
|
||||
],
|
||||
"status": "link_difference"
|
||||
},
|
||||
{
|
||||
"node_id": "37:13",
|
||||
"field": "lyrics",
|
||||
"api_value": "[Intro]\nMmm...\n(rain on the window)\nOoh...\n\n[Verse]\nMidnight and the canvas glows\nDragging little wires where the current flows\nType a quiet dream, let the sampler drift\nNoise into a picture, like the fog just lifts\nTwenty slow steps, I'm in no hurry now\nLatents turning colors and I don't know how\nEvery render's like a polaroid I found\nSoft focus memories, no sound\n\n[Instrumental]\n\n[Verse]\nQueue another frame, let the motion breathe\nPictures start to move like the falling leaves\nVideo drifting by at twenty-four\nLittle animations on my bedroom floor\nSeed after seed like the rain outside\nSome of them are keepers, some I let slide\nSave the ones that feel like a Sunday slow\nNode to node to node... and off we go\n\n[Chorus]\nMmm... let it render on\n(take your time, take your time)\nOoh... by the morning it'll all be done\n(one more queue, one more try)\n\n[Instrumental]\n\n[Bridge]\nRain keeps drawing pictures on the glass...\nMy machine keeps dreaming...\nNeither of us fast...\n\n[Chorus]\nMmm... let it render on\n(take your time, take your time)\nOoh... by the morning it'll all be done\n(one more queue, one more try)\n\n[Instrumental]\n\n[Outro]\nMmm...\n(node to node)\nOoh... goodnight",
|
||||
"api_type": "str",
|
||||
"named_evidence": {
|
||||
"source_value": "",
|
||||
"source_type": "str",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
46,
|
||||
-10,
|
||||
1,
|
||||
13,
|
||||
2,
|
||||
"STRING"
|
||||
],
|
||||
"source_expected": [
|
||||
"37:-10",
|
||||
1
|
||||
],
|
||||
"status": "link_difference"
|
||||
},
|
||||
{
|
||||
"node_id": "37:13",
|
||||
"field": "seed",
|
||||
"api_value": [
|
||||
"37:38",
|
||||
0
|
||||
],
|
||||
"api_type": "list",
|
||||
"named_evidence": {
|
||||
"source_value": 222,
|
||||
"source_type": "int",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
52,
|
||||
38,
|
||||
0,
|
||||
13,
|
||||
3,
|
||||
"INT"
|
||||
],
|
||||
"source_expected": [
|
||||
"37:38",
|
||||
0
|
||||
],
|
||||
"status": "link_equal"
|
||||
},
|
||||
{
|
||||
"node_id": "37:3",
|
||||
"field": "clip_name",
|
||||
"api_value": "MiniMax/minimax_music3_text_encoder_pruned_int8_convrot.safetensors",
|
||||
"api_type": "str",
|
||||
"named_evidence": {
|
||||
"source_value": "minimax_music3_text_encoder_pruned_int8_convrot.safetensors",
|
||||
"source_type": "str",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
56,
|
||||
-10,
|
||||
5,
|
||||
3,
|
||||
0,
|
||||
"COMBO"
|
||||
],
|
||||
"source_expected": [
|
||||
"37:-10",
|
||||
5
|
||||
],
|
||||
"status": "link_difference"
|
||||
},
|
||||
{
|
||||
"node_id": "37:7",
|
||||
"field": "vae_name",
|
||||
"api_value": "MiniMax/minimax_music3_dav.safetensors",
|
||||
"api_type": "str",
|
||||
"named_evidence": {
|
||||
"source_value": "minimax_music3_dav.safetensors",
|
||||
"source_type": "str",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
57,
|
||||
-10,
|
||||
6,
|
||||
7,
|
||||
0,
|
||||
"COMBO"
|
||||
],
|
||||
"source_expected": [
|
||||
"37:-10",
|
||||
6
|
||||
],
|
||||
"status": "link_difference"
|
||||
},
|
||||
{
|
||||
"node_id": "37:15",
|
||||
"field": "seconds",
|
||||
"api_value": [
|
||||
"37:13",
|
||||
1
|
||||
],
|
||||
"api_type": "list",
|
||||
"named_evidence": {
|
||||
"source_value": 120,
|
||||
"source_type": "int",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
20,
|
||||
13,
|
||||
1,
|
||||
15,
|
||||
0,
|
||||
"FLOAT"
|
||||
],
|
||||
"source_expected": [
|
||||
"37:13",
|
||||
1
|
||||
],
|
||||
"status": "link_equal"
|
||||
},
|
||||
{
|
||||
"node_id": "37:9",
|
||||
"field": "seed",
|
||||
"api_value": [
|
||||
"37:38",
|
||||
0
|
||||
],
|
||||
"api_type": "list",
|
||||
"named_evidence": {
|
||||
"source_value": 1111111112,
|
||||
"source_type": "int",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
53,
|
||||
38,
|
||||
0,
|
||||
9,
|
||||
4,
|
||||
"INT"
|
||||
],
|
||||
"source_expected": [
|
||||
"37:38",
|
||||
0
|
||||
],
|
||||
"status": "link_equal"
|
||||
},
|
||||
{
|
||||
"node_id": "37:38",
|
||||
"field": "seed",
|
||||
"api_value": 617970236276137,
|
||||
"api_type": "int",
|
||||
"named_evidence": {
|
||||
"source_value": 0,
|
||||
"source_type": "int",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
54,
|
||||
-10,
|
||||
3,
|
||||
38,
|
||||
0,
|
||||
"INT"
|
||||
],
|
||||
"source_expected": [
|
||||
"37:-10",
|
||||
3
|
||||
],
|
||||
"status": "link_difference"
|
||||
},
|
||||
{
|
||||
"node_id": "37:43",
|
||||
"field": "switch",
|
||||
"api_value": true,
|
||||
"api_type": "bool",
|
||||
"named_evidence": {
|
||||
"source_value": false,
|
||||
"source_type": "bool",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
63,
|
||||
-10,
|
||||
7,
|
||||
43,
|
||||
2,
|
||||
"BOOLEAN"
|
||||
],
|
||||
"source_expected": [
|
||||
"37:-10",
|
||||
7
|
||||
],
|
||||
"status": "link_difference"
|
||||
}
|
||||
],
|
||||
"output_map": [],
|
||||
"kind": "unknown",
|
||||
"issues": [
|
||||
{
|
||||
"code": "companion_unverified",
|
||||
"message": "采用提供的配套API;源图差异、导出版本与真实执行尚未核验,保持停用"
|
||||
}
|
||||
],
|
||||
"general_conversion_verified": false,
|
||||
"execution_verified": false,
|
||||
"evidence_file": "03.json"
|
||||
},
|
||||
{
|
||||
"id": "04",
|
||||
"source_path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_文生图_提示词增强.json",
|
||||
"state": "pending_check",
|
||||
"adopted": true,
|
||||
"api_nodes": 16,
|
||||
"api_inputs": 60,
|
||||
"new_api_literal_params": 42,
|
||||
"field_comparison": {
|
||||
"named_equal": 27,
|
||||
"link_difference": 20,
|
||||
"link_equal": 13
|
||||
},
|
||||
"source_only_ids": [
|
||||
"459",
|
||||
"463",
|
||||
"468"
|
||||
],
|
||||
"api_only_ids": [],
|
||||
"named_evidence_differences": [
|
||||
{
|
||||
"node_id": "459:451",
|
||||
"field": "unet_name",
|
||||
"api_value": "Qwen-Image/qwen_image_2.1_bf16.safetensors",
|
||||
"api_type": "str",
|
||||
"named_evidence": {
|
||||
"source_value": "qwen_image_2.1_int8_convrot.safetensors",
|
||||
"source_type": "str",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
663,
|
||||
-10,
|
||||
11,
|
||||
451,
|
||||
0,
|
||||
"COMBO"
|
||||
],
|
||||
"source_expected": [
|
||||
"459:-10",
|
||||
11
|
||||
],
|
||||
"status": "link_difference"
|
||||
},
|
||||
{
|
||||
"node_id": "459:452",
|
||||
"field": "prompt",
|
||||
"api_value": [
|
||||
"459:472",
|
||||
0
|
||||
],
|
||||
"api_type": "list",
|
||||
"named_evidence": {
|
||||
"source_value": "",
|
||||
"source_type": "str",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
687,
|
||||
472,
|
||||
0,
|
||||
452,
|
||||
3,
|
||||
"STRING"
|
||||
],
|
||||
"source_expected": [
|
||||
"459:472",
|
||||
0
|
||||
],
|
||||
"status": "link_equal"
|
||||
},
|
||||
{
|
||||
"node_id": "459:456",
|
||||
"field": "width",
|
||||
"api_value": [
|
||||
"13",
|
||||
0
|
||||
],
|
||||
"api_type": "list",
|
||||
"named_evidence": {
|
||||
"source_value": 1024,
|
||||
"source_type": "int",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
660,
|
||||
-10,
|
||||
6,
|
||||
456,
|
||||
0,
|
||||
"INT"
|
||||
],
|
||||
"source_expected": [
|
||||
"459:-10",
|
||||
6
|
||||
],
|
||||
"status": "link_difference"
|
||||
},
|
||||
{
|
||||
"node_id": "459:456",
|
||||
"field": "height",
|
||||
"api_value": [
|
||||
"13",
|
||||
1
|
||||
],
|
||||
"api_type": "list",
|
||||
"named_evidence": {
|
||||
"source_value": 1024,
|
||||
"source_type": "int",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
661,
|
||||
-10,
|
||||
7,
|
||||
456,
|
||||
1,
|
||||
"INT"
|
||||
],
|
||||
"source_expected": [
|
||||
"459:-10",
|
||||
7
|
||||
],
|
||||
"status": "link_difference"
|
||||
},
|
||||
{
|
||||
"node_id": "459:458",
|
||||
"field": "seed",
|
||||
"api_value": 447606998181263,
|
||||
"api_type": "int",
|
||||
"named_evidence": {
|
||||
"source_value": 0,
|
||||
"source_type": "int",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
667,
|
||||
-10,
|
||||
10,
|
||||
458,
|
||||
4,
|
||||
"INT"
|
||||
],
|
||||
"source_expected": [
|
||||
"459:-10",
|
||||
10
|
||||
],
|
||||
"status": "link_difference"
|
||||
},
|
||||
{
|
||||
"node_id": "459:471",
|
||||
"field": "prompt",
|
||||
"api_value": [
|
||||
"483",
|
||||
0
|
||||
],
|
||||
"api_type": "list",
|
||||
"named_evidence": {
|
||||
"source_value": "",
|
||||
"source_type": "str",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
711,
|
||||
-10,
|
||||
0,
|
||||
471,
|
||||
5,
|
||||
"STRING"
|
||||
],
|
||||
"source_expected": [
|
||||
"459:-10",
|
||||
0
|
||||
],
|
||||
"status": "link_difference"
|
||||
},
|
||||
{
|
||||
"node_id": "459:471",
|
||||
"field": "sampling_mode.seed",
|
||||
"api_value": 447606998181263,
|
||||
"api_type": "int",
|
||||
"named_evidence": {
|
||||
"source_value": 0,
|
||||
"source_type": "int",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
697,
|
||||
-10,
|
||||
10,
|
||||
471,
|
||||
13,
|
||||
"INT"
|
||||
],
|
||||
"source_expected": [
|
||||
"459:-10",
|
||||
10
|
||||
],
|
||||
"status": "link_difference"
|
||||
},
|
||||
{
|
||||
"node_id": "459:473",
|
||||
"field": "clip_name",
|
||||
"api_value": "Qwen-Image/qwen3.5_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",
|
||||
"api_type": "str",
|
||||
"named_evidence": {
|
||||
"source_value": "qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",
|
||||
"source_type": "str",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
696,
|
||||
-10,
|
||||
14,
|
||||
473,
|
||||
0,
|
||||
"COMBO"
|
||||
],
|
||||
"source_expected": [
|
||||
"459:-10",
|
||||
14
|
||||
],
|
||||
"status": "link_difference"
|
||||
},
|
||||
{
|
||||
"node_id": "459:474",
|
||||
"field": "switch",
|
||||
"api_value": true,
|
||||
"api_type": "bool",
|
||||
"named_evidence": {
|
||||
"source_value": false,
|
||||
"source_type": "bool",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
688,
|
||||
-10,
|
||||
1,
|
||||
474,
|
||||
2,
|
||||
"BOOLEAN"
|
||||
],
|
||||
"source_expected": [
|
||||
"459:-10",
|
||||
1
|
||||
],
|
||||
"status": "link_difference"
|
||||
}
|
||||
],
|
||||
"output_map": [
|
||||
{
|
||||
"class_type": "SaveImageAdvanced",
|
||||
"kind": "image",
|
||||
"label": "保存图像(高级)",
|
||||
"nodeId": "461"
|
||||
}
|
||||
],
|
||||
"kind": "image",
|
||||
"issues": [
|
||||
{
|
||||
"code": "companion_unverified",
|
||||
"message": "采用提供的配套API;源图差异、导出版本与真实执行尚未核验,保持停用"
|
||||
}
|
||||
],
|
||||
"general_conversion_verified": false,
|
||||
"execution_verified": false,
|
||||
"evidence_file": "04.json"
|
||||
},
|
||||
{
|
||||
"id": "05",
|
||||
"source_path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台时间线素材_双采样潜空间放大_多分段拼接.json",
|
||||
"state": "pending_check",
|
||||
"adopted": true,
|
||||
"api_nodes": 16,
|
||||
"api_inputs": 66,
|
||||
"new_api_literal_params": 48,
|
||||
"field_comparison": {
|
||||
"named_difference": 5,
|
||||
"named_equal": 43,
|
||||
"link_equal": 18
|
||||
},
|
||||
"source_only_ids": [
|
||||
"25"
|
||||
],
|
||||
"api_only_ids": [],
|
||||
"named_evidence_differences": [
|
||||
{
|
||||
"node_id": "1",
|
||||
"field": "unet_name",
|
||||
"api_value": "MiniMax/minimax_h3_ref2va_pruned_int8_convrot.safetensors",
|
||||
"api_type": "str",
|
||||
"named_evidence": {
|
||||
"source_value": "MiniMax\\minimax_h3_ref2va_pruned_int8_convrot.safetensors",
|
||||
"source_type": "str",
|
||||
"status": "different"
|
||||
},
|
||||
"source_value": "MiniMax\\minimax_h3_ref2va_pruned_int8_convrot.safetensors",
|
||||
"status": "named_difference"
|
||||
},
|
||||
{
|
||||
"node_id": "2",
|
||||
"field": "clip_name",
|
||||
"api_value": "MiniMax/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",
|
||||
"api_type": "str",
|
||||
"named_evidence": {
|
||||
"source_value": "MiniMax\\qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",
|
||||
"source_type": "str",
|
||||
"status": "different"
|
||||
},
|
||||
"source_value": "MiniMax\\qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",
|
||||
"status": "named_difference"
|
||||
},
|
||||
{
|
||||
"node_id": "3",
|
||||
"field": "vae_name",
|
||||
"api_value": "MiniMax/minimax_h3_video_vae_fp16.safetensors",
|
||||
"api_type": "str",
|
||||
"named_evidence": {
|
||||
"source_value": "MiniMax\\minimax_h3_video_vae_fp16.safetensors",
|
||||
"source_type": "str",
|
||||
"status": "different"
|
||||
},
|
||||
"source_value": "MiniMax\\minimax_h3_video_vae_fp16.safetensors",
|
||||
"status": "named_difference"
|
||||
},
|
||||
{
|
||||
"node_id": "4",
|
||||
"field": "vae_name",
|
||||
"api_value": "MiniMax/minimax_h3_audio_vae_fp32.safetensors",
|
||||
"api_type": "str",
|
||||
"named_evidence": {
|
||||
"source_value": "MiniMax\\minimax_h3_audio_vae_fp32.safetensors",
|
||||
"source_type": "str",
|
||||
"status": "different"
|
||||
},
|
||||
"source_value": "MiniMax\\minimax_h3_audio_vae_fp32.safetensors",
|
||||
"status": "named_difference"
|
||||
},
|
||||
{
|
||||
"node_id": "7",
|
||||
"field": "width",
|
||||
"api_value": [
|
||||
"24",
|
||||
0
|
||||
],
|
||||
"api_type": "list",
|
||||
"named_evidence": {
|
||||
"source_value": 1536,
|
||||
"source_type": "int",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
44,
|
||||
24,
|
||||
0,
|
||||
7,
|
||||
2,
|
||||
"INT"
|
||||
],
|
||||
"source_expected": [
|
||||
"24",
|
||||
0
|
||||
],
|
||||
"status": "link_equal"
|
||||
},
|
||||
{
|
||||
"node_id": "7",
|
||||
"field": "height",
|
||||
"api_value": [
|
||||
"24",
|
||||
1
|
||||
],
|
||||
"api_type": "list",
|
||||
"named_evidence": {
|
||||
"source_value": 960,
|
||||
"source_type": "int",
|
||||
"status": "different"
|
||||
},
|
||||
"source_link": [
|
||||
45,
|
||||
24,
|
||||
1,
|
||||
7,
|
||||
3,
|
||||
"INT"
|
||||
],
|
||||
"source_expected": [
|
||||
"24",
|
||||
1
|
||||
],
|
||||
"status": "link_equal"
|
||||
},
|
||||
{
|
||||
"node_id": "21",
|
||||
"field": "lora_name",
|
||||
"api_value": "MiniMax/minimax_h3_ref2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors",
|
||||
"api_type": "str",
|
||||
"named_evidence": {
|
||||
"source_value": "MiniMax\\minimax_h3_ref2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors",
|
||||
"source_type": "str",
|
||||
"status": "different"
|
||||
},
|
||||
"source_value": "MiniMax\\minimax_h3_ref2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors",
|
||||
"status": "named_difference"
|
||||
}
|
||||
],
|
||||
"output_map": [
|
||||
{
|
||||
"class_type": "SaveVideo",
|
||||
"kind": "video",
|
||||
"label": "保存视频",
|
||||
"nodeId": "10"
|
||||
}
|
||||
],
|
||||
"kind": "video",
|
||||
"issues": [
|
||||
{
|
||||
"code": "companion_unverified",
|
||||
"message": "采用提供的配套API;源图差异、导出版本与真实执行尚未核验,保持停用"
|
||||
}
|
||||
],
|
||||
"general_conversion_verified": false,
|
||||
"execution_verified": false,
|
||||
"evidence_file": "05.json"
|
||||
},
|
||||
{
|
||||
"id": "06",
|
||||
"source_path": "example_ComfyUI_workflows/5-数字人/Wan2.1_I2V_InfiniteTalk_rCM_数字人对口型多动态(KJ版).json",
|
||||
"state": "user_excluded",
|
||||
"adopted": false,
|
||||
"new_api_literal_params": 0,
|
||||
"exclusion": {
|
||||
"status": "user_excluded",
|
||||
"case_id": "06",
|
||||
"reason": "用户明确排除这一份,不补导、不修补,不作为剩余阻塞",
|
||||
"decision": {
|
||||
"issue_id": "01a17910-fd9c-72aa-9e76-331f0cfdf896",
|
||||
"comment_id": "01a187e6-5df9-7c98-8afe-05fc9baa5b55",
|
||||
"issue_link": "mention://issue/01a17910-fd9c-72aa-9e76-331f0cfdf896",
|
||||
"quote": "缺的那份不需要了"
|
||||
}
|
||||
},
|
||||
"historical_row_preserved": false
|
||||
},
|
||||
{
|
||||
"id": "07",
|
||||
"source_path": "example_ComfyUI_workflows/6-动作迁移/Wan_Animate2_动作迁移_for循环长视频.json",
|
||||
"state": "pending_check",
|
||||
"adopted": true,
|
||||
"api_nodes": 72,
|
||||
"api_inputs": 251,
|
||||
"new_api_literal_params": 130,
|
||||
"field_comparison": {
|
||||
"unnamed_or_virtual_boundary_unverified": 92,
|
||||
"link_difference": 57,
|
||||
"link_equal": 93,
|
||||
"named_difference": 1,
|
||||
"named_equal": 7,
|
||||
"source_node_unresolved": 1
|
||||
},
|
||||
"source_only_ids": [
|
||||
"574",
|
||||
"575",
|
||||
"292",
|
||||
"582",
|
||||
"291",
|
||||
"291:78",
|
||||
"291:77",
|
||||
"291:90",
|
||||
"291:80",
|
||||
"291:290",
|
||||
"291:96",
|
||||
"291:79",
|
||||
"291:97",
|
||||
"291:416",
|
||||
"291:417",
|
||||
"291:571",
|
||||
"291:572",
|
||||
"291:573",
|
||||
"581",
|
||||
"539",
|
||||
"600",
|
||||
"603",
|
||||
"602",
|
||||
"604",
|
||||
"605",
|
||||
"587",
|
||||
"597",
|
||||
"477",
|
||||
"477:466",
|
||||
"598",
|
||||
"261",
|
||||
"261:241",
|
||||
"608",
|
||||
"609",
|
||||
"540",
|
||||
"601",
|
||||
"610",
|
||||
"606"
|
||||
],
|
||||
"api_only_ids": [
|
||||
"612"
|
||||
],
|
||||
"named_evidence_differences": [
|
||||
{
|
||||
"node_id": "585",
|
||||
"field": "video",
|
||||
"api_value": "抖音20261025-285806.mp4",
|
||||
"api_type": "str",
|
||||
"named_evidence": {
|
||||
"source_value": "1daafaf7f9a12f651c41e56d38bc518f.mp4",
|
||||
"source_type": "str",
|
||||
"status": "different"
|
||||
},
|
||||
"source_value": "1daafaf7f9a12f651c41e56d38bc518f.mp4",
|
||||
"status": "named_difference"
|
||||
}
|
||||
],
|
||||
"output_map": [
|
||||
{
|
||||
"class_type": "SaveVideo",
|
||||
"kind": "video",
|
||||
"label": "保存视频",
|
||||
"nodeId": "246"
|
||||
}
|
||||
],
|
||||
"kind": "video",
|
||||
"issues": [
|
||||
{
|
||||
"code": "companion_unverified",
|
||||
"message": "采用提供的配套API;源图差异、导出版本与真实执行尚未核验,保持停用"
|
||||
}
|
||||
],
|
||||
"general_conversion_verified": false,
|
||||
"execution_verified": false,
|
||||
"evidence_file": "07.json"
|
||||
}
|
||||
],
|
||||
"adopted": 6,
|
||||
"user_excluded": 1,
|
||||
"source_files": 156,
|
||||
"target_files": 155,
|
||||
"general_conversion_verified": 0,
|
||||
"execution_verified": 0,
|
||||
"new_api_literal_params": 294
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"total": 155,
|
||||
"audit_scope": "current_delivery",
|
||||
"source_files": 156,
|
||||
"target_files": 155,
|
||||
"user_excluded": 1,
|
||||
"source_structure_purpose_partially_reviewed": 155,
|
||||
"full_documents_completed": 0,
|
||||
"files_with_selected_named_fields_reviewed": 41,
|
||||
"selected_named_fields_reviewed": 1217,
|
||||
"real_executions": 0,
|
||||
"states": {
|
||||
"pending_check": 16,
|
||||
"needs_conversion": 139
|
||||
},
|
||||
"named_values_preserved": 1217,
|
||||
"unnamed_widget_nodes": 3660,
|
||||
"semantic_batch_files": 139,
|
||||
"semantic_batch_without_named_fields": 114,
|
||||
"semantic_batch_named_fields": 490,
|
||||
"named_values_without_manual_field_review": 0,
|
||||
"named_values_without_verified_units_ranges_effects": 1217,
|
||||
"scope_limit": "人工结论与机械原值清单分开;源语义局部审校非完整说明定稿"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
.................................. [100%]
|
||||
=============================== warnings summary ===============================
|
||||
calliope-backend/.venv/lib/python3.11/site-packages/starlette/testclient.py:53
|
||||
/home/xiaomo/multica_workspaces/hello-af23464d222e/hel-892-830870af070f/workdir/aigc-home/calliope-backend/.venv/lib/python3.11/site-packages/starlette/testclient.py:53: DeprecationWarning: The anyio.abc.BlockingPortal alias is deprecated, use anyio.from_thread.BlockingPortal instead.
|
||||
_PortalFactoryType = Callable[[], AbstractContextManager[anyio.abc.BlockingPortal]]
|
||||
|
||||
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
|
||||
34 passed, 1 warning in 4.38s
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"batch_id": "87cdf97e-51b0-45ee-8a62-507aa690ff6b",
|
||||
"source_commit": "b01809cf8c3f8b408d1e4bdcf26b17a9e86ea360",
|
||||
"counts": {
|
||||
"updated": 6,
|
||||
"skipped": 149,
|
||||
"user_excluded": 1
|
||||
},
|
||||
"states": {
|
||||
"pending_check": 16,
|
||||
"needs_conversion": 139
|
||||
},
|
||||
"source_total": 156,
|
||||
"excluded_total": 1,
|
||||
"target_total": 155,
|
||||
"total": 156,
|
||||
"doc_completed": 0,
|
||||
"exec_verified": 0
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
All checks passed!
|
||||
@@ -0,0 +1,10 @@
|
||||
........................................................................ [ 44%]
|
||||
........................................................................ [ 88%]
|
||||
................... [100%]
|
||||
=============================== warnings summary ===============================
|
||||
calliope-backend/.venv/lib/python3.11/site-packages/starlette/testclient.py:53
|
||||
/home/xiaomo/multica_workspaces/hello-af23464d222e/hel-892-830870af070f/workdir/aigc-home/calliope-backend/.venv/lib/python3.11/site-packages/starlette/testclient.py:53: DeprecationWarning: The anyio.abc.BlockingPortal alias is deprecated, use anyio.from_thread.BlockingPortal instead.
|
||||
_PortalFactoryType = Callable[[], AbstractContextManager[anyio.abc.BlockingPortal]]
|
||||
|
||||
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
|
||||
163 passed, 1 warning in 80.83s (0:01:20)
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"batch_id": "43e804ef-8702-48c2-a4e5-0ef238438542",
|
||||
"source_commit": "b01809cf8c3f8b408d1e4bdcf26b17a9e86ea360",
|
||||
"counts": {
|
||||
"skipped": 155,
|
||||
"user_excluded": 1
|
||||
},
|
||||
"states": {
|
||||
"pending_check": 16,
|
||||
"needs_conversion": 139
|
||||
},
|
||||
"source_total": 156,
|
||||
"excluded_total": 1,
|
||||
"target_total": 155,
|
||||
"total": 156,
|
||||
"doc_completed": 0,
|
||||
"exec_verified": 0
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"evidence_layer": "pinned_source_serialization_contract_fixture",
|
||||
"target_history_observed": false,
|
||||
"verified_sources": [
|
||||
{
|
||||
"id": "core-preview",
|
||||
"sha256": "48cffa3b2ddd08c311af609642da8703abc9bac9e624c400c3dc41f6edcea930"
|
||||
},
|
||||
{
|
||||
"id": "core-audio",
|
||||
"sha256": "483466af050a43bf96f9fcdfa56ab2759dbf8611dd6a14a9543f6d136ecbdf43"
|
||||
},
|
||||
{
|
||||
"id": "core-ui",
|
||||
"sha256": "339cc100b45208f83f119ca76f48050bf723aea3377003357e8928a7ef85d025"
|
||||
},
|
||||
{
|
||||
"id": "core-io",
|
||||
"sha256": "c2a5aded4895a1adf1acb2df6c011fdfb74e15b0d4fd331ec00ea7562d91d91d"
|
||||
},
|
||||
{
|
||||
"id": "core-history",
|
||||
"sha256": "40c5306bc8d032aea90b93a7e1ef4ca137e0cf372187132d32b99ae070ba3d87"
|
||||
},
|
||||
{
|
||||
"id": "qwen-subtitle",
|
||||
"sha256": "f8cda2d0d39517f93ace1a73263146a4bea59a02604e58919a05393c45ade6b7"
|
||||
},
|
||||
{
|
||||
"id": "qwen-registration",
|
||||
"sha256": "0919008142c12f8fe9a12671a1ca1de548ded128dd7287a13f6230d9729b47c2"
|
||||
},
|
||||
{
|
||||
"id": "core-preview-v011",
|
||||
"sha256": "f8c526dbc4ec512f88a067524865f59eb24db636858f37d601e848885b2d0751"
|
||||
},
|
||||
{
|
||||
"id": "core-audio-v031",
|
||||
"sha256": "82bb9dcf191a84cb0695bc2533602f7956e29a81a1176965556350b02e1bd67e"
|
||||
},
|
||||
{
|
||||
"id": "core-ui-v031",
|
||||
"sha256": "14c48175a06d4c5ad7b7dfc2e3809185f88eb93af068fe5df84703257ca66353"
|
||||
}
|
||||
],
|
||||
"execution_boundary": "AST-extracted SavedResult/SavedAudios and PreviewAny.main (current and v0.11.0) only; torch print configuration stubbed; subtitle class parsed, never executed; no audio encoder, plugin imports, model or ComfyUI execution",
|
||||
"subtitle_return_names": [
|
||||
"TEXT",
|
||||
"SUBTITLES",
|
||||
"LANGUAGE",
|
||||
"OUTPUT_PATH"
|
||||
],
|
||||
"preview_v011_has_result": false,
|
||||
"subtitle_history_fixture": {
|
||||
"outputs": {
|
||||
"1": {
|
||||
"text": [
|
||||
""
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"text": [
|
||||
"0.00-1.20: 字幕文本"
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"text": [
|
||||
"Chinese"
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"text": [
|
||||
"正文"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"audio_history_fixture": {
|
||||
"outputs": {
|
||||
"35": {
|
||||
"audio": [
|
||||
{
|
||||
"filename": "music_00001.mp3",
|
||||
"subfolder": "audio",
|
||||
"type": "output"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
................. [100%]
|
||||
=============================== warnings summary ===============================
|
||||
calliope-backend/.venv/lib/python3.11/site-packages/starlette/testclient.py:53
|
||||
/home/xiaomo/multica_workspaces/hello-af23464d222e/hel-892-830870af070f/workdir/aigc-home/calliope-backend/.venv/lib/python3.11/site-packages/starlette/testclient.py:53: DeprecationWarning: The anyio.abc.BlockingPortal alias is deprecated, use anyio.from_thread.BlockingPortal instead.
|
||||
_PortalFactoryType = Callable[[], AbstractContextManager[anyio.abc.BlockingPortal]]
|
||||
|
||||
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
|
||||
17 passed, 1 warning in 0.77s
|
||||
@@ -0,0 +1,84 @@
|
||||
本轮完成六份配套API中的字幕/高级音频输出协议调查与兼容验证,保持全部配套停用。本轮不是全量完成,不合并、不部署。
|
||||
|
||||
## 代码与证据层
|
||||
|
||||
继续 PR #25(https://gitea.xbay.cc/leefer/aigc-home/pulls/25),分支 `agent/agent/a64a969a6a44`,base `main`@`1fc8bdb`,增量基点 `b01809cf8c3f8b408d1e4bdcf26b17a9e86ea360`。开工已通过远端PR API核对head/base。未改界面、源图、原始API、manifest、范围策略或source_reviews。
|
||||
|
||||
沿用 README 与 HEL-892 交付说明的架构:SQLite/library 维护来源和审校状态,parser/output_map 决定确认过的节点,worker 使用 client 从 history 收取文件并经 /view 下载。没有独立架构文档,不引入依赖。
|
||||
|
||||
新增 `protocol_references.json/.py` 是来源绑定的说明参考,不是可信 object_info,也不是全局节点注册表。返回参考要求源路径、源SHA256、导出SHA256及节点ID/class_type匹配。原始导出SHA、source_sha、API值和源审校保持独立;目标版本未知、真实history未观测。参考变更参与 companion_sha,文档版本升至2;用户修改整行仍优先保留。
|
||||
|
||||
`companions.py` 只在配套本身有效时附加 output_protocol_reference;`library.py` 将具体中文协议及版本差异写进实际 doc_json 的 api_companion 和 steps。新增参考覆盖 case02/03,case04 的459:472及case07的538/607只沿用直接相关的PreviewAny协议;case01/05本轮没有同一协议输出,不扩查SaveImage/SaveVideo或全部参数。未知节点未加入auto_output_map,case02/03映射仍为空。
|
||||
|
||||
`client.py` 复用原 audio/audios/files 收取及 /view 下载,仅补非法描述符拒绝:非字符串/空filename、路径/URL、非法subfolder/type及非对象node_out均跳过。未识别键不猜类型,text不进入文件解析。无合法文件时worker既有失败行为由受影响回归验证。
|
||||
|
||||
## 逐节点结论
|
||||
|
||||
|case/节点|源码可确认的协议|本配套现状与仍缺证据|
|
||||
|---|---|---|
|
||||
|02 / 9 AILab_Qwen3ASRSubtitle|NODE_CLASS_MAPPINGS明确绑定同名类;四槽0 TEXT、1 SUBTITLES、2 LANGUAGE、3 OUTPUT_PATH均STRING;不是OUTPUT_NODE,无ui文件描述符。|API output_format=none、output_path空:参考代码不写文件。原图槽2拼为LANUGAGE;参考函数模型/aligner默认值含-hf,API不含。不能当同版本或确认模型可用。|
|
||||
|02 / 1、2、3、4 PreviewAny|source依次连9的3、1、2、0槽,对应路径、字幕文本、语言、正文。官方0.11.0无result槽,新参考commit有STRING result;两版都将ui.text作为内联预览。|无filename,四份预览不能冒充四个字幕文件;缺目标版本与真实history。|
|
||||
|02 / 字幕保存分支|SUBTITLES是秒区间文本,缺时间戳时退回正文;txt/srt分支可写服务端路径,但返回的是STRING。srt无groups时写正文。|当前none未走保存分支;即使改srt也不能仅凭路径字符串调用/view,不能保证合法SRT;需要实际文件描述符契约/真实响应。|
|
||||
|03 / 35 SaveAudioAdvanced|define_schema node_id与扩展注册明确同名;AUDIO输入与透传输出,filename_prefix字符串,format为flac/mp3/opus动态选项;MP3 quality含V0/128k/320k。execute→AudioSaveHelper→SavedAudios.as_dict→ui.audio数组,每项filename/subfolder/type=output。|配套mp3/V0,format.quality经核心动态输入嵌套为format字典;无需改API。原图声明core0.31.0对应官方tag协议一致,仍不证明导出/目标版本;实际编码、模型、history与源子图展开未验证。|
|
||||
|04 / 459:472,07 / 538、607 PreviewAny|同一内联text协议;只补来源绑定说明。|不影响这些图既有图片/视频输出映射与源差异;不能拿预览文本当文件。|
|
||||
|
||||
case03参考history形状是 `outputs["35"].audio=[{filename,subfolder,type:"output"}]`,现有client已可收取;AUDIO透传的waveform/sample_rate是节点间数据,不是下载描述符。参考契约和合成fixture不等于目标history。
|
||||
|
||||
## 固定来源与复验
|
||||
|
||||
每个来源的准确URL、固定commit/tag、文件/行、获取时间、完整SHA256均在 `calliope-backend/src/calliope/comfyui/protocol_references.json`。原图 cnr_id/ver/outputs 保存在每个case的 source_node_metadata,明确只是源图声明;不能提升成目标快照。下面为直接源码入口:
|
||||
|
||||
- [core-preview](https://github.com/Comfy-Org/ComfyUI/blob/fd7639f477050e5c25b68fc38a9c2a6b6d988211/comfy_extras/nodes_preview_any.py),fd7639f47705,行 [[8, 44]];SHA256 `48cffa3b2ddd08c311af609642da8703abc9bac9e624c400c3dc41f6edcea930`;获取 2026-10-29T14:42:43.157537+00:00。
|
||||
- [core-audio](https://github.com/Comfy-Org/ComfyUI/blob/fd7639f477050e5c25b68fc38a9c2a6b6d988211/comfy_extras/nodes_audio.py),fd7639f47705,行 [[290, 333], [908, 936]];SHA256 `483466af050a43bf96f9fcdfa56ab2759dbf8611dd6a14a9543f6d136ecbdf43`;获取 2026-10-29T14:42:43.157600+00:00。
|
||||
- [core-ui](https://github.com/Comfy-Org/ComfyUI/blob/fd7639f477050e5c25b68fc38a9c2a6b6d988211/comfy_api/latest/_ui.py),fd7639f47705,行 [[23, 61], [256, 385]];SHA256 `339cc100b45208f83f119ca76f48050bf723aea3377003357e8928a7ef85d025`;获取 2026-10-29T14:42:43.157629+00:00。
|
||||
- [core-io](https://github.com/Comfy-Org/ComfyUI/blob/fd7639f477050e5c25b68fc38a9c2a6b6d988211/comfy_api/latest/_io.py),fd7639f47705,行 [[1230, 1286], [2095, 2140]];SHA256 `c2a5aded4895a1adf1acb2df6c011fdfb74e15b0d4fd331ec00ea7562d91d91d`;获取 2026-10-29T14:42:43.157714+00:00。
|
||||
- [core-history](https://github.com/Comfy-Org/ComfyUI/blob/fd7639f477050e5c25b68fc38a9c2a6b6d988211/execution.py),fd7639f47705,行 [[361, 423], [566, 580], [830, 838]];SHA256 `40c5306bc8d032aea90b93a7e1ef4ca137e0cf372187132d32b99ae070ba3d87`;获取 2026-10-29T14:42:43.157785+00:00。
|
||||
- [qwen-subtitle](https://github.com/1038lab/ComfyUI-QwenASR/blob/3f9a652a617e578e4e3bd090e3dbc75274bf4775/AILab_QwenASR.py),3f9a652a617e,行 [[1021, 1173]];SHA256 `f8cda2d0d39517f93ace1a73263146a4bea59a02604e58919a05393c45ade6b7`;获取 2026-10-29T14:42:43.157828+00:00。
|
||||
- [qwen-registration](https://github.com/1038lab/ComfyUI-QwenASR/blob/3f9a652a617e578e4e3bd090e3dbc75274bf4775/__init__.py),3f9a652a617e,行 [[17, 41]];SHA256 `0919008142c12f8fe9a12671a1ca1de548ded128dd7287a13f6230d9729b47c2`;获取 2026-10-29T14:42:43.157847+00:00。
|
||||
- [core-preview-v011](https://github.com/Comfy-Org/ComfyUI/blob/09725967cf76304371c390ca1d6483e04061da48/comfy_extras/nodes_preview_any.py),v0.11.0,行 [[7, 38]];SHA256 `f8c526dbc4ec512f88a067524865f59eb24db636858f37d601e848885b2d0751`;获取 2026-10-29T14:46:34.511211+00:00。
|
||||
- [core-audio-v031](https://github.com/Comfy-Org/ComfyUI/blob/43cb4fffc89bba20ab7bd61467a36d0339338dab/comfy_extras/nodes_audio.py),v0.31.0,行 [[251, 294], [869, 896]];SHA256 `82bb9dcf191a84cb0695bc2533602f7956e29a81a1176965556350b02e1bd67e`;获取 2026-10-29T14:46:34.511264+00:00。
|
||||
- [core-ui-v031](https://github.com/Comfy-Org/ComfyUI/blob/43cb4fffc89bba20ab7bd61467a36d0339338dab/comfy_api/latest/_ui.py),v0.31.0,行 [[27, 65], [262, 390]];SHA256 `14c48175a06d4c5ad7b7dfc2e3809185f88eb93af068fe5df84703257ca66353`;获取 2026-10-29T14:46:34.511291+00:00。
|
||||
|
||||
只搜索并读取节点包原仓库和官方核心源码,不安装/导入插件、不执行转写、不加载模型。公开新版为参考版本,另按原图声明取core v0.11.0和v0.31.0标签核对,不声称目标匹配。
|
||||
|
||||
仓库根复验(缓存放在本地目录,脚本只访问清单固定的公开源码URL):
|
||||
|
||||
```bash
|
||||
python3 calliope-backend/scripts/verify_output_protocol_sources.py --fetch \
|
||||
--source-dir ../protocol-reference-recheck --output ../serialization-recheck.json
|
||||
```
|
||||
|
||||
省略 --fetch 可离线验缓存。脚本先核验10个完整文件SHA256,再仅通过AST提取核心 SavedResult/SavedAudios 与两版 PreviewAny.main 的序列化函数,torch打印设置用stub;字幕类只解析四槽字面定义,不执行。没有调用音频编码器、转写、服务、模型或生成。`protocol-evidence/serialization.json` 是上述核心序列化构造的契约fixture,history封装是合成的,文本和文件名也是测试值。
|
||||
|
||||
## 验证结果
|
||||
|
||||
- 受影响14套件:163 passed。覆盖新增17项、原图片/视频/音频/未知输出、队列下载、库/配套/155范围、转换差分、启用/测试拦截。`regression.txt` 为首次协议代码完成后的结果;后续仅补历史标签、源metadata、中文版本差异及文档刷新版本,最终保护回归34 passed,另见 `final-protection.txt`,两组重叠不相加。
|
||||
- 序列化脚本10文件SHA核验成功;只执行上述核心纯序列化边界。合法音频通过MockTransport验证/view参数及落盘;file/SRT描述符可收取,内联字幕、路径、未知键和12类缺字段/非法描述符不收取。fixture字节不是合法音频编码证明。
|
||||
- 隔离库:155条导入/1条精确排除,16 pending_check、139 needs_conversion;重导155 skipped/1 user_excluded。6份采用配套、294项现值;目标155的1217源具名值/3660位置控件不变。4份参考说明入实际doc_json,全部is_enabled=0、doc_completed_at和exec_verified_at为空,完整定稿0/实跑0。整行用户修改、版本刷新、原值/源哈希保护由专项实测。
|
||||
- 未重跑全后台/前端:上批独立865 passed/5既有失败/6 skipped仅沿用为历史基线,不当本次结果;已知5项不扩修。本次选择的回归无失败。
|
||||
- wheel/sdist构建通过,检查包内参考JSON与源码字节一致;新增/其他改动Python文件Ruff通过。client.py仅保留b01809c已有E501(第66行),本次无新增lint;基线与当前JSON逐项核对,不能称全仓全绿。git diff --check通过。
|
||||
|
||||
## 复现入库与审计
|
||||
|
||||
使用已有锁文件环境,从仓库根执行(仅本地隔离库):
|
||||
|
||||
```bash
|
||||
uv run --project calliope-backend --frozen python -m calliope.comfyui.library_cli import \
|
||||
--root example_ComfyUI_workflows --db ../protocol-catalogue.db \
|
||||
--source-commit b01809cf8c3f8b408d1e4bdcf26b17a9e86ea360 \
|
||||
--companions docs/hel-892/supplied-api/manifest.json --output-dir ../protocol-import
|
||||
uv run --project calliope-backend --frozen python calliope-backend/scripts/audit_supplied_api.py \
|
||||
--repo . --manifest docs/hel-892/supplied-api/manifest.json \
|
||||
--db ../protocol-catalogue.db --output ../protocol-audit
|
||||
uv run --project calliope-backend --frozen python calliope-backend/scripts/audit_library_documents.py \
|
||||
--repo . --documents ../protocol-import --output ../protocol-doc-audit.json
|
||||
```
|
||||
|
||||
## 仍未解锁
|
||||
|
||||
1. case02:目标包版本、实际ui.text响应,以及若要文件交付时的有效filename/subfolder/type响应;仅返回服务器路径不足以收取。当前none不生成字幕文件,不自动改图。
|
||||
2. case03:目标SaveAudioAdvanced及核心动态format版本、节点35真实history音频描述符与实际编码;公共0.31.0实现证明参考协议,不证明目标环境与源子图展开等价。
|
||||
3. case04/07的PreviewAny同样缺目标版本/响应;其余输出节点和全部参数未在本轮扩审。case01/05无本轮相同协议兼容改动。
|
||||
4. 六份配套的源差异/展开、145份UI通用可靠转换、155份完整说明和必要实跑仍未完成;139份UI尚无配套。case06始终排除,不再索取它或计入待完成。
|
||||
|
||||
这些只按证据层留待总管以后分阶段协调,本轮无需用户补材料、开放机器或长时间停TTS。未连接目标机、写在线库、提交/prompt、调用付费服务、下载模型、合并或部署。
|
||||
Reference in New Issue
Block a user