HEL-892: show source-bound Chinese H3 parameter definitions
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -0,0 +1,425 @@
|
||||
"""Rebuild the single reviewed definition block from pinned source bytes; never execute upstream."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import ast
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
REPO = Path(__file__).resolve().parents[3]
|
||||
OUT = Path(__file__).resolve().parent
|
||||
REF = REPO / "docs/hel-892/h3-reference"
|
||||
PATH = (
|
||||
"example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/"
|
||||
"Minimax-H3提示词增强.json"
|
||||
)
|
||||
|
||||
|
||||
def canonical(value):
|
||||
return json.dumps(
|
||||
value, ensure_ascii=False, sort_keys=True, separators=(",", ":")
|
||||
).encode()
|
||||
|
||||
|
||||
def build():
|
||||
raw = (REPO / PATH).read_bytes()
|
||||
assert (
|
||||
hashlib.sha256(raw).hexdigest()
|
||||
== "ffea53b27d52c63aa9ec9c60144489cc4f9e5a44d9478bcc297be9d9008f1a4c"
|
||||
)
|
||||
source = json.loads(raw)
|
||||
manifest = json.loads((REF / "sources.json").read_bytes())
|
||||
sources = {s["id"]: s for s in manifest["sources"]}
|
||||
refs = []
|
||||
|
||||
def ref(key, start, end, claim):
|
||||
s = sources[key]
|
||||
content = (REF / s["local_file"]).read_bytes()
|
||||
assert hashlib.sha256(content).hexdigest() == s["sha256"]
|
||||
assert 1 <= start <= end <= len(content.decode().splitlines())
|
||||
entry = {
|
||||
k: s[k]
|
||||
for k in ("id", "commit", "file", "sha256", "url", "local_file", "license")
|
||||
}
|
||||
entry.update(lines=[start, end], claim=claim)
|
||||
refs.append(entry)
|
||||
return len(refs) - 1
|
||||
|
||||
nodes = "h3:minimax_h3_rewriter/nodes.py"
|
||||
check = "h3:minimax_h3_rewriter/prompt_check.py"
|
||||
schema = ref(nodes, 1453, 1576, "GuidedWriter输入声明、类型与控件提示")
|
||||
run = ref(nodes, 1594, 1658, "旁通、库选择、会话复用、比例解析及写作参数传递")
|
||||
inference = ref(
|
||||
nodes,
|
||||
1224,
|
||||
1297,
|
||||
"system_prompt替代指南、时长和seed/greedy/keep_loaded传递;未验证底层推理行为",
|
||||
)
|
||||
choices = ref(nodes, 199, 261, "写作模型列表动态构造及选择解析;并非目标机目录快照")
|
||||
const = ref(
|
||||
"h3:minimax_h3_rewriter/constants.py",
|
||||
18,
|
||||
20,
|
||||
"固定比例枚举、Writer时长静态界限",
|
||||
)
|
||||
modes = ref(
|
||||
"h3:minimax_h3_rewriter/guide_prompt.py",
|
||||
29,
|
||||
46,
|
||||
"四种基础任务及完整参考任务的字段对应",
|
||||
)
|
||||
aspect = ref(
|
||||
"h3:minimax_h3_rewriter/aspect.py", 30, 43, "比例选择与aspect_ratio覆盖关系"
|
||||
)
|
||||
aspect_run = ref(
|
||||
"h3:minimax_h3_rewriter/aspect.py",
|
||||
71,
|
||||
109,
|
||||
"宽高对/尺寸/数字读取及空值回退;仅说明固定实现",
|
||||
)
|
||||
memory = ref(
|
||||
"h3:minimax_h3_rewriter/memory.py",
|
||||
1,
|
||||
43,
|
||||
"每节点会话内复用,重启丢失;保存库选择另行持久化",
|
||||
)
|
||||
library = ref(
|
||||
"h3:minimax_h3_rewriter/library.py",
|
||||
323,
|
||||
386,
|
||||
"repeat_last开启后解析库选择;有效选择丢失报错,否则可能回退",
|
||||
)
|
||||
hidden = ref(
|
||||
"h3:web/js/prompt_library.js",
|
||||
1046,
|
||||
1090,
|
||||
"隐藏library_pick的界面处理不删除执行输入",
|
||||
)
|
||||
cschema = ref(
|
||||
check, 48, 151, "Check提示、任务、秒数、可选options/references及9个输出槽"
|
||||
)
|
||||
crun = ref(check, 153, 202, "Check读入文本、规则核对、字段拆分及输出;未运行验证")
|
||||
cconst = ref(
|
||||
"h3:minimax_h3_rewriter/universal.py",
|
||||
76,
|
||||
102,
|
||||
"Check任务枚举、字段及0.1至600秒schema界限",
|
||||
)
|
||||
seed = ref(
|
||||
"frontend:src/scripts/valueControl.ts",
|
||||
1,
|
||||
92,
|
||||
"control_after_generate控制与fixed不改值分支",
|
||||
)
|
||||
seed_widget = ref(
|
||||
"frontend:src/scripts/widgets.ts",
|
||||
91,
|
||||
148,
|
||||
"INT种子附加控件构造;精确规则与序列化见既有固定证据",
|
||||
)
|
||||
serial = ref(
|
||||
"frontend:src/utils/executionUtil.ts",
|
||||
124,
|
||||
168,
|
||||
"执行输入构造与物理线覆盖;该文件未调用",
|
||||
)
|
||||
bypass_return = ref(nodes, 929, 932, "旁通函数将原文本作为首出口返回")
|
||||
preview = ref(
|
||||
"core:comfy_extras/nodes_preview_any.py",
|
||||
8,
|
||||
39,
|
||||
"PreviewAny以文本显示输入;不生成文件",
|
||||
)
|
||||
# Editorial text states only behavior established by the ranges above.
|
||||
writer = [
|
||||
(
|
||||
"prompt",
|
||||
"原始提示文本",
|
||||
"STRING",
|
||||
"将输入文字交给所选任务的写作消息组装。原文本作为不透明字符串保存;本轮没有改写、增强或调用模型。",
|
||||
None,
|
||||
"未声明静态长度界限;内容效果待真实验证",
|
||||
[schema, inference],
|
||||
),
|
||||
(
|
||||
"model",
|
||||
"写作模型选择",
|
||||
"动态COMBO / STRING",
|
||||
"传给写作模型选择解析。保留源字符串;on disk只是源标签,不证明文件存在、模型已加载或当前列表包含它。",
|
||||
None,
|
||||
"动态模型列表成员、实际路径和加载状态待目标环境核对",
|
||||
[schema, choices, inference],
|
||||
),
|
||||
(
|
||||
"task",
|
||||
"写作任务",
|
||||
"静态COMBO / STRING",
|
||||
"T2VA按文字组织描述;I2VA以首帧、FL2VA以首尾帧、L2VA以尾帧组织对齐说明。切换会改变所用指南和消息结构,输出质量待验证。",
|
||||
None,
|
||||
"静态枚举:T2VA、I2VA、FL2VA、L2VA",
|
||||
[schema, modes, inference],
|
||||
),
|
||||
(
|
||||
"resolution",
|
||||
"目标画面比例",
|
||||
"静态COMBO / STRING",
|
||||
"给写作消息提供目标宽高比例,不是像素分辨率。非空aspect_ratio按固定解析覆盖此选择;本图该槽未接线且保存为空。",
|
||||
"宽高比(无量纲)",
|
||||
"静态枚举:48:9、32:9、21:9、16:9、4:3、1:1、3:4、9:16",
|
||||
[schema, const, aspect, run],
|
||||
),
|
||||
(
|
||||
"duration",
|
||||
"写作目标时长",
|
||||
"INT",
|
||||
"用于写作消息中的目标片长、镜头数量及节奏提示。仅表示固定源码定义,不保证生成视频长度;本图Writer为10秒、Check另为5秒,未自动同步。",
|
||||
"秒",
|
||||
"固定Writer声明:4~15,步长1;源properties.max_duration=30不能当此类生效范围",
|
||||
[schema, const, inference],
|
||||
),
|
||||
(
|
||||
"greedy",
|
||||
"贪心解码开关",
|
||||
"BOOLEAN",
|
||||
"固定声明称其为确定性解码,并将布尔值传给推理层。改变将影响传入的解码选项;本轮未验证解码结果,开启不保证跨环境可重复。",
|
||||
"不适用",
|
||||
"布尔:true / false",
|
||||
[schema, inference],
|
||||
),
|
||||
(
|
||||
"seed",
|
||||
"写作随机种子",
|
||||
"INT",
|
||||
"转为整数传给写作推理层;fixed仅指前端不在排队后调整种子,不能保证实际推理必然可重复。",
|
||||
"不适用",
|
||||
"固定声明:0~4294967295;不是推荐区间",
|
||||
[schema, inference, seed],
|
||||
),
|
||||
(
|
||||
"control_after_generate",
|
||||
"生成后种子控制",
|
||||
"前端COMBO / STRING",
|
||||
"源保存fixed,前端固定分支不改种子。只保存于工作流,不进入prompt执行输入;不计入16个最终标量。",
|
||||
"不适用",
|
||||
"前端控制枚举:fixed、increment、decrement、randomize;本说明仅核对源fixed保存态",
|
||||
[schema, seed, seed_widget, serial],
|
||||
),
|
||||
(
|
||||
"keep_model_loaded",
|
||||
"保留写作模型",
|
||||
"BOOLEAN",
|
||||
"作为keep_loaded传给写作推理层;声明意图是在改写后保留显存中的写作模型。false不代表当前显存已释放或模型未加载。",
|
||||
"不适用",
|
||||
"布尔:true / false;显存占用和释放行为待验证",
|
||||
[schema, inference],
|
||||
),
|
||||
(
|
||||
"aspect_ratio",
|
||||
"外部画面比例",
|
||||
"STRING,COMBO(STRING控件)",
|
||||
"非空值经固定比例解析覆盖resolution;可读取宽高对、尺寸或数字,空串回退到比例选择。本图未接线且为空,不产生覆盖。",
|
||||
"宽高比(无量纲)",
|
||||
"未声明静态字符串长度;可接受语法见固定解析,目标运行效果待验证",
|
||||
[schema, aspect, aspect_run, run],
|
||||
),
|
||||
(
|
||||
"reference_material",
|
||||
"参考素材文字描述",
|
||||
"STRING",
|
||||
"将参考帧或资产的文字描述送入消息组装。此节点读文字,不直接读取像素;原图为空串,不据此宣称参考素材已就绪。",
|
||||
None,
|
||||
"未声明静态长度界限;实际素材与效果待核对",
|
||||
[schema, inference],
|
||||
),
|
||||
(
|
||||
"bypass",
|
||||
"原文旁通",
|
||||
"BOOLEAN",
|
||||
"为true时在库选择、会话复用和写作之前返回原提示;本图false。此参数旁通与图节点mode旁路不同。",
|
||||
"不适用",
|
||||
"布尔:true / false",
|
||||
[schema, run],
|
||||
),
|
||||
(
|
||||
"system_prompt",
|
||||
"替代系统提示文本",
|
||||
"STRING",
|
||||
"非空文本替代整份组装指南且不获取该指南;空串沿固定默认指南分支。源文本原样保留,不执行指南获取或生成。",
|
||||
None,
|
||||
"未声明静态长度界限;内容效果待验证",
|
||||
[schema, inference],
|
||||
),
|
||||
(
|
||||
"repeat_last",
|
||||
"复用上次文本",
|
||||
"BOOLEAN",
|
||||
"虽属界面隐藏/定制控制,仍是真实执行输入。bypass优先;开启后先尝试library_pick,再尝试本节点会话内上次结果;无可用结果时才进入写作分支。会话缓存不随工作流保存,重启丢失。",
|
||||
"不适用",
|
||||
"布尔:true / false;现有会话缓存与库内容未知",
|
||||
[schema, run, memory, library],
|
||||
),
|
||||
(
|
||||
"library_pick",
|
||||
"保存库文本选择",
|
||||
"STRING",
|
||||
"界面隐藏但仍传入执行。仅repeat_last开启时使用;空串或无有效id不选择库记录。有效选择记录丢失会报错;同类同形状可直接复用,否则取保存文本再拆分。选择可随工作流保存,库实际存在未知。",
|
||||
None,
|
||||
"未声明静态长度;保存库JSON选择的实际成员待核对",
|
||||
[schema, run, library, hidden],
|
||||
),
|
||||
]
|
||||
checker = [
|
||||
(
|
||||
"prompt",
|
||||
"待核对文本",
|
||||
"STRING",
|
||||
"源保存文本仍保留,但执行时被169槽0→170.prompt物理线覆盖,不能把该保存文本当最终标量。固定实现读入字符串、按规则拆分核对并从槽0传出;本轮没有运行审查器。",
|
||||
None,
|
||||
"未声明静态长度界限;真实输出内容未验证",
|
||||
[cschema, crun, serial],
|
||||
),
|
||||
(
|
||||
"task",
|
||||
"核对任务",
|
||||
"静态COMBO / STRING",
|
||||
"选择应核对的字段与引用规则,不自动跟随Writer。固定枚举多出Ref2VA;原图与Writer都保存T2VA。",
|
||||
None,
|
||||
"静态枚举:T2VA、I2VA、FL2VA、L2VA、Ref2VA",
|
||||
[cschema, cconst, modes, crun],
|
||||
),
|
||||
(
|
||||
"duration",
|
||||
"核对目标时长",
|
||||
"FLOAT",
|
||||
"按目标秒数核对镜头切点等规则;原图保存JSON整数5,由固定FLOAT控件承载。Writer保存10秒,两者不同,使用前应核对意图;此处不修改源值。",
|
||||
"秒",
|
||||
"固定Check schema:0.1~600,步长0.1;不借其它类动态max_duration当本类范围",
|
||||
[cschema, cconst, crun],
|
||||
),
|
||||
]
|
||||
tree = ast.parse((REF / sources[nodes]["local_file"]).read_text())
|
||||
cls = next(
|
||||
n
|
||||
for n in tree.body
|
||||
if isinstance(n, ast.ClassDef) and n.name == "MiniMaxH3GuidedWriter"
|
||||
)
|
||||
method = next(
|
||||
n
|
||||
for n in cls.body
|
||||
if isinstance(n, ast.FunctionDef) and n.name == "INPUT_TYPES"
|
||||
)
|
||||
specs = {}
|
||||
for item in ast.walk(method):
|
||||
if isinstance(item, ast.Dict):
|
||||
for key, val in zip(item.keys, item.values):
|
||||
if isinstance(key, ast.Constant) and isinstance(key.value, str):
|
||||
specs[key.value] = (val.lineno, val.end_lineno)
|
||||
check_specs = {"prompt": (103, 103), "task": (104, 106), "duration": (107, 114)}
|
||||
fields = []
|
||||
for index, definitions in enumerate((writer, checker)):
|
||||
n = source["nodes"][index]
|
||||
for offset, (
|
||||
name,
|
||||
label,
|
||||
type_name,
|
||||
effect,
|
||||
unit,
|
||||
limits,
|
||||
citations,
|
||||
) in enumerate(definitions):
|
||||
if name == "bypass":
|
||||
citations = [*citations, bypass_return]
|
||||
if index == 0 and name != "control_after_generate":
|
||||
start, end = specs[name]
|
||||
citations = [
|
||||
ref(nodes, start, end, f"{name}的精确字段声明"),
|
||||
*citations,
|
||||
]
|
||||
elif index == 1:
|
||||
start, end = check_specs[name]
|
||||
citations = [
|
||||
ref(check, start, end, f"Check.{name}的精确字段声明"),
|
||||
*citations,
|
||||
]
|
||||
val = n["widgets_values"][offset]
|
||||
assert canonical(val) == canonical(n["widgets_values_named"][name])
|
||||
role = (
|
||||
"frontend"
|
||||
if name == "control_after_generate"
|
||||
else "linked"
|
||||
if index == 1 and name == "prompt"
|
||||
else "scalar"
|
||||
)
|
||||
fields.append(
|
||||
{
|
||||
"node_id": str(n["id"]),
|
||||
"class_type": n["type"],
|
||||
"field": name,
|
||||
"label": label,
|
||||
"type": type_name,
|
||||
"value": val,
|
||||
"json_type": type(val).__name__,
|
||||
"pointer": f"/nodes/{index}/widgets_values/{offset}",
|
||||
"named_pointer": f"/nodes/{index}/widgets_values_named/{name}",
|
||||
"unit": unit,
|
||||
"limits": limits,
|
||||
"effect": effect,
|
||||
"role": role,
|
||||
"evidence": citations,
|
||||
}
|
||||
)
|
||||
data = {
|
||||
"notice": "按源图声明版本核对,目标环境未核对",
|
||||
"source_path": PATH,
|
||||
"source_sha1": hashlib.sha1(raw).hexdigest(),
|
||||
"source_sha256": hashlib.sha256(raw).hexdigest(),
|
||||
"canonical_sha256": hashlib.sha256(canonical(source)).hexdigest(),
|
||||
"versions": [
|
||||
"前端1.53.10(743be3f4fe2e374b0ee39f0ded56e7cb65a837c5)",
|
||||
"minimax-h3-prompt-rewriter(a59888df88a69385d429b6865ea441e7844f49c9)",
|
||||
"comfy-core0.30.0(b1693ecba9f5b65f8c80ab36b195ab963ec92413)",
|
||||
],
|
||||
"counts": {
|
||||
"saved_fields": 18,
|
||||
"final_scalars": 16,
|
||||
"linked_saved_fields": 1,
|
||||
"frontend_only": 1,
|
||||
"physical_edges": 3,
|
||||
},
|
||||
"fields": fields,
|
||||
"sources": refs,
|
||||
"flow": [
|
||||
"169(GuidedWriter)按所选模型与任务写作文本;170(PromptCheck)按规则核对并拆分。这里仅展示固定实现说明,没有运行两个节点。",
|
||||
"169槽0 → 170.prompt;170槽0 → 171.source;170槽8 → 172.source,均为原图物理连线。",
|
||||
"171与172均为PreviewAny:显示字符串,分别为传入文本与核对发现;不是文件下载,也不证明成功生成。",
|
||||
"169.options、170.options与170.references可选槽未接线;options按固定实现使用DEFAULT_OPTIONS副本,references未接时跳过依赖引用实物数量的规则。默认实现不证明目标环境状态。",
|
||||
],
|
||||
"flow_evidence": [schema, run, cschema, crun, preview],
|
||||
"steps": [
|
||||
"先核对169的模型源字符串、T2VA任务和16:9比例;模型文件和目标节点是否存在仍待环境检查。本图没有上传素材入口。",
|
||||
"核对169的原始提示文本与可选system_prompt、reference_material;文本原样保留。aspect_ratio未接线且为空,options未接线;不把默认实现当已安装环境。",
|
||||
"核对169时长10秒与170时长5秒是否符合使用意图;Check任务也是T2VA,它不会自动同步Writer的任务或时长。",
|
||||
"核对169的seed=42、fixed控制及greedy=true;bypass=false、repeat_last=false、library_pick为空,隐藏输入仍应核对,会话和库状态未知。",
|
||||
"沿169槽0→170.prompt阅读数据流,再看171的文本显示及172的核对发现显示。170保存的prompt被连线覆盖;options/reference未接线,真实输出字符串未验证。",
|
||||
"本条仍停用、待可靠转换、说明未定稿且未实跑;目标环境、依赖与执行资格待后续审核,不通过此说明发起生成。",
|
||||
],
|
||||
}
|
||||
assert len(fields) == 18
|
||||
return data
|
||||
|
||||
|
||||
def main():
|
||||
data = build()
|
||||
(OUT / "definition.json").write_text(
|
||||
json.dumps(data, ensure_ascii=False, indent=2) + "\n"
|
||||
)
|
||||
path = REPO / "calliope-backend/src/calliope/comfyui/source_reviews.json"
|
||||
reviews = json.loads(path.read_bytes())
|
||||
reviews[PATH]["fixed_version_document"] = data
|
||||
path.write_text(json.dumps(reviews, ensure_ascii=False, indent=2) + "\n")
|
||||
print(hashlib.sha256(canonical(data)).hexdigest())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,926 @@
|
||||
{
|
||||
"notice": "按源图声明版本核对,目标环境未核对",
|
||||
"source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/Minimax-H3提示词增强.json",
|
||||
"source_sha1": "baa9413092e5f5d013e6e65eacd1203278b5c754",
|
||||
"source_sha256": "ffea53b27d52c63aa9ec9c60144489cc4f9e5a44d9478bcc297be9d9008f1a4c",
|
||||
"canonical_sha256": "bc526d473b9206d1feb300ae1a99708d585dc73eab93a9ee1f0455a3815eb26f",
|
||||
"versions": [
|
||||
"前端1.53.10(743be3f4fe2e374b0ee39f0ded56e7cb65a837c5)",
|
||||
"minimax-h3-prompt-rewriter(a59888df88a69385d429b6865ea441e7844f49c9)",
|
||||
"comfy-core0.30.0(b1693ecba9f5b65f8c80ab36b195ab963ec92413)"
|
||||
],
|
||||
"counts": {
|
||||
"saved_fields": 18,
|
||||
"final_scalars": 16,
|
||||
"linked_saved_fields": 1,
|
||||
"frontend_only": 1,
|
||||
"physical_edges": 3
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"node_id": "169",
|
||||
"class_type": "MiniMaxH3GuidedWriter",
|
||||
"field": "prompt",
|
||||
"label": "原始提示文本",
|
||||
"type": "STRING",
|
||||
"value": "图1的男人和图2的女人赤身躺在床上,女人跨坐在他身上,缓慢地起伏,双手撑在他胸口,头向后仰,呼吸越来越急。男人仰面躺着,喘息着低声说:\"看着我。\"女人俯下身吻他,镜头从侧面缓慢推近。\n",
|
||||
"json_type": "str",
|
||||
"pointer": "/nodes/0/widgets_values/0",
|
||||
"named_pointer": "/nodes/0/widgets_values_named/prompt",
|
||||
"unit": null,
|
||||
"limits": "未声明静态长度界限;内容效果待真实验证",
|
||||
"effect": "将输入文字交给所选任务的写作消息组装。原文本作为不透明字符串保存;本轮没有改写、增强或调用模型。",
|
||||
"role": "scalar",
|
||||
"evidence": [
|
||||
19,
|
||||
0,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "169",
|
||||
"class_type": "MiniMaxH3GuidedWriter",
|
||||
"field": "model",
|
||||
"label": "写作模型选择",
|
||||
"type": "动态COMBO / STRING",
|
||||
"value": "on disk: Qwen3.5-9B-Uncensored-HauhauCS-Aggressive-Q4_K_M.gguf [qwen35, 5.2 GB]",
|
||||
"json_type": "str",
|
||||
"pointer": "/nodes/0/widgets_values/1",
|
||||
"named_pointer": "/nodes/0/widgets_values_named/model",
|
||||
"unit": null,
|
||||
"limits": "动态模型列表成员、实际路径和加载状态待目标环境核对",
|
||||
"effect": "传给写作模型选择解析。保留源字符串;on disk只是源标签,不证明文件存在、模型已加载或当前列表包含它。",
|
||||
"role": "scalar",
|
||||
"evidence": [
|
||||
20,
|
||||
0,
|
||||
3,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "169",
|
||||
"class_type": "MiniMaxH3GuidedWriter",
|
||||
"field": "task",
|
||||
"label": "写作任务",
|
||||
"type": "静态COMBO / STRING",
|
||||
"value": "T2VA",
|
||||
"json_type": "str",
|
||||
"pointer": "/nodes/0/widgets_values/2",
|
||||
"named_pointer": "/nodes/0/widgets_values_named/task",
|
||||
"unit": null,
|
||||
"limits": "静态枚举:T2VA、I2VA、FL2VA、L2VA",
|
||||
"effect": "T2VA按文字组织描述;I2VA以首帧、FL2VA以首尾帧、L2VA以尾帧组织对齐说明。切换会改变所用指南和消息结构,输出质量待验证。",
|
||||
"role": "scalar",
|
||||
"evidence": [
|
||||
21,
|
||||
0,
|
||||
5,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "169",
|
||||
"class_type": "MiniMaxH3GuidedWriter",
|
||||
"field": "resolution",
|
||||
"label": "目标画面比例",
|
||||
"type": "静态COMBO / STRING",
|
||||
"value": "16:9",
|
||||
"json_type": "str",
|
||||
"pointer": "/nodes/0/widgets_values/3",
|
||||
"named_pointer": "/nodes/0/widgets_values_named/resolution",
|
||||
"unit": "宽高比(无量纲)",
|
||||
"limits": "静态枚举:48:9、32:9、21:9、16:9、4:3、1:1、3:4、9:16",
|
||||
"effect": "给写作消息提供目标宽高比例,不是像素分辨率。非空aspect_ratio按固定解析覆盖此选择;本图该槽未接线且保存为空。",
|
||||
"role": "scalar",
|
||||
"evidence": [
|
||||
22,
|
||||
0,
|
||||
4,
|
||||
6,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "169",
|
||||
"class_type": "MiniMaxH3GuidedWriter",
|
||||
"field": "duration",
|
||||
"label": "写作目标时长",
|
||||
"type": "INT",
|
||||
"value": 10,
|
||||
"json_type": "int",
|
||||
"pointer": "/nodes/0/widgets_values/4",
|
||||
"named_pointer": "/nodes/0/widgets_values_named/duration",
|
||||
"unit": "秒",
|
||||
"limits": "固定Writer声明:4~15,步长1;源properties.max_duration=30不能当此类生效范围",
|
||||
"effect": "用于写作消息中的目标片长、镜头数量及节奏提示。仅表示固定源码定义,不保证生成视频长度;本图Writer为10秒、Check另为5秒,未自动同步。",
|
||||
"role": "scalar",
|
||||
"evidence": [
|
||||
23,
|
||||
0,
|
||||
4,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "169",
|
||||
"class_type": "MiniMaxH3GuidedWriter",
|
||||
"field": "greedy",
|
||||
"label": "贪心解码开关",
|
||||
"type": "BOOLEAN",
|
||||
"value": true,
|
||||
"json_type": "bool",
|
||||
"pointer": "/nodes/0/widgets_values/5",
|
||||
"named_pointer": "/nodes/0/widgets_values_named/greedy",
|
||||
"unit": "不适用",
|
||||
"limits": "布尔:true / false",
|
||||
"effect": "固定声明称其为确定性解码,并将布尔值传给推理层。改变将影响传入的解码选项;本轮未验证解码结果,开启不保证跨环境可重复。",
|
||||
"role": "scalar",
|
||||
"evidence": [
|
||||
24,
|
||||
0,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "169",
|
||||
"class_type": "MiniMaxH3GuidedWriter",
|
||||
"field": "seed",
|
||||
"label": "写作随机种子",
|
||||
"type": "INT",
|
||||
"value": 42,
|
||||
"json_type": "int",
|
||||
"pointer": "/nodes/0/widgets_values/6",
|
||||
"named_pointer": "/nodes/0/widgets_values_named/seed",
|
||||
"unit": "不适用",
|
||||
"limits": "固定声明:0~4294967295;不是推荐区间",
|
||||
"effect": "转为整数传给写作推理层;fixed仅指前端不在排队后调整种子,不能保证实际推理必然可重复。",
|
||||
"role": "scalar",
|
||||
"evidence": [
|
||||
25,
|
||||
0,
|
||||
2,
|
||||
14
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "169",
|
||||
"class_type": "MiniMaxH3GuidedWriter",
|
||||
"field": "control_after_generate",
|
||||
"label": "生成后种子控制",
|
||||
"type": "前端COMBO / STRING",
|
||||
"value": "fixed",
|
||||
"json_type": "str",
|
||||
"pointer": "/nodes/0/widgets_values/7",
|
||||
"named_pointer": "/nodes/0/widgets_values_named/control_after_generate",
|
||||
"unit": "不适用",
|
||||
"limits": "前端控制枚举:fixed、increment、decrement、randomize;本说明仅核对源fixed保存态",
|
||||
"effect": "源保存fixed,前端固定分支不改种子。只保存于工作流,不进入prompt执行输入;不计入16个最终标量。",
|
||||
"role": "frontend",
|
||||
"evidence": [
|
||||
0,
|
||||
14,
|
||||
15,
|
||||
16
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "169",
|
||||
"class_type": "MiniMaxH3GuidedWriter",
|
||||
"field": "keep_model_loaded",
|
||||
"label": "保留写作模型",
|
||||
"type": "BOOLEAN",
|
||||
"value": false,
|
||||
"json_type": "bool",
|
||||
"pointer": "/nodes/0/widgets_values/8",
|
||||
"named_pointer": "/nodes/0/widgets_values_named/keep_model_loaded",
|
||||
"unit": "不适用",
|
||||
"limits": "布尔:true / false;显存占用和释放行为待验证",
|
||||
"effect": "作为keep_loaded传给写作推理层;声明意图是在改写后保留显存中的写作模型。false不代表当前显存已释放或模型未加载。",
|
||||
"role": "scalar",
|
||||
"evidence": [
|
||||
26,
|
||||
0,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "169",
|
||||
"class_type": "MiniMaxH3GuidedWriter",
|
||||
"field": "aspect_ratio",
|
||||
"label": "外部画面比例",
|
||||
"type": "STRING,COMBO(STRING控件)",
|
||||
"value": "",
|
||||
"json_type": "str",
|
||||
"pointer": "/nodes/0/widgets_values/9",
|
||||
"named_pointer": "/nodes/0/widgets_values_named/aspect_ratio",
|
||||
"unit": "宽高比(无量纲)",
|
||||
"limits": "未声明静态字符串长度;可接受语法见固定解析,目标运行效果待验证",
|
||||
"effect": "非空值经固定比例解析覆盖resolution;可读取宽高对、尺寸或数字,空串回退到比例选择。本图未接线且为空,不产生覆盖。",
|
||||
"role": "scalar",
|
||||
"evidence": [
|
||||
27,
|
||||
0,
|
||||
6,
|
||||
7,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "169",
|
||||
"class_type": "MiniMaxH3GuidedWriter",
|
||||
"field": "reference_material",
|
||||
"label": "参考素材文字描述",
|
||||
"type": "STRING",
|
||||
"value": "",
|
||||
"json_type": "str",
|
||||
"pointer": "/nodes/0/widgets_values/10",
|
||||
"named_pointer": "/nodes/0/widgets_values_named/reference_material",
|
||||
"unit": null,
|
||||
"limits": "未声明静态长度界限;实际素材与效果待核对",
|
||||
"effect": "将参考帧或资产的文字描述送入消息组装。此节点读文字,不直接读取像素;原图为空串,不据此宣称参考素材已就绪。",
|
||||
"role": "scalar",
|
||||
"evidence": [
|
||||
28,
|
||||
0,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "169",
|
||||
"class_type": "MiniMaxH3GuidedWriter",
|
||||
"field": "bypass",
|
||||
"label": "原文旁通",
|
||||
"type": "BOOLEAN",
|
||||
"value": false,
|
||||
"json_type": "bool",
|
||||
"pointer": "/nodes/0/widgets_values/11",
|
||||
"named_pointer": "/nodes/0/widgets_values_named/bypass",
|
||||
"unit": "不适用",
|
||||
"limits": "布尔:true / false",
|
||||
"effect": "为true时在库选择、会话复用和写作之前返回原提示;本图false。此参数旁通与图节点mode旁路不同。",
|
||||
"role": "scalar",
|
||||
"evidence": [
|
||||
29,
|
||||
0,
|
||||
1,
|
||||
17
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "169",
|
||||
"class_type": "MiniMaxH3GuidedWriter",
|
||||
"field": "system_prompt",
|
||||
"label": "替代系统提示文本",
|
||||
"type": "STRING",
|
||||
"value": "",
|
||||
"json_type": "str",
|
||||
"pointer": "/nodes/0/widgets_values/12",
|
||||
"named_pointer": "/nodes/0/widgets_values_named/system_prompt",
|
||||
"unit": null,
|
||||
"limits": "未声明静态长度界限;内容效果待验证",
|
||||
"effect": "非空文本替代整份组装指南且不获取该指南;空串沿固定默认指南分支。源文本原样保留,不执行指南获取或生成。",
|
||||
"role": "scalar",
|
||||
"evidence": [
|
||||
30,
|
||||
0,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "169",
|
||||
"class_type": "MiniMaxH3GuidedWriter",
|
||||
"field": "repeat_last",
|
||||
"label": "复用上次文本",
|
||||
"type": "BOOLEAN",
|
||||
"value": false,
|
||||
"json_type": "bool",
|
||||
"pointer": "/nodes/0/widgets_values/13",
|
||||
"named_pointer": "/nodes/0/widgets_values_named/repeat_last",
|
||||
"unit": "不适用",
|
||||
"limits": "布尔:true / false;现有会话缓存与库内容未知",
|
||||
"effect": "虽属界面隐藏/定制控制,仍是真实执行输入。bypass优先;开启后先尝试library_pick,再尝试本节点会话内上次结果;无可用结果时才进入写作分支。会话缓存不随工作流保存,重启丢失。",
|
||||
"role": "scalar",
|
||||
"evidence": [
|
||||
31,
|
||||
0,
|
||||
1,
|
||||
8,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "169",
|
||||
"class_type": "MiniMaxH3GuidedWriter",
|
||||
"field": "library_pick",
|
||||
"label": "保存库文本选择",
|
||||
"type": "STRING",
|
||||
"value": "",
|
||||
"json_type": "str",
|
||||
"pointer": "/nodes/0/widgets_values/14",
|
||||
"named_pointer": "/nodes/0/widgets_values_named/library_pick",
|
||||
"unit": null,
|
||||
"limits": "未声明静态长度;保存库JSON选择的实际成员待核对",
|
||||
"effect": "界面隐藏但仍传入执行。仅repeat_last开启时使用;空串或无有效id不选择库记录。有效选择记录丢失会报错;同类同形状可直接复用,否则取保存文本再拆分。选择可随工作流保存,库实际存在未知。",
|
||||
"role": "scalar",
|
||||
"evidence": [
|
||||
32,
|
||||
0,
|
||||
1,
|
||||
9,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "170",
|
||||
"class_type": "MiniMaxH3PromptCheck",
|
||||
"field": "prompt",
|
||||
"label": "待核对文本",
|
||||
"type": "STRING",
|
||||
"value": "",
|
||||
"json_type": "str",
|
||||
"pointer": "/nodes/1/widgets_values/0",
|
||||
"named_pointer": "/nodes/1/widgets_values_named/prompt",
|
||||
"unit": null,
|
||||
"limits": "未声明静态长度界限;真实输出内容未验证",
|
||||
"effect": "源保存文本仍保留,但执行时被169槽0→170.prompt物理线覆盖,不能把该保存文本当最终标量。固定实现读入字符串、按规则拆分核对并从槽0传出;本轮没有运行审查器。",
|
||||
"role": "linked",
|
||||
"evidence": [
|
||||
33,
|
||||
11,
|
||||
12,
|
||||
16
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "170",
|
||||
"class_type": "MiniMaxH3PromptCheck",
|
||||
"field": "task",
|
||||
"label": "核对任务",
|
||||
"type": "静态COMBO / STRING",
|
||||
"value": "T2VA",
|
||||
"json_type": "str",
|
||||
"pointer": "/nodes/1/widgets_values/1",
|
||||
"named_pointer": "/nodes/1/widgets_values_named/task",
|
||||
"unit": null,
|
||||
"limits": "静态枚举:T2VA、I2VA、FL2VA、L2VA、Ref2VA",
|
||||
"effect": "选择应核对的字段与引用规则,不自动跟随Writer。固定枚举多出Ref2VA;原图与Writer都保存T2VA。",
|
||||
"role": "scalar",
|
||||
"evidence": [
|
||||
34,
|
||||
11,
|
||||
13,
|
||||
5,
|
||||
12
|
||||
]
|
||||
},
|
||||
{
|
||||
"node_id": "170",
|
||||
"class_type": "MiniMaxH3PromptCheck",
|
||||
"field": "duration",
|
||||
"label": "核对目标时长",
|
||||
"type": "FLOAT",
|
||||
"value": 5,
|
||||
"json_type": "int",
|
||||
"pointer": "/nodes/1/widgets_values/2",
|
||||
"named_pointer": "/nodes/1/widgets_values_named/duration",
|
||||
"unit": "秒",
|
||||
"limits": "固定Check schema:0.1~600,步长0.1;不借其它类动态max_duration当本类范围",
|
||||
"effect": "按目标秒数核对镜头切点等规则;原图保存JSON整数5,由固定FLOAT控件承载。Writer保存10秒,两者不同,使用前应核对意图;此处不修改源值。",
|
||||
"role": "scalar",
|
||||
"evidence": [
|
||||
35,
|
||||
11,
|
||||
13,
|
||||
12
|
||||
]
|
||||
}
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1453,
|
||||
1576
|
||||
],
|
||||
"claim": "GuidedWriter输入声明、类型与控件提示"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1594,
|
||||
1658
|
||||
],
|
||||
"claim": "旁通、库选择、会话复用、比例解析及写作参数传递"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1224,
|
||||
1297
|
||||
],
|
||||
"claim": "system_prompt替代指南、时长和seed/greedy/keep_loaded传递;未验证底层推理行为"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
199,
|
||||
261
|
||||
],
|
||||
"claim": "写作模型列表动态构造及选择解析;并非目标机目录快照"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/constants.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/constants.py",
|
||||
"sha256": "3681fabe3ee718fbe877a29850ee984ac4f7c09f437646f98e3dcf5956e9f807",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/constants.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__constants.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
18,
|
||||
20
|
||||
],
|
||||
"claim": "固定比例枚举、Writer时长静态界限"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/guide_prompt.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/guide_prompt.py",
|
||||
"sha256": "dc9cd4861d4112bbc7d9c12e2e1d1b26f429283066c88a68df665ffcaaab90b5",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/guide_prompt.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__guide_prompt.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
29,
|
||||
46
|
||||
],
|
||||
"claim": "四种基础任务及完整参考任务的字段对应"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/aspect.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/aspect.py",
|
||||
"sha256": "da6320ee5d4ad0465734ba96ba81148c1baeb88bc7b90b6afb3926983c8b5e32",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/aspect.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__aspect.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
30,
|
||||
43
|
||||
],
|
||||
"claim": "比例选择与aspect_ratio覆盖关系"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/aspect.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/aspect.py",
|
||||
"sha256": "da6320ee5d4ad0465734ba96ba81148c1baeb88bc7b90b6afb3926983c8b5e32",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/aspect.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__aspect.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
71,
|
||||
109
|
||||
],
|
||||
"claim": "宽高对/尺寸/数字读取及空值回退;仅说明固定实现"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/memory.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/memory.py",
|
||||
"sha256": "0e38cc2d86059e5549843aa0fc6932eb820ee6de34d8f58954b6dc72c30bf5c7",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/memory.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__memory.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1,
|
||||
43
|
||||
],
|
||||
"claim": "每节点会话内复用,重启丢失;保存库选择另行持久化"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/library.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/library.py",
|
||||
"sha256": "20d1d77be6e829ef3a58476c052d345ad5457c7d1ffd608c2c3324bccf596937",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/library.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__library.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
323,
|
||||
386
|
||||
],
|
||||
"claim": "repeat_last开启后解析库选择;有效选择丢失报错,否则可能回退"
|
||||
},
|
||||
{
|
||||
"id": "h3:web/js/prompt_library.js",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "web/js/prompt_library.js",
|
||||
"sha256": "a218e99753fcf01844e8564ad130c8829930d13d0d36718ab6809dc701581099",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/web/js/prompt_library.js",
|
||||
"local_file": "h3__web__js__prompt_library.js",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1046,
|
||||
1090
|
||||
],
|
||||
"claim": "隐藏library_pick的界面处理不删除执行输入"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/prompt_check.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/prompt_check.py",
|
||||
"sha256": "d3a9b06923704b0160d2917cf212f602bb2c09a27a763cd9722c78bd59890fa2",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/prompt_check.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__prompt_check.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
48,
|
||||
151
|
||||
],
|
||||
"claim": "Check提示、任务、秒数、可选options/references及9个输出槽"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/prompt_check.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/prompt_check.py",
|
||||
"sha256": "d3a9b06923704b0160d2917cf212f602bb2c09a27a763cd9722c78bd59890fa2",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/prompt_check.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__prompt_check.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
153,
|
||||
202
|
||||
],
|
||||
"claim": "Check读入文本、规则核对、字段拆分及输出;未运行验证"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/universal.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/universal.py",
|
||||
"sha256": "5af26c72b73dfa25ac65fa091386daf950ea941549160db0625ad491c5d9c5bd",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/universal.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__universal.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
76,
|
||||
102
|
||||
],
|
||||
"claim": "Check任务枚举、字段及0.1至600秒schema界限"
|
||||
},
|
||||
{
|
||||
"id": "frontend:src/scripts/valueControl.ts",
|
||||
"commit": "743be3f4fe2e374b0ee39f0ded56e7cb65a837c5",
|
||||
"file": "src/scripts/valueControl.ts",
|
||||
"sha256": "007c7204d1fe88d156e07fee783a55e79fa7610e98a8a9f7761704a076a60458",
|
||||
"url": "https://github.com/Comfy-Org/ComfyUI_frontend/blob/743be3f4fe2e374b0ee39f0ded56e7cb65a837c5/src/scripts/valueControl.ts",
|
||||
"local_file": "frontend__src__scripts__valueControl.ts",
|
||||
"license": "GPL-3.0",
|
||||
"lines": [
|
||||
1,
|
||||
92
|
||||
],
|
||||
"claim": "control_after_generate控制与fixed不改值分支"
|
||||
},
|
||||
{
|
||||
"id": "frontend:src/scripts/widgets.ts",
|
||||
"commit": "743be3f4fe2e374b0ee39f0ded56e7cb65a837c5",
|
||||
"file": "src/scripts/widgets.ts",
|
||||
"sha256": "932a143a1a48c93aa3bee43b6dc3f932cd7f9a946802530650b4acdd41d36bd5",
|
||||
"url": "https://github.com/Comfy-Org/ComfyUI_frontend/blob/743be3f4fe2e374b0ee39f0ded56e7cb65a837c5/src/scripts/widgets.ts",
|
||||
"local_file": "frontend__src__scripts__widgets.ts",
|
||||
"license": "GPL-3.0",
|
||||
"lines": [
|
||||
91,
|
||||
148
|
||||
],
|
||||
"claim": "INT种子附加控件构造;精确规则与序列化见既有固定证据"
|
||||
},
|
||||
{
|
||||
"id": "frontend:src/utils/executionUtil.ts",
|
||||
"commit": "743be3f4fe2e374b0ee39f0ded56e7cb65a837c5",
|
||||
"file": "src/utils/executionUtil.ts",
|
||||
"sha256": "b29fd312e66c7415fa4c720654ac121dc67600b0c1fedf079b6575a174960698",
|
||||
"url": "https://github.com/Comfy-Org/ComfyUI_frontend/blob/743be3f4fe2e374b0ee39f0ded56e7cb65a837c5/src/utils/executionUtil.ts",
|
||||
"local_file": "frontend__src__utils__executionUtil.ts",
|
||||
"license": "GPL-3.0",
|
||||
"lines": [
|
||||
124,
|
||||
168
|
||||
],
|
||||
"claim": "执行输入构造与物理线覆盖;该文件未调用"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
929,
|
||||
932
|
||||
],
|
||||
"claim": "旁通函数将原文本作为首出口返回"
|
||||
},
|
||||
{
|
||||
"id": "core:comfy_extras/nodes_preview_any.py",
|
||||
"commit": "b1693ecba9f5b65f8c80ab36b195ab963ec92413",
|
||||
"file": "comfy_extras/nodes_preview_any.py",
|
||||
"sha256": "d51a648031621d638ae5f42787042ec08b06792e0b61045b7993b42db8ea7e7b",
|
||||
"url": "https://github.com/Comfy-Org/ComfyUI/blob/b1693ecba9f5b65f8c80ab36b195ab963ec92413/comfy_extras/nodes_preview_any.py",
|
||||
"local_file": "core__comfy_extras__nodes_preview_any.py",
|
||||
"license": "GPL-3.0",
|
||||
"lines": [
|
||||
8,
|
||||
39
|
||||
],
|
||||
"claim": "PreviewAny以文本显示输入;不生成文件"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1468,
|
||||
1475
|
||||
],
|
||||
"claim": "prompt的精确字段声明"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1476,
|
||||
1486
|
||||
],
|
||||
"claim": "model的精确字段声明"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1487,
|
||||
1498
|
||||
],
|
||||
"claim": "task的精确字段声明"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1499,
|
||||
1502
|
||||
],
|
||||
"claim": "resolution的精确字段声明"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1503,
|
||||
1512
|
||||
],
|
||||
"claim": "duration的精确字段声明"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1513,
|
||||
1522
|
||||
],
|
||||
"claim": "greedy的精确字段声明"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1523,
|
||||
1531
|
||||
],
|
||||
"claim": "seed的精确字段声明"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1532,
|
||||
1542
|
||||
],
|
||||
"claim": "keep_model_loaded的精确字段声明"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1545,
|
||||
1548
|
||||
],
|
||||
"claim": "aspect_ratio的精确字段声明"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1549,
|
||||
1561
|
||||
],
|
||||
"claim": "reference_material的精确字段声明"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1563,
|
||||
1563
|
||||
],
|
||||
"claim": "bypass的精确字段声明"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1564,
|
||||
1567
|
||||
],
|
||||
"claim": "system_prompt的精确字段声明"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1568,
|
||||
1568
|
||||
],
|
||||
"claim": "repeat_last的精确字段声明"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/nodes.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/nodes.py",
|
||||
"sha256": "93995f62675dc5d2ca8054eb961ffcfa9d3ba07446ef76fbbe5fb0bf56ab0a67",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/nodes.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__nodes.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
1569,
|
||||
1569
|
||||
],
|
||||
"claim": "library_pick的精确字段声明"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/prompt_check.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/prompt_check.py",
|
||||
"sha256": "d3a9b06923704b0160d2917cf212f602bb2c09a27a763cd9722c78bd59890fa2",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/prompt_check.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__prompt_check.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
103,
|
||||
103
|
||||
],
|
||||
"claim": "Check.prompt的精确字段声明"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/prompt_check.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/prompt_check.py",
|
||||
"sha256": "d3a9b06923704b0160d2917cf212f602bb2c09a27a763cd9722c78bd59890fa2",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/prompt_check.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__prompt_check.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
104,
|
||||
106
|
||||
],
|
||||
"claim": "Check.task的精确字段声明"
|
||||
},
|
||||
{
|
||||
"id": "h3:minimax_h3_rewriter/prompt_check.py",
|
||||
"commit": "a59888df88a69385d429b6865ea441e7844f49c9",
|
||||
"file": "minimax_h3_rewriter/prompt_check.py",
|
||||
"sha256": "d3a9b06923704b0160d2917cf212f602bb2c09a27a763cd9722c78bd59890fa2",
|
||||
"url": "https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI/blob/a59888df88a69385d429b6865ea441e7844f49c9/minimax_h3_rewriter/prompt_check.py",
|
||||
"local_file": "h3__minimax_h3_rewriter__prompt_check.py",
|
||||
"license": "MIT",
|
||||
"lines": [
|
||||
107,
|
||||
114
|
||||
],
|
||||
"claim": "Check.duration的精确字段声明"
|
||||
}
|
||||
],
|
||||
"flow": [
|
||||
"169(GuidedWriter)按所选模型与任务写作文本;170(PromptCheck)按规则核对并拆分。这里仅展示固定实现说明,没有运行两个节点。",
|
||||
"169槽0 → 170.prompt;170槽0 → 171.source;170槽8 → 172.source,均为原图物理连线。",
|
||||
"171与172均为PreviewAny:显示字符串,分别为传入文本与核对发现;不是文件下载,也不证明成功生成。",
|
||||
"169.options、170.options与170.references可选槽未接线;options按固定实现使用DEFAULT_OPTIONS副本,references未接时跳过依赖引用实物数量的规则。默认实现不证明目标环境状态。"
|
||||
],
|
||||
"flow_evidence": [
|
||||
0,
|
||||
1,
|
||||
11,
|
||||
12,
|
||||
18
|
||||
],
|
||||
"steps": [
|
||||
"先核对169的模型源字符串、T2VA任务和16:9比例;模型文件和目标节点是否存在仍待环境检查。本图没有上传素材入口。",
|
||||
"核对169的原始提示文本与可选system_prompt、reference_material;文本原样保留。aspect_ratio未接线且为空,options未接线;不把默认实现当已安装环境。",
|
||||
"核对169时长10秒与170时长5秒是否符合使用意图;Check任务也是T2VA,它不会自动同步Writer的任务或时长。",
|
||||
"核对169的seed=42、fixed控制及greedy=true;bypass=false、repeat_last=false、library_pick为空,隐藏输入仍应核对,会话和库状态未知。",
|
||||
"沿169槽0→170.prompt阅读数据流,再看171的文本显示及172的核对发现显示。170保存的prompt被连线覆盖;options/reference未接线,真实输出字符串未验证。",
|
||||
"本条仍停用、待可靠转换、说明未定稿且未实跑;目标环境、依赖与执行资格待后续审核,不通过此说明发起生成。"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,299 @@
|
||||
"""Reproduce H3 document adoption, real old-DB refresh and untouched boundaries offline."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import hashlib
|
||||
import io
|
||||
import json
|
||||
import os
|
||||
import sqlite3
|
||||
import subprocess
|
||||
import sys
|
||||
import tarfile
|
||||
import tempfile
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
|
||||
REPO = Path(__file__).resolve().parents[3]
|
||||
OUT = Path(__file__).resolve().parent
|
||||
BASE = "b47e13d169be9a786f69625f2fda58895204802a"
|
||||
sys.path.insert(0, str(REPO / "calliope-backend"))
|
||||
from calliope.comfyui.fixed_document import (
|
||||
DEFINITION_SHA256,
|
||||
SOURCE_PATH,
|
||||
canonical,
|
||||
)
|
||||
from scripts.audit_library_documents import audit
|
||||
|
||||
|
||||
def write(name, data):
|
||||
(OUT / name).write_text(json.dumps(data, ensure_ascii=False, indent=2) + "\n")
|
||||
|
||||
|
||||
def main():
|
||||
local = REPO / ".local-evidence/h3-document"
|
||||
local.mkdir(parents=True, exist_ok=True)
|
||||
with tempfile.TemporaryDirectory(dir=local) as directory:
|
||||
work = Path(directory)
|
||||
baseline = work / "baseline"
|
||||
baseline.mkdir()
|
||||
raw = subprocess.check_output(
|
||||
["git", "archive", BASE, "calliope-backend/src"], cwd=REPO
|
||||
)
|
||||
with tarfile.open(fileobj=io.BytesIO(raw)) as archive:
|
||||
archive.extractall(baseline, filter="data")
|
||||
db = work / "library.db"
|
||||
|
||||
def run(name, old=False):
|
||||
output = work / name
|
||||
env = {
|
||||
**os.environ,
|
||||
"PYTHONPATH": str((baseline if old else REPO) / "calliope-backend/src"),
|
||||
}
|
||||
command = [
|
||||
sys.executable,
|
||||
"-m",
|
||||
"calliope.comfyui.library_cli",
|
||||
"import",
|
||||
"--root",
|
||||
str(REPO / "example_ComfyUI_workflows"),
|
||||
"--db",
|
||||
str(db),
|
||||
"--source-commit",
|
||||
BASE,
|
||||
"--companions",
|
||||
str(REPO / "docs/hel-892/supplied-api/manifest.json"),
|
||||
"--output-dir",
|
||||
str(output),
|
||||
]
|
||||
subprocess.run(
|
||||
command, env=env, cwd=REPO, check=True, stdout=subprocess.DEVNULL
|
||||
)
|
||||
return json.loads((output / "import_report.json").read_bytes()), output
|
||||
|
||||
def rows():
|
||||
with sqlite3.connect(db) as conn:
|
||||
conn.row_factory = sqlite3.Row
|
||||
return {
|
||||
r["source_repo_path"]: dict(r)
|
||||
for r in conn.execute("SELECT * FROM workflows")
|
||||
}
|
||||
|
||||
first, _ = run("first", old=True)
|
||||
before = rows()
|
||||
assert first["counts"] == {"imported": 155, "user_excluded": 1}
|
||||
assert "fixed_version" not in json.loads(before[SOURCE_PATH]["doc_json"])
|
||||
original_db = db
|
||||
db = work / "old-user.db"
|
||||
with sqlite3.connect(original_db) as src, sqlite3.connect(db) as dst:
|
||||
src.backup(dst)
|
||||
dst.execute(
|
||||
"UPDATE workflows SET description=? WHERE source_repo_path=?",
|
||||
("旧库用户版", SOURCE_PATH),
|
||||
)
|
||||
old_user_before = rows()
|
||||
old_user, _ = run("old-user-protection")
|
||||
assert old_user["counts"] == {"conflict": 1, "skipped": 154, "user_excluded": 1}
|
||||
assert rows() == old_user_before
|
||||
db = original_db
|
||||
refreshed, exported = run("refresh")
|
||||
after = rows()
|
||||
assert refreshed["counts"] == {"updated": 1, "skipped": 154, "user_excluded": 1}
|
||||
for path, row in after.items():
|
||||
if path != SOURCE_PATH:
|
||||
assert row == before[path]
|
||||
else:
|
||||
for column in row.keys() - {
|
||||
"doc_json",
|
||||
"batch_id",
|
||||
"imported_at",
|
||||
"library_fingerprint",
|
||||
}:
|
||||
assert row[column] == before[path][column]
|
||||
doc = json.loads(after[SOURCE_PATH]["doc_json"])
|
||||
assert doc["fixed_version"]["matched"]
|
||||
block = {k: v for k, v in doc["fixed_version"].items() if k != "matched"}
|
||||
assert hashlib.sha256(canonical(block)).hexdigest() == DEFINITION_SHA256
|
||||
write("actual-document.json", doc)
|
||||
report = audit(REPO, exported)
|
||||
assert (
|
||||
report["named_values_preserved"] == 1217
|
||||
and report["unnamed_widget_nodes"] == 3660
|
||||
)
|
||||
assert report["full_documents_completed"] == report["real_executions"] == 0
|
||||
write(
|
||||
"document-audit-summary.json",
|
||||
{k: v for k, v in report.items() if k != "files"},
|
||||
)
|
||||
companion = 0
|
||||
for row in after.values():
|
||||
d = json.loads(row["doc_json"])
|
||||
companion += sum(
|
||||
p.get("value_origin") == "supplied_api_companion" for p in d["params"]
|
||||
)
|
||||
assert (
|
||||
not row["is_enabled"]
|
||||
and row["doc_completed_at"] is None
|
||||
and row["exec_verified_at"] is None
|
||||
)
|
||||
assert d["dependencies"]["check_state"] == "unchecked"
|
||||
assert companion == 294
|
||||
repeat, _ = run("repeat")
|
||||
assert repeat["counts"] == {"skipped": 155, "user_excluded": 1}
|
||||
# Restore the actual historical row, then repeat adoption. No mocks here.
|
||||
from calliope.comfyui.library import rollback_batch
|
||||
|
||||
with sqlite3.connect(db) as conn:
|
||||
conn.row_factory = sqlite3.Row
|
||||
rollback = rollback_batch(conn, refreshed["batch_id"])
|
||||
assert rollback["files"] == [
|
||||
{"workflow_id": after[SOURCE_PATH]["id"], "result": "restored"}
|
||||
]
|
||||
assert rows() == before
|
||||
restored, _ = run("after-rollback")
|
||||
assert restored["counts"] == {"updated": 1, "skipped": 154, "user_excluded": 1}
|
||||
with sqlite3.connect(db) as conn:
|
||||
conn.execute(
|
||||
"UPDATE workflows SET description=? WHERE source_repo_path=?",
|
||||
("用户整行保护", SOURCE_PATH),
|
||||
)
|
||||
protected = rows()
|
||||
user, _ = run("user")
|
||||
assert user["counts"] == {"conflict": 1, "skipped": 154, "user_excluded": 1}
|
||||
assert rows() == protected and len(protected[SOURCE_PATH]) == 29
|
||||
# A second genuinely fresh current import, distinct from the historical upgrade.
|
||||
db = work / "current-fresh.db"
|
||||
current, _ = run("current-first")
|
||||
again, _ = run("current-repeat")
|
||||
assert current["counts"] == {"imported": 155, "user_excluded": 1}
|
||||
assert current["states"] == {"pending_check": 16, "needs_conversion": 139}
|
||||
assert again["counts"] == {"skipped": 155, "user_excluded": 1}
|
||||
write(
|
||||
"import-protection.json",
|
||||
{
|
||||
"historical_code": BASE,
|
||||
"historical_first": first["counts"],
|
||||
"actual_historical_doc_lacked_fixed_block": True,
|
||||
"refresh": refreshed["counts"],
|
||||
"only_updated_path": SOURCE_PATH,
|
||||
"other_154_rows_byte_equal": True,
|
||||
"repeat": repeat["counts"],
|
||||
"rollback_restored_actual_old_row": True,
|
||||
"after_rollback": restored["counts"],
|
||||
"user_modified": user["counts"],
|
||||
"old_user_before_refresh": old_user["counts"],
|
||||
"old_user_all_columns_preserved": True,
|
||||
"protected_columns": 29,
|
||||
"whole_row_equal": True,
|
||||
"current_fresh": current["counts"],
|
||||
"current_repeat": again["counts"],
|
||||
"states": current["states"],
|
||||
"source_named": 1217,
|
||||
"source_positional": 3660,
|
||||
"companion_values": companion,
|
||||
"new_definitions": doc["fixed_version"]["counts"],
|
||||
"all_disabled": True,
|
||||
"environment_unchecked": True,
|
||||
"completed": 0,
|
||||
"executed": 0,
|
||||
},
|
||||
)
|
||||
originals = json.loads(
|
||||
(REPO / "docs/hel-892/media-evidence/original-bytes.json").read_bytes()
|
||||
)["files"]
|
||||
production = json.loads(
|
||||
(REPO / "docs/hel-892/setget-evidence/production-protection.json").read_bytes()
|
||||
)["files"]
|
||||
preserved = []
|
||||
protected_production = [
|
||||
p for p in production if not p["path"].endswith("/library.py")
|
||||
]
|
||||
for item in originals + protected_production:
|
||||
path = item["path"]
|
||||
raw = (REPO / path).read_bytes()
|
||||
assert raw == subprocess.check_output(
|
||||
["git", "show", f"{BASE}:{path}"], cwd=REPO
|
||||
)
|
||||
preserved.append({"path": path, "sha256": hashlib.sha256(raw).hexdigest()})
|
||||
assert len(originals) == 163 and len(production) == 9
|
||||
# Freeze the complete 28-profile baseline artifacts and every executable conversion module.
|
||||
boundaries = [
|
||||
"docs/hel-892/h3-chain-evidence/library.json",
|
||||
"docs/hel-892/media-evidence/protected-six-cases.json",
|
||||
"calliope-backend/src/calliope/comfyui/structure_reference.py",
|
||||
"calliope-backend/src/calliope/comfyui/serialization_reference.py",
|
||||
"calliope-backend/src/calliope/comfyui/ui2api.py",
|
||||
"calliope-backend/src/calliope/comfyui/h3_core_reference.py",
|
||||
"calliope-backend/src/calliope/comfyui/h3_chain_reference.py",
|
||||
]
|
||||
for path in boundaries:
|
||||
assert (REPO / path).read_bytes() == subprocess.check_output(
|
||||
["git", "show", f"{BASE}:{path}"], cwd=REPO
|
||||
)
|
||||
frozen = json.loads((REPO / boundaries[0]).read_bytes())
|
||||
assert len(frozen["profiles"]) == 28
|
||||
write(
|
||||
"unchanged-boundaries.json",
|
||||
{
|
||||
"base": BASE,
|
||||
"original_files": 163,
|
||||
"unchanged_production_files": 8,
|
||||
"authorized_document_integration": "library.py",
|
||||
"files": preserved,
|
||||
"frozen_conversion_and_audits": boundaries,
|
||||
"old_28_attempts_and_gaps_9_candidate_hashes_six_diffs": "unchanged artifacts and implementation; no conversion rerun claimed",
|
||||
},
|
||||
)
|
||||
review_path = "calliope-backend/src/calliope/comfyui/source_reviews.json"
|
||||
old_reviews = json.loads(
|
||||
subprocess.check_output(["git", "show", f"{BASE}:{review_path}"], cwd=REPO)
|
||||
)
|
||||
current_reviews = json.loads((REPO / review_path).read_bytes())
|
||||
del current_reviews[SOURCE_PATH]["fixed_version_document"]
|
||||
assert current_reviews == old_reviews
|
||||
ui_path = "calliope-web/src/lib/components/WorkflowDocumentDrawer.svelte"
|
||||
old_ui = subprocess.check_output(
|
||||
["git", "show", f"{BASE}:{ui_path}"], cwd=REPO
|
||||
).decode()
|
||||
assert (REPO / ui_path).read_text().split("<style>")[1] == old_ui.split("<style>")[
|
||||
1
|
||||
]
|
||||
write(
|
||||
"editorial-boundaries.json",
|
||||
{
|
||||
"source_reviews_only_one_new_named_block": True,
|
||||
"old_all_source_reviews_identical": True,
|
||||
"drawer_css_unchanged": True,
|
||||
},
|
||||
)
|
||||
packages = []
|
||||
with (
|
||||
zipfile.ZipFile(next((REPO / "calliope-backend/dist").glob("*.whl"))) as wheel,
|
||||
tarfile.open(next((REPO / "calliope-backend/dist").glob("*.tar.gz"))) as sdist,
|
||||
):
|
||||
for name in ("library.py", "source_reviews.json", "fixed_document.py"):
|
||||
path = f"calliope-backend/src/calliope/comfyui/{name}"
|
||||
raw = (REPO / path).read_bytes()
|
||||
assert wheel.read(f"calliope/comfyui/{name}") == raw
|
||||
member = next(
|
||||
n
|
||||
for n in sdist.getnames()
|
||||
if n.endswith(f"/src/calliope/comfyui/{name}")
|
||||
)
|
||||
assert sdist.extractfile(member).read() == raw
|
||||
packages.append(
|
||||
{
|
||||
"path": path,
|
||||
"sha256": hashlib.sha256(raw).hexdigest(),
|
||||
"wheel": True,
|
||||
"sdist": True,
|
||||
}
|
||||
)
|
||||
write("package-check.json", packages)
|
||||
print(
|
||||
"PASS: real historical DB refresh1/skipped154; fresh155/repeat155; 18 definitions; 1217/3660/294; protections and packages"
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -55,7 +55,7 @@
|
||||
| 130 /nodes/19 | 原数组[24,8,"sRGB"],images←122:0、audio←121:0 (/links/21..22) | **拒绝**:固定schema只有两控件;三项全部保留为raw证据,不给未知第三项编字段名/删除它。 |
|
||||
| 92 /nodes/20 | filename_prefix=video/01_reference_4step_sla、format=auto、codec=auto;video←130:0 (/links/23) | 三控件固定保存布局通过,上游130拒绝,整图关闭。 |
|
||||
|
||||
本组11实例有11项已映射保存标量(4加载器实例7项、采样选择1项、SaveVideo3项);另CreateVideo3项仅raw、未映射。五个无控件实例也逐槽检查。组合profile共18个节点证据,15布局通过/3布局拒绝;22项映射保存标量含第一组两个拒绝算式的2字符串,不可全计为运行字段完成。整图14条实际拒因:两算式布局、CreateVideo布局、三个未知H3类及依赖它们的无据输入。剩余三个未知类为H3SLAAttention900、MiniMaxH3ImageToVideo131、MiniMaxH3SigmaShift142,本轮未扩大调查。
|
||||
本组11实例有11项已映射保存标量(4加载器实例7项、采样选择1项、SaveVideo3项);另CreateVideo3项仅raw、未映射。四个无控件实例(126/125/121/122)也逐槽检查。组合profile共18个节点证据,15布局通过/3布局拒绝;22项映射保存标量含第一组两个拒绝算式的2字符串,不可全计为运行字段完成。整图14条实际拒因:两算式布局、CreateVideo布局、三个未知H3类及依赖它们的无据输入。剩余三个未知类为H3SLAAttention900、MiniMaxH3ImageToVideo131、MiniMaxH3SigmaShift142,本轮未扩大调查。
|
||||
|
||||
另外两份uncensored图仅按同契约批跑,三份均prompt=None、comparison_unavailable、无部分prompt;未删节点/保存值制造候选。没有真实API配套,不声称等价。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user