HEL-892: add source-bound VOSR2 image reference documentation
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -15,6 +15,10 @@ DEFINITION_SHA256 = "c4c7f04fde29dc7485a341207397fcf6191e3fcbe89ecc2d238f4a4f5bc
|
||||
|
||||
# Explicit path allowlist; a recomputed caller-supplied digest cannot extend trust.
|
||||
DEFINITIONS = {
|
||||
(
|
||||
"example_ComfyUI_workflows/0-基础处理:图像合并-音频"
|
||||
"分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json"
|
||||
): "61bfdcf85b7b5646c74be26ee98695e2cef7796cd2760a9c7d45e252d6b7b089",
|
||||
(
|
||||
"example_ComfyUI_workflows/0-基础处理:图像合并-音频"
|
||||
"分离-视频截取合并-图像视频放大/高清放大/Seedvr2_3b_int8_视频"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,261 @@
|
||||
"""VOSR2 exact saved states, editorial integrity and source identity boundaries."""
|
||||
|
||||
import ast
|
||||
import copy
|
||||
import hashlib
|
||||
import json
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from calliope.comfyui.fixed_document import DEFINITIONS, canonical
|
||||
from calliope.comfyui.library import build_document
|
||||
from calliope.comfyui.source_reviews import review_for
|
||||
|
||||
REPO = Path(__file__).resolve().parents[2]
|
||||
OUT = REPO / "docs/hel-892/vosr2-document-evidence"
|
||||
PATH = next(p for p in DEFINITIONS if p.endswith("/VOSR2_图像超分放大.json"))
|
||||
SOURCE = json.loads((REPO / PATH).read_bytes())
|
||||
REVIEW = review_for(PATH, hashlib.sha1((REPO / PATH).read_bytes()).hexdigest())
|
||||
BLOCK = REVIEW["fixed_version_document"]
|
||||
|
||||
|
||||
def pointer(obj, path):
|
||||
for part in path.strip("/").split("/"):
|
||||
obj = (
|
||||
obj[int(part)]
|
||||
if isinstance(obj, list)
|
||||
else obj[part.replace("~1", "/").replace("~0", "~")]
|
||||
)
|
||||
return obj
|
||||
|
||||
|
||||
def doc(source=SOURCE, review=REVIEW):
|
||||
return build_document(PATH, source, None, None, [], review)
|
||||
|
||||
|
||||
def refuse(source, review):
|
||||
b = review["fixed_version_document"]
|
||||
b["canonical_sha256"] = hashlib.sha256(canonical(source)).hexdigest()
|
||||
review["caller_digest"] = hashlib.sha256(canonical(b)).hexdigest()
|
||||
assert not doc(source, review)["fixed_version"]["matched"]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("f", BLOCK["fields"], ids=lambda f: f["node_id"] + "." + f["field"])
|
||||
def test_saved_position_dual_storage_scope_and_evidence(f):
|
||||
value = pointer(SOURCE, f["pointer"])
|
||||
assert canonical(value) == canonical(f["value"])
|
||||
assert type(value).__name__ == f["json_type"]
|
||||
assert pointer(SOURCE, f["named_pointer"]) == f["named_value"]
|
||||
assert f["scope"] == "root" and f["named_pointer"] in f["execution_note"]
|
||||
if f["field"] == "rgthree_comparer":
|
||||
assert [
|
||||
{k: v for k, v in x.items() if k != "img"} for x in f["named_value"]["images"]
|
||||
] == value
|
||||
else:
|
||||
assert canonical(value) == canonical(f["named_value"])
|
||||
for key in [
|
||||
"label",
|
||||
"schema_default",
|
||||
"unit",
|
||||
"limits",
|
||||
"effect",
|
||||
"execution_note",
|
||||
"role",
|
||||
"type",
|
||||
]:
|
||||
assert f[key]
|
||||
for i in f["evidence"]:
|
||||
e = BLOCK["sources"][i]
|
||||
raw = (OUT / e["local_file"]).read_bytes()
|
||||
assert hashlib.sha256(raw).hexdigest() == e["sha256"]
|
||||
assert 1 <= e["lines"][0] <= e["lines"][1] <= len(raw.decode().splitlines())
|
||||
|
||||
|
||||
@pytest.mark.parametrize("f", BLOCK["fields"], ids=lambda f: f["node_id"] + "." + f["field"])
|
||||
@pytest.mark.parametrize("variant", ["physical", "named", "text"])
|
||||
def test_each_position_forgery_refused_with_recomputed_caller_digest(f, variant):
|
||||
s, r = copy.deepcopy(SOURCE), copy.deepcopy(REVIEW)
|
||||
if variant == "text":
|
||||
r["fixed_version_document"]["fields"][BLOCK["fields"].index(f)]["effect"] = "forged"
|
||||
else:
|
||||
p = f["pointer"] if variant == "physical" else f["named_pointer"]
|
||||
parent, _, key = p.rpartition("/")
|
||||
value = pointer(s, parent)
|
||||
value[int(key) if isinstance(value, list) else key] = "forged"
|
||||
refuse(s, r)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("i", range(13))
|
||||
@pytest.mark.parametrize("variant", ["mode", "identity"])
|
||||
def test_all_node_modes_and_identities_bound(i, variant):
|
||||
s, r = copy.deepcopy(SOURCE), copy.deepcopy(REVIEW)
|
||||
if variant == "mode":
|
||||
s["nodes"][i]["mode"] = 2
|
||||
else:
|
||||
s["nodes"][i]["properties"]["ver"] = "forged"
|
||||
refuse(s, r)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("i", range(10))
|
||||
@pytest.mark.parametrize("variant", ["record", "input", "output"])
|
||||
def test_each_edge_endpoint_bound(i, variant):
|
||||
s, r = copy.deepcopy(SOURCE), copy.deepcopy(REVIEW)
|
||||
eid, src, slot, dst, inp, _ = s["links"][i]
|
||||
ns = {n["id"]: n for n in s["nodes"]}
|
||||
if variant == "record":
|
||||
s["links"][i][3] = 999999
|
||||
elif variant == "input":
|
||||
ns[dst]["inputs"][inp]["link"] = 999999
|
||||
else:
|
||||
ns[src]["outputs"][slot]["links"] = [999999]
|
||||
refuse(s, r)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"variant",
|
||||
[
|
||||
"note",
|
||||
"history_url",
|
||||
"history_img",
|
||||
"upload_null",
|
||||
"group_active",
|
||||
"disable",
|
||||
"sdppp",
|
||||
"ue",
|
||||
"graph_version",
|
||||
"frontend",
|
||||
"null",
|
||||
"source_sha",
|
||||
"path",
|
||||
"citation",
|
||||
"overview",
|
||||
"missing",
|
||||
"empty",
|
||||
],
|
||||
)
|
||||
def test_special_saved_shapes_and_metadata_fail_closed(variant):
|
||||
s, r = copy.deepcopy(SOURCE), copy.deepcopy(REVIEW)
|
||||
ns = {n["id"]: n for n in s["nodes"]}
|
||||
b = r["fixed_version_document"]
|
||||
if variant == "note":
|
||||
ns[140]["widgets_values"][0] = "forged"
|
||||
elif variant == "history_url":
|
||||
ns[139]["widgets_values"][0][0]["url"] = "https://example.invalid/never"
|
||||
elif variant == "history_img":
|
||||
ns[139]["widgets_values_named"]["rgthree_comparer"]["images"][0]["img"] = {"changed": True}
|
||||
elif variant == "upload_null":
|
||||
del ns[148]["widgets_values_named"]["choose video to upload"]
|
||||
elif variant == "group_active":
|
||||
ns[149]["properties"]["guhai_ig_active_set"] = []
|
||||
elif variant == "disable":
|
||||
ns[149]["properties"]["guhai_ig_disable"] = True
|
||||
elif variant == "sdppp":
|
||||
ns[29]["properties"]["#sdppp_simple_content"] = "changed"
|
||||
elif variant == "ue":
|
||||
s["extra"].pop("links_added_by_ue")
|
||||
elif variant == "graph_version":
|
||||
s["extra"]["node_versions"]["ComfyUI-VOSR2"] = "forged"
|
||||
elif variant == "frontend":
|
||||
s["extra"]["frontendVersion"] = "forged"
|
||||
elif variant == "null":
|
||||
ns[28]["widgets_values"] = []
|
||||
elif variant == "source_sha":
|
||||
r["source_sha"] = "forged"
|
||||
elif variant == "path":
|
||||
b["source_path"] = "forged"
|
||||
elif variant == "citation":
|
||||
b["sources"][0]["sha256"] = "forged"
|
||||
elif variant == "overview":
|
||||
b["user_overview"] = "forged"
|
||||
elif variant == "missing":
|
||||
r.pop("fixed_version_document")
|
||||
assert not doc(s, r)["fixed_version"]["matched"]
|
||||
return
|
||||
elif variant == "empty":
|
||||
r["fixed_version_document"] = {}
|
||||
assert not doc(s, r)["fixed_version"]["matched"]
|
||||
return
|
||||
refuse(s, r)
|
||||
|
||||
|
||||
def test_independent_source_inventory_and_topology():
|
||||
assert doc()["fixed_version"]["matched"]
|
||||
assert len(SOURCE["nodes"]) == 13 and len(SOURCE["links"]) == 10 and "definitions" not in SOURCE
|
||||
expected = []
|
||||
for i, n in enumerate(SOURCE["nodes"]):
|
||||
w = n.get("widgets_values")
|
||||
if w is None or n["type"] == "Note":
|
||||
continue
|
||||
expected.extend(
|
||||
f"/nodes/{i}/widgets_values/{k}" for k in (range(len(w)) if isinstance(w, list) else w)
|
||||
)
|
||||
assert expected == [f["pointer"] for f in BLOCK["fields"]] and len(expected) == 46
|
||||
assert sum(f["json_type"] in ["dict", "list"] for f in BLOCK["fields"]) == 3
|
||||
assert [n["id"] for n in SOURCE["nodes"] if n["mode"] == 4] == [143, 146, 150, 142, 151, 148]
|
||||
ns = {n["id"]: n for n in SOURCE["nodes"]}
|
||||
for eid, src, slot, dst, inp, typ in SOURCE["links"]:
|
||||
assert ns[dst]["inputs"][inp]["link"] == eid
|
||||
assert eid in ns[src]["outputs"][slot]["links"]
|
||||
assert ns[dst]["inputs"][inp]["type"] == typ
|
||||
assert [e for e in SOURCE["links"] if e[3] == 139] == [
|
||||
[262, 29, 0, 139, 0, "IMAGE"],
|
||||
[263, 28, 0, 139, 1, "IMAGE"],
|
||||
]
|
||||
assert ns[29]["outputs"][1]["links"] is None
|
||||
for n in BLOCK["comments"]:
|
||||
assert pointer(SOURCE, n["pointer"]) == pointer(SOURCE, n["named_pointer"]) == n["text"]
|
||||
assert len(BLOCK["comments"]) == 1
|
||||
|
||||
|
||||
def test_exact_static_contracts_without_importing_upstream():
|
||||
ref = OUT.parent / "vosr2-reference"
|
||||
text = (ref / "vosr__nodes_vosr.py").read_text()
|
||||
ast.parse(text)
|
||||
assert "tile_overlap >= tile_size" in text and "vae_tile_overlap >= vae_tile_size" in text
|
||||
assert "default=42" in text and "control_after_generate=io.ControlAfterGenerate.fixed" in text
|
||||
core = (ref / "core__nodes.py").read_text()
|
||||
tree = ast.parse(core)
|
||||
save = next(x for x in tree.body if isinstance(x, ast.ClassDef) and x.name == "SaveImage")
|
||||
preview = next(x for x in tree.body if isinstance(x, ast.ClassDef) and x.name == "PreviewImage")
|
||||
assert ast.literal_eval(
|
||||
next(
|
||||
x.value
|
||||
for x in save.body
|
||||
if isinstance(x, ast.Assign)
|
||||
and any(isinstance(t, ast.Name) and t.id == "RETURN_TYPES" for t in x.targets)
|
||||
)
|
||||
) == ("IMAGE",)
|
||||
assert preview.bases[0].id == "SaveImage"
|
||||
assert '"result" : (images,)' in ast.get_source_segment(core, save)
|
||||
loader = (ref / "vosr__loader.py").read_text()
|
||||
assert (
|
||||
"if model_name != KNOWN_MODEL:" in loader
|
||||
and "if not (dit_missing or vae_missing or vision_missing):" in loader
|
||||
)
|
||||
assert "revision=" not in loader
|
||||
comparer = (ref / "rgthree__py__image_comparer.py").read_text()
|
||||
assert "return result" in comparer and "'result'" not in comparer and '"result"' not in comparer
|
||||
|
||||
|
||||
def test_old_32_blocks_and_all_other_reviews_frozen():
|
||||
path = "calliope-backend/src/calliope/comfyui/source_reviews.json"
|
||||
old = json.loads(subprocess.check_output(["git", "show", "282c0e8:" + path], cwd=REPO))
|
||||
now = json.loads((REPO / path).read_bytes())
|
||||
now[PATH].pop("fixed_version_document")
|
||||
assert old == now and len(DEFINITIONS) == 33
|
||||
blocks = [r["fixed_version_document"] for r in old.values() if "fixed_version_document" in r]
|
||||
assert (
|
||||
len(blocks) == 32
|
||||
and sum(len(b["fields"]) for b in blocks) == 988
|
||||
and sum(
|
||||
len(
|
||||
build_document(p, json.loads((REPO / p).read_bytes()), None, None, [], r)[
|
||||
"source_notes"
|
||||
]
|
||||
)
|
||||
for p, r in old.items()
|
||||
if "fixed_version_document" in r
|
||||
)
|
||||
== 24
|
||||
)
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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,728 @@
|
||||
{
|
||||
"base": "282c0e88d0434bd60be57f0a596413203ef61ce6",
|
||||
"files": [
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/minimax_h3-Turbo_Text2Video_20260813_API.json",
|
||||
"sha256": "55c6d0e7fb323e05c3d9373606607e0e8fefb3127cac356b03e29f19b7aaa4ed"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/Krea2_t2i_20260818_API.json",
|
||||
"sha256": "dcf5fad9b464e4154d8ec7ba7af1c21987cb0153c7df747266a02de9f24e1313"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/video_minimax_h3_r2v_2ref_API.json",
|
||||
"sha256": "56ab7cbf2402f94000eb1df2b5415f90f36a2821e68f1c35af17a2d9498e7c49"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/MiniMax-H3-Turbo-R2V-Extend-2Refs1Vid_API.json",
|
||||
"sha256": "080a17d7ae079f278518de1af15b880a4404105ec89edbac4fd82cf16097b757"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/video_minimax_h3_r2v_4ref_API.json",
|
||||
"sha256": "0b00bfc29ad48f8af3c7b6ebc1dcaa03b809b33c24bc31dadc628289480b154a"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/video_minimax_h3_r2v_API.json",
|
||||
"sha256": "29f440f7123b9ce64e0fda01ee3cdafb7f87408c47c1fe46c2b73f88682eae0c"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/krea2_T2I_CharSheetV1_API.json",
|
||||
"sha256": "6a991229721d0a501846bf0bc55f793d1ab5225be28b2c9eea485fed56ed5b40"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/video_minimax_h3_r2v_5ref_API.json",
|
||||
"sha256": "0b6c1bee6507c2485aa115d3b6c038c6c3dabf1ce8569205f8ece50e58f4e909"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/video_minimax_h3_r2v_3ref_API.json",
|
||||
"sha256": "2a687133f175180584ebfc3b4318f29cfcac3a24a0f422e1b9c77e6b16c9862a"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/minimax_h3-Turbo_Image2Video_20260813_API.json",
|
||||
"sha256": "3d895b01e72c10008c036a9c65fa281b3dfe0d0808417089960fd8f4b56c48ce"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/1-语音生成/Qwen3-ASR-语音转文字.json",
|
||||
"sha256": "958a3b7cb7070f4207901c79f13863b44ffcd0ed5c2c7fb4cd779e7964da0d65"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/1-语音生成/Qwen3-TTS_语音设计+语音克隆.json",
|
||||
"sha256": "9c75272e418064f46da96f6167448216a9390566e4b5d5e168d8cc5955447ab1"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/1-语音生成/index-TTS2-情绪控制-音频参考-文本控制-克隆-多人对话.json",
|
||||
"sha256": "d2c469a8a17c6d1fcffb9a96700c38290895873d99c40d13d669bd45f6ea79de"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/1-语音生成/Qwen3-TTS_多角色对话.json",
|
||||
"sha256": "549a6502b3e0d4386323e6e67d6a9b4943b7a01eb59bdbe7adc7a920cfe5b690"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/1-语音生成/Qwen3-ASR-Subtitle语音转字幕.json",
|
||||
"sha256": "47f9afa955a6a5dce37000cb6a15bac7516d26ff50b6398bda334c825552cfd8"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/肖像大师_美女提示词生成.json",
|
||||
"sha256": "4ff20f7350813ec74fc054971b4532200d61661951c103c89f7729f89f7be2ff"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/6-动作迁移/Wan_Animate2_动作迁移_for循环长视频.json",
|
||||
"sha256": "22b7853e22629822dd354b0b768e2961a53b4c2f480cfaceeaea9dc51c0f0d0b"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/6-动作迁移/Wan2.1_Scail-2_动作迁移_WanAnimatePlus_v4.2.json",
|
||||
"sha256": "f0da1e6c1eab5706d29d8d12897db0cea0d9d5f7a73b4882cf07ef2a626dda45"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/6-动作迁移/Wan2.2_Animate_SAM3-人物迁移-动作迁移-长视频循环(KJ流).json",
|
||||
"sha256": "3ea95e56f193c046937ad246087292865a809d2cc26571357c22fff415295f41"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/6-动作迁移/Wan2.1_SCAIL2_角色迁移_动作迁移_FOR循环长视频.json",
|
||||
"sha256": "60d7a6c9b1b567d726ffd0981de3d8afb3675f88b320733d8442081d849b0ba8"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/6-动作迁移/Wan2.1_Scail-2_角色迁移_WanAnimatePlus_v4.2.json",
|
||||
"sha256": "395dc48ad21d9da6a3a815654922193a9893696015154f53be0cc6f484882637"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/6-动作迁移/Wan2.2_Animate_人物遮罩替换(官流整理).json",
|
||||
"sha256": "394c3c31ad05255d3eb130f309d8445764f4d3772b40fa07fbf19708bfcc1002"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/5-数字人/Wan2.1_I2V_InfiniteTalk_提示词调度动作控制图生视频数字人(KJ版).json",
|
||||
"sha256": "98b4c399948f99aeac9326b4de9638d9a7bc3d718edd2561ab745f6bec12478c"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/5-数字人/Wan2.1_infinitetalk_音频驱动视频配音-单人for循环长视频(官流).json",
|
||||
"sha256": "ebd0c2823b70e5121f9642f781f2d0fa32cda6abe7d4a68fb0eecacc30e92d06"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/5-数字人/Wan2.1_I2V_InfiniteTalk_rCM_数字人对口型多动态(KJ版).json",
|
||||
"sha256": "90fb512939d5bbaebfd3462d8edd019ad388611951748e6df09993ddd7f3a36f"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/5-数字人/Wan2.1_infinitetalk_音频驱动视频配音-双人for循环长视频(官流).json",
|
||||
"sha256": "87412366e6bedd2a2f4490d1a945d0fc005251bb49a20e4ba1157cd6c4ddfbcd"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/2-音乐生成/minimax_music_文生音乐.json",
|
||||
"sha256": "0a655ead5a0da406159dceb46451439df0c02050becaaa25b3018abb41840284"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/2-音乐生成/ace_step_1.5+Qwen3.5_自动歌词音乐生成.json",
|
||||
"sha256": "518085b1e8d12257e68427dcc0f01e6cda5018ec353fd90fdf366afb4fc89b85"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/2-音乐生成/ace_step1_5_xl_turbo_8Step极速音乐生成.json",
|
||||
"sha256": "668fae23de5f84cc530fa4cab7381299cbc787b30c4597345b47e7f5c17415ef"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/sam3_图像视频-提示词遮罩分割.json",
|
||||
"sha256": "5dbe1a7ab608ba6e9158369ff6498e9bb3f926d151a0ed31cf711c31b167c488"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json",
|
||||
"sha256": "61a0b1a2aa17a7d8c4f09f4f57e276eaf37227f69b5fc5789193005e593548c9"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/图像分割-多宫格分割.json",
|
||||
"sha256": "aeceb3fd00eb0966eebf8d8c89d90e2ad29d0aa8d02589aa05d52a6c145a4bcc"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/Minimax-H3提示词增强.json",
|
||||
"sha256": "ffea53b27d52c63aa9ec9c60144489cc4f9e5a44d9478bcc297be9d9008f1a4c"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/视频转gif动图图片.json",
|
||||
"sha256": "39f7ddf60bf5958882215bd4227a85707f1f9003f2c5aaefc709a28b1ef16827"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/加载本地latent解码.json",
|
||||
"sha256": "1fd83bd3f2d7950440189932b4c17718190af88daa4a93ac86474081dea9005b"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/图像4种添加水印节点.json",
|
||||
"sha256": "2eecd407d667d2ef6249061181edfdcfc417a2151627622f280d74aaac1794d8"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/手动按分镜视频截取.json",
|
||||
"sha256": "381bb5f3a6e2788d0dd3ee9594a97eaedb153611194d4f8fdde420cf47814132"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/图像合并成四宫格.json",
|
||||
"sha256": "fb5e5b346d51a79c19e611b76d39cf4b9491493723684bbb85ab3c49923467bb"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/多视频合成分屏展示.json",
|
||||
"sha256": "3c2f6558c199a7689546dc881df2b26dc31c02715fbc7b32f51caaa4601c13d7"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/ControlNet_aux_常用样例.json",
|
||||
"sha256": "8898689d777330c4749a079cd762f573bb12a278c47a2fefbd066ffbdc122b6b"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/birefnet_图像移除背景.json",
|
||||
"sha256": "a6799c5022c13e46d2b1cf27809cd3c1e1d140a605fa226c19359682751fd036"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/截取视频每一帧.json",
|
||||
"sha256": "43858b9121439a92e7ab35c2fb62b78e56fa93bcd0ad62679f2387f71fdec1fa"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/音频人声分离.json",
|
||||
"sha256": "3c4bc0f7b1891e298a5d4e00072c6243a61b98d5fc0d86d82a476ecead43a1a2"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/图像嵌入文字描述.json",
|
||||
"sha256": "938ad9ad0eed2253e9a5a9a9dc16dc6b0a22bf976a80af90aa1d0b56e42ba7d3"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/视频-音频分离.json",
|
||||
"sha256": "4861e3e33291ed962d2215b1d8cc976a4706d19719e3541e9cbb2c636683afc3"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/视频倒放.json",
|
||||
"sha256": "8c760ea58d7ff664323f92a1174fe88300cd931c00201ccf437df1ad0067cb24"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/音频转MP3格式.json",
|
||||
"sha256": "c46e83b4fe8fc291e9de45b4af6cc50b566ab9377a51b50767315917dd13861b"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/加载图片合成视频.json",
|
||||
"sha256": "f5245d225f77cd64aefe6d0b8bb9342ec48a8a6293a533d65ea7304ce1b03f93"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_孤海智能一体化(多合一简化版).json",
|
||||
"sha256": "827f43d5d9bdb6f2d6f4d8b69e86708e6d08642ed0df04bee15087d10b9a0e35"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_双采样多段循环-PV动画尾帧衔接.json",
|
||||
"sha256": "c8a442bd8cae8dcd75a6a01847ca99b75dcc37ef8ff0a855c82213ed25e943e0"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_短剧创作-多宫格分镜参考.json",
|
||||
"sha256": "d2850f5fb3e5b54e3e4ec9e17f34bdb11bf7009728b5e585c769fb2f11f80275"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_视频人物替换.json",
|
||||
"sha256": "dce57cfc239c9f90cda2107fff5614b2cb0944e0441d9d8137b3f1c325f41a7a"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_音频MV_多参长视频分段_Selflift双采潜放大_Qwen3.8官方Skills自动提示词.json",
|
||||
"sha256": "bdc93d36fb8a4728dfa8031d1f00782d68e8e6aedd718b166f57e54216f2882f"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/Minimax_H3_T8双时钟采样_图生视频-8步高质量极速版.json",
|
||||
"sha256": "97f188c9295af0dbe6358a4b23117ca1612e812d2fa3df67dd7b10ee68e96fb5"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台MiniMaxH3_多合一多分段拼接.json",
|
||||
"sha256": "34fde3a91f9ef932adc2837cc9d4254bf75a3251ad5c6474d90e4085690cbafc"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_FastH3_t2v_文生图8步极速.json",
|
||||
"sha256": "ed4a30da03245f35ff9006ac64cd045c1b9c64eb8b585520dbbb418f6793fc78"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/Minimax_H3_r2v_参考生视频_双采样潜空间放大+Qwen3.8官方Skills自动提示词.json",
|
||||
"sha256": "4c1305fdfe6d5643e64a7b6c99cc92e331ffc9475f30fef5e0119c887367aab0"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_文-图-参考-分段循环-双采放大_多合一.json",
|
||||
"sha256": "698430e2b234a107b15f1bebf7704833afeea819bd21a3af56f7121daa1383e0"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_视频参考+多参图.json",
|
||||
"sha256": "40f92a22aa66c9d87b876784e33b02471339d64504e22e1672155608fbcbf079"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/minimax_h3_i2v_图生视频.json",
|
||||
"sha256": "a071e6070ee933396f225b4447c363bbf6b0df059b3cd43da567e81bc7937e84"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_文_图_首尾_参考多合一(单采样).json",
|
||||
"sha256": "526986a02875bbefebeb8a81cce9b58a8e764ab0c0092b2d8e858ecfac771638"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_短剧创作-音频参考.json",
|
||||
"sha256": "c188a7383a6c7a0dbd5d4d0717527b096ec73c1232373ee50c731bceefcfe7fb"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/minimax_h3_t2v_文生视频.json",
|
||||
"sha256": "039d46a5bbb809b84fab3b42c777118f91d0c06835555d54410631742584f1be"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_FastH3_i2v_图生视频8步极速.json",
|
||||
"sha256": "c5eff277eeeeefacb39c4af2e5ac41251785cc18ca90c1678a653367f4dd5942"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/Minimax_H3_T8双时钟采样_文生音视频-8步高质量极速版.json",
|
||||
"sha256": "5b45b49ebe4402c207e7d894e03a1bb53482b24a0c09ce50d549be4a01f9c6d0"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/Minimax_H3_T8双采样_潜空间放大_参考生视频.json",
|
||||
"sha256": "fab48be409cf423aaed7be268c6655ae39ecd1733218413c51874c5ba2ad0bdf"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_双采样潜空间放大.json",
|
||||
"sha256": "2434bd48e3c29abf9e6ed0931f3c8825481772a134a065f6cfdd3c0b89ba81b7"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台时间线素材_双采样潜空间放大_多分段拼接.json",
|
||||
"sha256": "172eb8af3aca70082941427520fdcca06568957bab3d39101c5e9d6641b45e4a"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/Minimax_H3_视频动作参考_SelfLift双采样潜放大_Qwen3.8官方Skills自动提示词.json",
|
||||
"sha256": "2be3981360fff849a53a928a6a2040c97bcf1944dce2df82d716a805c0ef2594"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_多参考_双采样潜空间放大.json",
|
||||
"sha256": "8b97388e142ddb67c84f2cbe0bb68c10f519e7615d75f1ea0005580fe4537ab2"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/minimax_h3_r2v_多参生视频.json",
|
||||
"sha256": "89166eb9cce4c9177a0f9a0a3a058e140429413e7beb3692e7ee5c30b76bc4fb"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/Minimax_H3_音频数字人_单采样.json",
|
||||
"sha256": "77b665bf6bcd11195f424d42d88f5142b43b0c608af776eef5744aca896f4b56"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_视频参考+多参图-SelfLift双采样潜放大.json",
|
||||
"sha256": "97ec7f73f32126aa24798fc65736734dfa839b74d25c4b2a94021abe063f06d7"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_音频数字人_SelfLift双采样潜放大分块_Qwen3.8官方Skills自动提示词.json",
|
||||
"sha256": "903e32248fc0c53df36c5841f4f4ccdb5fb8190a39c6c9015d3e55a451aaf7eb"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/Minimax_H3_T8双时钟采样_参考生视频-8步高质量极速版.json",
|
||||
"sha256": "fae96106a128342a6903bd32680463d1be98c0d5ad738d2fff40fc0f52a35389"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/uncensored/minimax-h3多参生视频无审核版.json",
|
||||
"sha256": "e501089f36c4c7f76a9e926e09ab9c467316d0778e62dff4c9e9faa6b155cb83"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/uncensored/minimax-h3首尾帧生视频无审核版.json",
|
||||
"sha256": "d47d3e995858a9c581863a593d89d4f6a24ea04014a1df3faeffa7e07cb19537"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/uncensored/minimax-h3文生视频无审核版.json",
|
||||
"sha256": "07baed6dd4a259701f7e5563fa1f19799fbbb558668d09a74876db3729fff3a2"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Anima/Anima_Klein放大_超强动漫模型.json",
|
||||
"sha256": "000843bc0e46844e556b04fc820ae1b2f7fa9bba1dd0ec21805c0c7ab27a647c"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_赛博朋克现实风格.json",
|
||||
"sha256": "a353acdb89b02462abed5f1513acfcb4f538c50ab5bc8ede8e8597f3ce8eea60"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图.json",
|
||||
"sha256": "6b317af2bda225d9441074ef330669b4537e95c705987223efafd2705dbbc344"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_细节增强.json",
|
||||
"sha256": "faa28f85fbd80ec9c3aba76749d6447c1d3b4a8489c88853ebde665a4f78ef10"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_2万提示词随机模板+4千种风格选择.json",
|
||||
"sha256": "599bb58d48d68de929e7ec476f77e9f7c736c00235b68570416d214d3b4e391c"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2-Edit-Anything2Real_动漫转真人v3.json",
|
||||
"sha256": "0d482e6c6fac70af6dd5549e8a464ee080a0ec135350d72d32a4ce4a8fd05bbe"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_图像风格参考.json",
|
||||
"sha256": "8c248ccc44df79b475c81e0bb260596ece066d65f2a21c0b2a72dc6b2441b170"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_Qwen3.5自动提示词生成.json",
|
||||
"sha256": "afafb0e0ebdc445a7534041589b7f6a580e0b15b8293c2fd26907474892f5957"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_动漫风格2.5D半写实.json",
|
||||
"sha256": "3faf9b1f0a20c7d21367af1721583a7402f048e18991025f9afff192ff8fe077"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图 (N版).json",
|
||||
"sha256": "935fc592ead1a89614470d41c512e2d7b4a41a6887f71a0a8d8f4c071a60e3c9"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_动漫风格线条动漫.json",
|
||||
"sha256": "9bab028943604b4b167a56dcc51475f67bac897c9eae3c7bf9d311b2c5cb7d91"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_美学质量增强.json",
|
||||
"sha256": "fbca5f24abf71f10ed5e2b90012aab1c25c6632a18541fbf0412b8845f603b85"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_identity_edit_图像编辑.json",
|
||||
"sha256": "c208883f17eb873063a4febaef636f0fa065131fc82bc4b0b26eff41f442719a"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_极致写实(N版).json",
|
||||
"sha256": "ec98804940c28956af1719096751bba2d274eef8a251b97207ac655a05779384"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_动漫风格Image2风格.json",
|
||||
"sha256": "bf65d0080ab80a5934855a0dbc7a5e167300bb54e24a18e05e4321a70ec838ea"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_奇幻现实风格.json",
|
||||
"sha256": "7a2af26c48114c7f1a7741a5cded07c0cceb68c4e69410de8af6429eb6b5041c"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/Krea2_turbo_文生图_角色三视图双采样2k版.json",
|
||||
"sha256": "64bb5eb4e5399d307c12553717b8a1f0046f48b625b16e62d40e962b6bec1847"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/Krea2_turbo_文生图_4_6_8宫格故事板.json",
|
||||
"sha256": "776b2f92f8906232c2ffe1b25c8b9cfe3398bfe45a9f80715f6ce5acc03e96b4"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/Krea2_turbo_文生图_极致写实双采样2k版(N版).json",
|
||||
"sha256": "50433cee0d5bab60a2cce44d73adbe5fe9b486c039bc89e1caef640fe6e0b28d"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/7_Z-image+Controlnet_图像扩展.json",
|
||||
"sha256": "82cda5dca2e224a5b042daecba4c3c1405a825648a9e9ced29fe21e58f7e55f8"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/9_Z-Image+Flux2-Klein_风格重新编辑.json",
|
||||
"sha256": "3734f261691c3ad13d29b30d88e91f671d9c548f723e77d78651c7155b06c408"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/8_Z-image+Controlnet_姿势控制-洗图.json",
|
||||
"sha256": "babc1dbeb3bb4981e338d8317ff9fb6fd8c28913bf47a2e2e3eb5409439447bf"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/6_Z-image_局部重绘.json",
|
||||
"sha256": "f60e734b6ed9e678571ad7666411d6282065c38abe3e9c29ea4c5cc1c3455505"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/5_Z-Image+Qwen3.5提示词反推_文生图.json",
|
||||
"sha256": "910317a123e658f26e48ad5cd144d28b7f31e0d43cbdb3ed567048c7917b5c73"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/10_Z_Image双采样+Fluax2-klein修复-高清直出.json",
|
||||
"sha256": "043cd2abe731996b80637d87b9a799e412e08b9a15e4b7c2f4440fbcff2487b9"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/Z_Image_turbo_十八种风格_通用b.json",
|
||||
"sha256": "8d9e66744e0266c5f53a6396e030c38bb90053f2525ac9c3c6cc1b321006a976"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/11_Z_Image_Turbo+模型放大_图像4K高清放大.json",
|
||||
"sha256": "baaa0cd969a28abe5e6ab19b3d7f6e161468cd15c970fe4bd9922afbe09ab4da"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/12_Z_Image_Tubro_文生图_SeedVR2高清放大8K.json",
|
||||
"sha256": "8d79bcd44a7843ac5df9fbcd372a6327ba72274260ef463c46ec85709da7846a"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/1_Z-Image-Tubro_文生图.json",
|
||||
"sha256": "36713b1a3f5c4f2992c7edef2e1e8c3246d44d28ecc750b87f4353a08c3b5ab0"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/Z_Image_turbo_十八种风格_照片摄影.json",
|
||||
"sha256": "740d7d41b3248978dca2046d9a2ea99d3a66ef081d45609782d2847f04f7e0c8"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/Z_Image_turbo_十八种风格_通用a_.json",
|
||||
"sha256": "e58341a99587077a69baf3cec62d9ae7bb0ce02a87cb3973ce3134c04a119b23"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/2_Z-Image+Base+Turbo+双重采样工作流.json",
|
||||
"sha256": "27108ae85715b147f63d8640ee032484c70a21633e2c6234eed346079b9aba2c"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/4_Z-Image+Qwen3.5-文生图.json",
|
||||
"sha256": "56bd28b5253fe734e851abd81c7851d00c62e4dbf37a22d97781d93ec367a35d"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/Z_Image_turbo_十八种风格_插图漫画.json",
|
||||
"sha256": "02ea31b959de72f9b5c00a92f21b4e17bbc2bf5a54495093a204957771a88039"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/3_Z-Image_文生图(摇光梦幻).app.json",
|
||||
"sha256": "58e88cacc6e1375cad39023e39eb1728eb36e63acce3c46fca40898d706b1d42"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_图像编辑_提示词增强.json",
|
||||
"sha256": "ebf173eb9d871717534a379d451d4a08ca06c3b677b552de12a5d51dbe8febf2"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_文生图_角色表四视图.json",
|
||||
"sha256": "6fd307b02b7ba29858723e283580c1cf4ab1fce8804a3ced1f4fc37934965392"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_图像编辑_角色BFS头部迁移.json",
|
||||
"sha256": "6a9da127ee2bccafeff7499ab3d62f349aec1eff4265cb211bdec578dba1fe7b"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_文生_多图编辑_8步lora加速.json",
|
||||
"sha256": "172b8fff0b531fbea367e79aa6b5ed1e6b59cab2ce6cb23d324092d5b55a3f97"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_图像编辑_角色表四视图.json",
|
||||
"sha256": "0036c02e1ab22f44c94bd9f311d5254d7b3b0cea25211bc4ff1e92cd90e0acdf"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_图像编辑_深度-姿势-线稿-硬边缘-控图洗图.json",
|
||||
"sha256": "b6e232082089dd9c4046e0dc5bd1d046907525b8cb01758fb804b5f4aa11275e"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_图像编辑_动漫转真人.json",
|
||||
"sha256": "1aa1d3641f82533f99d99567c2708919438b9efbfc6623d684a9a88b876b75cd"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_文生_多图编辑_透明背景.json",
|
||||
"sha256": "5853f21657d56e97a6b625c4487e23473b846fa8c96dc292f3700b3075245a39"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_文生图_提示词增强.json",
|
||||
"sha256": "dfe10917d101bf1a8a8c20750f4360690ecd478e9eb33d16a59ea0c6f12c086c"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_图像编辑_背景移除.json",
|
||||
"sha256": "d225102993ad5aa08e619bd7f1e5abbfd54e2d5ac8d8be1eacf09722107c4c9e"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_Image2.1_图像编辑_VNCCS任意角度-任意姿势.json",
|
||||
"sha256": "a5a675500a473214eaeb1d25dc1eda83b57bba3a17d18f1f0042bee62b474314"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_图像编辑_一键16张姿势图.json",
|
||||
"sha256": "248b6c5ae28d5a44035c5ad91bcdfa458360a67598eaa4d195c3fb6853b18a49"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_文生_多图编辑_提示词增强(N版).json",
|
||||
"sha256": "ae6521e5f42bef0b887f754c2fec5961d612afc464fbd98940a976a9795662c6"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/5_flux2_klein_图生图_扩图.json",
|
||||
"sha256": "ad8c09e81b07aa7809a7d42f633d0b9069f704187e7a983bc2ac12bc3cbb8507"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/10_flux2_klein_文生图-角色三视图.json",
|
||||
"sha256": "e04e5bd04f03ce32b5221d37c5f7cffb0405b1471cb7be90b47b407d900a49b7"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/flux2_klein_图生图_人物迁移.json",
|
||||
"sha256": "81409bdcd546102a7a6d5b7e32578912bf7ad4f89b35718de0401ceed624225e"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/4_flux2_klein_图生图_局部重绘.json",
|
||||
"sha256": "d1d57bd401959975cbe6fd70f97706cec21bbed0a5ec3747447b9f192631f414"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/1_flux2_klein_文生图.json",
|
||||
"sha256": "523905ac41323c626d7a156c88d02156cfa4758a70175cd7a3fba2a8c4fd449b"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/flux2_klein-图生图_人物动作迁移.json",
|
||||
"sha256": "fc6daf483ac05fdc904ca402271223d14cc217ea4c81a17ba2ef4cae993aefe7"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/3_flux2_klein_图生图一致性增强(大雄lora).json",
|
||||
"sha256": "c6af28d5bd72df5577f1e4d336974397494dd500fff23efd4afe81037514be71"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/6_flux2-klein+Qwen3.5_转线稿洗图.json",
|
||||
"sha256": "40a9fee073066914ac610f74dc7f7a49022bda63f5b89560d4bd635094a5c757"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/8_flux2_klein_双图编辑.json",
|
||||
"sha256": "9d00eb7af7e8d49c54396e6dc2afe7770f99cf75ae765dc1b906c8c9e6b69d83"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/flux2_klein_图生图_印花提取.json",
|
||||
"sha256": "8768dec340e35dbd70f928d8bbc34813b2bd45f5c270c405d4495b92da478337"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/2_flux2_klein_图生图.json",
|
||||
"sha256": "c0472959097f4e785205f41109c941dab26d12a874311834a7dc02c4616bbe9b"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/flux2_klein_服装迁移.json",
|
||||
"sha256": "e3f01ba44f3628297e714b4307ed959758f04e0415093dc5ec690857384a8386"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/flux2_klein_图生图_老照片修复.json",
|
||||
"sha256": "922c534d70b85beacc2cd51354552ed1d850dbb611b20f2d6981c4e524ce06c5"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/7_flux2_klein_图生图-动漫转真人.json",
|
||||
"sha256": "8cab62c6b7b2401bb6b51ff4426aaad2a644fc6cfe49d974769fadf19c16a0a1"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/3_flux2_klein_图生图一致性增强(小志lora).json",
|
||||
"sha256": "43995837f89e5112afa74a57180dc356f7b4d4ef9e3a325984a2fc5ca1b7c651"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/深度图/moge3_深度图_几何图_线稿图.json",
|
||||
"sha256": "a50e8b9961fbdd83fa42ca121ff77b3c1b058c7e454ad374b0de7c60e7b8c4a9"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/sdpose_视频人物姿势骨架提取.json",
|
||||
"sha256": "4586c72d8a906d4a956fb7d62307b81e57e4e345324c7e73f63103e56bfffd14"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/NLF_视频人物动作骨架获取.json",
|
||||
"sha256": "1edc7ae5cca8e059577a9572d296c84e1683695e4f13a72388ff70473795ce97"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"sha256": "43f76f599f15058b6e62ae0dfb105518a37532008eed23ef7118e4950b37a608"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/提示词生成与反推/Llama-cpp+Qwen3.5-提示词.json",
|
||||
"sha256": "9071928ce74d5133401942583603a6bc98873263fbe4c32a438fe73cee81ce90"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/提示词生成与反推/gemma4_提示词反推(图像视频音频).json",
|
||||
"sha256": "1a94bdd5987955a29e403d128c2ea5ca0b6bc8a8d5ece145e1baba07146588b0"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"sha256": "87484f700a9a18d1bffbc61834af2b489a58171dcb4a225e210e695a30c85dd5"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/RTX_video_upscale.json",
|
||||
"sha256": "ce189e5efdb1d608eaf7f7905f0dbf3776be2c199e143193c226ab497f2eb9ec"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/Seedvr2_3b_int8_图像放大.json",
|
||||
"sha256": "2be6b137efaaf25a54aaedc841a14ff3089afdc8a01a04af6353634b8457393f"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_视频放大_分批循环长视频.json",
|
||||
"sha256": "0f55316d2961a293a7d9f77b7993fd6f01bd5a41a4dca58f69f4d0b35c0aa6ea"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/Seedvr2_视频放大FOR循环长视频.json",
|
||||
"sha256": "576a9516292ed3e63b50c2a03fbfc1a99f9d643f526dc7fa3b98f6cb9832c893"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/图像放大比较.json",
|
||||
"sha256": "1ca5938a963921b16c96649a97d3b1a9f75d810d3aabcd7ce472a30e5805f3e4"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/Seedvr2_3b_int8_视频放大.json",
|
||||
"sha256": "06c427c688c13b87ed5724ac6b1ed432c31f8ea6c44212b3e7596b94128619da"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/RTX_image_upscale.json",
|
||||
"sha256": "35bf9b7731e6199b5ccc113e31c248573f9ae74d1bb9302071a3a97524fea8c4"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/视频模型放大插帧(简单快速版).json",
|
||||
"sha256": "bf47ba2462a3f683fe4f1d742b7dcde81a7a3f95e7e63c021e942a6c4f9ef071"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/supplied-api/02.api.json",
|
||||
"sha256": "daa40971b730076691721afe95e165932df94e3423f1fc44dcb7707026e7125b"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/supplied-api/01.api.json",
|
||||
"sha256": "0ed76e088a23af43d6fecbf273fc0a983d7112e2b046d347f715afffac56d57e"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/supplied-api/07.api.json",
|
||||
"sha256": "b1b4f6a6c02d8d21701943c67b62805b1210fed17e7e26b618c58e112ea1d70d"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/supplied-api/06.api.json",
|
||||
"sha256": "3e9176a5346ce8b8122b6da10f377fbeb894dc7c2c82a415f85ffc0dbfefc90b"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/supplied-api/04.api.json",
|
||||
"sha256": "2066b07b2ca5390ba3e795df6b43934dab83865b12870b6ff26d8c0ef24f091e"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/supplied-api/03.api.json",
|
||||
"sha256": "91e6c2cea3747a03bbb71f661dbd016b28040781482b956365ff76a7a8b647ce"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/supplied-api/05.api.json",
|
||||
"sha256": "95a01c1ea27a8279a6dc202820505099a94161d91e0789189b61208b09007af8"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/registry.py",
|
||||
"sha256": "0382eda52a31f23c1c29dd7a62d0ffc93e10fcbb88872a5893b8fc93a2b2734d"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/library_cli.py",
|
||||
"sha256": "04bfa8cfbe3f9378e78594958973118ec95aa1ff0bcdbdf4da0311abbdbcd380"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/client.py",
|
||||
"sha256": "ce30b3b3587d8f0dac86d534b99f31b95f1f4d0acb361babb45fd2be9513fe72"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/output_map.py",
|
||||
"sha256": "36ed4ced825e4f7e1d389602085451b5cb9336b319d220f423f59f83fed6a70e"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/protocol_references.py",
|
||||
"sha256": "ab9d948dd1bbf83dfce27186d6e48d9c3d5dff129305afd760fb3e77570b2916"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/protocol_references.json",
|
||||
"sha256": "a10aaf98db9bb3b5ac6d1fc30b18c40cf315b34eee57ebb19470a6664e9221a4"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/routers/workflows.py",
|
||||
"sha256": "3f1d5fdacc841080973dcafb9cd87a42433ec19080a3ff14a29561f13d512c97"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/queue/worker.py",
|
||||
"sha256": "54f5505ae78802f77fedf23690579444c9ccfbb0949b32f9e96980e8d55c2d3b"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/h3-chain-evidence/library.json",
|
||||
"sha256": "667c09ebd5ba14c281366a1b9f7647d74f74e055a863b121d9324ac75a423cd4"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/media-evidence/protected-six-cases.json",
|
||||
"sha256": "c2b9dffd7f1a9c5f0de51c26c9dd81beedd3ad7f6b67a54aa3eb5cead55c8c5f"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/structure_reference.py",
|
||||
"sha256": "a9f3a8ed314a0c0a424c6781db4e83af3a85cb8b66b16b01380b5fecc3e1f0bb"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/serialization_reference.py",
|
||||
"sha256": "67724fac65acbd397198271e1ed17b91f592f52da7ce8299e575d4c597d57fa1"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/ui2api.py",
|
||||
"sha256": "86a9c98ad72afa15aaf706bab8b39589a1cbca2e93da40d0aed9f963c14c0d1f"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/h3_core_reference.py",
|
||||
"sha256": "2913654b6ec3dabac1d36b1894064b8e077dd1d743d546e81667b317339f8a5f"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/h3_chain_reference.py",
|
||||
"sha256": "a5c0ab92d99757c168648ddbc0418b23d2b871f674b153e9a240b75409cf5741"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/library.py",
|
||||
"sha256": "b9cbfce28267642e6db3ebe9d591cf8dd260c7772a5a21a8d36cb98915eca13c"
|
||||
}
|
||||
],
|
||||
"originals": 163,
|
||||
"old_thirty_two_blocks_unchanged": true,
|
||||
"drawer_css_unchanged": true,
|
||||
"drawer_whole_file_unchanged": true,
|
||||
"drawer_sha256": "3e3c7602bae3a031e7fb1c38792f8ba5a1f37172e7b8850d304502ea1be010c1",
|
||||
"conversion_rerun": false,
|
||||
"profiles_28_candidates_9_diffs_6": "unchanged"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,972 @@
|
||||
"One source-bound VOSR2 image editorial document; no execution contract."
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
REPO = Path(__file__).resolve().parents[3]
|
||||
OUT = Path(__file__).resolve().parent
|
||||
REF = OUT.parent / "vosr2-reference"
|
||||
PATHS = [
|
||||
(
|
||||
"example_ComfyUI_workflows/0-基础"
|
||||
"处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放"
|
||||
"大/VOSR2_图像超分放大.json"
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
def canonical(v):
|
||||
return json.dumps(v, ensure_ascii=False, sort_keys=True, separators=(",", ":")).encode()
|
||||
|
||||
|
||||
def build(index=0):
|
||||
raw = (REPO / PATHS[index]).read_bytes()
|
||||
g = json.loads(raw)
|
||||
entries = json.loads((REF / "sources.json").read_bytes())["sources"]
|
||||
refs = []
|
||||
|
||||
def ref(key, file, first, last, claim):
|
||||
e = next(e for e in entries if e["id"] == key and e["file"] == file)
|
||||
refs.append(
|
||||
{
|
||||
**e,
|
||||
"local_file": "../vosr2-reference/" + e["local_file"],
|
||||
"lines": [first, last],
|
||||
"claim": claim,
|
||||
}
|
||||
)
|
||||
return len(refs) - 1
|
||||
|
||||
loader = ref(
|
||||
"vosr", "nodes_vosr.py", 12, 32, ("VOSR2ModelLoader具名schema/model/dtype默认及类型")
|
||||
)
|
||||
upscale = ref(
|
||||
"vosr",
|
||||
"nodes_vosr.py",
|
||||
35,
|
||||
73,
|
||||
"VOSR2Upscale精确schema、单位、范围、重叠验证与调用;不是实跑",
|
||||
)
|
||||
ref("vosr", "nodes_vosr.py", 76, 86, "VOSR2两节点扩展注册")
|
||||
ref(
|
||||
"vosr",
|
||||
"__init__.py",
|
||||
1,
|
||||
len((REF / "vosr____init__.py").read_text().splitlines()),
|
||||
"包入口导出与注册",
|
||||
)
|
||||
bundle = ref(
|
||||
"vosr",
|
||||
"loader.py",
|
||||
37,
|
||||
65,
|
||||
("models/vosr2完整配套模型目录/默认名;HF只有repo名,未固定revision不称权重固定"),
|
||||
)
|
||||
discovery = ref(
|
||||
"vosr", "loader.py", 103, 131, "模型名安全目录边界、args.json目录发现与VOSR2枚举补入"
|
||||
)
|
||||
download = ref(
|
||||
"vosr", "loader.py", 152, 195, "仅已知VOSR2缺件会下载,齐全时返回;静态阅读未执行或下载"
|
||||
)
|
||||
ref("vosr", "loader.py", 306, 324, "模型VAE encode/decode到独立分块dispatch的调用")
|
||||
ref(
|
||||
"vhs",
|
||||
"videohelpersuite/load_video_nodes.py",
|
||||
316,
|
||||
332,
|
||||
"AnimateDiff维度对齐路由;原尺寸与实际输出分开",
|
||||
)
|
||||
ref("vhs", "videohelpersuite/nodes.py", 45, 104, "动态格式发现、FFmpeg可用性过滤与扩展控件解析")
|
||||
dtype = ref(
|
||||
"vosr",
|
||||
"loader.py",
|
||||
266,
|
||||
273,
|
||||
("default委托设备unet_dtype;fp16/bf16映射不保证精度或可用性"),
|
||||
)
|
||||
modelimpl = ref(
|
||||
"vosr",
|
||||
"loader.py",
|
||||
345,
|
||||
410,
|
||||
("load_vosr2先补文件再校验/构造配套模型;DiT与vision按compute_dtype、VAE float32"),
|
||||
)
|
||||
resize = ref(
|
||||
"vosr",
|
||||
"inference.py",
|
||||
22,
|
||||
85,
|
||||
("bicubic目标尺寸/16对齐反射填充、无分块时补方形/裁剪、CPU种子局部生成;未运行"),
|
||||
)
|
||||
tile = ref(
|
||||
"vosr", "inference.py", 88, 148, "DiT潜空间对齐/重叠钳制、分块高斯融合、小图方形补齐及裁剪"
|
||||
)
|
||||
run = ref(
|
||||
"vosr",
|
||||
"inference.py",
|
||||
151,
|
||||
218,
|
||||
("RGB及重叠检查;tile0大图警告、逐批seed+i/CPU颜色处理、最终返回;无显存/效果保证"),
|
||||
)
|
||||
color = ref(
|
||||
"vosr",
|
||||
"color.py",
|
||||
25,
|
||||
76,
|
||||
("wavelet低频参考加高频恢复/adain均值方差/none钳制;小轴高斯半径限制"),
|
||||
)
|
||||
vae = ref(
|
||||
"vosr",
|
||||
"tiled_vae.py",
|
||||
1,
|
||||
len((REF / "vosr__tiled_vae.py").read_text().splitlines()),
|
||||
"独立VAE像素分块、编码解码与高斯融合边缘条件;不执行",
|
||||
)
|
||||
image = ref(
|
||||
"core", "nodes.py", 1738, 1812, ("core0.35.1 LoadImage枚举、校验、IMAGE/MASK与实际素材条件")
|
||||
)
|
||||
preview = ref(
|
||||
"core",
|
||||
"nodes.py",
|
||||
1660,
|
||||
1736,
|
||||
("准确0.35.1 SaveImage RETURN_TYPES IMAGE、result(images,);PreviewImage继承、temp PNG"),
|
||||
)
|
||||
batch = ref(
|
||||
"core",
|
||||
"comfy_extras/nodes_images.py",
|
||||
283,
|
||||
310,
|
||||
"ImageFromBatch准确schema/索引钳制/切片;负索引先按批长偏移",
|
||||
)
|
||||
ref(
|
||||
"core",
|
||||
"nodes.py",
|
||||
2068,
|
||||
2145,
|
||||
("准确核心LoadImage/PreviewImage注册;ImageFromBatch另由扩展注册"),
|
||||
)
|
||||
ref("core", "nodes.py", 54, 54, "MAX_RESOLUTION=16384")
|
||||
ref("core", "comfy_extras/nodes_images.py", 1870, 1895, "ImageFromBatch扩展注册")
|
||||
ref("core", "comfy_api/latest/_io.py", 80, 85, "ControlAfterGenerate.fixed字面枚举")
|
||||
ref("guhai", "__init__.py", 1, 47, "GuHai目录模块映射合并与WEB_DIRECTORY;没有执行")
|
||||
ref("vhs", "__init__.py", 1, 9, "VHS包映射及web入口")
|
||||
comparer = ref(
|
||||
"rgthree",
|
||||
"py/image_comparer.py",
|
||||
1,
|
||||
41,
|
||||
(
|
||||
"准确rgthree比较器继承PreviewImage、A/B"
|
||||
"可选输入和分别保存UI预览;仅ui返回不等于输出result"
|
||||
),
|
||||
)
|
||||
comparejs = ref(
|
||||
"rgthree",
|
||||
"web/comfyui/image_comparer.js",
|
||||
11,
|
||||
81,
|
||||
"比较器前端A/B描述符、保存序列化去img、Canvas控件",
|
||||
)
|
||||
comparevalue = ref(
|
||||
"rgthree",
|
||||
"web/comfyui/image_comparer.js",
|
||||
187,
|
||||
225,
|
||||
"比较器值兼容数组/对象并按历史url创建图像;本项目只展示文字不请求URL",
|
||||
)
|
||||
ref("rgthree", "__init__.py", 40, 67, "准确比较器注册")
|
||||
loadvideo = ref(
|
||||
"vhs",
|
||||
"videohelpersuite/load_video_nodes.py",
|
||||
426,
|
||||
474,
|
||||
"VHS_LoadVideo准确具名schema/类型/范围/动态枚举和路径校验",
|
||||
)
|
||||
loadimpl = ref(
|
||||
"vhs",
|
||||
"videohelpersuite/load_video_nodes.py",
|
||||
24,
|
||||
81,
|
||||
"读取格式默认AnimateDiff、尺寸0及对齐规则",
|
||||
)
|
||||
loadframes = ref(
|
||||
"vhs",
|
||||
"videohelpersuite/load_video_nodes.py",
|
||||
83,
|
||||
169,
|
||||
"OpenCV读取路径的force0/跳帧/间隔/cap边界;未解码",
|
||||
)
|
||||
constants = ref("vhs", "videohelpersuite/utils.py", 19, 21, "BIGMAX=2**53-1、DIMMAX=8192")
|
||||
combine = ref(
|
||||
"vhs",
|
||||
"videohelpersuite/nodes.py",
|
||||
245,
|
||||
279,
|
||||
"Combine具名默认/范围/可选音频;返回VHS_FILENAMES",
|
||||
)
|
||||
ref(
|
||||
"vhs",
|
||||
"videohelpersuite/nodes.py",
|
||||
399,
|
||||
477,
|
||||
"动画/视频pingpong及loop_count条件,0不加视频loop过滤器",
|
||||
)
|
||||
ref("vhs", "videohelpersuite/nodes.py", 123, 160, "视频元数据编码条件,与首帧PNG开关分开")
|
||||
temp = ref(
|
||||
"vhs",
|
||||
"videohelpersuite/nodes.py",
|
||||
334,
|
||||
397,
|
||||
("save_output选择temp/output;VHS_MetadataImage条件写首帧PNG;未执行"),
|
||||
)
|
||||
audio = ref(
|
||||
"vhs",
|
||||
"videohelpersuite/nodes.py",
|
||||
573,
|
||||
634,
|
||||
"有音频波形才混流、trim/apad及preview描述符;源音频未接",
|
||||
)
|
||||
h264 = ref(
|
||||
"vhs",
|
||||
"video_formats/h264-mp4.json",
|
||||
1,
|
||||
15,
|
||||
"准确H264/MP4像素格式、CRF范围及元数据/修音轨控件",
|
||||
)
|
||||
vhsjs = ref(
|
||||
"vhs", "web/js/VHS.core.js", 33, 111, "VHS前端KV恢复/旧值兼容;不推断扩展组合最终状态"
|
||||
)
|
||||
ref(
|
||||
"vhs",
|
||||
"web/js/VHS.core.js",
|
||||
788,
|
||||
795,
|
||||
("choose video to upload为上传按钮且serialize=false;源named额外null不是新物理位置"),
|
||||
)
|
||||
history = ref(
|
||||
"vhs", "web/js/VHS.core.js", 895, 922, "videopreview为前端预览对象;历史params不是当前产物"
|
||||
)
|
||||
ref("vhs", "videohelpersuite/nodes.py", 1039, 1070, "VHS Combine/LoadVideo注册")
|
||||
guhai = ref(
|
||||
"guhai",
|
||||
"nodes/忽略多组.py",
|
||||
1,
|
||||
23,
|
||||
"忽略多组孤海后端无输入输出,execute返回空;guhai_ig不是后端参数",
|
||||
)
|
||||
guhaijs = ref(
|
||||
"guhai",
|
||||
"web/js/nodes pass.js",
|
||||
5,
|
||||
106,
|
||||
("GuHai创建控件、onConfigure重新同步properties,默认/active_set/disable条件"),
|
||||
)
|
||||
groupmode = ref(
|
||||
"guhai",
|
||||
"web/js/nodes pass.js",
|
||||
375,
|
||||
443,
|
||||
"GuHai组状态可改节点mode0/2/4;只解释源码条件,不模拟最终运行模式",
|
||||
)
|
||||
restore = ref(
|
||||
"frontend",
|
||||
"src/lib/litegraph/src/LGraphNode.ts",
|
||||
901,
|
||||
1043,
|
||||
(
|
||||
"准确frontend先恢复属性、namedValuesRes"
|
||||
"tore决定具名/位置值、最后onConfigure;扩展次"
|
||||
"序未知"
|
||||
),
|
||||
)
|
||||
seedcontrol = ref(
|
||||
"frontend",
|
||||
"src/scripts/widgets.ts",
|
||||
89,
|
||||
146,
|
||||
("种子前端control_after_generate控件命名及fixed等枚举、不放prompt"),
|
||||
)
|
||||
seedcallback = ref(
|
||||
"frontend",
|
||||
"src/scripts/widgets.ts",
|
||||
148,
|
||||
220,
|
||||
("种子生成前后设置和回调条件;fixed不做increment/randomize,本轮不求随机数"),
|
||||
)
|
||||
ref(
|
||||
"frontend",
|
||||
"src/scripts/valueControl.ts",
|
||||
1,
|
||||
len((REF / "frontend__src__scripts__valueControl.ts").read_text().splitlines()),
|
||||
"种子控制nextValueForLinkedTarget及fixed分支静态实现",
|
||||
)
|
||||
uploadimage = ref(
|
||||
"frontend",
|
||||
"src/extensions/core/uploadImage.ts",
|
||||
1,
|
||||
len((REF / ("frontend__src__extensions__core__uploadImage.ts")).read_text().splitlines()),
|
||||
"准确上传扩展静态文本;源upload=image前端状态不证明上传成功",
|
||||
)
|
||||
for key in ["vosr", "core", "frontend", "rgthree", "vhs"]:
|
||||
ref(
|
||||
key,
|
||||
"LICENSE",
|
||||
1,
|
||||
len((REF / (key + "__LICENSE")).read_text().splitlines()),
|
||||
"对应固定版本许可原文",
|
||||
)
|
||||
ref(
|
||||
"guhai",
|
||||
"README.md",
|
||||
224,
|
||||
230,
|
||||
("GuHai仅自述开源协议,准确树未列LICENSE/COPYING;具体许可未知,不编造"),
|
||||
)
|
||||
data = {}
|
||||
|
||||
def define(name, label, default, unit, limits, effect, evidence):
|
||||
data[name] = dict(
|
||||
label=label,
|
||||
schema_default=default,
|
||||
unit=unit,
|
||||
limits=limits,
|
||||
effect=effect,
|
||||
evidence=evidence,
|
||||
)
|
||||
|
||||
define(
|
||||
"model",
|
||||
"配套模型包",
|
||||
"VOSR2",
|
||||
"目录名",
|
||||
("模型枚举由models/vosr2下含args.json目录发现,确保包含VOSR2;非任意路径"),
|
||||
(
|
||||
"保存VOSR2是DiT+匹配Qwen 2D VAE+DINO"
|
||||
"v2-L整包选择,不拆换三件。只有已知名且缺文件时源码尝试H"
|
||||
"F下载,齐全即返回;HF调用无revision,不称已固定权"
|
||||
"重。本轮不加载、不下载,实际安装未知。"
|
||||
),
|
||||
[loader, bundle, discovery, download, modelimpl],
|
||||
)
|
||||
define(
|
||||
"dtype",
|
||||
"计算数据类型",
|
||||
"default",
|
||||
"枚举",
|
||||
"default/fp16/bf16",
|
||||
(
|
||||
"保存default委托ComfyUI设备unet_dtype"
|
||||
";DiT与视觉编码器用计算类型,VAE仍fp32。它不是固定"
|
||||
"精度、显存或硬件兼容保证。"
|
||||
),
|
||||
[loader, dtype, modelimpl],
|
||||
)
|
||||
define(
|
||||
"upscale",
|
||||
"目标放大倍率",
|
||||
"4",
|
||||
"倍",
|
||||
"INT 1~sys.maxsize;上限随Python平台,不当可用尺寸上限",
|
||||
(
|
||||
"先bicubic插值到输入高宽乘倍率,再模型处理、填充和裁剪"
|
||||
";27保存4、143保存2分实例。输入尺寸未知,不能给实际像"
|
||||
"素尺寸/画质保证;schema自身也不保证高倍率效果。"
|
||||
),
|
||||
[upscale, resize, run],
|
||||
)
|
||||
define(
|
||||
"seed",
|
||||
"初始噪声种子",
|
||||
"42",
|
||||
"整数种子",
|
||||
"0~sys.maxsize;每批项静态采用seed+i",
|
||||
(
|
||||
"两实例保存43,是后端噪声起点;源码局部CPU Genera"
|
||||
"tor与批项seed+i只静态说明,不计算随机数,不保证不同"
|
||||
"硬件/实现复现。与额外fixed前端控制分开。"
|
||||
),
|
||||
[upscale, resize, run],
|
||||
)
|
||||
define(
|
||||
"fixed",
|
||||
"种子生成控制保存值",
|
||||
("schema声明ControlAfterGenerate.fixed;具体恢复仍受前端命名影响"),
|
||||
"前端枚举",
|
||||
("前端fixed/increment/decrement/randomize;不是额外后端seed输入"),
|
||||
(
|
||||
"源named键字面为fixed、位置值亦fixed;准确前端"
|
||||
"可从control_after_generate字符串给控件"
|
||||
"命名。保存模式表示固定控制意图,不新增后端fixed字段,不"
|
||||
"求随机数;组合扩展恢复未知。"
|
||||
),
|
||||
[upscale, seedcontrol, seedcallback, restore],
|
||||
)
|
||||
define(
|
||||
"color_alignment",
|
||||
"颜色对齐方式",
|
||||
"wavelet",
|
||||
"枚举",
|
||||
"wavelet/adain/none",
|
||||
(
|
||||
"wavelet以放大参考图低频加解码图高频并钳制;adain"
|
||||
"匹配通道空间均值方差,none仅钳制。小轴高斯半径受限,不能"
|
||||
"保证颜色准确或实际视觉质量。"
|
||||
),
|
||||
[upscale, color, run],
|
||||
)
|
||||
define(
|
||||
"tile_size",
|
||||
"DiT分块尺寸",
|
||||
"0",
|
||||
"像素",
|
||||
("0~4096,step64;0关闭,非零要求tile_overlap<tile_size"),
|
||||
(
|
||||
"保存512启用DiT分块;转潜空间按8及patch2对齐、尺"
|
||||
"寸钳制到短边,重叠再钳制;小图可能补方形,大图高斯融合后裁剪"
|
||||
"。tile0超过512只是警告条件,512设置不保证画质或显"
|
||||
"存足够。"
|
||||
),
|
||||
[upscale, resize, tile, run],
|
||||
)
|
||||
define(
|
||||
"tile_overlap",
|
||||
"DiT分块重叠",
|
||||
"32",
|
||||
"像素",
|
||||
"0~512,step8;tile_size>0时须小于tile_size",
|
||||
(
|
||||
"保存64参与相邻DiT块融合;潜空间重叠max(像素重叠//"
|
||||
"8,块长//8),再限制到块长-1,与保存值不等同。重叠增大"
|
||||
"可能增加工作量,边缘效果未测。"
|
||||
),
|
||||
[upscale, resize, tile],
|
||||
)
|
||||
define(
|
||||
"vae_tile_size",
|
||||
"VAE分块尺寸",
|
||||
"0",
|
||||
"像素",
|
||||
"0~8192,step64;0禁用VAE分块,独立于DiT设置",
|
||||
(
|
||||
"保存512分别作用编码和解码;VAE分块与DiT分块独立。0"
|
||||
"时整图编解码,源码对放大后超过1024且0给显存警告;非零也"
|
||||
"不保证资源足够。"
|
||||
),
|
||||
[upscale, vae, run, modelimpl],
|
||||
)
|
||||
define(
|
||||
"vae_tile_overlap",
|
||||
"VAE分块重叠",
|
||||
"32",
|
||||
"像素",
|
||||
"0~512,step8;vae_tile_size>0时须小于其尺寸",
|
||||
(
|
||||
"保存64控制独立VAE块重叠;编码/解码按VAE比例转换网格"
|
||||
"并融合,像素尺寸//8至少1、重叠max(像素重叠//8,块"
|
||||
"长//8)再钳制块长-1;尾块补齐网格、编码ceil裁剪/解"
|
||||
"码8倍。不是去接缝或省显存保证。"
|
||||
),
|
||||
[upscale, vae],
|
||||
)
|
||||
define(
|
||||
"image",
|
||||
"输入图片文件引用",
|
||||
"动态input图片枚举,无固定文件默认",
|
||||
"文件名",
|
||||
"按图片内容类型过滤并验证注释路径",
|
||||
(
|
||||
"保存1.png仅文件引用。29.IMAGE分叉到27.ima"
|
||||
"ge与139.image_a,MASK未接;属性guhaiI"
|
||||
"mageValue及sdppp内容/遮罩canvas等只保存"
|
||||
"扩展状态,实际文件和恢复结果未知,不读取。"
|
||||
),
|
||||
[image, restore],
|
||||
)
|
||||
define(
|
||||
"upload",
|
||||
"上传控件状态",
|
||||
"前端注入,无独立后端默认",
|
||||
"前端状态",
|
||||
"保存image占位;不当第二个image参数",
|
||||
"保存image仅上传控件历史状态,不代表已上传或存在素材,也不请求素材。",
|
||||
[image, uploadimage, restore],
|
||||
)
|
||||
define(
|
||||
"rgthree_comparer",
|
||||
"A/B历史预览列表",
|
||||
"前端空images列表",
|
||||
"完整列表",
|
||||
"保存整个A/B列表一项,不拆内部对象",
|
||||
(
|
||||
"139.A接29原图、B接28处理后预览。位置列表含A/B各"
|
||||
"name/selected/url;named为images"
|
||||
"包装且另含各img={},两形态均保留,不要求原字节相等。准"
|
||||
"确前端序列化去img、值恢复可创建Image;这里只展示原文"
|
||||
",不请求任何历史URL。Slide是交互属性,不是生成参数。"
|
||||
"准确后端compare_images仅返回ui,继承IMAG"
|
||||
"E声明不当实际result输出证明。"
|
||||
),
|
||||
[comparer, comparejs, comparevalue, preview, restore],
|
||||
)
|
||||
define(
|
||||
"frame_rate",
|
||||
"合成帧率",
|
||||
"8",
|
||||
"帧/秒",
|
||||
"最小1、step1,schema未设max",
|
||||
("旁路146保存24,是合成设置;148无FPS边接146,不等于输入帧率或历史params24、无同步保证。"),
|
||||
[combine, audio],
|
||||
)
|
||||
define(
|
||||
"loop_count",
|
||||
"动画循环次数",
|
||||
"0",
|
||||
"次",
|
||||
"INT 0~100,step1;按具体格式分支使用",
|
||||
(
|
||||
"旁路保存0;视频分支仅在loop_count>0时加FFmp"
|
||||
"eg loop过滤器,0不据此无限复制视频,不能从循环控件推"
|
||||
"时长。"
|
||||
),
|
||||
[combine],
|
||||
)
|
||||
define(
|
||||
"filename_prefix",
|
||||
"临时输出名前缀",
|
||||
"AnimateDiff",
|
||||
"文本",
|
||||
"前缀按目标目录和计数命名",
|
||||
(
|
||||
"旁路保存AnimateDiff,save_output=fa"
|
||||
"lse选择temp;源码在VHS_MetadataImage"
|
||||
"非false时写首帧PNG及后续视频。未执行,历史D盘路径不"
|
||||
"是当前产物。"
|
||||
),
|
||||
[combine, temp],
|
||||
)
|
||||
define(
|
||||
"format",
|
||||
"旁路视频格式",
|
||||
"Combine无固定默认,动态格式首项与扩展条件分开",
|
||||
"枚举",
|
||||
"Combine动态image/gif、image/webp和可用FFmpeg格式",
|
||||
(
|
||||
"146保存video/h264-mp4:准确格式文本请求li"
|
||||
"bx264、MP4、bt709等编码条件;编解码器存在与实际"
|
||||
"产物未知。"
|
||||
),
|
||||
[combine, h264],
|
||||
)
|
||||
define(
|
||||
"pix_fmt",
|
||||
"H264像素格式",
|
||||
"枚举首项yuv420p;格式未显式default",
|
||||
"枚举",
|
||||
"yuv420p/yuv420p10le",
|
||||
"旁路保存yuv420p传给编码器像素格式;不保证实际位深或颜色精度。",
|
||||
[h264],
|
||||
)
|
||||
define(
|
||||
"crf",
|
||||
"H264质量因子",
|
||||
"19",
|
||||
"CRF值",
|
||||
"INT 0~100,step1(插件schema范围,不保证编码器全部接受)",
|
||||
(
|
||||
"旁路保存19,请求libx264的-crf参数;通常较低值减"
|
||||
"少压缩,但文件大小、质量及编码器接受范围未验证。"
|
||||
),
|
||||
[h264],
|
||||
)
|
||||
define(
|
||||
"save_metadata",
|
||||
"视频元数据开关",
|
||||
"true",
|
||||
"布尔",
|
||||
"H264格式扩展控件",
|
||||
(
|
||||
"旁路保存true控制格式元数据条件,不等于首帧PNG开关;首"
|
||||
"帧另受VHS_MetadataImage控制,不保证保留任何"
|
||||
"实况数据。"
|
||||
),
|
||||
[h264, temp],
|
||||
)
|
||||
define(
|
||||
"trim_to_audio",
|
||||
"按音频修剪",
|
||||
"false",
|
||||
"布尔",
|
||||
"有音频波形时格式条件参与apad/shortest分支",
|
||||
"旁路保存false;音频口未接,不能推混音/修音轨已发生或同步正确。",
|
||||
[h264, audio],
|
||||
)
|
||||
define(
|
||||
"pingpong",
|
||||
"往返帧序列",
|
||||
"false",
|
||||
"布尔",
|
||||
"动画/视频分支条件;批次兼容另有限制",
|
||||
"旁路保存false,不请求往返序列;不重排或处理实际帧。",
|
||||
[combine],
|
||||
)
|
||||
define(
|
||||
"save_output",
|
||||
"正式或临时目录",
|
||||
"true",
|
||||
"布尔",
|
||||
"false选temp,true选output",
|
||||
(
|
||||
"旁路保存false;若执行并成功只选择临时目录,仍可能写视频"
|
||||
"和条件首帧PNG,不等于不写磁盘。当前没有产物证明。"
|
||||
),
|
||||
[combine, temp, audio],
|
||||
)
|
||||
define(
|
||||
"videopreview",
|
||||
"历史视频预览对象",
|
||||
"前端预览状态,非后端默认",
|
||||
"完整对象",
|
||||
"整个hidden/paused/params保留一项;不拆参数",
|
||||
(
|
||||
"146对象记录temp/24、AnimateDiff历史MP"
|
||||
"4/PNG及D盘fullpath;148对象记录input素"
|
||||
"材和加载参数。均只历史快照,不能当作当前文件、实跑、FPS或"
|
||||
"播放器有效性证明;不请求URL/路径。"
|
||||
),
|
||||
[history, audio, vhsjs],
|
||||
)
|
||||
define(
|
||||
"batch_index",
|
||||
"批次起始索引",
|
||||
"0",
|
||||
"帧索引(从0开始)",
|
||||
"-16384~16384;负值先加批长,再钳制到0~批长-1",
|
||||
("旁路150保存0,从148原帧批次取片段送151预览;不是143处理后序列,不读取帧。"),
|
||||
[batch],
|
||||
)
|
||||
define(
|
||||
"length",
|
||||
"批次截取长度",
|
||||
"1",
|
||||
"帧数",
|
||||
"1~4096,切到可用批长",
|
||||
("旁路150保存100,不保证实际100帧或视频时长;只在执行成功有足够输入时才能取对应段。"),
|
||||
[batch],
|
||||
)
|
||||
define(
|
||||
"video",
|
||||
"旁路视频文件引用",
|
||||
"动态input视频枚举,无固定文件默认",
|
||||
"文件名",
|
||||
"准确扩展名过滤并验证路径",
|
||||
("保存0-sample-7-1.mp4只是源引用,素材存在、音轨/FPS/解码均未知;148音频出口未连接。"),
|
||||
[loadvideo],
|
||||
)
|
||||
define(
|
||||
"force_rate",
|
||||
"旁路强制读取帧率",
|
||||
"0",
|
||||
"帧/秒",
|
||||
"0~60,step1;0不强制转换",
|
||||
"保存0不强制帧率,按来源读取条件;不保证输入FPS,更不能等同合成24。",
|
||||
[loadvideo, loadframes],
|
||||
)
|
||||
for name, label in [("custom_width", "读取自定义宽"), ("custom_height", "读取自定义高")]:
|
||||
define(
|
||||
name,
|
||||
label,
|
||||
"0",
|
||||
"像素",
|
||||
"0~8192;0保留/按另一轴比例条件,最终尺寸有对齐",
|
||||
(
|
||||
"旁路保存0;双0保留原尺寸意图但加载格式可要求尺寸对齐,不保"
|
||||
"证最终像素不变,也未探测素材。"
|
||||
),
|
||||
[loadvideo, loadimpl, constants],
|
||||
)
|
||||
define(
|
||||
"frame_load_cap",
|
||||
"读取帧数上限",
|
||||
"0",
|
||||
"帧",
|
||||
"0~2**53-1,step1;0不限制",
|
||||
"旁路保存480是最多读取设置,不保证足够480帧、实际时长或显存可用。",
|
||||
[loadvideo, loadframes, constants],
|
||||
)
|
||||
define(
|
||||
"skip_first_frames",
|
||||
"跳过起始帧",
|
||||
"0",
|
||||
"帧",
|
||||
"0~2**53-1,step1",
|
||||
"旁路保存0不主动跳过;与抽帧间隔、cap分别作用,未读取源视频。",
|
||||
[loadvideo, loadframes, constants],
|
||||
)
|
||||
define(
|
||||
"select_every_nth",
|
||||
"抽帧间隔",
|
||||
"1",
|
||||
"帧间隔",
|
||||
"1~2**53-1,step1",
|
||||
"旁路保存1按每帧选择意图;不据此保证实际帧数/FPS/同步。",
|
||||
[loadvideo, loadframes, constants],
|
||||
)
|
||||
define(
|
||||
"guhai_ig",
|
||||
"组忽略控件保存状态",
|
||||
"前端状态;后端无required输入",
|
||||
"前端文本",
|
||||
"保存空字符串;实际组状态由properties和前端同步管理",
|
||||
(
|
||||
"149保存空串不是提示词。properties模式defau"
|
||||
"lt、active=null、active_set=[图像放"
|
||||
"大]、disable=false及过滤/排序/颜色/缩放分别"
|
||||
"保留。准确JS可在恢复/交互时改组节点mode;本说明仅原保"
|
||||
"存模式,不模拟最终旁路或忽略。"
|
||||
),
|
||||
[guhai, guhaijs, groupmode, restore],
|
||||
)
|
||||
fields = []
|
||||
comments = []
|
||||
missing = []
|
||||
for i, n in enumerate(g["nodes"]):
|
||||
base = f"/nodes/{i}"
|
||||
if n.get("widgets_values") is None:
|
||||
missing.append(
|
||||
dict(
|
||||
node_id=str(n["id"]),
|
||||
class_type=n["type"],
|
||||
effect=(
|
||||
"源widgets_values为JSON null,非缺键或"
|
||||
"空数组;PreviewImage无可编辑保存位置。"
|
||||
),
|
||||
)
|
||||
)
|
||||
continue
|
||||
if n["type"] == "Note":
|
||||
comments.append(
|
||||
dict(
|
||||
node_id=str(n["id"]),
|
||||
pointer=base + "/widgets_values/0",
|
||||
named_pointer=base + "/widgets_values_named/text",
|
||||
text=n["widgets_values"][0],
|
||||
meaning=(
|
||||
"原文“upscale: 放大倍数,根据图片尺寸调整”是建议;"
|
||||
"27实际保存4而旁路143保存2,不当倍率默认、质量或资源保"
|
||||
"证。"
|
||||
),
|
||||
)
|
||||
)
|
||||
continue
|
||||
w = n["widgets_values"]
|
||||
named = n["widgets_values_named"]
|
||||
names = list(named) if isinstance(w, list) else list(w)
|
||||
assert len(w) == len(names)
|
||||
for k, name in enumerate(names):
|
||||
v = w[k] if isinstance(w, list) else w[name]
|
||||
f = dict(data[name])
|
||||
f["evidence"] = list(f["evidence"])
|
||||
if n["id"] == 148 and name == "format":
|
||||
f.update(
|
||||
label="旁路读取格式",
|
||||
schema_default="AnimateDiff",
|
||||
unit="枚举",
|
||||
limits=("nodes.VHSLoadFormats与VHSLoadFormats合并枚举,实际外部扩展未知"),
|
||||
effect=(
|
||||
"148保存AnimateDiff是加载格式适配,区别146的"
|
||||
"video/h264-mp4编码容器;不能当视频实际编码。"
|
||||
),
|
||||
evidence=[loadvideo, loadimpl],
|
||||
)
|
||||
ptr = (
|
||||
f"{base}/widgets_values/{k}"
|
||||
if isinstance(w, list)
|
||||
else f"{base}/widgets_values/{name}"
|
||||
)
|
||||
np = f"{base}/widgets_values_named/{name}"
|
||||
inp = next((j for j, p in enumerate(n.get("inputs", [])) if p["name"] == name), None)
|
||||
role = (
|
||||
"history_object"
|
||||
if isinstance(v, (dict, list))
|
||||
else "frontend_control"
|
||||
if name in ["fixed", "upload", "guhai_ig"]
|
||||
else "scalar"
|
||||
)
|
||||
f.update(
|
||||
node_id=str(n["id"]),
|
||||
scope="root",
|
||||
class_type=n["type"],
|
||||
field=name,
|
||||
pointer=ptr,
|
||||
named_pointer=np,
|
||||
input_pointer=f"{base}/inputs/{inp}" if inp is not None else np,
|
||||
value=v,
|
||||
named_value=named[name],
|
||||
json_type=type(v).__name__,
|
||||
type=str(n["inputs"][inp]["type"]) if inp is not None else "前端状态",
|
||||
role=role,
|
||||
execution_note=f"节点{n['id']}保存mode{n['mode']},"
|
||||
+ ("视频组旁路设置;" if n["mode"] == 4 else "仅活动保存态;")
|
||||
+ "未实跑。具名双指针:"
|
||||
+ np
|
||||
+ ";不是可靠转换输入。",
|
||||
)
|
||||
f["evidence"] = list(dict.fromkeys(f["evidence"] + [restore]))
|
||||
fields.append(f)
|
||||
assert len(fields) == 46 and len(comments) == 1
|
||||
overview = (
|
||||
"这张图把输入图片交给VOSR2超分处理,再预览并与原图比较:"
|
||||
"A是原图,B是经预览节点的处理图。图片链保存4倍,视频组另存"
|
||||
"2倍但处于旁路;没有实际运行。模型、扩展恢复、设备和素材是否"
|
||||
"可用未知,倍率与分块不保证画质或显存。仅供参考,转换和生成保"
|
||||
"持关闭。"
|
||||
)
|
||||
flow = [
|
||||
overview,
|
||||
(
|
||||
"13节点/10物理边,无子图;视频组142/143/146/"
|
||||
"150/151/148六节点mode4,其余7节点mode0"
|
||||
"含Note和149组控件。仅原保存态,不模拟组改写或旁路执行"
|
||||
"。"
|
||||
),
|
||||
(
|
||||
"活动图片链29.LoadImage→27.VOSR2Upsc"
|
||||
"ale→28.PreviewImage→139.B;29另→"
|
||||
"139.A,26模型→27。MASK未接。准确core0.3"
|
||||
"5.1 PreviewImage继承IMAGE返回且Save"
|
||||
"Image给result(images,),不是沿用旧版无出"
|
||||
"口结论;预览写temp PNG非正式保存保证。"
|
||||
),
|
||||
(
|
||||
"旁路记录142模型→143,148帧→143→146.Com"
|
||||
"bine;148原帧→150.ImageFromBatch→"
|
||||
"151.PreviewImage,不是处理后预览。148音频"
|
||||
"未接146;143倍率2,146合成24不继承来源FPS;不"
|
||||
"模拟最终运行状态。"
|
||||
),
|
||||
(
|
||||
"27保存upscale4、seed43、fixed、wave"
|
||||
"let、512/64/512/64;143除upscale2"
|
||||
"外相同。26/142分别保存VOSR2/default,实例"
|
||||
"不去重。fixed前端控制与后端seed分开,前端命名和扩展"
|
||||
"恢复另有限制。"
|
||||
),
|
||||
(
|
||||
"VOSR2准确c9450b611e6b0e854212b81"
|
||||
"fecde2da5d088c1bc与图级extra.node"
|
||||
"_versions=129c7c4dfdd4306c574c"
|
||||
"6e4a6117f588e704efcd冲突分列;节点cor"
|
||||
"e0.35.1、图级0.34.0分层,不替换。fronten"
|
||||
"d1.51.9与rgthree/VHS/GuHai准确提交分"
|
||||
"别固定;不借当前main。"
|
||||
),
|
||||
(
|
||||
"静态VOSR2先bicubic到请求尺寸、按16反射填充、D"
|
||||
"iT与VAE独立分块、颜色对齐再裁剪。RGB和两组重叠约束分"
|
||||
"别验证;很小维度的反射填充仍受底层限制,未声称任意图都成功。"
|
||||
"sys.maxsize不是资源上限;源码512/1024警告"
|
||||
"不是画质或显存保证。"
|
||||
),
|
||||
(
|
||||
"loader在VOSR2缺DiT/配置、VAE或DINOv2"
|
||||
"时条件下载,齐全不联网,HF调用未固定revision;这里"
|
||||
"只静态解释,没有执行模型/插件、下载或反序列化。defaul"
|
||||
"t委托设备计算类型,VAE fp32;不保证精度。"
|
||||
),
|
||||
(
|
||||
"139比较器历史A/B列表完整一项;named为images"
|
||||
"包装且各img={},两种保存形态均保留,URL只原文不请求"
|
||||
"。146/148各完整videopreview对象,temp"
|
||||
"/24、D盘路径、MP4/PNG名不当当前产物。"
|
||||
),
|
||||
(
|
||||
"148另有widgets_values_named的choo"
|
||||
"se video to upload=null,物理widg"
|
||||
"ets_values无此键,不凭具名额外null制造位置;准"
|
||||
"确VHS按钮serialize=false。28/151物理"
|
||||
"widgets_values=null,非缺键或[]。"
|
||||
),
|
||||
"GuHai properties:"
|
||||
+ json.dumps(g["nodes"][12]["properties"], ensure_ascii=False)
|
||||
+ (
|
||||
"。准确JS在onConfigure同步,default ac"
|
||||
"tive_set和disable可能改节点mode;只报告保"
|
||||
"存事实,不推最终加载状态。"
|
||||
),
|
||||
(
|
||||
"UE7.8空可连接表、extra.ue_links=[]/l"
|
||||
"inks_added_by_ue=[]是保存属性,不证明无恢"
|
||||
"复改写;LoadImage的guhaiImageValue、"
|
||||
"sdppp default/canvas等独立未知。准确前端"
|
||||
"namedValuesRestore开关决定具名或位置恢复,"
|
||||
"再onConfigure;所有扩展组合顺序未证明,不重开旧U"
|
||||
"E调查。"
|
||||
),
|
||||
(
|
||||
"146 save_output=false选择temp而非禁"
|
||||
"止写盘;VHS_MetadataImage非false时条件"
|
||||
"首帧PNG,H264后续视频需要编码器。源extra未设该键"
|
||||
",准确默认条件不证明本环境实况;音频未接,不保证FPS/编码"
|
||||
"/同步。"
|
||||
),
|
||||
(
|
||||
"46顶层非注释保存位置=43标量+1完整比较列表+2完整历史"
|
||||
"对象,另1完整Note;旧32图988位置+24注释逐对象冻"
|
||||
"结,现33图1034+25仅参考。155定稿0/实跑0/新增"
|
||||
"转换0;145UI9参考候选136关闭。"
|
||||
),
|
||||
(
|
||||
"GuHai准确tree无LICENSE/COPYING文件,"
|
||||
"README仅笼统声称开源,具体许可未知;未按其他包许可补齐"
|
||||
"。"
|
||||
),
|
||||
*["原边 root " + json.dumps(e, ensure_ascii=False) for e in g["links"]],
|
||||
"注释中文说明:" + comments[0]["meaning"],
|
||||
]
|
||||
return dict(
|
||||
source_path=PATHS[index],
|
||||
source_sha1=hashlib.sha1(raw).hexdigest(),
|
||||
source_sha256=hashlib.sha256(raw).hexdigest(),
|
||||
canonical_sha256=hashlib.sha256(canonical(g)).hexdigest(),
|
||||
notice=(
|
||||
"仅固定来源参考;身份冲突、扩展恢复/模型素材/设备/真实效果未知,转换关闭、未实跑。"
|
||||
),
|
||||
user_overview=overview,
|
||||
versions=[
|
||||
e["id"] + "→" + e["commit"] for e in json.loads((REF / "identities.json").read_bytes())
|
||||
],
|
||||
counts=dict(
|
||||
saved_fields=46,
|
||||
source_nodes=13,
|
||||
physical_edges=10,
|
||||
source_notes=1,
|
||||
history_objects=3,
|
||||
linked_saved_fields=0,
|
||||
frontend_only=4,
|
||||
final_scalars=0,
|
||||
final_prompt_constructed=False,
|
||||
),
|
||||
fields=fields,
|
||||
sources=refs,
|
||||
comments=comments,
|
||||
flow=flow,
|
||||
flow_evidence=list(range(len(refs))),
|
||||
zero_saved_nodes=missing,
|
||||
boundaries=[],
|
||||
steps=[
|
||||
overview,
|
||||
(
|
||||
"操作1:分别核对图片活动链和视频旁路保存态、比较器A/B与版"
|
||||
"本冲突,保持停用;不上传素材。"
|
||||
),
|
||||
(
|
||||
"操作2:核对两套倍率、种子和独立分块设置,模型/设备/扩展恢"
|
||||
"复未知,不加载模型或构造prompt。"
|
||||
),
|
||||
("操作3:全量完成并审核前仅读参考说明,不作为生成入口;实际质量/FPS/产物/显存仍未测。"),
|
||||
],
|
||||
)
|
||||
@@ -0,0 +1,3 @@
|
||||
All checks passed!
|
||||
12 files already formatted
|
||||
PASS 12 authored Python files and one JS syntax check
|
||||
@@ -0,0 +1,40 @@
|
||||
"Check changed authored Python only; upstream originals remain byte-for-byte."
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[3]
|
||||
OUT = Path(__file__).resolve().parent
|
||||
FILES = [
|
||||
"calliope-backend/src/calliope/comfyui/fixed_document.py",
|
||||
"calliope-backend/tests/test_vosr2_fixed_document.py",
|
||||
"e2e/run-vosr2-document.py",
|
||||
] + [str(p.relative_to(ROOT)) for p in sorted(OUT.glob("*.py"))]
|
||||
|
||||
|
||||
def main():
|
||||
for command in [["check"], ["format", "--check"]]:
|
||||
subprocess.run(
|
||||
[
|
||||
"uv",
|
||||
"run",
|
||||
"--project",
|
||||
"calliope-backend",
|
||||
"--offline",
|
||||
"ruff",
|
||||
*command,
|
||||
"--config",
|
||||
"calliope-backend/pyproject.toml",
|
||||
*FILES,
|
||||
],
|
||||
cwd=ROOT,
|
||||
check=True,
|
||||
)
|
||||
subprocess.run(["node", "--check", "e2e/vosr2-document.mjs"], cwd=ROOT, check=True)
|
||||
(OUT / "python-check-files.json").write_text(json.dumps(FILES, indent=2) + "\n")
|
||||
print("PASS", len(FILES), "authored Python files and one JS syntax check")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,15 @@
|
||||
第52批只新增VOSR2_图像超分放大.json的固定参考中文说明,进入实际doc_json、GET及现有Drawer。46顶层位置(43标量+1完整比较列表+2完整videopreview)与1完整Note;旧32块988位置+24源注释逐对象冻结,33图1034位置+25源注释仅供参考。155完整定稿0、必要实跑0、新增转换0;全量未完成。
|
||||
|
||||
13节点/10物理边无子图;A原图、B经PreviewImage处理链。准确core0.35.1 PreviewImage继承SaveImage IMAGE与result;比较器自身仅ui返回另列。27倍率4/旁路143倍率2;seed43/fixed、wavelet及两套512/64分块各自解释。节点/图级VOSR2与core版本冲突分层保留,未按图级替换;GuHai恢复/组改写、UE7.8和sdppp/guhai属性未知分层。模型包缺件条件下载、default计算类型及VAE fp32仅静态解释。完整历史列表named images/img差异和上传额外null分别保留,URL/D盘temp/24非当前产物。
|
||||
|
||||
源码local_file基准为docs/hel-892/vosr2-document-evidence。31份实际引用Git文本/58行号引用,另两份有界辅助文本;六身份精确commit/tree,core/frontend tag绑定,必要注册/schema/实现/许可和SHA/blob均有离线核对。GuHai精确树无LICENSE/COPYING,README只笼统声称开源,具体许可未知。没有借最新版,不执行上游源码或模型。
|
||||
|
||||
本批273后台通过(260专项+13库回归);1436浏览通过(652新图+768旧32概要+2汇总+14共享)。1440/390逐位置/Note/来源、默认技术折叠、错绑定/旧空doc/迟到响应/重试、键盘焦点与无横溢通过。5张代表图实际目验,仅附件交付。浏览112固定GET/10轮询,后端107固定含就绪1/10轮询,6详情本地拦截和1字体CSS拦截分列,禁止请求0。finally停两服务并核8247/5173释放。
|
||||
|
||||
真实282c0e8旧代码隔离库1update/154skip,其余154整行不变;幂等155skip、精确回退1、再升级1;升级前后用户编辑1conflict、29列整行保护。155停用/未检查/两时间戳空,16/139、1217/3660/294保持;163原件、191冻结资源、28profiles/9候选hash/六差分与Drawer整文件不变,case06排除。
|
||||
|
||||
12自写Python Ruff/format、JS语法、离线wheel/sdist资源字节和双次重建/渲染确定性通过。开发失败/修正见development-corrections.md;未机械重复未改全套,历史5业务失败和旧I001仅保留记录,不声称全仓全绿。复现入口validation-commands.txt。
|
||||
|
||||
剩余:版本冲突/扩展组合恢复、模型/素材/设备/显存/实际像素与画质、旁路视频FPS/音轨/同步/编解码器及产物均未实测。当前不需要用户窗口;未连接目标、停TTS、启ComfyUI、构造prompt、执行模型/插件/GPU/媒体/ffmpeg/随机种子、下载模型/素材/字体/运行库、加依赖付费、写在线库、合并部署。全量完成并审核通过后才发布。
|
||||
|
||||
自写差集git diff --check通过;上游原有CRLF/尾空白保留,33文本暂存字节与固定Git blob均相同。
|
||||
@@ -0,0 +1,9 @@
|
||||
本轮开发记录(仅本批,非历史业务失败):
|
||||
|
||||
- 首次专项+库回归272通过/1失败:旧32块的固定comments合计23,而实际doc.source_notes合计24(历史块有源注释未放入fixed.comments)。修正测试为按实际build_document的source_notes验证,未修改任何旧块或产品代码;最终273通过。
|
||||
- 首次Ruff在新脚本/测试尚未格式化时报告132项(自动修2),主要紧凑多语句及长中文行。格式化、拆文字常量后全部修复。
|
||||
- 中文常量重排工具曾给相邻字面量多加括号,造成构建脚本SyntaxError;一次修正尝试又误匹配函数调用括号。均在本地修正并经最终Ruff/format、重建与双次渲染确定性、实际源码验证确认,不保留无效工具入库。
|
||||
- Git文本首轮列表尝试了不存在的rgthree py/base.py、py/base_node.py,精确树未收录,未用同名最新版补齐;当前仅使用精确存在的文本。中文GuHai路径初次urllib未URL编码,改为quote后成功;未下载任何模型/媒体/字体。
|
||||
- 最终资源和代码检查均针对最后数据;源文件/转换/Drawer不变。未跑未改全后台/前端/转换全套。历史5个业务失败、旧I001仅沿用上批记录,不称全仓全绿。
|
||||
|
||||
- 全差集git diff --check提示精确上游文本的原有CRLF/尾空白;33份上游暂存字节逐一与Git blob/SHA核对相同,按要求不重排上游。排除vosr2-reference后自写差集检查通过。
|
||||
@@ -0,0 +1,161 @@
|
||||
"""Bounded exact source text; no installation or execution of upstream code."""
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from pathlib import Path
|
||||
|
||||
REF = Path(__file__).resolve().parent.parent / "vosr2-reference"
|
||||
SPECS = {
|
||||
"vosr": ("ylchen333/ComfyUI-VOSR2", "c9450b611e6b0e854212b81fecde2da5d088c1bc", None),
|
||||
"core": ("Comfy-Org/ComfyUI", None, "v0.35.1"),
|
||||
"frontend": ("Comfy-Org/ComfyUI_frontend", None, "v1.51.9"),
|
||||
"rgthree": ("rgthree/rgthree-comfy", "2c5342a8cb0eaecaabf61435a5f37dd594c510ba", None),
|
||||
"vhs": (
|
||||
"Kosinkadink/ComfyUI-VideoHelperSuite",
|
||||
"4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
None,
|
||||
),
|
||||
"guhai": ("goohai/Goohaitools-comfyui", "4e11bd3b8471102eef1cadd809c79c94dc8001ee", None),
|
||||
}
|
||||
|
||||
|
||||
def get(url):
|
||||
with urllib.request.urlopen(url, timeout=45) as r:
|
||||
b = r.read(3000001)
|
||||
assert len(b) < 3000000
|
||||
return b
|
||||
|
||||
|
||||
def metadata(item):
|
||||
key, (repo, commit, tag) = item
|
||||
if tag:
|
||||
raw = get(f"https://api.github.com/repos/{repo}/git/ref/tags/{tag}")
|
||||
(REF / f"{key}-tag.json").write_bytes(raw)
|
||||
obj = json.loads(raw)["object"]
|
||||
if obj["type"] == "tag":
|
||||
raw = get(obj["url"])
|
||||
(REF / f"{key}-tag-object.json").write_bytes(raw)
|
||||
obj = json.loads(raw)["object"]
|
||||
assert obj["type"] == "commit"
|
||||
commit = obj["sha"]
|
||||
raw = get(f"https://api.github.com/repos/{repo}/git/trees/{commit}?recursive=1")
|
||||
(REF / f"{key}-tree.json").write_bytes(raw)
|
||||
tree = json.loads(raw)
|
||||
assert not tree["truncated"] and tree["sha"] == commit
|
||||
assert commit == PINS[key]
|
||||
return key, repo, commit, tree
|
||||
|
||||
|
||||
def main():
|
||||
with ThreadPoolExecutor(max_workers=4) as pool:
|
||||
rows = list(pool.map(metadata, SPECS.items()))
|
||||
(REF / "identities.json").write_text(
|
||||
json.dumps([{"id": k, "repo": r, "commit": c} for k, r, c, t in rows], indent=2) + "\n"
|
||||
)
|
||||
for key, repo, commit, tree in rows:
|
||||
print(key, commit, "exact tree entries", len(tree["tree"]), flush=True)
|
||||
|
||||
|
||||
FILES = {
|
||||
"vosr": [
|
||||
"__init__.py",
|
||||
"nodes_vosr.py",
|
||||
"loader.py",
|
||||
"inference.py",
|
||||
"color.py",
|
||||
"tiled_vae.py",
|
||||
"LICENSE",
|
||||
],
|
||||
"core": [
|
||||
"nodes.py",
|
||||
"comfy_extras/nodes_images.py",
|
||||
"comfy_api/latest/_io.py",
|
||||
"folder_paths.py",
|
||||
"LICENSE",
|
||||
],
|
||||
"frontend": [
|
||||
"src/scripts/widgets.ts",
|
||||
"src/scripts/valueControl.ts",
|
||||
"src/extensions/core/uploadImage.ts",
|
||||
"src/lib/litegraph/src/LGraphNode.ts",
|
||||
"LICENSE",
|
||||
],
|
||||
"rgthree": [
|
||||
"__init__.py",
|
||||
"py/image_comparer.py",
|
||||
"py/constants.py",
|
||||
"web/comfyui/image_comparer.js",
|
||||
"LICENSE",
|
||||
],
|
||||
"vhs": [
|
||||
"__init__.py",
|
||||
"videohelpersuite/nodes.py",
|
||||
"videohelpersuite/load_video_nodes.py",
|
||||
"videohelpersuite/utils.py",
|
||||
"video_formats/h264-mp4.json",
|
||||
"web/js/VHS.core.js",
|
||||
"LICENSE",
|
||||
],
|
||||
"guhai": ["__init__.py", "nodes/忽略多组.py", "web/js/nodes pass.js", "README.md"],
|
||||
}
|
||||
|
||||
|
||||
def fetch_texts():
|
||||
identities = json.loads((REF / "identities.json").read_bytes())
|
||||
entries = []
|
||||
|
||||
def fetch(job):
|
||||
row, p, blob = job
|
||||
key = row["id"]
|
||||
commit = row["commit"]
|
||||
url = f"https://raw.githubusercontent.com/{row['repo']}/{commit}/{p}"
|
||||
name = key + "__" + p.replace("/", "__")
|
||||
cached = REF / name
|
||||
b = cached.read_bytes() if cached.exists() else get(urllib.parse.quote(url, safe=":/"))
|
||||
actual = hashlib.sha1(b"blob " + str(len(b)).encode() + b"\0" + b).hexdigest()
|
||||
assert actual == blob
|
||||
name = key + "__" + p.replace("/", "__")
|
||||
(REF / name).write_bytes(b)
|
||||
return dict(
|
||||
id=key,
|
||||
file=p,
|
||||
local_file=name,
|
||||
url=url,
|
||||
commit=commit,
|
||||
sha256=hashlib.sha256(b).hexdigest(),
|
||||
git_blob_sha1=blob,
|
||||
)
|
||||
|
||||
jobs = []
|
||||
for row in identities:
|
||||
paths = {
|
||||
e["path"]: e["sha"]
|
||||
for e in json.loads((REF / (row["id"] + "-tree.json")).read_bytes())["tree"]
|
||||
if e["type"] == "blob"
|
||||
}
|
||||
for p in FILES[row["id"]]:
|
||||
if p in paths:
|
||||
jobs.append((row, p, paths[p]))
|
||||
else:
|
||||
print("MISSING", row["id"], p, flush=True)
|
||||
with ThreadPoolExecutor(max_workers=5) as pool:
|
||||
entries = list(pool.map(fetch, jobs))
|
||||
(REF / "sources.json").write_text(json.dumps(dict(sources=entries), indent=2) + "\n")
|
||||
print("Fetched", len(entries), "bounded texts")
|
||||
|
||||
|
||||
PINS = {
|
||||
"vosr": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"core": "856a922befab9d94cb66f36a3dce17234d7a6e31",
|
||||
"frontend": "71d2f2f2b5c6da9dee281836b5b72f3af368966f",
|
||||
"rgthree": "2c5342a8cb0eaecaabf61435a5f37dd594c510ba",
|
||||
"vhs": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"guhai": "4e11bd3b8471102eef1cadd809c79c94dc8001ee",
|
||||
}
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
fetch_texts()
|
||||
@@ -0,0 +1,534 @@
|
||||
{
|
||||
"base": "282c0e88d0434bd60be57f0a596413203ef61ce6",
|
||||
"files": [
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/fixed_document.py",
|
||||
"bytes": 9614,
|
||||
"sha256": "bbcd5c77a2a143ac6f651ed1887c97c34e244e3c9a6343008fc130162f5ffa9f",
|
||||
"purpose": "新增单图定义摘要白名单;旧32项逐对象不变"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/source_reviews.json",
|
||||
"bytes": 4142441,
|
||||
"sha256": "60167451251b8069fbb16b0fbe3f7138b94012bc8d030501a72f53c69aed54ba",
|
||||
"purpose": "仅新增VOSR2固定参考说明块,源/定义摘要绑定"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/tests/test_vosr2_fixed_document.py",
|
||||
"bytes": 9906,
|
||||
"sha256": "babaf306974ec451bd43c609d2f1eeba5e447471321a1423ea6eadea1a329824",
|
||||
"purpose": "保存值/具名形态、身份、物理边、元数据和摘要伪造失败关闭专项"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/VOSR2图片超分放大固定参考中文说明.md",
|
||||
"bytes": 125842,
|
||||
"sha256": "ccd065c292359af10601322efdf43ee550839f74d6d67554b33fd723b9ff4931",
|
||||
"purpose": "完整中文说明或本批交付/开发修正说明"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/actual-VOSR2_图像超分放大.json",
|
||||
"bytes": 138213,
|
||||
"sha256": "d0d23b191468d4dc493668285074364824375790a3445b6b17ee856965349a4c",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/audit-summary.json",
|
||||
"bytes": 797,
|
||||
"sha256": "b79c3f138241cc4c82f8530637349ec411fc8bd92de0668a07e2a88c4a2cbb7a",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/authored-diff-check.txt",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"purpose": "自写差集空白检查通过(空输出)"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/boundaries.json",
|
||||
"bytes": 38632,
|
||||
"sha256": "d355b8f1c05315dc4f4d34cf0438b4d148c32275dcac22e287c7cacb72ee6124",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/browser-initial.txt",
|
||||
"bytes": 73717,
|
||||
"sha256": "96739c8b6bfd61afef3e55d95c26cc781b78f7c7008640e99df99fc4475fb379",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/browser-results.json",
|
||||
"bytes": 89922,
|
||||
"sha256": "304a3cb1a0c71d182bfd93e317454dc422636d992b946a9b0bd01e0225554d4c",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/build-final.txt",
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/build_definition.py",
|
||||
"bytes": 35248,
|
||||
"sha256": "a40b8e72c542cc5bf9efd91bb379849b3f487c838eb7fd75d53d135ed68f3de1",
|
||||
"purpose": "按13节点/10边原图生成46位置+1Note及固定源码中文说明"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/check-code-final.txt",
|
||||
"bytes": 100,
|
||||
"sha256": "ba3ad488d916696d5b35456e7287d7d18bf5b5b11a65c8345c7fc47948bddea9",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/check_code.py",
|
||||
"bytes": 1209,
|
||||
"sha256": "9e8f580e2f3dd7c94558fd9ed06f73e57bfa3935cbbb6ed7e7899e596a934e94",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/definition-0.json",
|
||||
"bytes": 94198,
|
||||
"sha256": "3b8902ded2e1e5d153b4ac16884895e7ffc0fc3065730b3cb39aaf5924e2ee62",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/delivery-summary.md",
|
||||
"bytes": 3027,
|
||||
"sha256": "c173da5e9a4c5c2b236d2cc26748b8848cc3acda2f83ffada7fbadbb0ad63698",
|
||||
"purpose": "完整中文说明或本批交付/开发修正说明"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/development-corrections.md",
|
||||
"bytes": 1497,
|
||||
"sha256": "791af14706e91a8adf405d63b097888ee08b28fe61c8c3711adda05d7a4e2d51",
|
||||
"purpose": "完整中文说明或本批交付/开发修正说明"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/fetch_sources.py",
|
||||
"bytes": 5161,
|
||||
"sha256": "3d6386d6dcb8481765bc37154532cc90e4897f7049aef738f0814c8e054df7d3",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/fixed-source-index.json",
|
||||
"bytes": 44195,
|
||||
"sha256": "c169e15abb939ca392c539922938b6eee2ff800c11b0ac75a1e8fbe3fe7b74b8",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/frozen-resource-check.json",
|
||||
"bytes": 40348,
|
||||
"sha256": "e03c7a149af0fb2f12959b371130fda1abaf2b482d74b0d4ca975fb178433671",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/import-protection.json",
|
||||
"bytes": 1269,
|
||||
"sha256": "df7158d9d7c3eb7956937bfb38b11d7ff0f115146e401de1ef5ac7a4a3b1c0af",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/package-check.json",
|
||||
"bytes": 550,
|
||||
"sha256": "db2cfee86c58ea97cc6aec3885ea8bf492cb78793a402236429a673e2db24a61",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/pins.json",
|
||||
"bytes": 226,
|
||||
"sha256": "12153c6be01b7edd7b2da3977bdb1ecdf17263a53cd4de5de40e4db8eda9484b",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/pr-baseline.json",
|
||||
"bytes": 235,
|
||||
"sha256": "b632cfac21b01f5be566e9d5c1ffc2ff6bd964f86d8c83bc7ad987e92dd0d735",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/pytest-final.txt",
|
||||
"bytes": 960,
|
||||
"sha256": "deed7566b16c361492bf1a44439ce3e7daae67a3aa525f74703a0376521104ad",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/pytest-initial.txt",
|
||||
"bytes": 2695,
|
||||
"sha256": "9eebaa87095e0c5522d7869959214e2c331b4f828ddf7a873190a3baf1c7204f",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/python-check-files.json",
|
||||
"bytes": 668,
|
||||
"sha256": "5e85d29b1458ee43c357dfd22ad7838f26cdb6e708be9ca64baaf00e7fad1b6e",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/rebuild.py",
|
||||
"bytes": 2448,
|
||||
"sha256": "8c7d2ad9498285d6e2e5709a2027ec426f80c9aea5380bf67050f9d9ddf3cbd3",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/recompute-initial.txt",
|
||||
"bytes": 212,
|
||||
"sha256": "ab55ed5523270745b2f62f0bbfa082213f40b61a710757bb9b77be5cb0758f16",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/recompute.py",
|
||||
"bytes": 12275,
|
||||
"sha256": "052fe305c56858fe080ac89a1f744a0a6c0079c178efed0a53eb04cf3ec8a80c",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/render_report.py",
|
||||
"bytes": 4443,
|
||||
"sha256": "48e94cd4c4fd0bfb86ecae3ffa0eaaec875235a079f0715754912937faa2a607",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/repeat-final.txt",
|
||||
"bytes": 71,
|
||||
"sha256": "1c4de890cacc8abbcb119c86e6ebbea50780922b17bc7883685bfe4e0b261a96",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/repeat.py",
|
||||
"bytes": 1288,
|
||||
"sha256": "583e6d2faa9a10636de8b1fe5b95c06c88db93905ac94ba043ce27b1faa3954d",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/repeatability.json",
|
||||
"bytes": 424,
|
||||
"sha256": "80d7cdf624fdb9107a95afc5d3f4d850046866f1fb2fce151dc02b5e0f8fb515",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/request_counts.py",
|
||||
"bytes": 1385,
|
||||
"sha256": "982d4859e01e9a3e3ef9746fc8b7f447b4ea63fbdf414f13de3bbaaaedd2d58f",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/review-delta.json",
|
||||
"bytes": 448,
|
||||
"sha256": "0cde9c0973aa5d1cc20bb677f08d1dab3bde9e65ea53f8d4570892f656262df0",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/ruff-initial.txt",
|
||||
"bytes": 84689,
|
||||
"sha256": "069798b4796721d9b71b5fbf8653fa6e1312f910be7926eff29d38b6026316ac",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/server-request-accounting.json",
|
||||
"bytes": 1362,
|
||||
"sha256": "b9352142212437e13842befc5e10002c489a508a040a3261b0bf3f6484d47883",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/service-0.txt",
|
||||
"bytes": 8367,
|
||||
"sha256": "38b47d33eafec14253192173a80c4de5edddad9c86508f115167ae2a0ce165d4",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/service-stop.json",
|
||||
"bytes": 65,
|
||||
"sha256": "26a1c53a887aaa01778530a87c33062e6121fde93e9eacea671c3561b8fe5594",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/source-check.json",
|
||||
"bytes": 589,
|
||||
"sha256": "6445fc2197b1dbc94288aef5bd064e77dd0e49195cfdb2968991964f8e0446e7",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/validation-commands.txt",
|
||||
"bytes": 2227,
|
||||
"sha256": "5201e0cbe53884ff244ec4b110bb27f58f78cdebc711678f5b91333de46c01a6",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-document-evidence/verify_sources.py",
|
||||
"bytes": 2173,
|
||||
"sha256": "93610a840897628c68dde12d6a29e708c1b9cc5d936a0ca4fc1a83c7d65b020d",
|
||||
"purpose": "本批可复现验证脚本或实际证据"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/core-tag.json",
|
||||
"bytes": 339,
|
||||
"sha256": "4d4d728aa39c6383f7503931f505127938ff163eaff3c373e08a7aa5660beb6e",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/core-tree.json",
|
||||
"bytes": 312437,
|
||||
"sha256": "db9993d1952279c33f86984907e5802b4caaa3db9d436a2d0e53ce979a9964fe",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/core__LICENSE",
|
||||
"bytes": 35149,
|
||||
"sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/core__comfy_api__latest___io.py",
|
||||
"bytes": 97422,
|
||||
"sha256": "55391c45bee9cfd821c7c86a23ab0f9e12ce9b5b40d77d48308c1d3698ed4080",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/core__comfy_extras__nodes_images.py",
|
||||
"bytes": 78963,
|
||||
"sha256": "c1503a3949530d5708948329e050aa89aedaf739678cdb4084e40d95bea46a60",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/core__folder_paths.py",
|
||||
"bytes": 23156,
|
||||
"sha256": "b748be5d1e068ad673f6c4de069fb6b7b723405c40ae3c3c44465d416f7df2db",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/core__nodes.py",
|
||||
"bytes": 108581,
|
||||
"sha256": "f7b6a909bf9a47296b974b730e5db0ec2137a3c6a64dda045970951d7382d4c7",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/frontend-tag.json",
|
||||
"bytes": 357,
|
||||
"sha256": "3339e7b4a85b9c7f6a1d04f26fad5c12573b22494736f65ebabc846615fabc06",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/frontend-tree.json",
|
||||
"bytes": 1689185,
|
||||
"sha256": "c67fb666322055f795e400b54d965faa92a222f270c7c95809a28bd738dbeef1",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/frontend__LICENSE",
|
||||
"bytes": 35149,
|
||||
"sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/frontend__src__extensions__core__uploadImage.ts",
|
||||
"bytes": 966,
|
||||
"sha256": "48d062c2ee95bd77c537c539e6c8f8bc03bd71dcec94c5b82487c014ea3e9c06",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/frontend__src__lib__litegraph__src__LGraphNode.ts",
|
||||
"bytes": 132247,
|
||||
"sha256": "d6263d56f28a5e6c5a95a3a263fe0d6ffe4083a981c01a14ec4ebfca43487e50",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/frontend__src__scripts__valueControl.ts",
|
||||
"bytes": 4363,
|
||||
"sha256": "57f607f240896f28663c40f02ab16bb01d3914470be486f6c58041e4032d87b1",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/frontend__src__scripts__widgets.ts",
|
||||
"bytes": 9562,
|
||||
"sha256": "5f3d26cd1626c72ec4d3f7cc806345d0c771afb86daf7127935ff26a7a1f3d54",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/guhai-tree.json",
|
||||
"bytes": 134514,
|
||||
"sha256": "d4b4fd6a743d7ebdb19a3c774f4a51c5155574883a32f4658e22cdfe15d20a9d",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/guhai__README.md",
|
||||
"bytes": 10783,
|
||||
"sha256": "7930cd372eda184ec5fc035f4ab202f83021ddaa85a5f868f8923d591f6c8b45",
|
||||
"purpose": "完整中文说明或本批交付/开发修正说明"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/guhai____init__.py",
|
||||
"bytes": 1600,
|
||||
"sha256": "d1cdc5dce665f9f52aaab69a1742cacabaf2d9617a380b517f8387b4b662d164",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/guhai__nodes__忽略多组.py",
|
||||
"bytes": 499,
|
||||
"sha256": "4350ab38acf4b1e555dbeaf27afe5427223d91b5e9ac4c7a2d4ce25c2931f450",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/guhai__web__js__nodes pass.js",
|
||||
"bytes": 49500,
|
||||
"sha256": "2466edb72013fc93e1685e430042c79bf089b38237bbfab65199d4903e7a3f5f",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/identities.json",
|
||||
"bytes": 759,
|
||||
"sha256": "62ce699db9f4a955aa7c8c6158e17e8ca628a33e892d6fb56de088c17351102b",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/rgthree-tree.json",
|
||||
"bytes": 69484,
|
||||
"sha256": "d1aac629f1f25512816be418de288105fd54366bfc1cf7aa9f9c5c57a77bc8bb",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/rgthree__LICENSE",
|
||||
"bytes": 1106,
|
||||
"sha256": "b34faf7c3e2975fe08d0169958e2b39f076d4d4289cbe2560dd7dd5b1a613ed1",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/rgthree____init__.py",
|
||||
"bytes": 4732,
|
||||
"sha256": "c51fdbaf7ed4c397be33413b7464dc3653714711d8a77d4c3e9a410a9d3de152",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/rgthree__py__constants.py",
|
||||
"bytes": 238,
|
||||
"sha256": "50dee946013b1d88d01fe9d63c2a7ab4d4c59be218cf80171f3542b43f0d8558",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/rgthree__py__image_comparer.py",
|
||||
"bytes": 1360,
|
||||
"sha256": "43ccce9b6f9413d5196ce4a7a3ef544969ae1ce2b52c44345f6cc8fb28c596fc",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/rgthree__web__comfyui__image_comparer.js",
|
||||
"bytes": 14371,
|
||||
"sha256": "b6dd39b71a2722774ecad101e12823220c6905f9f2a3d1cefca077e1aaa08a49",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/sources.json",
|
||||
"bytes": 15368,
|
||||
"sha256": "f1d3273d56b1583d76645462a17cb26ddae3a92e4b497904b8b8f15548d3003f",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/vhs-tree.json",
|
||||
"bytes": 13833,
|
||||
"sha256": "e0010ca47a56fea98fbe80ea04e85e11036dbf0a0c8e9bf6e61c37676310cb0a",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/vhs__LICENSE",
|
||||
"bytes": 35149,
|
||||
"sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/vhs____init__.py",
|
||||
"bytes": 398,
|
||||
"sha256": "d3e74626bfdd628d0e96b190b2c07e25fa1e5ee9f1f402c7c650446f86b0838f",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/vhs__video_formats__h264-mp4.json",
|
||||
"bytes": 619,
|
||||
"sha256": "4c15a42816ccbb06cb8a2fb02f8d1831d622c8531b26e432959ec80e50f7b8bc",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/vhs__videohelpersuite__load_video_nodes.py",
|
||||
"bytes": 29104,
|
||||
"sha256": "dd0e40047e60eaae7687e1fea812fd94b094187a9808819b74b1130b1819243a",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/vhs__videohelpersuite__nodes.py",
|
||||
"bytes": 48413,
|
||||
"sha256": "1c306fbc759ea4e09534422efd2603f50877c4674ff101e876e1d33426d46218",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/vhs__videohelpersuite__utils.py",
|
||||
"bytes": 17044,
|
||||
"sha256": "ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/vhs__web__js__VHS.core.js",
|
||||
"bytes": 104514,
|
||||
"sha256": "fd0f5e78c3fb40dad605105d6d07fd629d166f6ccb4a9d04a20b5cd1b82b13a1",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/vosr-tree.json",
|
||||
"bytes": 13559,
|
||||
"sha256": "b13408919783c5342327f0918d5cae5ddf113610f79974db2448a7f64295af6c",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/vosr__LICENSE",
|
||||
"bytes": 11356,
|
||||
"sha256": "de4d0a8b95787defcc0ccaaa783e77750c243f3f0d29f75a7e5e9bf3a5f84863",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/vosr____init__.py",
|
||||
"bytes": 2525,
|
||||
"sha256": "4da7ceb543f7ad94b9207df61733ab083471071f4e0ebcbdd600b71bd43a65f3",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/vosr__color.py",
|
||||
"bytes": 3395,
|
||||
"sha256": "9154368749c0d77bcdecb649c9534958a9a2c3a81c1d5045330e2e6062f69aa2",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/vosr__inference.py",
|
||||
"bytes": 10278,
|
||||
"sha256": "4b050e154dc9dfde775b2537b6b35b102d8f0a84a0b27d488050305391212a73",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/vosr__loader.py",
|
||||
"bytes": 18075,
|
||||
"sha256": "629cc249598001d44bb7516f5f0f9d8d7fc2685aebf3a254e9c2c81811dac196",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/vosr__nodes_vosr.py",
|
||||
"bytes": 4588,
|
||||
"sha256": "ee4712cd8ea94d5c70e2f13913c2e775673021dce3f42a954ffea2d6b11a4645",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/vosr2-reference/vosr__tiled_vae.py",
|
||||
"bytes": 6312,
|
||||
"sha256": "3540cae5ac7680df23f07ac49078a4aad1d107bd193adb56aac278bfa6a0c0ad",
|
||||
"purpose": "固定上游文本/身份/许可,保留准确字节"
|
||||
},
|
||||
{
|
||||
"path": "e2e/run-vosr2-document.py",
|
||||
"bytes": 3112,
|
||||
"sha256": "d09b93962e0490238fc4d18b63e60fadd56238d41a8bb4d1c7d3f34199ca84f3",
|
||||
"purpose": "复用原GET隔离服务,逐项/Note/32旧图与回退/焦点浏览;finally停服务"
|
||||
},
|
||||
{
|
||||
"path": "e2e/vosr2-document.mjs",
|
||||
"bytes": 14292,
|
||||
"sha256": "b95d83dbafc60fb145a5bb993ed8c5bcdaf8daff0d532cefe7d6cc48a0ad0083",
|
||||
"purpose": "复用原GET隔离服务,逐项/Note/32旧图与回退/焦点浏览;finally停服务"
|
||||
}
|
||||
],
|
||||
"manifest_self_excluded": true
|
||||
}
|
||||
@@ -0,0 +1,872 @@
|
||||
[
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vosr",
|
||||
"file": "nodes_vosr.py",
|
||||
"local_file": "../vosr2-reference/vosr__nodes_vosr.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/nodes_vosr.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "ee4712cd8ea94d5c70e2f13913c2e775673021dce3f42a954ffea2d6b11a4645",
|
||||
"git_blob_sha1": "c559e834e45646ee6f6aaa6f3ccd59a9536cdf1b",
|
||||
"lines": [
|
||||
12,
|
||||
32
|
||||
],
|
||||
"claim": "VOSR2ModelLoader具名schema/model/dtype默认及类型"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vosr",
|
||||
"file": "nodes_vosr.py",
|
||||
"local_file": "../vosr2-reference/vosr__nodes_vosr.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/nodes_vosr.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "ee4712cd8ea94d5c70e2f13913c2e775673021dce3f42a954ffea2d6b11a4645",
|
||||
"git_blob_sha1": "c559e834e45646ee6f6aaa6f3ccd59a9536cdf1b",
|
||||
"lines": [
|
||||
35,
|
||||
73
|
||||
],
|
||||
"claim": "VOSR2Upscale精确schema、单位、范围、重叠验证与调用;不是实跑"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vosr",
|
||||
"file": "nodes_vosr.py",
|
||||
"local_file": "../vosr2-reference/vosr__nodes_vosr.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/nodes_vosr.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "ee4712cd8ea94d5c70e2f13913c2e775673021dce3f42a954ffea2d6b11a4645",
|
||||
"git_blob_sha1": "c559e834e45646ee6f6aaa6f3ccd59a9536cdf1b",
|
||||
"lines": [
|
||||
76,
|
||||
86
|
||||
],
|
||||
"claim": "VOSR2两节点扩展注册"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vosr",
|
||||
"file": "__init__.py",
|
||||
"local_file": "../vosr2-reference/vosr____init__.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/__init__.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "4da7ceb543f7ad94b9207df61733ab083471071f4e0ebcbdd600b71bd43a65f3",
|
||||
"git_blob_sha1": "5e1fd16823138a5e78531927ff563a545c0cbc91",
|
||||
"lines": [
|
||||
1,
|
||||
65
|
||||
],
|
||||
"claim": "包入口导出与注册"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vosr",
|
||||
"file": "loader.py",
|
||||
"local_file": "../vosr2-reference/vosr__loader.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/loader.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "629cc249598001d44bb7516f5f0f9d8d7fc2685aebf3a254e9c2c81811dac196",
|
||||
"git_blob_sha1": "9dd229cc8203a02e628b900af4253dbce2bc997d",
|
||||
"lines": [
|
||||
37,
|
||||
65
|
||||
],
|
||||
"claim": "models/vosr2完整配套模型目录/默认名;HF只有repo名,未固定revision不称权重固定"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vosr",
|
||||
"file": "loader.py",
|
||||
"local_file": "../vosr2-reference/vosr__loader.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/loader.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "629cc249598001d44bb7516f5f0f9d8d7fc2685aebf3a254e9c2c81811dac196",
|
||||
"git_blob_sha1": "9dd229cc8203a02e628b900af4253dbce2bc997d",
|
||||
"lines": [
|
||||
103,
|
||||
131
|
||||
],
|
||||
"claim": "模型名安全目录边界、args.json目录发现与VOSR2枚举补入"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vosr",
|
||||
"file": "loader.py",
|
||||
"local_file": "../vosr2-reference/vosr__loader.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/loader.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "629cc249598001d44bb7516f5f0f9d8d7fc2685aebf3a254e9c2c81811dac196",
|
||||
"git_blob_sha1": "9dd229cc8203a02e628b900af4253dbce2bc997d",
|
||||
"lines": [
|
||||
152,
|
||||
195
|
||||
],
|
||||
"claim": "仅已知VOSR2缺件会下载,齐全时返回;静态阅读未执行或下载"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vosr",
|
||||
"file": "loader.py",
|
||||
"local_file": "../vosr2-reference/vosr__loader.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/loader.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "629cc249598001d44bb7516f5f0f9d8d7fc2685aebf3a254e9c2c81811dac196",
|
||||
"git_blob_sha1": "9dd229cc8203a02e628b900af4253dbce2bc997d",
|
||||
"lines": [
|
||||
306,
|
||||
324
|
||||
],
|
||||
"claim": "模型VAE encode/decode到独立分块dispatch的调用"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/load_video_nodes.py",
|
||||
"local_file": "../vosr2-reference/vhs__videohelpersuite__load_video_nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/videohelpersuite/load_video_nodes.py",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "dd0e40047e60eaae7687e1fea812fd94b094187a9808819b74b1130b1819243a",
|
||||
"git_blob_sha1": "5c6bd0b40ac75a8d596a4b3c86253420e8d56bb4",
|
||||
"lines": [
|
||||
316,
|
||||
332
|
||||
],
|
||||
"claim": "AnimateDiff维度对齐路由;原尺寸与实际输出分开"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/nodes.py",
|
||||
"local_file": "../vosr2-reference/vhs__videohelpersuite__nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/videohelpersuite/nodes.py",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "1c306fbc759ea4e09534422efd2603f50877c4674ff101e876e1d33426d46218",
|
||||
"git_blob_sha1": "496bf94e41ea11b8a9315ab92d9ea386636e6115",
|
||||
"lines": [
|
||||
45,
|
||||
104
|
||||
],
|
||||
"claim": "动态格式发现、FFmpeg可用性过滤与扩展控件解析"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vosr",
|
||||
"file": "loader.py",
|
||||
"local_file": "../vosr2-reference/vosr__loader.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/loader.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "629cc249598001d44bb7516f5f0f9d8d7fc2685aebf3a254e9c2c81811dac196",
|
||||
"git_blob_sha1": "9dd229cc8203a02e628b900af4253dbce2bc997d",
|
||||
"lines": [
|
||||
266,
|
||||
273
|
||||
],
|
||||
"claim": "default委托设备unet_dtype;fp16/bf16映射不保证精度或可用性"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vosr",
|
||||
"file": "loader.py",
|
||||
"local_file": "../vosr2-reference/vosr__loader.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/loader.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "629cc249598001d44bb7516f5f0f9d8d7fc2685aebf3a254e9c2c81811dac196",
|
||||
"git_blob_sha1": "9dd229cc8203a02e628b900af4253dbce2bc997d",
|
||||
"lines": [
|
||||
345,
|
||||
410
|
||||
],
|
||||
"claim": "load_vosr2先补文件再校验/构造配套模型;DiT与vision按compute_dtype、VAE float32"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vosr",
|
||||
"file": "inference.py",
|
||||
"local_file": "../vosr2-reference/vosr__inference.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/inference.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "4b050e154dc9dfde775b2537b6b35b102d8f0a84a0b27d488050305391212a73",
|
||||
"git_blob_sha1": "ccbcfd4afab0ba4dac4ff003f9c2250ebeb8bf27",
|
||||
"lines": [
|
||||
22,
|
||||
85
|
||||
],
|
||||
"claim": "bicubic目标尺寸/16对齐反射填充、无分块时补方形/裁剪、CPU种子局部生成;未运行"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vosr",
|
||||
"file": "inference.py",
|
||||
"local_file": "../vosr2-reference/vosr__inference.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/inference.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "4b050e154dc9dfde775b2537b6b35b102d8f0a84a0b27d488050305391212a73",
|
||||
"git_blob_sha1": "ccbcfd4afab0ba4dac4ff003f9c2250ebeb8bf27",
|
||||
"lines": [
|
||||
88,
|
||||
148
|
||||
],
|
||||
"claim": "DiT潜空间对齐/重叠钳制、分块高斯融合、小图方形补齐及裁剪"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vosr",
|
||||
"file": "inference.py",
|
||||
"local_file": "../vosr2-reference/vosr__inference.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/inference.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "4b050e154dc9dfde775b2537b6b35b102d8f0a84a0b27d488050305391212a73",
|
||||
"git_blob_sha1": "ccbcfd4afab0ba4dac4ff003f9c2250ebeb8bf27",
|
||||
"lines": [
|
||||
151,
|
||||
218
|
||||
],
|
||||
"claim": "RGB及重叠检查;tile0大图警告、逐批seed+i/CPU颜色处理、最终返回;无显存/效果保证"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vosr",
|
||||
"file": "color.py",
|
||||
"local_file": "../vosr2-reference/vosr__color.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/color.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "9154368749c0d77bcdecb649c9534958a9a2c3a81c1d5045330e2e6062f69aa2",
|
||||
"git_blob_sha1": "a6e60a408d49873b5408fb305dee919ac1a4fc5a",
|
||||
"lines": [
|
||||
25,
|
||||
76
|
||||
],
|
||||
"claim": "wavelet低频参考加高频恢复/adain均值方差/none钳制;小轴高斯半径限制"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vosr",
|
||||
"file": "tiled_vae.py",
|
||||
"local_file": "../vosr2-reference/vosr__tiled_vae.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/tiled_vae.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "3540cae5ac7680df23f07ac49078a4aad1d107bd193adb56aac278bfa6a0c0ad",
|
||||
"git_blob_sha1": "380fb39798c2900dd3f7e2b6ce84026f4c09556e",
|
||||
"lines": [
|
||||
1,
|
||||
145
|
||||
],
|
||||
"claim": "独立VAE像素分块、编码解码与高斯融合边缘条件;不执行"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "core",
|
||||
"file": "nodes.py",
|
||||
"local_file": "../vosr2-reference/core__nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/856a922befab9d94cb66f36a3dce17234d7a6e31/nodes.py",
|
||||
"commit": "856a922befab9d94cb66f36a3dce17234d7a6e31",
|
||||
"sha256": "f7b6a909bf9a47296b974b730e5db0ec2137a3c6a64dda045970951d7382d4c7",
|
||||
"git_blob_sha1": "038b88350daef6b0f3dbcda8d112a6e1655f4887",
|
||||
"lines": [
|
||||
1738,
|
||||
1812
|
||||
],
|
||||
"claim": "core0.35.1 LoadImage枚举、校验、IMAGE/MASK与实际素材条件"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "core",
|
||||
"file": "nodes.py",
|
||||
"local_file": "../vosr2-reference/core__nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/856a922befab9d94cb66f36a3dce17234d7a6e31/nodes.py",
|
||||
"commit": "856a922befab9d94cb66f36a3dce17234d7a6e31",
|
||||
"sha256": "f7b6a909bf9a47296b974b730e5db0ec2137a3c6a64dda045970951d7382d4c7",
|
||||
"git_blob_sha1": "038b88350daef6b0f3dbcda8d112a6e1655f4887",
|
||||
"lines": [
|
||||
1660,
|
||||
1736
|
||||
],
|
||||
"claim": "准确0.35.1 SaveImage RETURN_TYPES IMAGE、result(images,);PreviewImage继承、temp PNG"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "core",
|
||||
"file": "comfy_extras/nodes_images.py",
|
||||
"local_file": "../vosr2-reference/core__comfy_extras__nodes_images.py",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/856a922befab9d94cb66f36a3dce17234d7a6e31/comfy_extras/nodes_images.py",
|
||||
"commit": "856a922befab9d94cb66f36a3dce17234d7a6e31",
|
||||
"sha256": "c1503a3949530d5708948329e050aa89aedaf739678cdb4084e40d95bea46a60",
|
||||
"git_blob_sha1": "91a3f990c1e1e34e9782f5f2c072ae2c81b1d459",
|
||||
"lines": [
|
||||
283,
|
||||
310
|
||||
],
|
||||
"claim": "ImageFromBatch准确schema/索引钳制/切片;负索引先按批长偏移"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "core",
|
||||
"file": "nodes.py",
|
||||
"local_file": "../vosr2-reference/core__nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/856a922befab9d94cb66f36a3dce17234d7a6e31/nodes.py",
|
||||
"commit": "856a922befab9d94cb66f36a3dce17234d7a6e31",
|
||||
"sha256": "f7b6a909bf9a47296b974b730e5db0ec2137a3c6a64dda045970951d7382d4c7",
|
||||
"git_blob_sha1": "038b88350daef6b0f3dbcda8d112a6e1655f4887",
|
||||
"lines": [
|
||||
2068,
|
||||
2145
|
||||
],
|
||||
"claim": "准确核心LoadImage/PreviewImage注册;ImageFromBatch另由扩展注册"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "core",
|
||||
"file": "nodes.py",
|
||||
"local_file": "../vosr2-reference/core__nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/856a922befab9d94cb66f36a3dce17234d7a6e31/nodes.py",
|
||||
"commit": "856a922befab9d94cb66f36a3dce17234d7a6e31",
|
||||
"sha256": "f7b6a909bf9a47296b974b730e5db0ec2137a3c6a64dda045970951d7382d4c7",
|
||||
"git_blob_sha1": "038b88350daef6b0f3dbcda8d112a6e1655f4887",
|
||||
"lines": [
|
||||
54,
|
||||
54
|
||||
],
|
||||
"claim": "MAX_RESOLUTION=16384"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "core",
|
||||
"file": "comfy_extras/nodes_images.py",
|
||||
"local_file": "../vosr2-reference/core__comfy_extras__nodes_images.py",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/856a922befab9d94cb66f36a3dce17234d7a6e31/comfy_extras/nodes_images.py",
|
||||
"commit": "856a922befab9d94cb66f36a3dce17234d7a6e31",
|
||||
"sha256": "c1503a3949530d5708948329e050aa89aedaf739678cdb4084e40d95bea46a60",
|
||||
"git_blob_sha1": "91a3f990c1e1e34e9782f5f2c072ae2c81b1d459",
|
||||
"lines": [
|
||||
1870,
|
||||
1895
|
||||
],
|
||||
"claim": "ImageFromBatch扩展注册"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "core",
|
||||
"file": "comfy_api/latest/_io.py",
|
||||
"local_file": "../vosr2-reference/core__comfy_api__latest___io.py",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/856a922befab9d94cb66f36a3dce17234d7a6e31/comfy_api/latest/_io.py",
|
||||
"commit": "856a922befab9d94cb66f36a3dce17234d7a6e31",
|
||||
"sha256": "55391c45bee9cfd821c7c86a23ab0f9e12ce9b5b40d77d48308c1d3698ed4080",
|
||||
"git_blob_sha1": "4c062d8aabcfdf056425737d35f153b6a67522f8",
|
||||
"lines": [
|
||||
80,
|
||||
85
|
||||
],
|
||||
"claim": "ControlAfterGenerate.fixed字面枚举"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "guhai",
|
||||
"file": "__init__.py",
|
||||
"local_file": "../vosr2-reference/guhai____init__.py",
|
||||
"url": "https://raw.githubusercontent.com/goohai/Goohaitools-comfyui/4e11bd3b8471102eef1cadd809c79c94dc8001ee/__init__.py",
|
||||
"commit": "4e11bd3b8471102eef1cadd809c79c94dc8001ee",
|
||||
"sha256": "d1cdc5dce665f9f52aaab69a1742cacabaf2d9617a380b517f8387b4b662d164",
|
||||
"git_blob_sha1": "e5d5dffc4201bff73162a350edad9d00fd0d5e51",
|
||||
"lines": [
|
||||
1,
|
||||
47
|
||||
],
|
||||
"claim": "GuHai目录模块映射合并与WEB_DIRECTORY;没有执行"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "__init__.py",
|
||||
"local_file": "../vosr2-reference/vhs____init__.py",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/__init__.py",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "d3e74626bfdd628d0e96b190b2c07e25fa1e5ee9f1f402c7c650446f86b0838f",
|
||||
"git_blob_sha1": "9fa995f0ac7e296a62bcba9df68b5250a0f7d041",
|
||||
"lines": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"claim": "VHS包映射及web入口"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "rgthree",
|
||||
"file": "py/image_comparer.py",
|
||||
"local_file": "../vosr2-reference/rgthree__py__image_comparer.py",
|
||||
"url": "https://raw.githubusercontent.com/rgthree/rgthree-comfy/2c5342a8cb0eaecaabf61435a5f37dd594c510ba/py/image_comparer.py",
|
||||
"commit": "2c5342a8cb0eaecaabf61435a5f37dd594c510ba",
|
||||
"sha256": "43ccce9b6f9413d5196ce4a7a3ef544969ae1ce2b52c44345f6cc8fb28c596fc",
|
||||
"git_blob_sha1": "079ebdbf6051fa86cf89f75f55f8502904d0c93f",
|
||||
"lines": [
|
||||
1,
|
||||
41
|
||||
],
|
||||
"claim": "准确rgthree比较器继承PreviewImage、A/B可选输入和分别保存UI预览;仅ui返回不等于输出result"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "rgthree",
|
||||
"file": "web/comfyui/image_comparer.js",
|
||||
"local_file": "../vosr2-reference/rgthree__web__comfyui__image_comparer.js",
|
||||
"url": "https://raw.githubusercontent.com/rgthree/rgthree-comfy/2c5342a8cb0eaecaabf61435a5f37dd594c510ba/web/comfyui/image_comparer.js",
|
||||
"commit": "2c5342a8cb0eaecaabf61435a5f37dd594c510ba",
|
||||
"sha256": "b6dd39b71a2722774ecad101e12823220c6905f9f2a3d1cefca077e1aaa08a49",
|
||||
"git_blob_sha1": "4c5d6b8d8f33f53387d8e385ba6d9ffe4ed4caba",
|
||||
"lines": [
|
||||
11,
|
||||
81
|
||||
],
|
||||
"claim": "比较器前端A/B描述符、保存序列化去img、Canvas控件"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "rgthree",
|
||||
"file": "web/comfyui/image_comparer.js",
|
||||
"local_file": "../vosr2-reference/rgthree__web__comfyui__image_comparer.js",
|
||||
"url": "https://raw.githubusercontent.com/rgthree/rgthree-comfy/2c5342a8cb0eaecaabf61435a5f37dd594c510ba/web/comfyui/image_comparer.js",
|
||||
"commit": "2c5342a8cb0eaecaabf61435a5f37dd594c510ba",
|
||||
"sha256": "b6dd39b71a2722774ecad101e12823220c6905f9f2a3d1cefca077e1aaa08a49",
|
||||
"git_blob_sha1": "4c5d6b8d8f33f53387d8e385ba6d9ffe4ed4caba",
|
||||
"lines": [
|
||||
187,
|
||||
225
|
||||
],
|
||||
"claim": "比较器值兼容数组/对象并按历史url创建图像;本项目只展示文字不请求URL"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "rgthree",
|
||||
"file": "__init__.py",
|
||||
"local_file": "../vosr2-reference/rgthree____init__.py",
|
||||
"url": "https://raw.githubusercontent.com/rgthree/rgthree-comfy/2c5342a8cb0eaecaabf61435a5f37dd594c510ba/__init__.py",
|
||||
"commit": "2c5342a8cb0eaecaabf61435a5f37dd594c510ba",
|
||||
"sha256": "c51fdbaf7ed4c397be33413b7464dc3653714711d8a77d4c3e9a410a9d3de152",
|
||||
"git_blob_sha1": "3211d8926c52792d6d99096b4e747315ba9e615c",
|
||||
"lines": [
|
||||
40,
|
||||
67
|
||||
],
|
||||
"claim": "准确比较器注册"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/load_video_nodes.py",
|
||||
"local_file": "../vosr2-reference/vhs__videohelpersuite__load_video_nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/videohelpersuite/load_video_nodes.py",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "dd0e40047e60eaae7687e1fea812fd94b094187a9808819b74b1130b1819243a",
|
||||
"git_blob_sha1": "5c6bd0b40ac75a8d596a4b3c86253420e8d56bb4",
|
||||
"lines": [
|
||||
426,
|
||||
474
|
||||
],
|
||||
"claim": "VHS_LoadVideo准确具名schema/类型/范围/动态枚举和路径校验"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/load_video_nodes.py",
|
||||
"local_file": "../vosr2-reference/vhs__videohelpersuite__load_video_nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/videohelpersuite/load_video_nodes.py",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "dd0e40047e60eaae7687e1fea812fd94b094187a9808819b74b1130b1819243a",
|
||||
"git_blob_sha1": "5c6bd0b40ac75a8d596a4b3c86253420e8d56bb4",
|
||||
"lines": [
|
||||
24,
|
||||
81
|
||||
],
|
||||
"claim": "读取格式默认AnimateDiff、尺寸0及对齐规则"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/load_video_nodes.py",
|
||||
"local_file": "../vosr2-reference/vhs__videohelpersuite__load_video_nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/videohelpersuite/load_video_nodes.py",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "dd0e40047e60eaae7687e1fea812fd94b094187a9808819b74b1130b1819243a",
|
||||
"git_blob_sha1": "5c6bd0b40ac75a8d596a4b3c86253420e8d56bb4",
|
||||
"lines": [
|
||||
83,
|
||||
169
|
||||
],
|
||||
"claim": "OpenCV读取路径的force0/跳帧/间隔/cap边界;未解码"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/utils.py",
|
||||
"local_file": "../vosr2-reference/vhs__videohelpersuite__utils.py",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/videohelpersuite/utils.py",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a",
|
||||
"git_blob_sha1": "5b35ad47fa3d1412773ab561598031ba6a3b38bc",
|
||||
"lines": [
|
||||
19,
|
||||
21
|
||||
],
|
||||
"claim": "BIGMAX=2**53-1、DIMMAX=8192"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/nodes.py",
|
||||
"local_file": "../vosr2-reference/vhs__videohelpersuite__nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/videohelpersuite/nodes.py",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "1c306fbc759ea4e09534422efd2603f50877c4674ff101e876e1d33426d46218",
|
||||
"git_blob_sha1": "496bf94e41ea11b8a9315ab92d9ea386636e6115",
|
||||
"lines": [
|
||||
245,
|
||||
279
|
||||
],
|
||||
"claim": "Combine具名默认/范围/可选音频;返回VHS_FILENAMES"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/nodes.py",
|
||||
"local_file": "../vosr2-reference/vhs__videohelpersuite__nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/videohelpersuite/nodes.py",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "1c306fbc759ea4e09534422efd2603f50877c4674ff101e876e1d33426d46218",
|
||||
"git_blob_sha1": "496bf94e41ea11b8a9315ab92d9ea386636e6115",
|
||||
"lines": [
|
||||
399,
|
||||
477
|
||||
],
|
||||
"claim": "动画/视频pingpong及loop_count条件,0不加视频loop过滤器"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/nodes.py",
|
||||
"local_file": "../vosr2-reference/vhs__videohelpersuite__nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/videohelpersuite/nodes.py",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "1c306fbc759ea4e09534422efd2603f50877c4674ff101e876e1d33426d46218",
|
||||
"git_blob_sha1": "496bf94e41ea11b8a9315ab92d9ea386636e6115",
|
||||
"lines": [
|
||||
123,
|
||||
160
|
||||
],
|
||||
"claim": "视频元数据编码条件,与首帧PNG开关分开"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/nodes.py",
|
||||
"local_file": "../vosr2-reference/vhs__videohelpersuite__nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/videohelpersuite/nodes.py",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "1c306fbc759ea4e09534422efd2603f50877c4674ff101e876e1d33426d46218",
|
||||
"git_blob_sha1": "496bf94e41ea11b8a9315ab92d9ea386636e6115",
|
||||
"lines": [
|
||||
334,
|
||||
397
|
||||
],
|
||||
"claim": "save_output选择temp/output;VHS_MetadataImage条件写首帧PNG;未执行"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/nodes.py",
|
||||
"local_file": "../vosr2-reference/vhs__videohelpersuite__nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/videohelpersuite/nodes.py",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "1c306fbc759ea4e09534422efd2603f50877c4674ff101e876e1d33426d46218",
|
||||
"git_blob_sha1": "496bf94e41ea11b8a9315ab92d9ea386636e6115",
|
||||
"lines": [
|
||||
573,
|
||||
634
|
||||
],
|
||||
"claim": "有音频波形才混流、trim/apad及preview描述符;源音频未接"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "video_formats/h264-mp4.json",
|
||||
"local_file": "../vosr2-reference/vhs__video_formats__h264-mp4.json",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/video_formats/h264-mp4.json",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "4c15a42816ccbb06cb8a2fb02f8d1831d622c8531b26e432959ec80e50f7b8bc",
|
||||
"git_blob_sha1": "4aa0bd57c6a4cc65334d82e5cdaa7aadb8372321",
|
||||
"lines": [
|
||||
1,
|
||||
15
|
||||
],
|
||||
"claim": "准确H264/MP4像素格式、CRF范围及元数据/修音轨控件"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "web/js/VHS.core.js",
|
||||
"local_file": "../vosr2-reference/vhs__web__js__VHS.core.js",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/web/js/VHS.core.js",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "fd0f5e78c3fb40dad605105d6d07fd629d166f6ccb4a9d04a20b5cd1b82b13a1",
|
||||
"git_blob_sha1": "8d7f2c877ad215cb61d4fdd823f18b9d26ccab2e",
|
||||
"lines": [
|
||||
33,
|
||||
111
|
||||
],
|
||||
"claim": "VHS前端KV恢复/旧值兼容;不推断扩展组合最终状态"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "web/js/VHS.core.js",
|
||||
"local_file": "../vosr2-reference/vhs__web__js__VHS.core.js",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/web/js/VHS.core.js",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "fd0f5e78c3fb40dad605105d6d07fd629d166f6ccb4a9d04a20b5cd1b82b13a1",
|
||||
"git_blob_sha1": "8d7f2c877ad215cb61d4fdd823f18b9d26ccab2e",
|
||||
"lines": [
|
||||
788,
|
||||
795
|
||||
],
|
||||
"claim": "choose video to upload为上传按钮且serialize=false;源named额外null不是新物理位置"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "web/js/VHS.core.js",
|
||||
"local_file": "../vosr2-reference/vhs__web__js__VHS.core.js",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/web/js/VHS.core.js",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "fd0f5e78c3fb40dad605105d6d07fd629d166f6ccb4a9d04a20b5cd1b82b13a1",
|
||||
"git_blob_sha1": "8d7f2c877ad215cb61d4fdd823f18b9d26ccab2e",
|
||||
"lines": [
|
||||
895,
|
||||
922
|
||||
],
|
||||
"claim": "videopreview为前端预览对象;历史params不是当前产物"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/nodes.py",
|
||||
"local_file": "../vosr2-reference/vhs__videohelpersuite__nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/videohelpersuite/nodes.py",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "1c306fbc759ea4e09534422efd2603f50877c4674ff101e876e1d33426d46218",
|
||||
"git_blob_sha1": "496bf94e41ea11b8a9315ab92d9ea386636e6115",
|
||||
"lines": [
|
||||
1039,
|
||||
1070
|
||||
],
|
||||
"claim": "VHS Combine/LoadVideo注册"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "guhai",
|
||||
"file": "nodes/忽略多组.py",
|
||||
"local_file": "../vosr2-reference/guhai__nodes__忽略多组.py",
|
||||
"url": "https://raw.githubusercontent.com/goohai/Goohaitools-comfyui/4e11bd3b8471102eef1cadd809c79c94dc8001ee/nodes/忽略多组.py",
|
||||
"commit": "4e11bd3b8471102eef1cadd809c79c94dc8001ee",
|
||||
"sha256": "4350ab38acf4b1e555dbeaf27afe5427223d91b5e9ac4c7a2d4ce25c2931f450",
|
||||
"git_blob_sha1": "fc1992c878179f88b3a0d776f0293cd79108eee5",
|
||||
"lines": [
|
||||
1,
|
||||
23
|
||||
],
|
||||
"claim": "忽略多组孤海后端无输入输出,execute返回空;guhai_ig不是后端参数"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "guhai",
|
||||
"file": "web/js/nodes pass.js",
|
||||
"local_file": "../vosr2-reference/guhai__web__js__nodes pass.js",
|
||||
"url": "https://raw.githubusercontent.com/goohai/Goohaitools-comfyui/4e11bd3b8471102eef1cadd809c79c94dc8001ee/web/js/nodes pass.js",
|
||||
"commit": "4e11bd3b8471102eef1cadd809c79c94dc8001ee",
|
||||
"sha256": "2466edb72013fc93e1685e430042c79bf089b38237bbfab65199d4903e7a3f5f",
|
||||
"git_blob_sha1": "4e3f4e6d2f3e1a8031d63930af7d5caf3f62b8b0",
|
||||
"lines": [
|
||||
5,
|
||||
106
|
||||
],
|
||||
"claim": "GuHai创建控件、onConfigure重新同步properties,默认/active_set/disable条件"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "guhai",
|
||||
"file": "web/js/nodes pass.js",
|
||||
"local_file": "../vosr2-reference/guhai__web__js__nodes pass.js",
|
||||
"url": "https://raw.githubusercontent.com/goohai/Goohaitools-comfyui/4e11bd3b8471102eef1cadd809c79c94dc8001ee/web/js/nodes pass.js",
|
||||
"commit": "4e11bd3b8471102eef1cadd809c79c94dc8001ee",
|
||||
"sha256": "2466edb72013fc93e1685e430042c79bf089b38237bbfab65199d4903e7a3f5f",
|
||||
"git_blob_sha1": "4e3f4e6d2f3e1a8031d63930af7d5caf3f62b8b0",
|
||||
"lines": [
|
||||
375,
|
||||
443
|
||||
],
|
||||
"claim": "GuHai组状态可改节点mode0/2/4;只解释源码条件,不模拟最终运行模式"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "frontend",
|
||||
"file": "src/lib/litegraph/src/LGraphNode.ts",
|
||||
"local_file": "../vosr2-reference/frontend__src__lib__litegraph__src__LGraphNode.ts",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/71d2f2f2b5c6da9dee281836b5b72f3af368966f/src/lib/litegraph/src/LGraphNode.ts",
|
||||
"commit": "71d2f2f2b5c6da9dee281836b5b72f3af368966f",
|
||||
"sha256": "d6263d56f28a5e6c5a95a3a263fe0d6ffe4083a981c01a14ec4ebfca43487e50",
|
||||
"git_blob_sha1": "38723cce556962cb80456239df383d49469134d9",
|
||||
"lines": [
|
||||
901,
|
||||
1043
|
||||
],
|
||||
"claim": "准确frontend先恢复属性、namedValuesRestore决定具名/位置值、最后onConfigure;扩展次序未知"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "frontend",
|
||||
"file": "src/scripts/widgets.ts",
|
||||
"local_file": "../vosr2-reference/frontend__src__scripts__widgets.ts",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/71d2f2f2b5c6da9dee281836b5b72f3af368966f/src/scripts/widgets.ts",
|
||||
"commit": "71d2f2f2b5c6da9dee281836b5b72f3af368966f",
|
||||
"sha256": "5f3d26cd1626c72ec4d3f7cc806345d0c771afb86daf7127935ff26a7a1f3d54",
|
||||
"git_blob_sha1": "20bcdf0e541f7f38803be6ad5e9cc8fe411a9432",
|
||||
"lines": [
|
||||
89,
|
||||
146
|
||||
],
|
||||
"claim": "种子前端control_after_generate控件命名及fixed等枚举、不放prompt"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "frontend",
|
||||
"file": "src/scripts/widgets.ts",
|
||||
"local_file": "../vosr2-reference/frontend__src__scripts__widgets.ts",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/71d2f2f2b5c6da9dee281836b5b72f3af368966f/src/scripts/widgets.ts",
|
||||
"commit": "71d2f2f2b5c6da9dee281836b5b72f3af368966f",
|
||||
"sha256": "5f3d26cd1626c72ec4d3f7cc806345d0c771afb86daf7127935ff26a7a1f3d54",
|
||||
"git_blob_sha1": "20bcdf0e541f7f38803be6ad5e9cc8fe411a9432",
|
||||
"lines": [
|
||||
148,
|
||||
220
|
||||
],
|
||||
"claim": "种子生成前后设置和回调条件;fixed不做increment/randomize,本轮不求随机数"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "frontend",
|
||||
"file": "src/scripts/valueControl.ts",
|
||||
"local_file": "../vosr2-reference/frontend__src__scripts__valueControl.ts",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/71d2f2f2b5c6da9dee281836b5b72f3af368966f/src/scripts/valueControl.ts",
|
||||
"commit": "71d2f2f2b5c6da9dee281836b5b72f3af368966f",
|
||||
"sha256": "57f607f240896f28663c40f02ab16bb01d3914470be486f6c58041e4032d87b1",
|
||||
"git_blob_sha1": "b3e29fc07bf4241c41df92de92d4413082679fbb",
|
||||
"lines": [
|
||||
1,
|
||||
160
|
||||
],
|
||||
"claim": "种子控制nextValueForLinkedTarget及fixed分支静态实现"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "frontend",
|
||||
"file": "src/extensions/core/uploadImage.ts",
|
||||
"local_file": "../vosr2-reference/frontend__src__extensions__core__uploadImage.ts",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/71d2f2f2b5c6da9dee281836b5b72f3af368966f/src/extensions/core/uploadImage.ts",
|
||||
"commit": "71d2f2f2b5c6da9dee281836b5b72f3af368966f",
|
||||
"sha256": "48d062c2ee95bd77c537c539e6c8f8bc03bd71dcec94c5b82487c014ea3e9c06",
|
||||
"git_blob_sha1": "58e43bb218171534c4713bdced29171ecb96d903",
|
||||
"lines": [
|
||||
1,
|
||||
40
|
||||
],
|
||||
"claim": "准确上传扩展静态文本;源upload=image前端状态不证明上传成功"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vosr",
|
||||
"file": "LICENSE",
|
||||
"local_file": "../vosr2-reference/vosr__LICENSE",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/LICENSE",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "de4d0a8b95787defcc0ccaaa783e77750c243f3f0d29f75a7e5e9bf3a5f84863",
|
||||
"git_blob_sha1": "ada5dc2bfdbe0232c59a18747190a14d3c5189ab",
|
||||
"lines": [
|
||||
1,
|
||||
201
|
||||
],
|
||||
"claim": "对应固定版本许可原文"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "core",
|
||||
"file": "LICENSE",
|
||||
"local_file": "../vosr2-reference/core__LICENSE",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/856a922befab9d94cb66f36a3dce17234d7a6e31/LICENSE",
|
||||
"commit": "856a922befab9d94cb66f36a3dce17234d7a6e31",
|
||||
"sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
|
||||
"git_blob_sha1": "f288702d2fa16d3cdf0035b15a9fcbc552cd88e7",
|
||||
"lines": [
|
||||
1,
|
||||
674
|
||||
],
|
||||
"claim": "对应固定版本许可原文"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "frontend",
|
||||
"file": "LICENSE",
|
||||
"local_file": "../vosr2-reference/frontend__LICENSE",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/71d2f2f2b5c6da9dee281836b5b72f3af368966f/LICENSE",
|
||||
"commit": "71d2f2f2b5c6da9dee281836b5b72f3af368966f",
|
||||
"sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
|
||||
"git_blob_sha1": "f288702d2fa16d3cdf0035b15a9fcbc552cd88e7",
|
||||
"lines": [
|
||||
1,
|
||||
674
|
||||
],
|
||||
"claim": "对应固定版本许可原文"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "rgthree",
|
||||
"file": "LICENSE",
|
||||
"local_file": "../vosr2-reference/rgthree__LICENSE",
|
||||
"url": "https://raw.githubusercontent.com/rgthree/rgthree-comfy/2c5342a8cb0eaecaabf61435a5f37dd594c510ba/LICENSE",
|
||||
"commit": "2c5342a8cb0eaecaabf61435a5f37dd594c510ba",
|
||||
"sha256": "b34faf7c3e2975fe08d0169958e2b39f076d4d4289cbe2560dd7dd5b1a613ed1",
|
||||
"git_blob_sha1": "5a4eb87c0791b74af3db40c2a4d362469a8b6b43",
|
||||
"lines": [
|
||||
1,
|
||||
21
|
||||
],
|
||||
"claim": "对应固定版本许可原文"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "vhs",
|
||||
"file": "LICENSE",
|
||||
"local_file": "../vosr2-reference/vhs__LICENSE",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/LICENSE",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
|
||||
"git_blob_sha1": "f288702d2fa16d3cdf0035b15a9fcbc552cd88e7",
|
||||
"lines": [
|
||||
1,
|
||||
674
|
||||
],
|
||||
"claim": "对应固定版本许可原文"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"id": "guhai",
|
||||
"file": "README.md",
|
||||
"local_file": "../vosr2-reference/guhai__README.md",
|
||||
"url": "https://raw.githubusercontent.com/goohai/Goohaitools-comfyui/4e11bd3b8471102eef1cadd809c79c94dc8001ee/README.md",
|
||||
"commit": "4e11bd3b8471102eef1cadd809c79c94dc8001ee",
|
||||
"sha256": "7930cd372eda184ec5fc035f4ab202f83021ddaa85a5f868f8923d591f6c8b45",
|
||||
"git_blob_sha1": "5de30a6c14d4dfc93671b04c7d94547b93d79131",
|
||||
"lines": [
|
||||
224,
|
||||
230
|
||||
],
|
||||
"claim": "GuHai仅自述开源协议,准确树未列LICENSE/COPYING;具体许可未知,不编造"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,771 @@
|
||||
{
|
||||
"base": "282c0e88d0434bd60be57f0a596413203ef61ce6",
|
||||
"files": [
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/__init__.py",
|
||||
"sha256": "1d3488bcc2eadcd8a8f2e84ab4f6e9bdf52096b8af637c4da399db041d5a0543"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/client.py",
|
||||
"sha256": "ce30b3b3587d8f0dac86d534b99f31b95f1f4d0acb361babb45fd2be9513fe72"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/companions.py",
|
||||
"sha256": "7dde205059bf489e3d39539a8b42333b3947c3989d890441f70a45cf67d9ab04"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/delivery_scope.json",
|
||||
"sha256": "3a85718f877a63be54c843e2610b24dcc3013a6011f705d6348c91e2c7f78fd6"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/delivery_scope.py",
|
||||
"sha256": "0b849256dbb06f709c1ba856c34b3df04d2fccf09984a6e1fe1284b792eaf867"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/dry_run.py",
|
||||
"sha256": "f8bf4d1b91d959044de1dbc4aeb11bf0bb521f51f1928d36a46c670381a08ed7"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/endpoints.py",
|
||||
"sha256": "fc99a623850b581ae38843bbc3baf1b71ca9fd633e6103a34cb809a345e5a647"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/h3_chain_reference.py",
|
||||
"sha256": "a5c0ab92d99757c168648ddbc0418b23d2b871f674b153e9a240b75409cf5741"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/h3_core_reference.py",
|
||||
"sha256": "2913654b6ec3dabac1d36b1894064b8e077dd1d743d546e81667b317339f8a5f"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/library.py",
|
||||
"sha256": "b9cbfce28267642e6db3ebe9d591cf8dd260c7772a5a21a8d36cb98915eca13c"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/library_cli.py",
|
||||
"sha256": "04bfa8cfbe3f9378e78594958973118ec95aa1ff0bcdbdf4da0311abbdbcd380"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/lint.py",
|
||||
"sha256": "9b79bf162e13fb68321727fb17f96d6fc0c217d60db85de38235c4270bf9b4e3"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/output_map.py",
|
||||
"sha256": "36ed4ced825e4f7e1d389602085451b5cb9336b319d220f423f59f83fed6a70e"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/parser.py",
|
||||
"sha256": "a02d583c6a1cf7f85e77341a20308823771c233fb95241118a264e202a5230a0"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/patcher.py",
|
||||
"sha256": "8ac1417f0f78d952cdb219b10811a6ed7d4ce3bb0d561708858c4a8f5d15b45d"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/preflight.py",
|
||||
"sha256": "6629961d33204cbe5b3fc3d8a5a0a4de0c86d235e73f542d191429cf7f4bd2ec"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/profiles.py",
|
||||
"sha256": "4ca33343fc3f20e0fb82558cb428548f6415af04fb90213a694fb759515732f2"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/protocol_references.json",
|
||||
"sha256": "a10aaf98db9bb3b5ac6d1fc30b18c40cf315b34eee57ebb19470a6664e9221a4"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/protocol_references.py",
|
||||
"sha256": "ab9d948dd1bbf83dfce27186d6e48d9c3d5dff129305afd760fb3e77570b2916"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/registry.py",
|
||||
"sha256": "0382eda52a31f23c1c29dd7a62d0ffc93e10fcbb88872a5893b8fc93a2b2734d"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/roles.py",
|
||||
"sha256": "cc0b45eac2d881a6f7cc5ea88ceadb03f71715240a45257fef3a76bfc53d56c4"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/serialization_reference.py",
|
||||
"sha256": "67724fac65acbd397198271e1ed17b91f592f52da7ce8299e575d4c597d57fa1"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/smart_fill.py",
|
||||
"sha256": "adc34e80cca7a2b38cc834a713c9e64001caac84413af288389e5554e304bab6"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/source_reviews.py",
|
||||
"sha256": "b85e26f1e4fce77f75429b7bc0653401065b2cd28151bdf5d9edc87c096e9419"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/structure_reference.py",
|
||||
"sha256": "a9f3a8ed314a0c0a424c6781db4e83af3a85cb8b66b16b01380b5fecc3e1f0bb"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/ui2api.py",
|
||||
"sha256": "86a9c98ad72afa15aaf706bab8b39589a1cbca2e93da40d0aed9f963c14c0d1f"
|
||||
},
|
||||
{
|
||||
"path": "calliope-backend/src/calliope/comfyui/validate.py",
|
||||
"sha256": "c27fca69a604705b06809fdd692975ca0e7a08d05d558172962f8910a6a0491d"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/supplied-api/01.api.json",
|
||||
"sha256": "0ed76e088a23af43d6fecbf273fc0a983d7112e2b046d347f715afffac56d57e"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/supplied-api/02.api.json",
|
||||
"sha256": "daa40971b730076691721afe95e165932df94e3423f1fc44dcb7707026e7125b"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/supplied-api/03.api.json",
|
||||
"sha256": "91e6c2cea3747a03bbb71f661dbd016b28040781482b956365ff76a7a8b647ce"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/supplied-api/04.api.json",
|
||||
"sha256": "2066b07b2ca5390ba3e795df6b43934dab83865b12870b6ff26d8c0ef24f091e"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/supplied-api/05.api.json",
|
||||
"sha256": "95a01c1ea27a8279a6dc202820505099a94161d91e0789189b61208b09007af8"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/supplied-api/06.api.json",
|
||||
"sha256": "3e9176a5346ce8b8122b6da10f377fbeb894dc7c2c82a415f85ffc0dbfefc90b"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/supplied-api/07.api.json",
|
||||
"sha256": "b1b4f6a6c02d8d21701943c67b62805b1210fed17e7e26b618c58e112ea1d70d"
|
||||
},
|
||||
{
|
||||
"path": "docs/hel-892/supplied-api/manifest.json",
|
||||
"sha256": "f1367b4fa7a8377fb57512d17c80bc697d4d3abd0adb77adc3c06c6dedab69ea"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/ControlNet_aux_常用样例.json",
|
||||
"sha256": "8898689d777330c4749a079cd762f573bb12a278c47a2fefbd066ffbdc122b6b"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/Minimax-H3提示词增强.json",
|
||||
"sha256": "ffea53b27d52c63aa9ec9c60144489cc4f9e5a44d9478bcc297be9d9008f1a4c"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/birefnet_图像移除背景.json",
|
||||
"sha256": "a6799c5022c13e46d2b1cf27809cd3c1e1d140a605fa226c19359682751fd036"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/sam3_图像视频-提示词遮罩分割.json",
|
||||
"sha256": "5dbe1a7ab608ba6e9158369ff6498e9bb3f926d151a0ed31cf711c31b167c488"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/NLF_视频人物动作骨架获取.json",
|
||||
"sha256": "1edc7ae5cca8e059577a9572d296c84e1683695e4f13a72388ff70473795ce97"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"sha256": "43f76f599f15058b6e62ae0dfb105518a37532008eed23ef7118e4950b37a608"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/sdpose_视频人物姿势骨架提取.json",
|
||||
"sha256": "4586c72d8a906d4a956fb7d62307b81e57e4e345324c7e73f63103e56bfffd14"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/加载图片合成视频.json",
|
||||
"sha256": "f5245d225f77cd64aefe6d0b8bb9342ec48a8a6293a533d65ea7304ce1b03f93"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/加载本地latent解码.json",
|
||||
"sha256": "1fd83bd3f2d7950440189932b4c17718190af88daa4a93ac86474081dea9005b"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json",
|
||||
"sha256": "61a0b1a2aa17a7d8c4f09f4f57e276eaf37227f69b5fc5789193005e593548c9"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/图像4种添加水印节点.json",
|
||||
"sha256": "2eecd407d667d2ef6249061181edfdcfc417a2151627622f280d74aaac1794d8"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/图像分割-多宫格分割.json",
|
||||
"sha256": "aeceb3fd00eb0966eebf8d8c89d90e2ad29d0aa8d02589aa05d52a6c145a4bcc"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/图像合并成四宫格.json",
|
||||
"sha256": "fb5e5b346d51a79c19e611b76d39cf4b9491493723684bbb85ab3c49923467bb"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/图像嵌入文字描述.json",
|
||||
"sha256": "938ad9ad0eed2253e9a5a9a9dc16dc6b0a22bf976a80af90aa1d0b56e42ba7d3"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/多视频合成分屏展示.json",
|
||||
"sha256": "3c2f6558c199a7689546dc881df2b26dc31c02715fbc7b32f51caaa4601c13d7"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/截取视频每一帧.json",
|
||||
"sha256": "43858b9121439a92e7ab35c2fb62b78e56fa93bcd0ad62679f2387f71fdec1fa"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/手动按分镜视频截取.json",
|
||||
"sha256": "381bb5f3a6e2788d0dd3ee9594a97eaedb153611194d4f8fdde420cf47814132"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/提示词生成与反推/Llama-cpp+Qwen3.5-提示词.json",
|
||||
"sha256": "9071928ce74d5133401942583603a6bc98873263fbe4c32a438fe73cee81ce90"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/提示词生成与反推/gemma4_提示词反推(图像视频音频).json",
|
||||
"sha256": "1a94bdd5987955a29e403d128c2ea5ca0b6bc8a8d5ece145e1baba07146588b0"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/深度图/moge3_深度图_几何图_线稿图.json",
|
||||
"sha256": "a50e8b9961fbdd83fa42ca121ff77b3c1b058c7e454ad374b0de7c60e7b8c4a9"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/视频-音频分离.json",
|
||||
"sha256": "4861e3e33291ed962d2215b1d8cc976a4706d19719e3541e9cbb2c636683afc3"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/视频倒放.json",
|
||||
"sha256": "8c760ea58d7ff664323f92a1174fe88300cd931c00201ccf437df1ad0067cb24"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/视频转gif动图图片.json",
|
||||
"sha256": "39f7ddf60bf5958882215bd4227a85707f1f9003f2c5aaefc709a28b1ef16827"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/音频人声分离.json",
|
||||
"sha256": "3c4bc0f7b1891e298a5d4e00072c6243a61b98d5fc0d86d82a476ecead43a1a2"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/音频转MP3格式.json",
|
||||
"sha256": "c46e83b4fe8fc291e9de45b4af6cc50b566ab9377a51b50767315917dd13861b"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/RTX_image_upscale.json",
|
||||
"sha256": "35bf9b7731e6199b5ccc113e31c248573f9ae74d1bb9302071a3a97524fea8c4"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/RTX_video_upscale.json",
|
||||
"sha256": "ce189e5efdb1d608eaf7f7905f0dbf3776be2c199e143193c226ab497f2eb9ec"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/Seedvr2_3b_int8_图像放大.json",
|
||||
"sha256": "2be6b137efaaf25a54aaedc841a14ff3089afdc8a01a04af6353634b8457393f"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/Seedvr2_3b_int8_视频放大.json",
|
||||
"sha256": "06c427c688c13b87ed5724ac6b1ed432c31f8ea6c44212b3e7596b94128619da"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/Seedvr2_视频放大FOR循环长视频.json",
|
||||
"sha256": "576a9516292ed3e63b50c2a03fbfc1a99f9d643f526dc7fa3b98f6cb9832c893"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json",
|
||||
"sha256": "87484f700a9a18d1bffbc61834af2b489a58171dcb4a225e210e695a30c85dd5"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_视频放大_分批循环长视频.json",
|
||||
"sha256": "0f55316d2961a293a7d9f77b7993fd6f01bd5a41a4dca58f69f4d0b35c0aa6ea"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/图像放大比较.json",
|
||||
"sha256": "1ca5938a963921b16c96649a97d3b1a9f75d810d3aabcd7ce472a30e5805f3e4"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/视频模型放大插帧(简单快速版).json",
|
||||
"sha256": "bf47ba2462a3f683fe4f1d742b7dcde81a7a3f95e7e63c021e942a6c4f9ef071"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/1-语音生成/Qwen3-ASR-Subtitle语音转字幕.json",
|
||||
"sha256": "47f9afa955a6a5dce37000cb6a15bac7516d26ff50b6398bda334c825552cfd8"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/1-语音生成/Qwen3-ASR-语音转文字.json",
|
||||
"sha256": "958a3b7cb7070f4207901c79f13863b44ffcd0ed5c2c7fb4cd779e7964da0d65"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/1-语音生成/Qwen3-TTS_多角色对话.json",
|
||||
"sha256": "549a6502b3e0d4386323e6e67d6a9b4943b7a01eb59bdbe7adc7a920cfe5b690"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/1-语音生成/Qwen3-TTS_语音设计+语音克隆.json",
|
||||
"sha256": "9c75272e418064f46da96f6167448216a9390566e4b5d5e168d8cc5955447ab1"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/1-语音生成/index-TTS2-情绪控制-音频参考-文本控制-克隆-多人对话.json",
|
||||
"sha256": "d2c469a8a17c6d1fcffb9a96700c38290895873d99c40d13d669bd45f6ea79de"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/2-音乐生成/ace_step1_5_xl_turbo_8Step极速音乐生成.json",
|
||||
"sha256": "668fae23de5f84cc530fa4cab7381299cbc787b30c4597345b47e7f5c17415ef"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/2-音乐生成/ace_step_1.5+Qwen3.5_自动歌词音乐生成.json",
|
||||
"sha256": "518085b1e8d12257e68427dcc0f01e6cda5018ec353fd90fdf366afb4fc89b85"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/2-音乐生成/minimax_music_文生音乐.json",
|
||||
"sha256": "0a655ead5a0da406159dceb46451439df0c02050becaaa25b3018abb41840284"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Anima/Anima_Klein放大_超强动漫模型.json",
|
||||
"sha256": "000843bc0e46844e556b04fc820ae1b2f7fa9bba1dd0ec21805c0c7ab27a647c"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/10_flux2_klein_文生图-角色三视图.json",
|
||||
"sha256": "e04e5bd04f03ce32b5221d37c5f7cffb0405b1471cb7be90b47b407d900a49b7"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/1_flux2_klein_文生图.json",
|
||||
"sha256": "523905ac41323c626d7a156c88d02156cfa4758a70175cd7a3fba2a8c4fd449b"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/2_flux2_klein_图生图.json",
|
||||
"sha256": "c0472959097f4e785205f41109c941dab26d12a874311834a7dc02c4616bbe9b"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/3_flux2_klein_图生图一致性增强(大雄lora).json",
|
||||
"sha256": "c6af28d5bd72df5577f1e4d336974397494dd500fff23efd4afe81037514be71"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/3_flux2_klein_图生图一致性增强(小志lora).json",
|
||||
"sha256": "43995837f89e5112afa74a57180dc356f7b4d4ef9e3a325984a2fc5ca1b7c651"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/4_flux2_klein_图生图_局部重绘.json",
|
||||
"sha256": "d1d57bd401959975cbe6fd70f97706cec21bbed0a5ec3747447b9f192631f414"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/5_flux2_klein_图生图_扩图.json",
|
||||
"sha256": "ad8c09e81b07aa7809a7d42f633d0b9069f704187e7a983bc2ac12bc3cbb8507"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/6_flux2-klein+Qwen3.5_转线稿洗图.json",
|
||||
"sha256": "40a9fee073066914ac610f74dc7f7a49022bda63f5b89560d4bd635094a5c757"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/7_flux2_klein_图生图-动漫转真人.json",
|
||||
"sha256": "8cab62c6b7b2401bb6b51ff4426aaad2a644fc6cfe49d974769fadf19c16a0a1"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/8_flux2_klein_双图编辑.json",
|
||||
"sha256": "9d00eb7af7e8d49c54396e6dc2afe7770f99cf75ae765dc1b906c8c9e6b69d83"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/flux2_klein-图生图_人物动作迁移.json",
|
||||
"sha256": "fc6daf483ac05fdc904ca402271223d14cc217ea4c81a17ba2ef4cae993aefe7"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/flux2_klein_图生图_人物迁移.json",
|
||||
"sha256": "81409bdcd546102a7a6d5b7e32578912bf7ad4f89b35718de0401ceed624225e"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/flux2_klein_图生图_印花提取.json",
|
||||
"sha256": "8768dec340e35dbd70f928d8bbc34813b2bd45f5c270c405d4495b92da478337"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/flux2_klein_图生图_老照片修复.json",
|
||||
"sha256": "922c534d70b85beacc2cd51354552ed1d850dbb611b20f2d6981c4e524ce06c5"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Flux/flux2_klein_服装迁移.json",
|
||||
"sha256": "e3f01ba44f3628297e714b4307ed959758f04e0415093dc5ec690857384a8386"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_Image2.1_图像编辑_VNCCS任意角度-任意姿势.json",
|
||||
"sha256": "a5a675500a473214eaeb1d25dc1eda83b57bba3a17d18f1f0042bee62b474314"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_图像编辑_一键16张姿势图.json",
|
||||
"sha256": "248b6c5ae28d5a44035c5ad91bcdfa458360a67598eaa4d195c3fb6853b18a49"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_图像编辑_动漫转真人.json",
|
||||
"sha256": "1aa1d3641f82533f99d99567c2708919438b9efbfc6623d684a9a88b876b75cd"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_图像编辑_提示词增强.json",
|
||||
"sha256": "ebf173eb9d871717534a379d451d4a08ca06c3b677b552de12a5d51dbe8febf2"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_图像编辑_深度-姿势-线稿-硬边缘-控图洗图.json",
|
||||
"sha256": "b6e232082089dd9c4046e0dc5bd1d046907525b8cb01758fb804b5f4aa11275e"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_图像编辑_背景移除.json",
|
||||
"sha256": "d225102993ad5aa08e619bd7f1e5abbfd54e2d5ac8d8be1eacf09722107c4c9e"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_图像编辑_角色BFS头部迁移.json",
|
||||
"sha256": "6a9da127ee2bccafeff7499ab3d62f349aec1eff4265cb211bdec578dba1fe7b"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_图像编辑_角色表四视图.json",
|
||||
"sha256": "0036c02e1ab22f44c94bd9f311d5254d7b3b0cea25211bc4ff1e92cd90e0acdf"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_文生_多图编辑_8步lora加速.json",
|
||||
"sha256": "172b8fff0b531fbea367e79aa6b5ed1e6b59cab2ce6cb23d324092d5b55a3f97"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_文生_多图编辑_提示词增强(N版).json",
|
||||
"sha256": "ae6521e5f42bef0b887f754c2fec5961d612afc464fbd98940a976a9795662c6"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_文生_多图编辑_透明背景.json",
|
||||
"sha256": "5853f21657d56e97a6b625c4487e23473b846fa8c96dc292f3700b3075245a39"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_文生图_提示词增强.json",
|
||||
"sha256": "dfe10917d101bf1a8a8c20750f4360690ecd478e9eb33d16a59ea0c6f12c086c"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Qwen-Image-2.1/Qwen_image2.1_文生图_角色表四视图.json",
|
||||
"sha256": "6fd307b02b7ba29858723e283580c1cf4ab1fce8804a3ced1f4fc37934965392"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/10_Z_Image双采样+Fluax2-klein修复-高清直出.json",
|
||||
"sha256": "043cd2abe731996b80637d87b9a799e412e08b9a15e4b7c2f4440fbcff2487b9"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/11_Z_Image_Turbo+模型放大_图像4K高清放大.json",
|
||||
"sha256": "baaa0cd969a28abe5e6ab19b3d7f6e161468cd15c970fe4bd9922afbe09ab4da"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/12_Z_Image_Tubro_文生图_SeedVR2高清放大8K.json",
|
||||
"sha256": "8d79bcd44a7843ac5df9fbcd372a6327ba72274260ef463c46ec85709da7846a"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/1_Z-Image-Tubro_文生图.json",
|
||||
"sha256": "36713b1a3f5c4f2992c7edef2e1e8c3246d44d28ecc750b87f4353a08c3b5ab0"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/2_Z-Image+Base+Turbo+双重采样工作流.json",
|
||||
"sha256": "27108ae85715b147f63d8640ee032484c70a21633e2c6234eed346079b9aba2c"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/3_Z-Image_文生图(摇光梦幻).app.json",
|
||||
"sha256": "58e88cacc6e1375cad39023e39eb1728eb36e63acce3c46fca40898d706b1d42"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/4_Z-Image+Qwen3.5-文生图.json",
|
||||
"sha256": "56bd28b5253fe734e851abd81c7851d00c62e4dbf37a22d97781d93ec367a35d"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/5_Z-Image+Qwen3.5提示词反推_文生图.json",
|
||||
"sha256": "910317a123e658f26e48ad5cd144d28b7f31e0d43cbdb3ed567048c7917b5c73"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/6_Z-image_局部重绘.json",
|
||||
"sha256": "f60e734b6ed9e678571ad7666411d6282065c38abe3e9c29ea4c5cc1c3455505"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/7_Z-image+Controlnet_图像扩展.json",
|
||||
"sha256": "82cda5dca2e224a5b042daecba4c3c1405a825648a9e9ced29fe21e58f7e55f8"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/8_Z-image+Controlnet_姿势控制-洗图.json",
|
||||
"sha256": "babc1dbeb3bb4981e338d8317ff9fb6fd8c28913bf47a2e2e3eb5409439447bf"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/9_Z-Image+Flux2-Klein_风格重新编辑.json",
|
||||
"sha256": "3734f261691c3ad13d29b30d88e91f671d9c548f723e77d78651c7155b06c408"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/Z_Image_turbo_十八种风格_插图漫画.json",
|
||||
"sha256": "02ea31b959de72f9b5c00a92f21b4e17bbc2bf5a54495093a204957771a88039"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/Z_Image_turbo_十八种风格_照片摄影.json",
|
||||
"sha256": "740d7d41b3248978dca2046d9a2ea99d3a66ef081d45609782d2847f04f7e0c8"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/Z_Image_turbo_十八种风格_通用a_.json",
|
||||
"sha256": "e58341a99587077a69baf3cec62d9ae7bb0ce02a87cb3973ce3134c04a119b23"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/Z-Image/Z_Image_turbo_十八种风格_通用b.json",
|
||||
"sha256": "8d9e66744e0266c5f53a6396e030c38bb90053f2525ac9c3c6cc1b321006a976"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/Krea2_turbo_文生图_4_6_8宫格故事板.json",
|
||||
"sha256": "776b2f92f8906232c2ffe1b25c8b9cfe3398bfe45a9f80715f6ce5acc03e96b4"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/Krea2_turbo_文生图_极致写实双采样2k版(N版).json",
|
||||
"sha256": "50433cee0d5bab60a2cce44d73adbe5fe9b486c039bc89e1caef640fe6e0b28d"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/Krea2_turbo_文生图_角色三视图双采样2k版.json",
|
||||
"sha256": "64bb5eb4e5399d307c12553717b8a1f0046f48b625b16e62d40e962b6bec1847"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2-Edit-Anything2Real_动漫转真人v3.json",
|
||||
"sha256": "0d482e6c6fac70af6dd5549e8a464ee080a0ec135350d72d32a4ce4a8fd05bbe"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_identity_edit_图像编辑.json",
|
||||
"sha256": "c208883f17eb873063a4febaef636f0fa065131fc82bc4b0b26eff41f442719a"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图 (N版).json",
|
||||
"sha256": "935fc592ead1a89614470d41c512e2d7b4a41a6887f71a0a8d8f4c071a60e3c9"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图.json",
|
||||
"sha256": "6b317af2bda225d9441074ef330669b4537e95c705987223efafd2705dbbc344"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_2万提示词随机模板+4千种风格选择.json",
|
||||
"sha256": "599bb58d48d68de929e7ec476f77e9f7c736c00235b68570416d214d3b4e391c"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_Qwen3.5自动提示词生成.json",
|
||||
"sha256": "afafb0e0ebdc445a7534041589b7f6a580e0b15b8293c2fd26907474892f5957"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_动漫风格2.5D半写实.json",
|
||||
"sha256": "3faf9b1f0a20c7d21367af1721583a7402f048e18991025f9afff192ff8fe077"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_动漫风格Image2风格.json",
|
||||
"sha256": "bf65d0080ab80a5934855a0dbc7a5e167300bb54e24a18e05e4321a70ec838ea"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_动漫风格线条动漫.json",
|
||||
"sha256": "9bab028943604b4b167a56dcc51475f67bac897c9eae3c7bf9d311b2c5cb7d91"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_图像风格参考.json",
|
||||
"sha256": "8c248ccc44df79b475c81e0bb260596ece066d65f2a21c0b2a72dc6b2441b170"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_奇幻现实风格.json",
|
||||
"sha256": "7a2af26c48114c7f1a7741a5cded07c0cceb68c4e69410de8af6429eb6b5041c"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_极致写实(N版).json",
|
||||
"sha256": "ec98804940c28956af1719096751bba2d274eef8a251b97207ac655a05779384"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_细节增强.json",
|
||||
"sha256": "faa28f85fbd80ec9c3aba76749d6447c1d3b4a8489c88853ebde665a4f78ef10"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_美学质量增强.json",
|
||||
"sha256": "fbca5f24abf71f10ed5e2b90012aab1c25c6632a18541fbf0412b8845f603b85"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/krea2/krea2_turbo_文生图_赛博朋克现实风格.json",
|
||||
"sha256": "a353acdb89b02462abed5f1513acfcb4f538c50ab5bc8ede8e8597f3ce8eea60"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/3-图像生成/肖像大师_美女提示词生成.json",
|
||||
"sha256": "4ff20f7350813ec74fc054971b4532200d61661951c103c89f7729f89f7be2ff"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_FastH3_i2v_图生视频8步极速.json",
|
||||
"sha256": "c5eff277eeeeefacb39c4af2e5ac41251785cc18ca90c1678a653367f4dd5942"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_FastH3_t2v_文生图8步极速.json",
|
||||
"sha256": "ed4a30da03245f35ff9006ac64cd045c1b9c64eb8b585520dbbb418f6793fc78"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_多参考_双采样潜空间放大.json",
|
||||
"sha256": "8b97388e142ddb67c84f2cbe0bb68c10f519e7615d75f1ea0005580fe4537ab2"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_孤海智能一体化(多合一简化版).json",
|
||||
"sha256": "827f43d5d9bdb6f2d6f4d8b69e86708e6d08642ed0df04bee15087d10b9a0e35"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台MiniMaxH3_多合一多分段拼接.json",
|
||||
"sha256": "34fde3a91f9ef932adc2837cc9d4254bf75a3251ad5c6474d90e4085690cbafc"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_双采样多段循环-PV动画尾帧衔接.json",
|
||||
"sha256": "c8a442bd8cae8dcd75a6a01847ca99b75dcc37ef8ff0a855c82213ed25e943e0"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_双采样潜空间放大.json",
|
||||
"sha256": "2434bd48e3c29abf9e6ed0931f3c8825481772a134a065f6cfdd3c0b89ba81b7"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_文-图-参考-分段循环-双采放大_多合一.json",
|
||||
"sha256": "698430e2b234a107b15f1bebf7704833afeea819bd21a3af56f7121daa1383e0"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_文_图_首尾_参考多合一(单采样).json",
|
||||
"sha256": "526986a02875bbefebeb8a81cce9b58a8e764ab0c0092b2d8e858ecfac771638"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_短剧创作-多宫格分镜参考.json",
|
||||
"sha256": "d2850f5fb3e5b54e3e4ec9e17f34bdb11bf7009728b5e585c769fb2f11f80275"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_短剧创作-音频参考.json",
|
||||
"sha256": "c188a7383a6c7a0dbd5d4d0717527b096ec73c1232373ee50c731bceefcfe7fb"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_视频人物替换.json",
|
||||
"sha256": "dce57cfc239c9f90cda2107fff5614b2cb0944e0441d9d8137b3f1c325f41a7a"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_视频参考+多参图-SelfLift双采样潜放大.json",
|
||||
"sha256": "97ec7f73f32126aa24798fc65736734dfa839b74d25c4b2a94021abe063f06d7"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台_视频参考+多参图.json",
|
||||
"sha256": "40f92a22aa66c9d87b876784e33b02471339d64504e22e1672155608fbcbf079"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_导演台时间线素材_双采样潜空间放大_多分段拼接.json",
|
||||
"sha256": "172eb8af3aca70082941427520fdcca06568957bab3d39101c5e9d6641b45e4a"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_音频MV_多参长视频分段_Selflift双采潜放大_Qwen3.8官方Skills自动提示词.json",
|
||||
"sha256": "bdc93d36fb8a4728dfa8031d1f00782d68e8e6aedd718b166f57e54216f2882f"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/MiniMax_H3_音频数字人_SelfLift双采样潜放大分块_Qwen3.8官方Skills自动提示词.json",
|
||||
"sha256": "903e32248fc0c53df36c5841f4f4ccdb5fb8190a39c6c9015d3e55a451aaf7eb"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/Minimax_H3_T8双时钟采样_参考生视频-8步高质量极速版.json",
|
||||
"sha256": "fae96106a128342a6903bd32680463d1be98c0d5ad738d2fff40fc0f52a35389"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/Minimax_H3_T8双时钟采样_图生视频-8步高质量极速版.json",
|
||||
"sha256": "97f188c9295af0dbe6358a4b23117ca1612e812d2fa3df67dd7b10ee68e96fb5"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/Minimax_H3_T8双时钟采样_文生音视频-8步高质量极速版.json",
|
||||
"sha256": "5b45b49ebe4402c207e7d894e03a1bb53482b24a0c09ce50d549be4a01f9c6d0"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/Minimax_H3_T8双采样_潜空间放大_参考生视频.json",
|
||||
"sha256": "fab48be409cf423aaed7be268c6655ae39ecd1733218413c51874c5ba2ad0bdf"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/Minimax_H3_r2v_参考生视频_双采样潜空间放大+Qwen3.8官方Skills自动提示词.json",
|
||||
"sha256": "4c1305fdfe6d5643e64a7b6c99cc92e331ffc9475f30fef5e0119c887367aab0"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/Minimax_H3_视频动作参考_SelfLift双采样潜放大_Qwen3.8官方Skills自动提示词.json",
|
||||
"sha256": "2be3981360fff849a53a928a6a2040c97bcf1944dce2df82d716a805c0ef2594"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/Minimax_H3_音频数字人_单采样.json",
|
||||
"sha256": "77b665bf6bcd11195f424d42d88f5142b43b0c608af776eef5744aca896f4b56"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/minimax_h3_i2v_图生视频.json",
|
||||
"sha256": "a071e6070ee933396f225b4447c363bbf6b0df059b3cd43da567e81bc7937e84"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/minimax_h3_r2v_多参生视频.json",
|
||||
"sha256": "89166eb9cce4c9177a0f9a0a3a058e140429413e7beb3692e7ee5c30b76bc4fb"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/Minimax-h3/minimax_h3_t2v_文生视频.json",
|
||||
"sha256": "039d46a5bbb809b84fab3b42c777118f91d0c06835555d54410631742584f1be"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/uncensored/minimax-h3多参生视频无审核版.json",
|
||||
"sha256": "e501089f36c4c7f76a9e926e09ab9c467316d0778e62dff4c9e9faa6b155cb83"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/uncensored/minimax-h3文生视频无审核版.json",
|
||||
"sha256": "07baed6dd4a259701f7e5563fa1f19799fbbb558668d09a74876db3729fff3a2"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/4-视频生成/uncensored/minimax-h3首尾帧生视频无审核版.json",
|
||||
"sha256": "d47d3e995858a9c581863a593d89d4f6a24ea04014a1df3faeffa7e07cb19537"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/5-数字人/Wan2.1_I2V_InfiniteTalk_rCM_数字人对口型多动态(KJ版).json",
|
||||
"sha256": "90fb512939d5bbaebfd3462d8edd019ad388611951748e6df09993ddd7f3a36f"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/5-数字人/Wan2.1_I2V_InfiniteTalk_提示词调度动作控制图生视频数字人(KJ版).json",
|
||||
"sha256": "98b4c399948f99aeac9326b4de9638d9a7bc3d718edd2561ab745f6bec12478c"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/5-数字人/Wan2.1_infinitetalk_音频驱动视频配音-单人for循环长视频(官流).json",
|
||||
"sha256": "ebd0c2823b70e5121f9642f781f2d0fa32cda6abe7d4a68fb0eecacc30e92d06"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/5-数字人/Wan2.1_infinitetalk_音频驱动视频配音-双人for循环长视频(官流).json",
|
||||
"sha256": "87412366e6bedd2a2f4490d1a945d0fc005251bb49a20e4ba1157cd6c4ddfbcd"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/6-动作迁移/Wan2.1_SCAIL2_角色迁移_动作迁移_FOR循环长视频.json",
|
||||
"sha256": "60d7a6c9b1b567d726ffd0981de3d8afb3675f88b320733d8442081d849b0ba8"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/6-动作迁移/Wan2.1_Scail-2_动作迁移_WanAnimatePlus_v4.2.json",
|
||||
"sha256": "f0da1e6c1eab5706d29d8d12897db0cea0d9d5f7a73b4882cf07ef2a626dda45"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/6-动作迁移/Wan2.1_Scail-2_角色迁移_WanAnimatePlus_v4.2.json",
|
||||
"sha256": "395dc48ad21d9da6a3a815654922193a9893696015154f53be0cc6f484882637"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/6-动作迁移/Wan2.2_Animate_SAM3-人物迁移-动作迁移-长视频循环(KJ流).json",
|
||||
"sha256": "3ea95e56f193c046937ad246087292865a809d2cc26571357c22fff415295f41"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/6-动作迁移/Wan2.2_Animate_人物遮罩替换(官流整理).json",
|
||||
"sha256": "394c3c31ad05255d3eb130f309d8445764f4d3772b40fa07fbf19708bfcc1002"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/6-动作迁移/Wan_Animate2_动作迁移_for循环长视频.json",
|
||||
"sha256": "22b7853e22629822dd354b0b768e2961a53b4c2f480cfaceeaea9dc51c0f0d0b"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/Krea2_t2i_20260818_API.json",
|
||||
"sha256": "dcf5fad9b464e4154d8ec7ba7af1c21987cb0153c7df747266a02de9f24e1313"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/MiniMax-H3-Turbo-R2V-Extend-2Refs1Vid_API.json",
|
||||
"sha256": "080a17d7ae079f278518de1af15b880a4404105ec89edbac4fd82cf16097b757"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/krea2_T2I_CharSheetV1_API.json",
|
||||
"sha256": "6a991229721d0a501846bf0bc55f793d1ab5225be28b2c9eea485fed56ed5b40"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/minimax_h3-Turbo_Image2Video_20260813_API.json",
|
||||
"sha256": "3d895b01e72c10008c036a9c65fa281b3dfe0d0808417089960fd8f4b56c48ce"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/minimax_h3-Turbo_Text2Video_20260813_API.json",
|
||||
"sha256": "55c6d0e7fb323e05c3d9373606607e0e8fefb3127cac356b03e29f19b7aaa4ed"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/video_minimax_h3_r2v_2ref_API.json",
|
||||
"sha256": "56ab7cbf2402f94000eb1df2b5415f90f36a2821e68f1c35af17a2d9498e7c49"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/video_minimax_h3_r2v_3ref_API.json",
|
||||
"sha256": "2a687133f175180584ebfc3b4318f29cfcac3a24a0f422e1b9c77e6b16c9862a"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/video_minimax_h3_r2v_4ref_API.json",
|
||||
"sha256": "0b00bfc29ad48f8af3c7b6ebc1dcaa03b809b33c24bc31dadc628289480b154a"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/video_minimax_h3_r2v_5ref_API.json",
|
||||
"sha256": "0b6c1bee6507c2485aa115d3b6c038c6c3dabf1ce8569205f8ece50e58f4e909"
|
||||
},
|
||||
{
|
||||
"path": "example_ComfyUI_workflows/video_minimax_h3_r2v_API.json",
|
||||
"sha256": "29f440f7123b9ce64e0fda01ee3cdafb7f87408c47c1fe46c2b73f88682eae0c"
|
||||
}
|
||||
],
|
||||
"original_files": 156,
|
||||
"all_unchanged": true
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"base": "282c0e88d0434bd60be57f0a596413203ef61ce6",
|
||||
"first": {
|
||||
"imported": 155,
|
||||
"user_excluded": 1
|
||||
},
|
||||
"upgrade": {
|
||||
"skipped": 154,
|
||||
"updated": 1,
|
||||
"user_excluded": 1
|
||||
},
|
||||
"repeat": {
|
||||
"skipped": 155,
|
||||
"user_excluded": 1
|
||||
},
|
||||
"restored_rows": 1,
|
||||
"untouched_whole_rows": 154,
|
||||
"eligibility_unchanged": true,
|
||||
"redo": {
|
||||
"skipped": 154,
|
||||
"updated": 1,
|
||||
"user_excluded": 1
|
||||
},
|
||||
"user_protection": [
|
||||
{
|
||||
"phase": "user-before",
|
||||
"counts": {
|
||||
"skipped": 154,
|
||||
"conflict": 1,
|
||||
"user_excluded": 1
|
||||
},
|
||||
"whole_rows": 1,
|
||||
"columns": 29
|
||||
},
|
||||
{
|
||||
"phase": "user-after",
|
||||
"counts": {
|
||||
"skipped": 154,
|
||||
"conflict": 1,
|
||||
"user_excluded": 1
|
||||
},
|
||||
"whole_rows": 1,
|
||||
"columns": 29
|
||||
}
|
||||
],
|
||||
"fresh": {
|
||||
"imported": 155,
|
||||
"user_excluded": 1
|
||||
},
|
||||
"fresh_repeat": {
|
||||
"skipped": 155,
|
||||
"user_excluded": 1
|
||||
},
|
||||
"states": {
|
||||
"pending_check": 16,
|
||||
"needs_conversion": 139
|
||||
},
|
||||
"source_named_fields": 1217,
|
||||
"positional_widgets": 3660,
|
||||
"companion_values": 294,
|
||||
"new_saved": 46,
|
||||
"new_notes": 1,
|
||||
"old_saved": 988,
|
||||
"old_notes": 24,
|
||||
"overviews": 33,
|
||||
"all_disabled": true,
|
||||
"doc_done": 0,
|
||||
"executed": 0
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
[
|
||||
{
|
||||
"file": "fixed_document.py",
|
||||
"sha256": "bbcd5c77a2a143ac6f651ed1887c97c34e244e3c9a6343008fc130162f5ffa9f",
|
||||
"wheel": true,
|
||||
"sdist": true,
|
||||
"definitions": 33
|
||||
},
|
||||
{
|
||||
"file": "source_reviews.json",
|
||||
"sha256": "60167451251b8069fbb16b0fbe3f7138b94012bc8d030501a72f53c69aed54ba",
|
||||
"wheel": true,
|
||||
"sdist": true,
|
||||
"definitions": 33
|
||||
},
|
||||
{
|
||||
"file": "library.py",
|
||||
"sha256": "b9cbfce28267642e6db3ebe9d591cf8dd260c7772a5a21a8d36cb98915eca13c",
|
||||
"wheel": true,
|
||||
"sdist": true,
|
||||
"definitions": 33
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json": "61bfdcf85b7b5646c74be26ee98695e2cef7796cd2760a9c7d45e252d6b7b089"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"number": 25,
|
||||
"state": "open",
|
||||
"merged": false,
|
||||
"html_url": "http://gitea.xbay.cc/leefer/aigc-home/pulls/25",
|
||||
"head": "282c0e88d0434bd60be57f0a596413203ef61ce6",
|
||||
"head_ref": "agent/agent/a64a969a6a44",
|
||||
"base": "main"
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
........................................................................ [ 26%]
|
||||
........................................................................ [ 52%]
|
||||
........................................................................ [ 79%]
|
||||
......................................................... [100%]
|
||||
=============================== warnings summary ===============================
|
||||
calliope-backend/.venv/lib/python3.11/site-packages/starlette/testclient.py:53
|
||||
/home/xiaomo/multica_workspaces/hello-af23464d222e/hel-892-2a616a58e8ec/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
|
||||
273 passed, 1 warning in 4.87s
|
||||
@@ -0,0 +1,29 @@
|
||||
........................................................................ [ 26%]
|
||||
........................................................................ [ 52%]
|
||||
........................................................................ [ 79%]
|
||||
...........................................F............. [100%]
|
||||
=================================== FAILURES ===================================
|
||||
_______________ test_old_32_blocks_and_all_other_reviews_frozen ________________
|
||||
|
||||
def test_old_32_blocks_and_all_other_reviews_frozen():
|
||||
path='calliope-backend/src/calliope/comfyui/source_reviews.json'
|
||||
old=json.loads(subprocess.check_output(['git','show','282c0e8:'+path],cwd=REPO))
|
||||
now=json.loads((REPO/path).read_bytes());now[PATH].pop('fixed_version_document')
|
||||
assert old==now and len(DEFINITIONS)==33
|
||||
blocks=[r['fixed_version_document'] for r in old.values() if 'fixed_version_document' in r]
|
||||
> assert len(blocks)==32 and sum(len(b['fields']) for b in blocks)==988 and sum(len(b.get('comments',[])) for b in blocks)==24
|
||||
E AssertionError: assert (32 == 32 and 988 == 988 and 23 == 24)
|
||||
E + where 32 = len([{'notice': '固定版本参考说明:节点按源声明分别核对固定提交;前端未声明,1.37.11仅显式假设;aux发布包与提交绑定、UE与目标环境未知', 'source_path': 'example_ComfyUI_workfl...ef7118e4950b37a608', 'canonical_sha256': '8881dcd31b226e95d9ce141e5f06067f4d5cb4bd11af88104d779422478d6201', ...}, ...])
|
||||
E + and 988 = sum(<generator object test_old_32_blocks_and_all_other_reviews_frozen.<locals>.<genexpr> at 0x7fb5d85d1b60>)
|
||||
E + and 23 = sum(<generator object test_old_32_blocks_and_all_other_reviews_frozen.<locals>.<genexpr> at 0x7fb5d858fa60>)
|
||||
|
||||
calliope-backend/tests/test_vosr2_fixed_document.py:166: AssertionError
|
||||
=============================== warnings summary ===============================
|
||||
calliope-backend/.venv/lib/python3.11/site-packages/starlette/testclient.py:53
|
||||
/home/xiaomo/multica_workspaces/hello-af23464d222e/hel-892-2a616a58e8ec/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
|
||||
=========================== short test summary info ============================
|
||||
FAILED calliope-backend/tests/test_vosr2_fixed_document.py::test_old_32_blocks_and_all_other_reviews_frozen
|
||||
1 failed, 272 passed, 1 warning in 4.87s
|
||||
@@ -0,0 +1,14 @@
|
||||
[
|
||||
"calliope-backend/src/calliope/comfyui/fixed_document.py",
|
||||
"calliope-backend/tests/test_vosr2_fixed_document.py",
|
||||
"e2e/run-vosr2-document.py",
|
||||
"docs/hel-892/vosr2-document-evidence/build_definition.py",
|
||||
"docs/hel-892/vosr2-document-evidence/check_code.py",
|
||||
"docs/hel-892/vosr2-document-evidence/fetch_sources.py",
|
||||
"docs/hel-892/vosr2-document-evidence/rebuild.py",
|
||||
"docs/hel-892/vosr2-document-evidence/recompute.py",
|
||||
"docs/hel-892/vosr2-document-evidence/render_report.py",
|
||||
"docs/hel-892/vosr2-document-evidence/repeat.py",
|
||||
"docs/hel-892/vosr2-document-evidence/request_counts.py",
|
||||
"docs/hel-892/vosr2-document-evidence/verify_sources.py"
|
||||
]
|
||||
@@ -0,0 +1,64 @@
|
||||
"Add one reviewed definition; preserve every other review object exactly."
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
import subprocess
|
||||
|
||||
from build_definition import OUT, PATHS, REPO, build, canonical
|
||||
|
||||
BASE = "282c0e88d0434bd60be57f0a596413203ef61ce6"
|
||||
RESOURCE = "calliope-backend/src/calliope/comfyui/source_reviews.json"
|
||||
|
||||
|
||||
def build_all():
|
||||
previous = json.loads(subprocess.check_output(["git", "show", f"{BASE}:{RESOURCE}"], cwd=REPO))
|
||||
reviews = json.loads(json.dumps(previous, ensure_ascii=False))
|
||||
for i, path in enumerate(PATHS):
|
||||
block = build(i)
|
||||
assert reviews[path]["source_sha"] == block["source_sha1"]
|
||||
assert "fixed_version_document" not in previous[path]
|
||||
reviews[path]["fixed_version_document"] = block
|
||||
return reviews, previous
|
||||
|
||||
|
||||
def main():
|
||||
current = json.loads((REPO / RESOURCE).read_bytes())
|
||||
reviews, previous = build_all()
|
||||
(REPO / RESOURCE).write_text(json.dumps(reviews, ensure_ascii=False, indent=2) + "\n")
|
||||
pins = {}
|
||||
for i, path in enumerate(PATHS):
|
||||
block = reviews[path]["fixed_version_document"]
|
||||
pins[path] = hashlib.sha256(canonical(block)).hexdigest()
|
||||
(OUT / f"definition-{i}.json").write_text(
|
||||
json.dumps(block, ensure_ascii=False, indent=2) + "\n"
|
||||
)
|
||||
# Explicit maintenance of the code-owned allowlist, never trust runtime caller digests.
|
||||
module = REPO / ("calliope-backend/src/calliope/comfyui/fixed_document.py")
|
||||
text = module.read_text()
|
||||
for path, digest in pins.items():
|
||||
old_block = current[path].get("fixed_version_document")
|
||||
old_digest = hashlib.sha256(canonical(old_block)).hexdigest() if old_block else None
|
||||
if old_digest and old_digest in text:
|
||||
text = text.replace(old_digest, digest)
|
||||
elif digest in text:
|
||||
pass
|
||||
else:
|
||||
text = text.replace(
|
||||
"DEFINITIONS = {",
|
||||
"DEFINITIONS = {\n (\n"
|
||||
+ "".join(
|
||||
" " + repr(path[i : i + 40]) + "\n" for i in range(0, len(path), 40)
|
||||
)
|
||||
+ " ): "
|
||||
+ repr(digest)
|
||||
+ ",",
|
||||
)
|
||||
module.write_text(text)
|
||||
(OUT / "pins.json").write_text(json.dumps(pins, ensure_ascii=False, indent=2) + "\n")
|
||||
print(("PASS one definition; other 155 reviews and old 32 blocks unchanged"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,2 @@
|
||||
PASS exact sources, tag/tree/blob/line ranges and 46+1 inventory
|
||||
PASS actual 282c0e8 upgrade1/skip154, repeat155, rollback1, edits1/29cols, fresh155, 1217/3660/294, 33 definitions, frozen boundaries, wheel/sdist
|
||||
@@ -0,0 +1,330 @@
|
||||
"Actual 282c0e8 upgrade, one-row protection/rollback, frozen boundaries and packages."
|
||||
|
||||
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
|
||||
|
||||
from build_definition import OUT, PATHS, REPO, canonical
|
||||
from rebuild import BASE, RESOURCE, build_all
|
||||
|
||||
sys.path.insert(0, str(REPO / "calliope-backend"))
|
||||
|
||||
|
||||
def write(name, value):
|
||||
(OUT / name).write_text(json.dumps(value, ensure_ascii=False, indent=2) + "\n")
|
||||
|
||||
|
||||
def require_packages():
|
||||
dist = REPO / "calliope-backend/dist"
|
||||
w = sorted(dist.glob("*.whl"))
|
||||
s = sorted(dist.glob("*.tar.gz"))
|
||||
if not w or not s:
|
||||
raise SystemExit(
|
||||
(
|
||||
"缺少wheel/sdist包产物,请先在仓库根执行:"
|
||||
"uv build --project calliop"
|
||||
"e-backend --offline"
|
||||
)
|
||||
)
|
||||
return w[-1], s[-1]
|
||||
|
||||
|
||||
def main():
|
||||
from calliope.comfyui.fixed_document import DEFINITIONS
|
||||
from calliope.comfyui.library import rollback_batch
|
||||
from scripts.audit_library_documents import audit
|
||||
|
||||
wheels, sdists = require_packages()
|
||||
from verify_sources import main as verify_sources
|
||||
|
||||
verify_sources()
|
||||
rebuilt, previous = build_all()
|
||||
assert rebuilt == json.loads((REPO / RESOURCE).read_bytes())
|
||||
old_blocks = {
|
||||
p: r["fixed_version_document"] for p, r in previous.items() if "fixed_version_document" in r
|
||||
}
|
||||
assert len(old_blocks) == 32
|
||||
assert all(rebuilt[p]["fixed_version_document"] == b for p, b in old_blocks.items())
|
||||
assert sum(len(b["fields"]) for b in old_blocks.values()) == 988
|
||||
for p, d in DEFINITIONS.items():
|
||||
assert hashlib.sha256(canonical(rebuilt[p]["fixed_version_document"])).hexdigest() == d
|
||||
write(
|
||||
"review-delta.json",
|
||||
dict(
|
||||
base=BASE,
|
||||
changed_paths=PATHS,
|
||||
other_reviews_unchanged=155,
|
||||
old_blocks_unchanged=32,
|
||||
old_saved=988,
|
||||
old_notes=24,
|
||||
new_saved=46,
|
||||
new_notes=1,
|
||||
total_documents=33,
|
||||
total_saved=1034,
|
||||
total_notes=25,
|
||||
),
|
||||
)
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
work = Path(directory)
|
||||
old = work / "old"
|
||||
old.mkdir()
|
||||
data = subprocess.check_output(["git", "archive", BASE, "calliope-backend/src"], cwd=REPO)
|
||||
with tarfile.open(fileobj=io.BytesIO(data)) as a:
|
||||
a.extractall(old, filter="data")
|
||||
db = work / "library.db"
|
||||
|
||||
def run(name, historical=False):
|
||||
out = work / name
|
||||
env = {
|
||||
**os.environ,
|
||||
"PYTHONPATH": str((old if historical else REPO) / "calliope-backend/src"),
|
||||
}
|
||||
subprocess.run(
|
||||
[
|
||||
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(out),
|
||||
],
|
||||
cwd=REPO,
|
||||
env=env,
|
||||
check=True,
|
||||
stdout=subprocess.DEVNULL,
|
||||
)
|
||||
return json.loads((out / "import_report.json").read_bytes()), out
|
||||
|
||||
def rows():
|
||||
with sqlite3.connect(db) as c:
|
||||
c.row_factory = sqlite3.Row
|
||||
return {
|
||||
r["source_repo_path"]: dict(r) for r in c.execute("SELECT * FROM workflows")
|
||||
}
|
||||
|
||||
first, _ = run("historical", True)
|
||||
before = rows()
|
||||
assert first["counts"] == {"imported": 155, "user_excluded": 1}
|
||||
assert all("fixed_version" not in json.loads(before[p]["doc_json"]) for p in PATHS)
|
||||
assert all(
|
||||
json.loads(before[p]["doc_json"])["fixed_version"]["matched"]
|
||||
for p in DEFINITIONS
|
||||
if p not in PATHS
|
||||
)
|
||||
original = db
|
||||
protected = []
|
||||
|
||||
def protect(name):
|
||||
nonlocal db
|
||||
db = work / (name + ".db")
|
||||
with sqlite3.connect(original) as src, sqlite3.connect(db) as dst:
|
||||
src.backup(dst)
|
||||
for p in PATHS:
|
||||
dst.execute(
|
||||
("UPDATE workflows SET description=? WHERE source_repo_path=?"),
|
||||
(name, p),
|
||||
)
|
||||
snapshot = rows()
|
||||
r, _ = run(name)
|
||||
assert r["counts"] == {"conflict": 1, "skipped": 154, "user_excluded": 1}
|
||||
assert rows() == snapshot and all(len(snapshot[p]) == 29 for p in PATHS)
|
||||
protected.append(dict(phase=name, counts=r["counts"], whole_rows=1, columns=29))
|
||||
db = original
|
||||
|
||||
protect("user-before")
|
||||
upgrade, exported = run("upgrade")
|
||||
after = rows()
|
||||
assert upgrade["counts"] == {"updated": 1, "skipped": 154, "user_excluded": 1}
|
||||
for p, row in after.items():
|
||||
if p not in PATHS:
|
||||
assert row == before[p]
|
||||
continue
|
||||
assert len(row) == 29
|
||||
assert all(
|
||||
row[k] == before[p][k]
|
||||
for k in row.keys() - {"doc_json", "batch_id", "imported_at", "library_fingerprint"}
|
||||
)
|
||||
d = json.loads(row["doc_json"])
|
||||
assert d["fixed_version"]["matched"]
|
||||
old_doc = json.loads(before[p]["doc_json"])
|
||||
without = dict(d)
|
||||
fixed = without.pop("fixed_version")
|
||||
assert without["steps"] == old_doc["steps"][:-3] + fixed["steps"]
|
||||
without["steps"] = old_doc["steps"]
|
||||
assert without.pop("source_review_sha") != old_doc.pop("source_review_sha")
|
||||
assert without == old_doc
|
||||
write("actual-" + Path(p).stem + ".json", d)
|
||||
repeat, _ = run("repeat")
|
||||
assert repeat["counts"] == {"skipped": 155, "user_excluded": 1}
|
||||
with sqlite3.connect(db) as c:
|
||||
c.row_factory = sqlite3.Row
|
||||
r = rollback_batch(c, upgrade["batch_id"])
|
||||
assert len(r["files"]) == 1 and all(f["result"] == "restored" for f in r["files"])
|
||||
assert rows() == before
|
||||
redo, _ = run("redo")
|
||||
assert redo["counts"] == upgrade["counts"]
|
||||
protect("user-after")
|
||||
db = work / "fresh.db"
|
||||
fresh, exported = run("fresh")
|
||||
fresh_repeat, _ = run("fresh-repeat")
|
||||
assert fresh["counts"] == first["counts"] and fresh_repeat["counts"] == repeat["counts"]
|
||||
assert fresh["states"] == {"pending_check": 16, "needs_conversion": 139}
|
||||
companion = 0
|
||||
for row in rows().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 not d["status"]["doc_done"] and not d["status"]["exec_verified"]
|
||||
assert d["dependencies"]["check_state"] == "unchecked"
|
||||
report = audit(REPO, exported)
|
||||
assert (
|
||||
report["named_values_preserved"] == 1217
|
||||
and report["unnamed_widget_nodes"] == 3660
|
||||
and companion == 294
|
||||
)
|
||||
assert report["full_documents_completed"] == report["real_executions"] == 0
|
||||
write("audit-summary.json", {k: v for k, v in report.items() if k != "files"})
|
||||
write(
|
||||
"import-protection.json",
|
||||
dict(
|
||||
base=BASE,
|
||||
first=first["counts"],
|
||||
upgrade=upgrade["counts"],
|
||||
repeat=repeat["counts"],
|
||||
restored_rows=1,
|
||||
untouched_whole_rows=154,
|
||||
eligibility_unchanged=True,
|
||||
redo=redo["counts"],
|
||||
user_protection=protected,
|
||||
fresh=fresh["counts"],
|
||||
fresh_repeat=fresh_repeat["counts"],
|
||||
states=fresh["states"],
|
||||
source_named_fields=1217,
|
||||
positional_widgets=3660,
|
||||
companion_values=companion,
|
||||
new_saved=46,
|
||||
new_notes=1,
|
||||
old_saved=988,
|
||||
old_notes=24,
|
||||
overviews=33,
|
||||
all_disabled=True,
|
||||
doc_done=0,
|
||||
executed=0,
|
||||
),
|
||||
)
|
||||
old_reviews = json.loads(
|
||||
subprocess.check_output(["git", "show", f"{BASE}:{RESOURCE}"], cwd=REPO)
|
||||
)
|
||||
current = json.loads((REPO / RESOURCE).read_bytes())
|
||||
for p in PATHS:
|
||||
current[p].pop("fixed_version_document")
|
||||
assert current == old_reviews
|
||||
boundaries = json.loads(
|
||||
(REPO / ("docs/hel-892/h3-document-evidence/unchanged-boundaries.json")).read_bytes()
|
||||
)
|
||||
paths = (
|
||||
[f["path"] for f in boundaries["files"]]
|
||||
+ boundaries["frozen_conversion_and_audits"]
|
||||
+ ["calliope-backend/src/calliope/comfyui/library.py"]
|
||||
)
|
||||
kept = []
|
||||
for p in paths:
|
||||
raw = (REPO / p).read_bytes()
|
||||
assert raw == subprocess.check_output(["git", "show", f"{BASE}:{p}"], cwd=REPO)
|
||||
kept.append(dict(path=p, sha256=hashlib.sha256(raw).hexdigest()))
|
||||
ui = "calliope-web/src/lib/components/WorkflowDocumentDrawer.svelte"
|
||||
drawer_bytes = (REPO / ui).read_bytes()
|
||||
assert drawer_bytes == subprocess.check_output(["git", "show", f"{BASE}:{ui}"], cwd=REPO)
|
||||
|
||||
write(
|
||||
"boundaries.json",
|
||||
dict(
|
||||
base=BASE,
|
||||
files=kept,
|
||||
originals=163,
|
||||
old_thirty_two_blocks_unchanged=True,
|
||||
drawer_css_unchanged=True,
|
||||
drawer_whole_file_unchanged=True,
|
||||
drawer_sha256=hashlib.sha256(drawer_bytes).hexdigest(),
|
||||
conversion_rerun=False,
|
||||
profiles_28_candidates_9_diffs_6="unchanged",
|
||||
),
|
||||
)
|
||||
tracked = (
|
||||
subprocess.check_output(["git", "ls-tree", "-rz", "--name-only", BASE], cwd=REPO)
|
||||
.decode()
|
||||
.rstrip("\0")
|
||||
.split("\0")
|
||||
)
|
||||
frozen = [
|
||||
p
|
||||
for p in tracked
|
||||
if p.startswith(("example_ComfyUI_workflows/", "docs/hel-892/supplied-api/"))
|
||||
or p.startswith("calliope-backend/src/calliope/comfyui/")
|
||||
and p not in [RESOURCE, ("calliope-backend/src/calliope/comfyui/fixed_document.py")]
|
||||
]
|
||||
for p in frozen:
|
||||
assert (REPO / p).read_bytes() == subprocess.check_output(
|
||||
["git", "show", f"{BASE}:{p}"], cwd=REPO
|
||||
)
|
||||
write(
|
||||
"frozen-resource-check.json",
|
||||
dict(
|
||||
base=BASE,
|
||||
files=[
|
||||
dict(path=p, sha256=hashlib.sha256((REPO / p).read_bytes()).hexdigest())
|
||||
for p in frozen
|
||||
],
|
||||
original_files=sum(p.startswith("example_ComfyUI_workflows/") for p in frozen),
|
||||
all_unchanged=True,
|
||||
),
|
||||
)
|
||||
packages = []
|
||||
with zipfile.ZipFile(wheels) as w, tarfile.open(sdists) as s:
|
||||
for name in ["fixed_document.py", "source_reviews.json", "library.py"]:
|
||||
raw = (REPO / "calliope-backend/src/calliope/comfyui" / name).read_bytes()
|
||||
assert w.read("calliope/comfyui/" + name) == raw
|
||||
member = next(n for n in s.getnames() if n.endswith("/src/calliope/comfyui/" + name))
|
||||
assert s.extractfile(member).read() == raw
|
||||
packages.append(
|
||||
dict(
|
||||
file=name,
|
||||
sha256=hashlib.sha256(raw).hexdigest(),
|
||||
wheel=True,
|
||||
sdist=True,
|
||||
definitions=33,
|
||||
)
|
||||
)
|
||||
write("package-check.json", packages)
|
||||
print(
|
||||
"PASS actual 282c0e8 upgrade1/skip154, repe"
|
||||
"at155, rollback1, edits1/29cols, fresh155,"
|
||||
" 1217/3660/294, 33 definitions, frozen bou"
|
||||
"ndaries, wheel/sdist"
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,123 @@
|
||||
"Readable complete Chinese definitions and fixed source index from delivered data."
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
OUT = Path(__file__).resolve().parent
|
||||
|
||||
|
||||
def main():
|
||||
lines = [
|
||||
"# VOSR2图片超分放大固定参考中文说明",
|
||||
"",
|
||||
"新增46保存位置+1完整Note;旧32图988位置+24注释逐对象不变,现33图1034+25仅参考。155定稿0/实跑0/新增转换0。",
|
||||
"",
|
||||
(
|
||||
"来源local_file以docs/hel-892/vosr2-document"
|
||||
"-evidence为基准;源SHA/全图摘要/定义摘要绑定;不加载上游代码、媒体或链接。"
|
||||
),
|
||||
"",
|
||||
]
|
||||
index = []
|
||||
for i in range(1):
|
||||
b = json.loads((OUT / f"definition-{i}.json").read_bytes())
|
||||
lines += [
|
||||
"## " + Path(b["source_path"]).stem,
|
||||
"",
|
||||
b["user_overview"],
|
||||
"",
|
||||
b["notice"],
|
||||
"",
|
||||
"源路径:`" + b["source_path"] + "`",
|
||||
"",
|
||||
"SHA1:" + b["source_sha1"],
|
||||
"",
|
||||
"原字节SHA256:" + b["source_sha256"],
|
||||
"",
|
||||
"规范全图SHA256:" + b["canonical_sha256"],
|
||||
"",
|
||||
*[v + "\n" for v in b["versions"]],
|
||||
"### 具体连线与处理条件",
|
||||
"",
|
||||
*[v + "\n" for v in b["flow"]],
|
||||
"### 使用与核对",
|
||||
"",
|
||||
*[v + "\n" for v in b["steps"]],
|
||||
"### 逐保存位置说明",
|
||||
"",
|
||||
]
|
||||
for j, f in enumerate(b["fields"], 1):
|
||||
lines += [
|
||||
f"#### {j}. 节点{f['node_id']} · {f['label']}({f['field']})",
|
||||
"",
|
||||
f["effect"],
|
||||
"",
|
||||
"```json",
|
||||
json.dumps(f["value"], ensure_ascii=False, indent=2),
|
||||
"```",
|
||||
"",
|
||||
f"类:{f['class_type']};JSON类型:{f['json_type']};角色:{f['role']}。",
|
||||
"",
|
||||
"源保存位置:`" + f["pointer"] + "`;源输入口:`" + f["input_pointer"] + "`",
|
||||
"",
|
||||
"定义默认:" + f["schema_default"] + ";单位:" + f["unit"],
|
||||
"",
|
||||
"范围/条件:" + f["limits"],
|
||||
"",
|
||||
f["execution_note"],
|
||||
"",
|
||||
"依据:",
|
||||
]
|
||||
for k in f["evidence"]:
|
||||
e = b["sources"][k]
|
||||
lines += [
|
||||
f"- [{k}] {e['claim']};{e['file']} {e['lines'][0]}~{e['lines'][1]}行;"
|
||||
f"commit {e['commit']};SHA256 {e['sha256']};{e['url']}"
|
||||
]
|
||||
if f.get("named_value") != f["value"]:
|
||||
lines += [
|
||||
"具名保存完整形态(与位置列表分开保留):",
|
||||
"",
|
||||
"```json",
|
||||
json.dumps(f["named_value"], ensure_ascii=False, indent=2),
|
||||
"```",
|
||||
"",
|
||||
]
|
||||
lines += [""]
|
||||
lines += ["### 零保存节点与源注释", ""]
|
||||
for z in b["zero_saved_nodes"]:
|
||||
lines += [z["node_id"] + " " + z["class_type"] + ":" + z["effect"], ""]
|
||||
for n in b["comments"]:
|
||||
lines += [
|
||||
"节点" + n["node_id"] + ",位置`" + n["pointer"] + "`",
|
||||
"",
|
||||
n["meaning"],
|
||||
"",
|
||||
"```text",
|
||||
n["text"],
|
||||
"```",
|
||||
"",
|
||||
]
|
||||
lines += ["### 固定原件索引", ""]
|
||||
for k, e in enumerate(b["sources"]):
|
||||
data = (OUT / e["local_file"]).read_bytes()
|
||||
assert hashlib.sha256(data).hexdigest() == e["sha256"]
|
||||
lines += [
|
||||
f"{k}. {e['claim']};{e['file']} 第{e['lines'][0]}~{e['lines'][1]}行;"
|
||||
f"提交{e['commit']};SHA256 {e['sha256']};{e['url']}",
|
||||
"",
|
||||
]
|
||||
index.append(dict(document=b["source_path"], **e))
|
||||
(OUT.parent / "VOSR2图片超分放大固定参考中文说明.md").write_text(
|
||||
"\n".join(lines).rstrip() + "\n"
|
||||
)
|
||||
(OUT / "fixed-source-index.json").write_text(
|
||||
json.dumps(index, ensure_ascii=False, indent=2) + "\n"
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1 @@
|
||||
PASS deterministic definitions and rendered artifacts: zero difference
|
||||
@@ -0,0 +1,42 @@
|
||||
"Compare deterministic definitions and rendered artifacts without repeating unrelated tests."
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
|
||||
from build_definition import OUT, REPO, canonical
|
||||
from rebuild import RESOURCE, build_all
|
||||
from render_report import main as render
|
||||
|
||||
|
||||
def main():
|
||||
a, old = build_all()
|
||||
b, previous = build_all()
|
||||
assert a == b and old == previous
|
||||
assert a == json.loads((REPO / RESOURCE).read_bytes())
|
||||
render()
|
||||
paths = [
|
||||
OUT / "fixed-source-index.json",
|
||||
OUT.parent / "VOSR2图片超分放大固定参考中文说明.md",
|
||||
]
|
||||
before = {p.name: hashlib.sha256(p.read_bytes()).hexdigest() for p in paths}
|
||||
render()
|
||||
assert before == {p.name: hashlib.sha256(p.read_bytes()).hexdigest() for p in paths}
|
||||
(OUT / "repeatability.json").write_text(
|
||||
json.dumps(
|
||||
dict(
|
||||
definitions=33,
|
||||
repeated_build_equal=True,
|
||||
repeated_render_equal=True,
|
||||
resource_sha256=hashlib.sha256(canonical(a)).hexdigest(),
|
||||
artifacts=before,
|
||||
),
|
||||
ensure_ascii=False,
|
||||
indent=2,
|
||||
)
|
||||
+ "\n"
|
||||
)
|
||||
print(("PASS deterministic definitions and rendered artifacts: zero difference"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"definitions": 33,
|
||||
"repeated_build_equal": true,
|
||||
"repeated_render_equal": true,
|
||||
"resource_sha256": "ff43737bd1a58d91ab435ad4b759652d8849a57029ac256f6a35911d9c1fb984",
|
||||
"artifacts": {
|
||||
"fixed-source-index.json": "c169e15abb939ca392c539922938b6eee2ff800c11b0ac75a1e8fbe3fe7b74b8",
|
||||
"VOSR2图片超分放大固定参考中文说明.md": "ccd065c292359af10601322efdf43ee550839f74d6d67554b33fd723b9ff4931"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
"Count actual local server GETs separately from browser intercepted requests."
|
||||
|
||||
import collections
|
||||
import json
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
OUT = Path(__file__).resolve().parent
|
||||
|
||||
|
||||
def main():
|
||||
text = (OUT / "service-0.txt").read_text()
|
||||
gets = re.findall(r'"GET ([^ ]+) HTTP/', text)
|
||||
polling = [p for p in gets if p in ["/api/jobs", "/api/events"]]
|
||||
result = dict(
|
||||
total=len(gets),
|
||||
fixed_count=len(gets) - len(polling),
|
||||
polling_count=len(polling),
|
||||
paths=dict(collections.Counter(gets)),
|
||||
readiness_included=1,
|
||||
reason=(
|
||||
"就绪GET单列1;浏览记录含Node直连及Playwright本地拦截的GET,"
|
||||
"服务日志只含真正到后端者,不机械等同。"
|
||||
"轮询可随计时边界±1,禁止请求始终零容忍。"
|
||||
),
|
||||
)
|
||||
browser = json.loads((OUT / "browser-results.json").read_bytes())
|
||||
assert browser["errors"] == []
|
||||
assert all(r["method"] == "GET" for r in browser["requests"])
|
||||
assert all(not p.startswith("/api/view") for p in gets)
|
||||
assert abs(result["polling_count"] - browser["request_accounting"]["polling_count"]) <= 1
|
||||
(OUT / "server-request-accounting.json").write_text(
|
||||
json.dumps(result, ensure_ascii=False, indent=2) + "\n"
|
||||
)
|
||||
print(json.dumps(result, ensure_ascii=False))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"base": "282c0e88d0434bd60be57f0a596413203ef61ce6",
|
||||
"changed_paths": [
|
||||
"example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/高清放大/VOSR2_图像超分放大.json"
|
||||
],
|
||||
"other_reviews_unchanged": 155,
|
||||
"old_blocks_unchanged": 32,
|
||||
"old_saved": 988,
|
||||
"old_notes": 24,
|
||||
"new_saved": 46,
|
||||
"new_notes": 1,
|
||||
"total_documents": 33,
|
||||
"total_saved": 1034,
|
||||
"total_notes": 25
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"total": 117,
|
||||
"fixed_count": 107,
|
||||
"polling_count": 10,
|
||||
"paths": {
|
||||
"/api/workflows": 3,
|
||||
"/api/workflows/31": 4,
|
||||
"/api/workflows/29": 4,
|
||||
"/api/workflows/28": 3,
|
||||
"/api/workflows/27": 3,
|
||||
"/api/workflows/26": 3,
|
||||
"/api/workflows/17": 3,
|
||||
"/api/workflows/4": 3,
|
||||
"/api/workflows/15": 3,
|
||||
"/api/workflows/11": 3,
|
||||
"/api/workflows/3": 3,
|
||||
"/api/workflows/9": 3,
|
||||
"/api/workflows/16": 3,
|
||||
"/api/workflows/10": 3,
|
||||
"/api/workflows/23": 3,
|
||||
"/api/workflows/8": 3,
|
||||
"/api/workflows/22": 3,
|
||||
"/api/workflows/5": 3,
|
||||
"/api/workflows/6": 3,
|
||||
"/api/workflows/7": 3,
|
||||
"/api/workflows/19": 3,
|
||||
"/api/workflows/13": 3,
|
||||
"/api/workflows/12": 3,
|
||||
"/api/workflows/64": 3,
|
||||
"/api/workflows/62": 3,
|
||||
"/api/workflows/70": 3,
|
||||
"/api/workflows/1": 3,
|
||||
"/api/workflows/36": 3,
|
||||
"/api/workflows/35": 3,
|
||||
"/api/workflows/2": 3,
|
||||
"/api/workflows/25": 3,
|
||||
"/api/workflows/24": 3,
|
||||
"/api/workflows/21": 3,
|
||||
"/api/workflows/14": 3,
|
||||
"/api/jobs": 10,
|
||||
"/api/settings": 1,
|
||||
"/api/workflows/156": 1,
|
||||
"/api/workflows/157": 1
|
||||
},
|
||||
"readiness_included": 1,
|
||||
"reason": "就绪GET单列1;浏览记录含Node直连及Playwright本地拦截的GET,服务日志只含真正到后端者,不机械等同。轮询可随计时边界±1,禁止请求始终零容忍。"
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
INFO: Started server process [750245]
|
||||
INFO: Waiting for application startup.
|
||||
INFO: Application startup complete.
|
||||
INFO: Uvicorn running on http://127.0.0.1:8247 (Press CTRL+C to quit)
|
||||
{'counts': {'imported': 155, 'user_excluded': 1}, 'states': {'pending_check': 16, 'needs_conversion': 139}}
|
||||
INFO: 127.0.0.1:49080 - "GET /api/workflows HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49094 - "GET /api/workflows HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49108 - "GET /api/workflows/31 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49094 - "GET /api/workflows/29 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49108 - "GET /api/workflows/28 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49094 - "GET /api/workflows/27 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49108 - "GET /api/workflows/26 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49094 - "GET /api/workflows/17 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49108 - "GET /api/workflows/4 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49094 - "GET /api/workflows/15 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49108 - "GET /api/workflows/11 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49094 - "GET /api/workflows/3 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49108 - "GET /api/workflows/9 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49094 - "GET /api/workflows/16 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49108 - "GET /api/workflows/10 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49094 - "GET /api/workflows/23 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49108 - "GET /api/workflows/8 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49094 - "GET /api/workflows/22 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49108 - "GET /api/workflows/5 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49094 - "GET /api/workflows/6 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49108 - "GET /api/workflows/7 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49094 - "GET /api/workflows/19 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49108 - "GET /api/workflows/13 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49094 - "GET /api/workflows/12 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49108 - "GET /api/workflows/64 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49094 - "GET /api/workflows/62 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49108 - "GET /api/workflows/70 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49094 - "GET /api/workflows/1 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49108 - "GET /api/workflows/36 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49094 - "GET /api/workflows/35 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49108 - "GET /api/workflows/2 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49094 - "GET /api/workflows/25 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49108 - "GET /api/workflows/24 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49094 - "GET /api/workflows/21 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49108 - "GET /api/workflows/14 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49120 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:49118 - "GET /api/settings HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49128 - "GET /api/workflows HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:49142 - "GET /api/workflows/31 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37004 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:37008 - "GET /api/workflows/29 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37024 - "GET /api/workflows/28 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37038 - "GET /api/workflows/27 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37052 - "GET /api/workflows/26 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37060 - "GET /api/workflows/17 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37064 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:37078 - "GET /api/workflows/4 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37090 - "GET /api/workflows/15 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37102 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:37106 - "GET /api/workflows/11 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37110 - "GET /api/workflows/3 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56788 - "GET /api/workflows/9 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56792 - "GET /api/workflows/16 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56802 - "GET /api/workflows/10 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56814 - "GET /api/workflows/23 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56816 - "GET /api/workflows/8 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56826 - "GET /api/workflows/22 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56840 - "GET /api/workflows/5 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56856 - "GET /api/workflows/6 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56870 - "GET /api/workflows/7 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56874 - "GET /api/workflows/19 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56890 - "GET /api/workflows/13 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56892 - "GET /api/workflows/12 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56894 - "GET /api/workflows/64 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56908 - "GET /api/workflows/62 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56916 - "GET /api/workflows/70 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56918 - "GET /api/workflows/1 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56922 - "GET /api/workflows/36 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56932 - "GET /api/workflows/35 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56940 - "GET /api/workflows/2 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56946 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:56952 - "GET /api/workflows/25 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56958 - "GET /api/workflows/24 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56968 - "GET /api/workflows/21 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56972 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:56976 - "GET /api/workflows/14 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:56988 - "GET /api/workflows/31 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:47382 - "GET /api/workflows/29 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:47388 - "GET /api/workflows/28 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:47390 - "GET /api/workflows/27 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:47404 - "GET /api/workflows/26 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:47416 - "GET /api/workflows/17 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:47422 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:47430 - "GET /api/workflows/4 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:47436 - "GET /api/workflows/15 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:47438 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:47450 - "GET /api/workflows/11 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:47464 - "GET /api/workflows/3 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:47476 - "GET /api/workflows/9 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:47478 - "GET /api/workflows/16 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:47486 - "GET /api/workflows/10 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:47496 - "GET /api/workflows/23 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:47500 - "GET /api/workflows/8 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43600 - "GET /api/workflows/22 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43602 - "GET /api/workflows/5 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43606 - "GET /api/workflows/6 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43618 - "GET /api/workflows/7 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43630 - "GET /api/workflows/19 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43644 - "GET /api/workflows/13 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43654 - "GET /api/workflows/12 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43660 - "GET /api/workflows/64 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43664 - "GET /api/workflows/62 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43672 - "GET /api/workflows/70 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43674 - "GET /api/workflows/1 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43676 - "GET /api/workflows/36 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43684 - "GET /api/workflows/35 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43698 - "GET /api/workflows/2 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43714 - "GET /api/workflows/25 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43718 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:43720 - "GET /api/workflows/24 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43724 - "GET /api/workflows/21 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43726 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:43742 - "GET /api/workflows/14 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43748 - "GET /api/workflows/156 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43752 - "GET /api/workflows/157 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:43758 - "GET /api/workflows/29 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40864 - "GET /api/workflows/31 HTTP/1.1" 200 OK
|
||||
INFO: Shutting down
|
||||
INFO: Waiting for application shutdown.
|
||||
INFO: Application shutdown complete.
|
||||
INFO: Finished server process [750245]
|
||||
@@ -0,0 +1 @@
|
||||
{"ports_released": [8247, 5173], "child_exit_codes": [-15, 143]}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"all_pass": true,
|
||||
"commits": {
|
||||
"vosr": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"vhs": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"core": "856a922befab9d94cb66f36a3dce17234d7a6e31",
|
||||
"guhai": "4e11bd3b8471102eef1cadd809c79c94dc8001ee",
|
||||
"rgthree": "2c5342a8cb0eaecaabf61435a5f37dd594c510ba",
|
||||
"frontend": "71d2f2f2b5c6da9dee281836b5b72f3af368966f"
|
||||
},
|
||||
"citations": 58,
|
||||
"git_texts": 31,
|
||||
"local_file_base": "docs/hel-892/vosr2-document-evidence",
|
||||
"guhai_license": "README generic statement only; exact license unknown",
|
||||
"upstream_executed": false
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
# Run from repo root. Existing locked dependencies only; no upstream code execution, GPU/media/target requests.
|
||||
PYTHONDONTWRITEBYTECODE=1 uv sync --project calliope-backend --frozen --extra dev --python 3.11 --offline
|
||||
npm ci --prefix calliope-web --ignore-scripts --offline
|
||||
PYTHONDONTWRITEBYTECODE=1 python3 docs/hel-892/vosr2-document-evidence/verify_sources.py
|
||||
PYTHONDONTWRITEBYTECODE=1 python3 docs/hel-892/vosr2-document-evidence/rebuild.py
|
||||
PYTHONDONTWRITEBYTECODE=1 uv run --project calliope-backend --offline pytest calliope-backend/tests/test_vosr2_fixed_document.py calliope-backend/tests/test_workflow_library.py -q
|
||||
PYTHONDONTWRITEBYTECODE=1 python3 docs/hel-892/vosr2-document-evidence/check_code.py
|
||||
PYTHONDONTWRITEBYTECODE=1 uv build --project calliope-backend --offline
|
||||
PYTHONDONTWRITEBYTECODE=1 uv run --project calliope-backend --offline python docs/hel-892/vosr2-document-evidence/recompute.py
|
||||
PYTHONDONTWRITEBYTECODE=1 python3 docs/hel-892/vosr2-document-evidence/repeat.py
|
||||
PYTHONDONTWRITEBYTECODE=1 LD_LIBRARY_PATH=/home/xiaomo/chromium-libs/root/usr/lib/x86_64-linux-gnu:/home/xiaomo/browserlibs/root/usr/lib/x86_64-linux-gnu PLAYWRIGHT_MODULE=/home/xiaomo/.npm-global/lib/node_modules/playwright/index.mjs BROWSER_EXECUTABLE=/home/xiaomo/.cache/ms-playwright/chromium-1248/chrome-linux64/chrome uv run --project calliope-backend --offline python e2e/run-vosr2-document.py
|
||||
# Browser foreground completes, finally stops both owned services and verifies 8247/5173 are released.
|
||||
# Copy browser-results.json/service-stop.json/service-0.log (rename .txt) from .local-evidence/vosr2-document/browser to this evidence dir.
|
||||
PYTHONDONTWRITEBYTECODE=1 python3 docs/hel-892/vosr2-document-evidence/request_counts.py
|
||||
# Optional exact static text refetch: fetch_sources.py (Git metadata + bounded text only). No URL in source Note is executed.
|
||||
# Source local_file base: docs/hel-892/vosr2-document-evidence.
|
||||
# Old code baseline: 282c0e88d0434bd60be57f0a596413203ef61ce6. Examples: source-check.json, review-delta.json, import-protection.json, package-check.json, repeatability.json, actual-VOSR2_图像超分放大.json.
|
||||
|
||||
# Screenshot files live only in .local-evidence/vosr2-document/browser and the delivery attachment.
|
||||
@@ -0,0 +1,58 @@
|
||||
"""Offline verification of exact Git text, inventories, citations and identities."""
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
|
||||
from build_definition import OUT, REF, REPO, build
|
||||
from fetch_sources import PINS
|
||||
|
||||
|
||||
def main():
|
||||
b = build()
|
||||
roots = {}
|
||||
for e in b["sources"]:
|
||||
raw = (OUT / e["local_file"]).read_bytes()
|
||||
assert hashlib.sha256(raw).hexdigest() == e["sha256"]
|
||||
tree = json.loads((REF / (e["id"] + "-tree.json")).read_bytes())
|
||||
assert not tree["truncated"] and tree["sha"] == e["commit"]
|
||||
assert (
|
||||
hashlib.sha1(b"blob " + str(len(raw)).encode() + b"\0" + raw).hexdigest()
|
||||
== e["git_blob_sha1"]
|
||||
== next(x["sha"] for x in tree["tree"] if x["path"] == e["file"])
|
||||
)
|
||||
assert 1 <= e["lines"][0] <= e["lines"][1] <= len(raw.decode().splitlines())
|
||||
tag = REF / (e["id"] + "-tag.json")
|
||||
if tag.exists():
|
||||
obj = json.loads(tag.read_bytes())["object"]
|
||||
assert obj["type"] == "commit" and obj["sha"] == e["commit"]
|
||||
roots[e["id"]] = e["commit"]
|
||||
assert roots == PINS
|
||||
assert len(b["fields"]) == 46 and len(b["comments"]) == 1
|
||||
g = json.loads((REPO / b["source_path"]).read_bytes())
|
||||
assert len(g["nodes"]) == 13 and len(g["links"]) == 10 and "definitions" not in g
|
||||
guhai = json.loads((REF / "guhai-tree.json").read_bytes())
|
||||
missing_license = not any(
|
||||
x["path"].lower() in ["license", "license.md", "copying", "license.txt"]
|
||||
for x in guhai["tree"]
|
||||
)
|
||||
assert missing_license
|
||||
(OUT / "source-check.json").write_text(
|
||||
json.dumps(
|
||||
dict(
|
||||
all_pass=True,
|
||||
commits=roots,
|
||||
citations=len(b["sources"]),
|
||||
git_texts=len({e["local_file"] for e in b["sources"]}),
|
||||
local_file_base=str(OUT.relative_to(REPO)),
|
||||
guhai_license="README generic statement only; exact license unknown",
|
||||
upstream_executed=False,
|
||||
),
|
||||
indent=2,
|
||||
)
|
||||
+ "\n"
|
||||
)
|
||||
print("PASS exact sources, tag/tree/blob/line ranges and 46+1 inventory")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1 @@
|
||||
{"ref":"refs/tags/v0.35.1","node_id":"REF_kwDOIygeJrFyZWZzL3RhZ3MvdjAuMzUuMQ","url":"https://api.github.com/repos/Comfy-Org/ComfyUI/git/refs/tags/v0.35.1","object":{"sha":"856a922befab9d94cb66f36a3dce17234d7a6e31","type":"commit","url":"https://api.github.com/repos/Comfy-Org/ComfyUI/git/commits/856a922befab9d94cb66f36a3dce17234d7a6e31"}}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,589 @@
|
||||
import os
|
||||
import time
|
||||
import mimetypes
|
||||
import logging
|
||||
from typing import Literal, List
|
||||
from collections.abc import Collection
|
||||
|
||||
from comfy.cli_args import args
|
||||
|
||||
supported_pt_extensions: set[str] = {'.ckpt', '.pt', '.pt2', '.bin', '.pth', '.safetensors', '.pkl', '.sft'}
|
||||
|
||||
folder_names_and_paths: dict[str, tuple[list[str], set[str]]] = {}
|
||||
|
||||
# --base-directory - Resets all default paths configured in folder_paths with a new base path
|
||||
if args.base_directory:
|
||||
base_path = os.path.abspath(args.base_directory)
|
||||
else:
|
||||
base_path = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if args.models_directory:
|
||||
models_dir = os.path.abspath(args.models_directory)
|
||||
else:
|
||||
models_dir = os.path.join(base_path, "models")
|
||||
|
||||
folder_names_and_paths["checkpoints"] = ([os.path.join(models_dir, "checkpoints")], supported_pt_extensions)
|
||||
folder_names_and_paths["configs"] = ([os.path.join(models_dir, "configs")], [".yaml"])
|
||||
|
||||
folder_names_and_paths["loras"] = ([os.path.join(models_dir, "loras")], supported_pt_extensions)
|
||||
folder_names_and_paths["vae"] = ([os.path.join(models_dir, "vae")], supported_pt_extensions)
|
||||
folder_names_and_paths["text_encoders"] = ([os.path.join(models_dir, "text_encoders"), os.path.join(models_dir, "clip")], supported_pt_extensions)
|
||||
folder_names_and_paths["diffusion_models"] = ([os.path.join(models_dir, "unet"), os.path.join(models_dir, "diffusion_models")], supported_pt_extensions)
|
||||
folder_names_and_paths["clip_vision"] = ([os.path.join(models_dir, "clip_vision")], supported_pt_extensions)
|
||||
folder_names_and_paths["style_models"] = ([os.path.join(models_dir, "style_models")], supported_pt_extensions)
|
||||
folder_names_and_paths["embeddings"] = ([os.path.join(models_dir, "embeddings")], supported_pt_extensions)
|
||||
folder_names_and_paths["diffusers"] = ([os.path.join(models_dir, "diffusers")], ["folder"])
|
||||
folder_names_and_paths["vae_approx"] = ([os.path.join(models_dir, "vae_approx")], supported_pt_extensions)
|
||||
|
||||
folder_names_and_paths["controlnet"] = ([os.path.join(models_dir, "controlnet"), os.path.join(models_dir, "t2i_adapter")], supported_pt_extensions)
|
||||
folder_names_and_paths["gligen"] = ([os.path.join(models_dir, "gligen")], supported_pt_extensions)
|
||||
|
||||
folder_names_and_paths["upscale_models"] = ([os.path.join(models_dir, "upscale_models")], supported_pt_extensions)
|
||||
|
||||
folder_names_and_paths["latent_upscale_models"] = ([os.path.join(models_dir, "latent_upscale_models")], supported_pt_extensions)
|
||||
|
||||
folder_names_and_paths["custom_nodes"] = ([os.path.join(base_path, "custom_nodes")], set())
|
||||
|
||||
folder_names_and_paths["datasets"] = ([os.path.join(base_path, "datasets")], set())
|
||||
|
||||
folder_names_and_paths["hypernetworks"] = ([os.path.join(models_dir, "hypernetworks")], supported_pt_extensions)
|
||||
|
||||
folder_names_and_paths["photomaker"] = ([os.path.join(models_dir, "photomaker")], supported_pt_extensions)
|
||||
|
||||
folder_names_and_paths["classifiers"] = ([os.path.join(models_dir, "classifiers")], {""})
|
||||
|
||||
folder_names_and_paths["model_patches"] = ([os.path.join(models_dir, "model_patches")], supported_pt_extensions)
|
||||
|
||||
folder_names_and_paths["audio_encoders"] = ([os.path.join(models_dir, "audio_encoders")], supported_pt_extensions)
|
||||
|
||||
folder_names_and_paths["background_removal"] = ([os.path.join(models_dir, "background_removal")], supported_pt_extensions)
|
||||
|
||||
folder_names_and_paths["frame_interpolation"] = ([os.path.join(models_dir, "frame_interpolation")], supported_pt_extensions)
|
||||
|
||||
folder_names_and_paths["geometry_estimation"] = ([os.path.join(models_dir, "geometry_estimation")], supported_pt_extensions)
|
||||
|
||||
folder_names_and_paths["optical_flow"] = ([os.path.join(models_dir, "optical_flow")], supported_pt_extensions)
|
||||
|
||||
folder_names_and_paths["detection"] = ([os.path.join(models_dir, "detection")], supported_pt_extensions)
|
||||
|
||||
output_directory = os.path.join(base_path, "output")
|
||||
temp_directory = os.path.join(base_path, "temp")
|
||||
input_directory = os.path.join(base_path, "input")
|
||||
user_directory = os.path.join(base_path, "user")
|
||||
|
||||
filename_list_cache: dict[str, tuple[list[str], dict[str, float], float]] = {}
|
||||
|
||||
class CacheHelper:
|
||||
"""
|
||||
Helper class for managing file list cache data.
|
||||
"""
|
||||
def __init__(self):
|
||||
self.cache: dict[str, tuple[list[str], dict[str, float], float]] = {}
|
||||
self.active = False
|
||||
|
||||
def get(self, key: str, default=None) -> tuple[list[str], dict[str, float], float]:
|
||||
if not self.active:
|
||||
return default
|
||||
return self.cache.get(key, default)
|
||||
|
||||
def set(self, key: str, value: tuple[list[str], dict[str, float], float]) -> None:
|
||||
if self.active:
|
||||
self.cache[key] = value
|
||||
|
||||
def clear(self):
|
||||
self.cache.clear()
|
||||
|
||||
def __enter__(self):
|
||||
self.active = True
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
self.active = False
|
||||
self.clear()
|
||||
|
||||
cache_helper = CacheHelper()
|
||||
|
||||
extension_mimetypes_cache = {
|
||||
"webp" : "image",
|
||||
"fbx" : "model",
|
||||
}
|
||||
|
||||
def map_legacy(folder_name: str) -> str:
|
||||
legacy = {"unet": "diffusion_models",
|
||||
"clip": "text_encoders"}
|
||||
return legacy.get(folder_name, folder_name)
|
||||
|
||||
if not os.path.exists(input_directory):
|
||||
try:
|
||||
os.makedirs(input_directory)
|
||||
except:
|
||||
logging.error("Failed to create input directory")
|
||||
|
||||
def set_output_directory(output_dir: str) -> None:
|
||||
global output_directory
|
||||
output_directory = output_dir
|
||||
|
||||
def set_temp_directory(temp_dir: str) -> None:
|
||||
global temp_directory
|
||||
temp_directory = temp_dir
|
||||
|
||||
def set_input_directory(input_dir: str) -> None:
|
||||
global input_directory
|
||||
input_directory = input_dir
|
||||
|
||||
def get_output_directory() -> str:
|
||||
global output_directory
|
||||
return output_directory
|
||||
|
||||
def get_temp_directory() -> str:
|
||||
global temp_directory
|
||||
return temp_directory
|
||||
|
||||
def get_input_directory() -> str:
|
||||
global input_directory
|
||||
return input_directory
|
||||
|
||||
def get_user_directory() -> str:
|
||||
return user_directory
|
||||
|
||||
def set_user_directory(user_dir: str) -> None:
|
||||
global user_directory
|
||||
user_directory = user_dir
|
||||
|
||||
|
||||
# System User Protection - Protects system directories from HTTP endpoint access
|
||||
# System Users are internal-only users that cannot be accessed via HTTP endpoints.
|
||||
# They use the '__' prefix convention (similar to Python's private member convention).
|
||||
SYSTEM_USER_PREFIX = "__"
|
||||
|
||||
|
||||
def get_system_user_directory(name: str = "system") -> str:
|
||||
"""
|
||||
Get the path to a System User directory.
|
||||
|
||||
System User directories (prefixed with '__') are only accessible via internal API,
|
||||
not through HTTP endpoints. Use this for storing system-internal data that
|
||||
should not be exposed to users.
|
||||
|
||||
Args:
|
||||
name: System user name (e.g., "system", "cache"). Must be alphanumeric
|
||||
with underscores allowed, but cannot start with underscore.
|
||||
|
||||
Returns:
|
||||
Absolute path to the system user directory.
|
||||
|
||||
Raises:
|
||||
ValueError: If name is empty, invalid, or starts with underscore.
|
||||
|
||||
Example:
|
||||
>>> get_system_user_directory("cache")
|
||||
'/path/to/user/__cache'
|
||||
"""
|
||||
if not name or not isinstance(name, str):
|
||||
raise ValueError("System user name cannot be empty")
|
||||
if not name.replace("_", "").isalnum():
|
||||
raise ValueError(f"Invalid system user name: '{name}'")
|
||||
if name.startswith("_"):
|
||||
raise ValueError("System user name should not start with underscore")
|
||||
return os.path.join(get_user_directory(), f"{SYSTEM_USER_PREFIX}{name}")
|
||||
|
||||
|
||||
def get_public_user_directory(user_id: str) -> str | None:
|
||||
"""
|
||||
Get the path to a Public User directory for HTTP endpoint access.
|
||||
|
||||
This function provides structural security by returning None for any
|
||||
System User (prefixed with '__'). All HTTP endpoints should use this
|
||||
function instead of directly constructing user paths.
|
||||
|
||||
Args:
|
||||
user_id: User identifier from HTTP request.
|
||||
|
||||
Returns:
|
||||
Absolute path to the user directory, or None if user_id is invalid
|
||||
or refers to a System User.
|
||||
|
||||
Example:
|
||||
>>> get_public_user_directory("default")
|
||||
'/path/to/user/default'
|
||||
>>> get_public_user_directory("__system")
|
||||
None
|
||||
"""
|
||||
if not user_id or not isinstance(user_id, str):
|
||||
return None
|
||||
if user_id.startswith(SYSTEM_USER_PREFIX):
|
||||
return None
|
||||
return os.path.join(get_user_directory(), user_id)
|
||||
|
||||
|
||||
#NOTE: used in http server so don't put folders that should not be accessed remotely
|
||||
def get_directory_by_type(type_name: str) -> str | None:
|
||||
if type_name == "output":
|
||||
return get_output_directory()
|
||||
if type_name == "temp":
|
||||
return get_temp_directory()
|
||||
if type_name == "input":
|
||||
return get_input_directory()
|
||||
return None
|
||||
|
||||
def filter_files_content_types(files: list[str], content_types: List[Literal["image", "video", "audio", "model"]]) -> list[str]:
|
||||
"""
|
||||
Example:
|
||||
files = os.listdir(folder_paths.get_input_directory())
|
||||
videos = filter_files_content_types(files, ["video"])
|
||||
|
||||
Note:
|
||||
- 'model' in MIME context refers to 3D models, not files containing trained weights and parameters
|
||||
"""
|
||||
global extension_mimetypes_cache
|
||||
result = []
|
||||
for file in files:
|
||||
extension = file.split('.')[-1]
|
||||
if extension not in extension_mimetypes_cache:
|
||||
mime_type, _ = mimetypes.guess_type(file, strict=False)
|
||||
if not mime_type:
|
||||
continue
|
||||
content_type = mime_type.split('/')[0]
|
||||
extension_mimetypes_cache[extension] = content_type
|
||||
else:
|
||||
content_type = extension_mimetypes_cache[extension]
|
||||
|
||||
if content_type in content_types:
|
||||
result.append(file)
|
||||
return result
|
||||
|
||||
# determine base_dir rely on annotation if name is 'filename.ext [annotation]' format
|
||||
# otherwise use default_path as base_dir
|
||||
def annotated_filepath(name: str) -> tuple[str, str | None]:
|
||||
if name.endswith("[output]"):
|
||||
base_dir = get_output_directory()
|
||||
name = name[:-9]
|
||||
elif name.endswith("[input]"):
|
||||
base_dir = get_input_directory()
|
||||
name = name[:-8]
|
||||
elif name.endswith("[temp]"):
|
||||
base_dir = get_temp_directory()
|
||||
name = name[:-7]
|
||||
else:
|
||||
return name, None
|
||||
|
||||
return name, base_dir
|
||||
|
||||
|
||||
# Content types a browser may execute or render inline. File endpoints that
|
||||
# serve user-controlled content must force these to download (and ideally set
|
||||
# Content-Disposition: attachment) to avoid stored XSS. Centralised here so the
|
||||
# /view and /userdata handlers can't drift apart. mimetypes.guess_type may
|
||||
# return either the text/* or application/* spelling depending on platform, so
|
||||
# both are listed.
|
||||
DANGEROUS_CONTENT_TYPES = {
|
||||
'text/html', 'text/html-sandboxed', 'application/xhtml+xml',
|
||||
'text/javascript', 'application/javascript', 'application/x-javascript',
|
||||
'application/ecmascript', 'text/css',
|
||||
'image/svg+xml', 'application/xml', 'text/xml',
|
||||
# message/rfc822 (.mht/.mhtml) can carry script in some browsers.
|
||||
'message/rfc822',
|
||||
}
|
||||
|
||||
|
||||
def is_dangerous_content_type(content_type: str | None) -> bool:
|
||||
"""Return True if a browser may execute or render `content_type` inline.
|
||||
|
||||
Normalises before matching so the check can't be slipped past with a
|
||||
charset/boundary parameter (``text/html; charset=utf-8``) or casing
|
||||
(``TEXT/HTML``). Any XML dialect (``*+xml`` or ``*/xml``) is treated as
|
||||
dangerous because XML can carry inline script via stylesheet/entity tricks,
|
||||
which also covers the ``application/{xslt,rss,atom,rdf}+xml`` family without
|
||||
enumerating each one. Endpoints serving user-controlled content should route
|
||||
a dangerous type to ``application/octet-stream`` + ``Content-Disposition:
|
||||
attachment`` + ``X-Content-Type-Options: nosniff``.
|
||||
"""
|
||||
if not content_type:
|
||||
return False
|
||||
normalized = content_type.split(';', 1)[0].strip().lower()
|
||||
if normalized in DANGEROUS_CONTENT_TYPES:
|
||||
return True
|
||||
return normalized.endswith('+xml') or normalized.endswith('/xml')
|
||||
|
||||
|
||||
def renders_safely_as_image(content_type: str | None, sec_fetch_dest: str | None) -> bool:
|
||||
"""Return True if a dangerous `content_type` is safe to serve inline anyway.
|
||||
|
||||
An SVG referenced by an ``<img>`` is loaded in secure static mode: scripts
|
||||
and external references are disabled, so the stored XSS that
|
||||
``is_dangerous_content_type`` guards against cannot fire. The attack needs
|
||||
the SVG to become a document, which is a separate ``Sec-Fetch-Dest``.
|
||||
Browsers set that header themselves and script cannot override it (the
|
||||
``Sec-`` prefix makes it a forbidden header name), so it is trustworthy for
|
||||
this decision. Anything else, including a missing header from a non-browser
|
||||
client or a proxy that strips it, fails closed.
|
||||
"""
|
||||
if sec_fetch_dest != 'image':
|
||||
return False
|
||||
return (content_type or '').split(';', 1)[0].strip().lower() == 'image/svg+xml'
|
||||
|
||||
|
||||
def is_within_directory(directory: str, target: str) -> bool:
|
||||
"""Return True if `target` resolves to a path inside `directory`.
|
||||
|
||||
Uses realpath on both operands so that a symlink placed inside `directory`
|
||||
that points elsewhere cannot escape the containment check at open time.
|
||||
"""
|
||||
try:
|
||||
directory = os.path.realpath(directory)
|
||||
target = os.path.realpath(target)
|
||||
return os.path.commonpath((directory, target)) == directory
|
||||
except ValueError:
|
||||
# ValueError is raised by realpath() on a path with an embedded null
|
||||
# byte, and by commonpath() on Windows when the paths are on different
|
||||
# drives. In either case the target is not safely within the directory.
|
||||
return False
|
||||
|
||||
|
||||
def get_annotated_filepath(name: str, default_dir: str | None=None) -> str:
|
||||
name, base_dir = annotated_filepath(name)
|
||||
|
||||
if base_dir is None:
|
||||
if default_dir is not None:
|
||||
base_dir = default_dir
|
||||
else:
|
||||
base_dir = get_input_directory() # fallback path
|
||||
|
||||
filepath = os.path.abspath(os.path.join(base_dir, name))
|
||||
# Prevent path traversal: the resolved path must stay within base_dir.
|
||||
# repr() the name in the message so a crafted value can't inject log lines.
|
||||
if not is_within_directory(base_dir, filepath):
|
||||
raise ValueError("Invalid file path: {!r}".format(name))
|
||||
return filepath
|
||||
|
||||
|
||||
def exists_annotated_filepath(name) -> bool:
|
||||
name, base_dir = annotated_filepath(name)
|
||||
|
||||
if base_dir is None:
|
||||
base_dir = get_input_directory() # fallback path
|
||||
|
||||
filepath = os.path.abspath(os.path.join(base_dir, name))
|
||||
# Treat traversal attempts as non-existent rather than probing the filesystem.
|
||||
if not is_within_directory(base_dir, filepath):
|
||||
return False
|
||||
return os.path.exists(filepath)
|
||||
|
||||
|
||||
def add_model_folder_path(folder_name: str, full_folder_path: str, is_default: bool = False) -> None:
|
||||
global folder_names_and_paths
|
||||
folder_name = map_legacy(folder_name)
|
||||
if folder_name in folder_names_and_paths:
|
||||
paths, _exts = folder_names_and_paths[folder_name]
|
||||
if full_folder_path in paths:
|
||||
if is_default and paths[0] != full_folder_path:
|
||||
# If the path to the folder is not the first in the list, move it to the beginning.
|
||||
paths.remove(full_folder_path)
|
||||
paths.insert(0, full_folder_path)
|
||||
else:
|
||||
if is_default:
|
||||
paths.insert(0, full_folder_path)
|
||||
else:
|
||||
paths.append(full_folder_path)
|
||||
else:
|
||||
folder_names_and_paths[folder_name] = ([full_folder_path], set())
|
||||
|
||||
def get_folder_paths(folder_name: str) -> list[str]:
|
||||
folder_name = map_legacy(folder_name)
|
||||
return folder_names_and_paths[folder_name][0][:]
|
||||
|
||||
def recursive_search(directory: str, excluded_dir_names: list[str] | None=None) -> tuple[list[str], dict[str, float]]:
|
||||
if not os.path.isdir(directory):
|
||||
return [], {}
|
||||
|
||||
if excluded_dir_names is None:
|
||||
excluded_dir_names = []
|
||||
|
||||
result = []
|
||||
dirs = {}
|
||||
|
||||
# Attempt to add the initial directory to dirs with error handling
|
||||
try:
|
||||
dirs[directory] = os.path.getmtime(directory)
|
||||
except FileNotFoundError:
|
||||
logging.warning(f"Warning: Unable to access {directory}. Skipping this path.")
|
||||
|
||||
logging.debug("recursive file list on directory {}".format(directory))
|
||||
dirpath: str
|
||||
subdirs: list[str]
|
||||
filenames: list[str]
|
||||
|
||||
for dirpath, subdirs, filenames in os.walk(directory, followlinks=True, topdown=True):
|
||||
subdirs[:] = [d for d in subdirs if d not in excluded_dir_names]
|
||||
for file_name in filenames:
|
||||
try:
|
||||
relative_path = os.path.relpath(os.path.join(dirpath, file_name), directory)
|
||||
result.append(relative_path)
|
||||
except:
|
||||
logging.warning(f"Warning: Unable to access {file_name}. Skipping this file.")
|
||||
continue
|
||||
|
||||
for d in subdirs:
|
||||
path: str = os.path.join(dirpath, d)
|
||||
try:
|
||||
dirs[path] = os.path.getmtime(path)
|
||||
except FileNotFoundError:
|
||||
logging.warning(f"Warning: Unable to access {path}. Skipping this path.")
|
||||
continue
|
||||
logging.debug("found {} files".format(len(result)))
|
||||
return result, dirs
|
||||
|
||||
def filter_files_extensions(files: Collection[str], extensions: Collection[str]) -> list[str]:
|
||||
return sorted(list(filter(lambda a: os.path.splitext(a)[-1].lower() in extensions or len(extensions) == 0, files)))
|
||||
|
||||
|
||||
|
||||
def get_full_path(folder_name: str, filename: str) -> str | None:
|
||||
"""
|
||||
Get the full path of a file in a folder, has to be a file
|
||||
"""
|
||||
global folder_names_and_paths
|
||||
folder_name = map_legacy(folder_name)
|
||||
if folder_name not in folder_names_and_paths:
|
||||
return None
|
||||
folders = folder_names_and_paths[folder_name]
|
||||
filename = os.path.relpath(os.path.join("/", filename), "/")
|
||||
for x in folders[0]:
|
||||
full_path = os.path.join(x, filename)
|
||||
if os.path.isfile(full_path):
|
||||
return full_path
|
||||
elif os.path.islink(full_path):
|
||||
logging.warning("WARNING path {} exists but doesn't link anywhere, skipping.".format(full_path))
|
||||
|
||||
return None
|
||||
|
||||
|
||||
def get_full_path_or_raise(folder_name: str, filename: str) -> str:
|
||||
"""
|
||||
Get the full path of a file in a folder, has to be a file
|
||||
"""
|
||||
full_path = get_full_path(folder_name, filename)
|
||||
if full_path is None:
|
||||
raise FileNotFoundError(f"Model in folder '{folder_name}' with filename '{filename}' not found.")
|
||||
return full_path
|
||||
|
||||
|
||||
def get_filename_list_(folder_name: str) -> tuple[list[str], dict[str, float], float]:
|
||||
folder_name = map_legacy(folder_name)
|
||||
global folder_names_and_paths
|
||||
output_list = set()
|
||||
folders = folder_names_and_paths[folder_name]
|
||||
output_folders = {}
|
||||
for x in folders[0]:
|
||||
files, folders_all = recursive_search(x, excluded_dir_names=[".git"])
|
||||
output_list.update(filter_files_extensions(files, folders[1]))
|
||||
output_folders = {**output_folders, **folders_all}
|
||||
|
||||
return sorted(list(output_list)), output_folders, time.perf_counter()
|
||||
|
||||
def cached_filename_list_(folder_name: str) -> tuple[list[str], dict[str, float], float] | None:
|
||||
strong_cache = cache_helper.get(folder_name)
|
||||
if strong_cache is not None:
|
||||
return strong_cache
|
||||
|
||||
global filename_list_cache
|
||||
global folder_names_and_paths
|
||||
folder_name = map_legacy(folder_name)
|
||||
if folder_name not in filename_list_cache:
|
||||
return None
|
||||
out = filename_list_cache[folder_name]
|
||||
|
||||
for x in out[1]:
|
||||
time_modified = out[1][x]
|
||||
folder = x
|
||||
if os.path.getmtime(folder) != time_modified:
|
||||
return None
|
||||
|
||||
folders = folder_names_and_paths[folder_name]
|
||||
for x in folders[0]:
|
||||
if os.path.isdir(x):
|
||||
if x not in out[1]:
|
||||
return None
|
||||
|
||||
return out
|
||||
|
||||
def get_filename_list(folder_name: str) -> list[str]:
|
||||
folder_name = map_legacy(folder_name)
|
||||
out = cached_filename_list_(folder_name)
|
||||
if out is None:
|
||||
out = get_filename_list_(folder_name)
|
||||
global filename_list_cache
|
||||
filename_list_cache[folder_name] = out
|
||||
cache_helper.set(folder_name, out)
|
||||
return list(out[0])
|
||||
|
||||
def get_save_image_path(filename_prefix: str, output_dir: str, image_width=0, image_height=0) -> tuple[str, str, int, str, str]:
|
||||
def map_filename(filename: str) -> tuple[int, str]:
|
||||
prefix_len = len(os.path.basename(filename_prefix))
|
||||
prefix = filename[:prefix_len + 1]
|
||||
try:
|
||||
remainder = filename[prefix_len + 1:]
|
||||
base_remainder = remainder.split('.')[0]
|
||||
digits = int(base_remainder.split('_')[0])
|
||||
except:
|
||||
digits = 0
|
||||
return digits, prefix
|
||||
|
||||
def compute_vars(input: str, image_width: int, image_height: int) -> str:
|
||||
input = input.replace("%width%", str(image_width))
|
||||
input = input.replace("%height%", str(image_height))
|
||||
now = time.localtime()
|
||||
input = input.replace("%year%", str(now.tm_year))
|
||||
input = input.replace("%month%", str(now.tm_mon).zfill(2))
|
||||
input = input.replace("%day%", str(now.tm_mday).zfill(2))
|
||||
input = input.replace("%hour%", str(now.tm_hour).zfill(2))
|
||||
input = input.replace("%minute%", str(now.tm_min).zfill(2))
|
||||
input = input.replace("%second%", str(now.tm_sec).zfill(2))
|
||||
return input
|
||||
|
||||
if "%" in filename_prefix:
|
||||
filename_prefix = compute_vars(filename_prefix, image_width, image_height)
|
||||
|
||||
subfolder = os.path.dirname(os.path.normpath(filename_prefix))
|
||||
filename = os.path.basename(os.path.normpath(filename_prefix))
|
||||
|
||||
full_output_folder = os.path.join(output_dir, subfolder)
|
||||
|
||||
if not is_within_directory(output_dir, full_output_folder):
|
||||
err = "**** ERROR: Saving image outside the output folder is not allowed." + \
|
||||
"\n full_output_folder: " + os.path.abspath(full_output_folder) + \
|
||||
"\n output_dir: " + output_dir
|
||||
logging.error(err)
|
||||
raise Exception(err)
|
||||
|
||||
try:
|
||||
counter = max(filter(lambda a: os.path.normcase(a[1][:-1]) == os.path.normcase(filename) and a[1][-1] == "_", map(map_filename, os.listdir(full_output_folder))))[0] + 1
|
||||
except ValueError:
|
||||
counter = 1
|
||||
except FileNotFoundError:
|
||||
os.makedirs(full_output_folder, exist_ok=True)
|
||||
counter = 1
|
||||
return full_output_folder, filename, counter, subfolder, filename_prefix
|
||||
|
||||
def get_input_subfolders() -> list[str]:
|
||||
"""Returns a list of all subfolder paths in the input directory, recursively.
|
||||
|
||||
Returns:
|
||||
List of folder paths relative to the input directory, excluding the root directory
|
||||
"""
|
||||
input_dir = get_input_directory()
|
||||
folders = []
|
||||
|
||||
try:
|
||||
if not os.path.exists(input_dir):
|
||||
return []
|
||||
|
||||
for root, dirs, _ in os.walk(input_dir):
|
||||
rel_path = os.path.relpath(root, input_dir)
|
||||
if rel_path != ".": # Only include non-root directories
|
||||
# Normalize path separators to forward slashes
|
||||
folders.append(rel_path.replace(os.sep, '/'))
|
||||
|
||||
return sorted(folders)
|
||||
except FileNotFoundError:
|
||||
return []
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
{"ref":"refs/tags/v1.51.9","node_id":"REF_kwDOMIrOxrFyZWZzL3RhZ3MvdjEuNTEuOQ","url":"https://api.github.com/repos/Comfy-Org/ComfyUI_frontend/git/refs/tags/v1.51.9","object":{"sha":"71d2f2f2b5c6da9dee281836b5b72f3af368966f","type":"commit","url":"https://api.github.com/repos/Comfy-Org/ComfyUI_frontend/git/commits/71d2f2f2b5c6da9dee281836b5b72f3af368966f"}}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
@@ -0,0 +1,40 @@
|
||||
import type { LGraphNode } from '@/lib/litegraph/src/LGraphNode'
|
||||
import {
|
||||
type ComfyNodeDef,
|
||||
type InputSpec,
|
||||
isMediaUploadComboInput
|
||||
} from '@/schemas/nodeDefSchema'
|
||||
|
||||
import { app } from '../../scripts/app'
|
||||
|
||||
// Adds an upload button to the nodes
|
||||
|
||||
const createUploadInput = (
|
||||
imageInputName: string,
|
||||
imageInputOptions: InputSpec
|
||||
): InputSpec => [
|
||||
'IMAGEUPLOAD',
|
||||
{
|
||||
...imageInputOptions[1],
|
||||
imageInputName
|
||||
}
|
||||
]
|
||||
|
||||
app.registerExtension({
|
||||
name: 'Comfy.UploadImage',
|
||||
beforeRegisterNodeDef(_nodeType: typeof LGraphNode, nodeData: ComfyNodeDef) {
|
||||
const { input } = nodeData ?? {}
|
||||
const { required } = input ?? {}
|
||||
if (!required) return
|
||||
|
||||
const found = Object.entries(required).find(([_, input]) =>
|
||||
isMediaUploadComboInput(input)
|
||||
)
|
||||
|
||||
// If media combo input found, attach upload input
|
||||
if (found) {
|
||||
const [inputName, inputSpec] = found
|
||||
required.upload = createUploadInput(inputName, inputSpec)
|
||||
}
|
||||
}
|
||||
})
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,160 @@
|
||||
import { isComboWidget } from '@/lib/litegraph/src/litegraph'
|
||||
import type { IBaseWidget } from '@/lib/litegraph/src/types/widgets'
|
||||
|
||||
import { IS_CONTROL_WIDGET } from './controlWidgetMarker'
|
||||
|
||||
type ValueControlMode =
|
||||
| 'fixed'
|
||||
| 'increment'
|
||||
| 'increment-wrap'
|
||||
| 'decrement'
|
||||
| 'randomize'
|
||||
|
||||
export function nextValueForLinkedTarget(params: {
|
||||
target: IBaseWidget
|
||||
linkedWidgets: IBaseWidget[] | undefined
|
||||
nodeId: unknown
|
||||
isPartialExecution: boolean | undefined
|
||||
}): IBaseWidget['value'] | undefined {
|
||||
if (params.isPartialExecution) return undefined
|
||||
const linked = params.linkedWidgets
|
||||
if (!linked) return undefined
|
||||
|
||||
const controlWidget = linked.find(isValueControlWidget)
|
||||
if (!controlWidget) return undefined
|
||||
|
||||
const comboFilter = linked.find(
|
||||
(w) => w !== controlWidget && w.type === 'string'
|
||||
)
|
||||
const filterValue =
|
||||
typeof comboFilter?.value === 'string' ? comboFilter.value : undefined
|
||||
|
||||
const mode = controlWidget.value as ValueControlMode
|
||||
return computeNextControlledValue(params.target, mode, {
|
||||
comboFilter: filterValue,
|
||||
nodeId: params.nodeId
|
||||
})
|
||||
}
|
||||
|
||||
const SAFE_INTEGER_MAX = 1125899906842624
|
||||
const SAFE_INTEGER_MIN = -1125899906842624
|
||||
|
||||
export function isValueControlWidget(widget: IBaseWidget): boolean {
|
||||
return (
|
||||
(widget as Record<symbol, unknown>)[IS_CONTROL_WIDGET] === true &&
|
||||
typeof widget.beforeQueued === 'function' &&
|
||||
typeof widget.afterQueued === 'function'
|
||||
)
|
||||
}
|
||||
|
||||
function buildComboFilter(
|
||||
filter: string | undefined,
|
||||
nodeId?: unknown
|
||||
): ((item: string) => boolean) | undefined {
|
||||
if (!filter) return undefined
|
||||
|
||||
if (filter.startsWith('/') && filter.endsWith('/')) {
|
||||
try {
|
||||
const regex = new RegExp(filter.substring(1, filter.length - 1))
|
||||
return (item: string) => regex.test(item)
|
||||
} catch (error) {
|
||||
console.error(
|
||||
'Error constructing RegExp filter for node ' + String(nodeId),
|
||||
filter,
|
||||
error
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const lower = filter.toLocaleLowerCase()
|
||||
return (item: string) => item.toLocaleLowerCase().includes(lower)
|
||||
}
|
||||
|
||||
export function computeNextControlledValue(
|
||||
target: IBaseWidget,
|
||||
mode: ValueControlMode,
|
||||
options: { comboFilter?: string; nodeId?: unknown } = {}
|
||||
): IBaseWidget['value'] | undefined {
|
||||
if (mode === 'fixed') return undefined
|
||||
|
||||
if (isComboWidget(target)) {
|
||||
return computeNextComboValue(target, mode, options)
|
||||
}
|
||||
|
||||
return computeNextNumberValue(target, mode)
|
||||
}
|
||||
|
||||
function computeNextComboValue(
|
||||
target: IBaseWidget,
|
||||
mode: ValueControlMode,
|
||||
{ comboFilter, nodeId }: { comboFilter?: string; nodeId?: unknown }
|
||||
): IBaseWidget['value'] | undefined {
|
||||
const rawValues = target.options.values
|
||||
if (!Array.isArray(rawValues)) return undefined
|
||||
|
||||
const allValues = rawValues.filter(
|
||||
(value): value is string => typeof value === 'string'
|
||||
)
|
||||
const check = buildComboFilter(comboFilter, nodeId)
|
||||
const values = check ? allValues.filter(check) : allValues
|
||||
|
||||
if (!values.length) {
|
||||
if (allValues.length) {
|
||||
console.warn(
|
||||
'Filter for node ' + String(nodeId) + ' has filtered out all items',
|
||||
comboFilter
|
||||
)
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
let currentIndex = values.indexOf(target.value as string)
|
||||
const length = values.length
|
||||
|
||||
switch (mode) {
|
||||
case 'increment':
|
||||
currentIndex += 1
|
||||
break
|
||||
case 'increment-wrap':
|
||||
currentIndex += 1
|
||||
if (currentIndex >= length) currentIndex = 0
|
||||
break
|
||||
case 'decrement':
|
||||
currentIndex -= 1
|
||||
break
|
||||
case 'randomize':
|
||||
currentIndex = Math.floor(Math.random() * length)
|
||||
break
|
||||
}
|
||||
|
||||
currentIndex = Math.max(0, Math.min(length - 1, currentIndex))
|
||||
return values[currentIndex]
|
||||
}
|
||||
|
||||
function computeNextNumberValue(
|
||||
target: IBaseWidget,
|
||||
mode: ValueControlMode
|
||||
): number | undefined {
|
||||
if (typeof target.value !== 'number') return undefined
|
||||
|
||||
const { min: rawMin = 0, max: rawMax = 1, step2 = 1 } = target.options
|
||||
const max = Math.min(SAFE_INTEGER_MAX, rawMax)
|
||||
const min = Math.max(SAFE_INTEGER_MIN, rawMin)
|
||||
const range = (max - min) / step2
|
||||
|
||||
let next = target.value
|
||||
switch (mode) {
|
||||
case 'increment':
|
||||
case 'increment-wrap':
|
||||
next += step2
|
||||
break
|
||||
case 'decrement':
|
||||
next -= step2
|
||||
break
|
||||
case 'randomize':
|
||||
next = Math.floor(Math.random() * range) * step2 + min
|
||||
break
|
||||
}
|
||||
|
||||
return Math.min(Math.max(next, min), max)
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
import { t } from '@/i18n'
|
||||
import { type LGraphNode, isComboWidget } from '@/lib/litegraph/src/litegraph'
|
||||
import type {
|
||||
IBaseWidget,
|
||||
IComboWidget,
|
||||
IStringWidget
|
||||
} from '@/lib/litegraph/src/types/widgets'
|
||||
import { nextValueForLinkedTarget } from './valueControl'
|
||||
import { useSettingStore } from '@/platform/settings/settingStore'
|
||||
import { dynamicWidgets } from '@/core/graph/widgets/dynamicWidgets'
|
||||
import { useBooleanWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useBooleanWidget'
|
||||
import { useBoundingBoxWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useBoundingBoxWidget'
|
||||
import { useCurveWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useCurveWidget'
|
||||
import { useChartWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useChartWidget'
|
||||
import { useColorWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useColorWidget'
|
||||
import { useComboWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useComboWidget'
|
||||
import { useCompositorWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useCompositorWidget'
|
||||
import { useFloatWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useFloatWidget'
|
||||
import { useGalleriaWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useGalleriaWidget'
|
||||
import { useBoundingBoxesWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useBoundingBoxesWidget'
|
||||
import { useColorsWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useColorsWidget'
|
||||
import { useImageCompareWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useImageCompareWidget'
|
||||
import { useImageUploadWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useImageUploadWidget'
|
||||
import { useIntWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useIntWidget'
|
||||
import { useMarkdownWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useMarkdownWidget'
|
||||
import { usePainterWidget } from '@/renderer/extensions/vueNodes/widgets/composables/usePainterWidget'
|
||||
import { useRangeWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useRangeWidget'
|
||||
import { useStringWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useStringWidget'
|
||||
import { useTextareaWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useTextareaWidget'
|
||||
import { useVideoEditWidget } from '@/renderer/extensions/vueNodes/widgets/composables/useVideoEditWidget'
|
||||
import { transformInputSpecV1ToV2 } from '@/schemas/nodeDef/migration'
|
||||
import type { InputSpec as InputSpecV2 } from '@/schemas/nodeDef/nodeDefSchemaV2'
|
||||
import type { InputSpec } from '@/schemas/nodeDefSchema'
|
||||
|
||||
import type { ComfyApp } from './app'
|
||||
import { IS_CONTROL_WIDGET } from './controlWidgetMarker'
|
||||
import './domWidget'
|
||||
import './errorNodeWidgets'
|
||||
|
||||
export { IS_CONTROL_WIDGET }
|
||||
|
||||
export type ComfyWidgetConstructorV2 = (
|
||||
node: LGraphNode,
|
||||
inputSpec: InputSpecV2
|
||||
) => IBaseWidget
|
||||
|
||||
export type ComfyWidgetConstructor = (
|
||||
node: LGraphNode,
|
||||
inputName: string,
|
||||
inputData: InputSpec,
|
||||
app: ComfyApp,
|
||||
widgetName?: string
|
||||
) => { widget: IBaseWidget; minWidth?: number; minHeight?: number }
|
||||
|
||||
/**
|
||||
* Transforms a V2 widget constructor to a V1 widget constructor.
|
||||
* @param widgetConstructorV2 The V2 widget constructor to transform.
|
||||
* @returns The transformed V1 widget constructor.
|
||||
*/
|
||||
const transformWidgetConstructorV2ToV1 = (
|
||||
widgetConstructorV2: ComfyWidgetConstructorV2
|
||||
): ComfyWidgetConstructor => {
|
||||
return (node, inputName, inputData) => {
|
||||
const inputSpec = transformInputSpecV1ToV2(inputData, {
|
||||
name: inputName
|
||||
})
|
||||
const widget = widgetConstructorV2(node, inputSpec)
|
||||
return {
|
||||
widget,
|
||||
minWidth: widget.options.minNodeSize?.[0],
|
||||
minHeight: widget.options.minNodeSize?.[1]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function controlValueRunBefore() {
|
||||
return useSettingStore().get('Comfy.WidgetControlMode') === 'before'
|
||||
}
|
||||
|
||||
export function updateControlWidgetLabel(widget: IBaseWidget) {
|
||||
if (controlValueRunBefore()) {
|
||||
widget.label = t('g.control_before_generate')
|
||||
} else {
|
||||
widget.label = t('g.control_after_generate')
|
||||
}
|
||||
}
|
||||
|
||||
const HAS_EXECUTED = Symbol()
|
||||
|
||||
export function addValueControlWidget(
|
||||
node: LGraphNode,
|
||||
targetWidget: IBaseWidget,
|
||||
defaultValue?: string,
|
||||
_values?: unknown,
|
||||
widgetName?: string,
|
||||
inputData?: InputSpec
|
||||
): IComboWidget {
|
||||
let name = inputData?.[1]?.control_after_generate
|
||||
if (typeof name !== 'string') {
|
||||
name = widgetName
|
||||
}
|
||||
const widgets = addValueControlWidgets(
|
||||
node,
|
||||
targetWidget,
|
||||
defaultValue ?? 'randomize',
|
||||
{
|
||||
addFilterList: false,
|
||||
controlAfterGenerateName: name
|
||||
},
|
||||
inputData
|
||||
)
|
||||
return widgets[0]
|
||||
}
|
||||
|
||||
export function addValueControlWidgets(
|
||||
node: LGraphNode,
|
||||
targetWidget: IBaseWidget,
|
||||
defaultValue?: string,
|
||||
options?: Record<string, any>,
|
||||
inputData?: InputSpec
|
||||
): [IComboWidget, ...IStringWidget[]] {
|
||||
if (!defaultValue) defaultValue = 'randomize'
|
||||
if (!options) options = {}
|
||||
|
||||
const getName = (defaultName: string, optionName: string) => {
|
||||
let name = defaultName
|
||||
if (options[optionName]) {
|
||||
name = options[optionName]
|
||||
} else if (typeof inputData?.[1]?.[defaultName] === 'string') {
|
||||
name = inputData?.[1]?.[defaultName]
|
||||
} else if (inputData?.[1]?.control_prefix) {
|
||||
name = inputData?.[1]?.control_prefix + ' ' + name
|
||||
}
|
||||
return name
|
||||
}
|
||||
|
||||
const valueControl = node.addWidget(
|
||||
'combo',
|
||||
getName('control_after_generate', 'controlAfterGenerateName'),
|
||||
defaultValue,
|
||||
function () {},
|
||||
{
|
||||
values: ['fixed', 'increment', 'decrement', 'randomize'],
|
||||
serialize: false, // Don't include this in prompt.
|
||||
canvasOnly: true
|
||||
}
|
||||
) as IComboWidget
|
||||
|
||||
valueControl.tooltip =
|
||||
'Allows the linked widget to be changed automatically, for example randomizing the noise seed.'
|
||||
valueControl[IS_CONTROL_WIDGET] = true
|
||||
updateControlWidgetLabel(valueControl)
|
||||
Object.defineProperty(valueControl, 'disabled', {
|
||||
get: () => targetWidget.computedDisabled
|
||||
})
|
||||
const widgets: [IComboWidget, ...IStringWidget[]] = [valueControl]
|
||||
|
||||
const isCombo = isComboWidget(targetWidget)
|
||||
let comboFilter: IStringWidget
|
||||
if (isCombo && valueControl.options.values) {
|
||||
// @ts-expect-error Combo widget values may be a dictionary or legacy function type
|
||||
valueControl.options.values.push('increment-wrap')
|
||||
}
|
||||
if (isCombo && options.addFilterList !== false) {
|
||||
comboFilter = node.addWidget(
|
||||
'string',
|
||||
getName('control_filter_list', 'controlFilterListName'),
|
||||
'',
|
||||
function () {},
|
||||
{
|
||||
serialize: false // Don't include this in prompt.
|
||||
}
|
||||
) as IStringWidget
|
||||
updateControlWidgetLabel(comboFilter)
|
||||
comboFilter.tooltip =
|
||||
"Allows for filtering the list of values when changing the value via the control generate mode. Allows for RegEx matches in the format /abc/ to only filter to values containing 'abc'."
|
||||
Object.defineProperty(comboFilter, 'disabled', {
|
||||
get: () => targetWidget.computedDisabled
|
||||
})
|
||||
|
||||
widgets.push(comboFilter)
|
||||
}
|
||||
|
||||
function applyWidgetControl(isPartialExecution: boolean | undefined) {
|
||||
if (
|
||||
node.inputs?.some(
|
||||
(input) =>
|
||||
input.widget?.name === targetWidget.name && input.link != null
|
||||
)
|
||||
)
|
||||
return
|
||||
|
||||
const next = nextValueForLinkedTarget({
|
||||
target: targetWidget,
|
||||
linkedWidgets: targetWidget.linkedWidgets,
|
||||
nodeId: node.id,
|
||||
isPartialExecution
|
||||
})
|
||||
if (next === undefined) return
|
||||
|
||||
targetWidget.value = next
|
||||
targetWidget.callback?.(next)
|
||||
}
|
||||
|
||||
valueControl.beforeQueued = ({ isPartialExecution } = {}) => {
|
||||
if (controlValueRunBefore()) {
|
||||
// Don't run on first execution
|
||||
if (valueControl[HAS_EXECUTED]) {
|
||||
applyWidgetControl(isPartialExecution)
|
||||
}
|
||||
}
|
||||
valueControl[HAS_EXECUTED] = true
|
||||
}
|
||||
|
||||
valueControl.afterQueued = ({ isPartialExecution } = {}) => {
|
||||
if (!controlValueRunBefore()) {
|
||||
applyWidgetControl(isPartialExecution)
|
||||
}
|
||||
}
|
||||
|
||||
return widgets
|
||||
}
|
||||
|
||||
export const ComfyWidgets = {
|
||||
INT: transformWidgetConstructorV2ToV1(useIntWidget()),
|
||||
FLOAT: transformWidgetConstructorV2ToV1(useFloatWidget()),
|
||||
BOOLEAN: transformWidgetConstructorV2ToV1(useBooleanWidget()),
|
||||
STRING: transformWidgetConstructorV2ToV1(useStringWidget()),
|
||||
MARKDOWN: transformWidgetConstructorV2ToV1(useMarkdownWidget()),
|
||||
COMBO: transformWidgetConstructorV2ToV1(useComboWidget()),
|
||||
IMAGEUPLOAD: useImageUploadWidget(),
|
||||
COLOR: transformWidgetConstructorV2ToV1(useColorWidget()),
|
||||
IMAGECOMPARE: transformWidgetConstructorV2ToV1(useImageCompareWidget()),
|
||||
BOUNDING_BOX: transformWidgetConstructorV2ToV1(useBoundingBoxWidget()),
|
||||
CHART: transformWidgetConstructorV2ToV1(useChartWidget()),
|
||||
GALLERIA: transformWidgetConstructorV2ToV1(useGalleriaWidget()),
|
||||
PAINTER: transformWidgetConstructorV2ToV1(usePainterWidget()),
|
||||
COMPOSITOR: transformWidgetConstructorV2ToV1(useCompositorWidget()),
|
||||
TEXTAREA: transformWidgetConstructorV2ToV1(useTextareaWidget()),
|
||||
CURVE: transformWidgetConstructorV2ToV1(useCurveWidget()),
|
||||
RANGE: transformWidgetConstructorV2ToV1(useRangeWidget()),
|
||||
VIDEO_EDIT: transformWidgetConstructorV2ToV1(useVideoEditWidget()),
|
||||
BOUNDING_BOXES: transformWidgetConstructorV2ToV1(useBoundingBoxesWidget()),
|
||||
COLORS: transformWidgetConstructorV2ToV1(useColorsWidget()),
|
||||
...dynamicWidgets
|
||||
} as const
|
||||
|
||||
export function isValidWidgetType(
|
||||
key: unknown
|
||||
): key is keyof typeof ComfyWidgets {
|
||||
return ComfyWidgets[key as keyof typeof ComfyWidgets] !== undefined
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,231 @@
|
||||
# Goohaitools-ComfyUI 孤海工具箱
|
||||
|
||||
[](https://github.com/goohai/Goohaitools-comfyui)
|
||||
[](https://space.bilibili.com/1194488958)
|
||||
|
||||
## 🎬 视频教程
|
||||
|
||||
### 👉 [点击前往 B 站主页观看全部教程](https://space.bilibili.com/1194488958)
|
||||
|
||||
[](https://space.bilibili.com/1194488958)
|
||||
|
||||
---
|
||||
## 🧩 RunningHub 工作流
|
||||
|
||||
### 👉 [点击访问我的 RunningHub 个人主页](https://www.runninghub.cn/user-center/1959241033525714946/webapp?inviteCode=rh-v1557)
|
||||
|
||||
<a href="https://vibex.runninghub.cn/p/app-5b97e951de8d47aab61ce3e9731f50a9/?inviteCode=rh-v1557" target="_blank">
|
||||
<img src="https://www.runninghub.cn/assets/images/logo.png" alt="RunningHub" height="28" align="middle" />
|
||||
<span style="display:inline-block;margin-left:8px;font-size:15px;font-weight:600;color:#1E90FF;vertical-align:middle;">RH Vibex主页 · 在线运行AI应用</span>
|
||||
</a>
|
||||
|
||||
---
|
||||
|
||||
孤海(Goohai)ComfyUI 实用工具集,合集包含 **70+** 个实用节点,覆盖:文件夹批处理快速读图、指定 DPI 自动保存、多功能遮罩分析与运算、人脸自动矫正/对齐、证件照 & 身份证自动扶正拼版、图像自动排版、实用前端JS、取色器、数字混合运算、证件照可视化服装发型选择等。适合证件照/写真/批处理生产等场景。
|
||||
|
||||
---
|
||||
|
||||
## 📦 节点总览
|
||||
|
||||
所有节点默认位于 `🔵孤海/`(即 `孤海工具箱`)分类下,少量节点按功能归入子分类:`孤海/结婚登记照`、`孤海定制`、`image` 等。
|
||||
|
||||
### 📂 加载 & 文件夹 & 批处理
|
||||
|
||||
| 节点名称 | 说明 |
|
||||
|---------|------|
|
||||
| **加载图像** | 增强版单图加载 |
|
||||
| **加载批次图像** | 从文件夹批量加载图像,支持批处理工作流 |
|
||||
| **📁文件夹图片统计** | 统计文件夹内图片数量 |
|
||||
| **文件夹数量统计** | 统计子文件夹数量 |
|
||||
| **文件夹索引** | 按序号读取文件夹内指定图片 |
|
||||
| **根据文件名识别尺寸** | 从文件名自动解析图像宽高 |
|
||||
| **批处理开关** | 批处理流中用于切换/汇总参数 |
|
||||
| **批处理进度条 🐋** | 批处理任务实时进度可视化 |
|
||||
| **自动新建文件夹** | 自动按规则创建输出目录 |
|
||||
| **自动切换正反斜杠** | Windows / Mac / Linux 路径斜杠自动兼容 |
|
||||
| **忽略多组** | 工作流中忽略多余分支输出 |
|
||||
| **字符串按类型分隔** | 按类型拆分混合字符串 |
|
||||
|
||||
### 💾 保存 & 输出
|
||||
|
||||
| 节点名称 | 说明 |
|
||||
|---------|------|
|
||||
| **保存图像JPG** | 轻量化JPG 格式保存,减少等待时间 |
|
||||
| **图像保存** | 高级图像保存(高级参数)为批处理而生 |
|
||||
|
||||
### 📐 尺寸 & 缩放 & 裁剪
|
||||
|
||||
| 节点名称 | 说明 |
|
||||
|---------|------|
|
||||
| **预设尺寸** | 常用尺寸快捷选项(证件照/社媒/打印等) |
|
||||
| **图像缩放V2** | 图像缩放 V2 增强版 |
|
||||
| **图像缩放按像素** | 按目标像素总数缩放 |
|
||||
| **图像缩放(范围)** | 在指定宽高范围内自适应缩放 |
|
||||
| **图像裁剪按比例** | 按宽高比裁剪 |
|
||||
| **图像裁剪(主体保护)** | 基于遮罩保护主体的智能裁剪 |
|
||||
| **图像旋转** | 图像旋转(常用角度选择) |
|
||||
| **外补画板(按目标宽高)** | 三合一外补画板 —— 按目标宽高 |
|
||||
| **外补画板(按比例)** | 三合一外补画板 —— 按比例 |
|
||||
| **外补画板(按方向)** | 三合一外补画板 —— 按方向 |
|
||||
|
||||
### 🎨 排版 & 拼版
|
||||
|
||||
| 节点名称 | 说明 |
|
||||
|---------|------|
|
||||
| **单尺寸排版** | 单尺寸网格/证件照排版 |
|
||||
| **多尺寸混合排版** | 不同尺寸图片混合排版 |
|
||||
| **批量自动排版** | 批量自动排版到指定纸型/DPI |
|
||||
| **身份证自动扶正拼版** | 身份证自动旋转扶正并拼版 |
|
||||
| **图像嵌入** | 将图像嵌入PNG模板指定位置(水印/相框场景) |
|
||||
|
||||
### 🎭 遮罩(Mask)处理
|
||||
|
||||
| 节点名称 | 说明 |
|
||||
|---------|------|
|
||||
| **遮罩检测** | 自动检测图像生成遮罩 |
|
||||
| **遮罩分析** | 输出遮罩包围盒、面积、中心等信息 |
|
||||
| **遮罩比例计算** | 计算遮罩占图像比例 |
|
||||
| **遮罩对齐v2** | 遮罩与目标位置对齐 V2 |
|
||||
| **遮罩中心对齐** | 按遮罩中心对齐 |
|
||||
| **遮罩裁剪** | 根据遮罩裁剪图像 |
|
||||
| **遮罩裁剪V2** | 通过遮罩裁剪再贴回,解决采样像素偏移问题 |
|
||||
| **裁剪恢复** | 将裁剪后的图像恢复到原坐标 |
|
||||
| **遮罩模糊生长按比例** | 遮罩按比例模糊扩张/收缩 |
|
||||
| **遮罩混合运算** | 遮罩加减乘/交并补等运算 |
|
||||
| **头顶遮罩** | 自动生成头顶扩展遮罩(证件照换装/发型场景) |
|
||||
| **遮罩圆角消除** | 消除遮罩圆角带来的黑边 |
|
||||
| **Seg次序过滤** | Seg 分割次序过滤 |
|
||||
| **图像与遮罩预览** | 图像 + 遮罩实时预览 |
|
||||
| **图像与遮罩描边** | 沿遮罩边缘绘制描边 |
|
||||
|
||||
### 🖼️ 图像处理
|
||||
|
||||
| 节点名称 | 说明 |
|
||||
|---------|------|
|
||||
| **图像对比 视频对比 GH** | 图像/视频滑动对比、自动双拼、左右双拼、上下双拼,支持批次选择 |
|
||||
| **保留遮罩区域移除图像背景** | 保留遮罩内区域,外部背景移除 |
|
||||
| **移除纯色背景 v2** | 自动识别并移除纯色背景 |
|
||||
| **图像合并(遮罩)** | 基于遮罩合成两张图像 |
|
||||
| **图像差异到遮罩** | 两张图像差异生成遮罩 |
|
||||
| **图像添加水印** | 批量添加文字/图片水印 |
|
||||
| **图像组合批次** | 多批次图像合并 |
|
||||
| **自动分割图像** | 根据主体/空白自动切图 |
|
||||
| **图像亮度比较** | 比较图像亮度,输出更亮/更暗分支 |
|
||||
| **肤色差值** | 计算图像肤色差异,可用于肤色一致性判断 |
|
||||
| **主色提取(多版本兼容)** | 提取图像主色调 |
|
||||
| **颜色转换** | HSV/RGB/LAB 等颜色空间互转 |
|
||||
| **常用颜色🔵孤海** | 常用颜色快捷选取 |
|
||||
| **🎨 取色器 / 孤海 取色器(双)** | 图像拾色器(单色/双色) |
|
||||
| **自定义颜色** | 自定义颜色输出 |
|
||||
|
||||
### 👤 人脸 & 证件照
|
||||
|
||||
| 节点名称 | 说明 |
|
||||
|---------|------|
|
||||
| **👤 人脸自动矫正** | 基于关键点自动矫正人脸角度 |
|
||||
| **面部对齐** | 双眼水平对齐,标准脸对齐 |
|
||||
| **证件照裁剪** | 按证件照规范(头肩比/位置)自动裁剪 |
|
||||
| **证件照服装发型** | 证件照服装/发型切换(内置男女士西装、马甲、衬衫、减龄上衣等几十套模板) |
|
||||
| **结婚登记照服装** | 结婚登记照服装切换模板 |
|
||||
| **证件照简易提示词** | 一键生成证件照常用提示词 |
|
||||
| **ID信息** | 身份证文字信息节点 |
|
||||
| **ID证生成器** | 身份证图片生成/排版节点 |
|
||||
|
||||
|
||||
### 🧰 通用小工具
|
||||
|
||||
| 节点名称 | 说明 |
|
||||
|---------|------|
|
||||
| **孤海万能滑条** | 通用整数/浮点滑条,动态范围 |
|
||||
| **孤海-浮点滑条 / 孤海-浮点滑条 0-2** | 浮点滑条(0–1 / 0–2) |
|
||||
| **布尔 孤海** | 布尔开关 |
|
||||
| **孤海-效果切换** | 多效果分支切换(N 选 1) |
|
||||
| **数学运算 孤海** | 加减乘除/混合数学运算/支持三元表达式 |
|
||||
|
||||
---
|
||||
|
||||
## ✨ 特色能力速览
|
||||
|
||||
### 📁 文件夹批处理
|
||||
- 快速加载整个文件夹图片、自动索引、自动统计
|
||||
- 配合 **批处理进度条 🐋** 直观显示当前处理进度
|
||||
- 自动新建输出目录,跨平台路径斜杠自动修正
|
||||
|
||||
### 💾 智能保存
|
||||
- 支持 **JPG 指定 DPI**(打印/证件照常用 300dpi)
|
||||
- 高级保存支持自定义压缩、元数据、命名规则
|
||||
|
||||
### 🎨 自动排版
|
||||
- **单尺寸 / 多尺寸混合 / 批量自动** 三种排版模式
|
||||
- 适配 A4/A5/6 寸等纸型,自动拼版到打印规格
|
||||
- 身份证自动扶正并排版到标准身份证模板
|
||||
|
||||
### 👤 人脸 & 证件照生产流
|
||||
- 人脸检测 → 面部对齐 → 证件照裁剪 → 服装/发型替换 → 自动排版一条龙
|
||||
- 内置女士西装/马甲/衬衫/减龄上衣、结婚登记照等 **几十套服装模板**(见 `image/ID_Photo/` 目录)
|
||||
- 人脸自动矫正 + 肤色差值 + 头顶遮罩扩展,保证换装/换发型自然
|
||||
|
||||
### 🎭 遮罩全家桶
|
||||
- 检测 → 分析 → 生长 → 模糊 → 对齐 → 裁剪 → 恢复 → 混合运算,覆盖绝大部分遮罩场景
|
||||
- 主体保护裁剪、保留遮罩区域抠背景、图像差异生成遮罩等进阶能力
|
||||
|
||||
### 🌈 颜色 & 取色
|
||||
- 取色器、常用色板、颜色空间转换、主色提取,配色/色偏校正场景常用
|
||||
|
||||
### 🖼️ 图像/视频对比
|
||||
- 支持滑动对比、自动双拼、左右双拼、上下双拼
|
||||
- 支持图像和视频预览、视频播放/暂停及进度控制
|
||||
- 双拼模式支持 Alt+滚轮缩放、Alt+左键框内平移,视频支持全屏对比
|
||||
- 批次输入可选择前 10 张图像分别对比
|
||||
- 自动调用输入文件进行预览,无需在 temp 目录新增文件
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ 安装
|
||||
|
||||
### 方法一:Git 克隆(推荐,便于后续更新)
|
||||
|
||||
```bash
|
||||
cd ComfyUI/custom_nodes/
|
||||
git clone https://github.com/goohai/Goohaitools-comfyui.git
|
||||
cd Goohaitools-comfyui
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
重启 ComfyUI 即可。
|
||||
|
||||
|
||||
### 方法二:手动下载
|
||||
|
||||
下载 Goohaitools-comfyui ZIP 包
|
||||
解压到 ComfyUI/custom_nodes/ 目录,确保目录名为 Goohaitools-comfyui
|
||||
进入该目录执行 pip install -r requirements.txt
|
||||
重启 ComfyUI
|
||||
|
||||
requirements.txt 主要依赖:
|
||||
|
||||
opencv-python / scipy / scikit-image / matplotlib:图像处理核心
|
||||
mediapipe>=0.10.20:人脸/关键点检测
|
||||
dlib-bin>=19.24.6:人脸 5 点关键点模型(仓库已内置 shape_predictor_5_face_landmarks.dat)
|
||||
若使用国内网络 pip 安装慢,requirements 已默认配置清华镜像源(-i https://pypi.tuna.tsinghua.edu.cn/simple)。
|
||||
|
||||
## 🔧 前端扩展组件
|
||||
|
||||
本插件在 web/js/ 下提供多个前端 Widget 增强:
|
||||
|
||||
BOOLEAN.js 布尔开关组件
|
||||
GoohaiNote.js 节点备注/便签
|
||||
colorWidget.js 颜色取色器 Widget
|
||||
goohai_universal_slider.js 万能滑条前端交互
|
||||
gh_image_video_comparer.js 图像/视频对比预览
|
||||
id_photo_clothing.js / marry.js 证件照、结婚登记照服装选择前端组件
|
||||
启用后部分节点(取色器、万能滑条、服装切换等)会有更友好的交互 UI。
|
||||
|
||||
|
||||
## 📝 许可证
|
||||
|
||||
本项目采用开源协议发布,欢迎 Star、Fork、PR。
|
||||
|
||||
💬 反馈 & 交流
|
||||
📺 B 站(视频教程 / 工作流演示):孤海B
|
||||
🐛 GitHub Issues:提 Bug & 需求
|
||||
💡 如有问题、想要新增的功能或节点建议,欢迎在 GitHub 提 Issue 或 B 站私信;觉得好用的话,欢迎给仓库点个 Star ⭐。
|
||||
@@ -0,0 +1,49 @@
|
||||
import os
|
||||
import importlib.util
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# 获取当前包目录的路径
|
||||
current_dir = Path(__file__).parent
|
||||
nodes_dir = current_dir / "nodes"
|
||||
|
||||
# 设置WEB目录路径 - 这是关键配置
|
||||
WEB_DIRECTORY = "./web"
|
||||
|
||||
# 初始化全局映射字典
|
||||
NODE_CLASS_MAPPINGS = {}
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {}
|
||||
|
||||
# 遍历nodes目录中的所有Python文件
|
||||
for file_path in nodes_dir.glob("*.py"):
|
||||
# 跳过__init__.py文件
|
||||
if file_path.name == "__init__.py":
|
||||
continue
|
||||
|
||||
# 提取模块名(不含.py后缀)
|
||||
module_name = file_path.stem
|
||||
|
||||
# 使用importlib动态加载模块
|
||||
spec = importlib.util.spec_from_file_location(f"goohaitools.nodes.{module_name}", file_path)
|
||||
module = importlib.util.module_from_spec(spec)
|
||||
|
||||
try:
|
||||
# 执行模块代码
|
||||
spec.loader.exec_module(module)
|
||||
|
||||
# 检查并合并NODE_CLASS_MAPPINGS
|
||||
if hasattr(module, 'NODE_CLASS_MAPPINGS'):
|
||||
NODE_CLASS_MAPPINGS.update(module.NODE_CLASS_MAPPINGS)
|
||||
|
||||
# 检查并合并NODE_DISPLAY_NAME_MAPPINGS
|
||||
if hasattr(module, 'NODE_DISPLAY_NAME_MAPPINGS'):
|
||||
NODE_DISPLAY_NAME_MAPPINGS.update(module.NODE_DISPLAY_NAME_MAPPINGS)
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error loading node module {module_name}: {str(e)}")
|
||||
continue
|
||||
|
||||
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS', 'WEB_DIRECTORY']
|
||||
|
||||
# 打印加载信息
|
||||
print(f'\033[92m[GoohaiTools]\033[0m \033[93m{len(NODE_CLASS_MAPPINGS)} nodes\033[0m loaded | \033[94mColorWidget enabled\033[0m')
|
||||
@@ -0,0 +1,23 @@
|
||||
class IgnoreGroupsGuHai:
|
||||
"""忽略多组 孤海 — 通过开关控制工作流中各编组的忽略/旁路状态"""
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {"required": {}}
|
||||
|
||||
RETURN_TYPES = ()
|
||||
FUNCTION = "execute"
|
||||
CATEGORY = "孤海工具箱"
|
||||
OUTPUT_NODE = True
|
||||
|
||||
def execute(self):
|
||||
return ()
|
||||
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
"忽略多组孤海": IgnoreGroupsGuHai,
|
||||
}
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"忽略多组孤海": "忽略多组 孤海",
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,32 @@
|
||||
[
|
||||
{
|
||||
"id": "vosr",
|
||||
"repo": "ylchen333/ComfyUI-VOSR2",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc"
|
||||
},
|
||||
{
|
||||
"id": "core",
|
||||
"repo": "Comfy-Org/ComfyUI",
|
||||
"commit": "856a922befab9d94cb66f36a3dce17234d7a6e31"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"repo": "Comfy-Org/ComfyUI_frontend",
|
||||
"commit": "71d2f2f2b5c6da9dee281836b5b72f3af368966f"
|
||||
},
|
||||
{
|
||||
"id": "rgthree",
|
||||
"repo": "rgthree/rgthree-comfy",
|
||||
"commit": "2c5342a8cb0eaecaabf61435a5f37dd594c510ba"
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"repo": "Kosinkadink/ComfyUI-VideoHelperSuite",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1"
|
||||
},
|
||||
{
|
||||
"id": "guhai",
|
||||
"repo": "goohai/Goohaitools-comfyui",
|
||||
"commit": "4e11bd3b8471102eef1cadd809c79c94dc8001ee"
|
||||
}
|
||||
]
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 Regis Gaughan, III (rgthree)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,115 @@
|
||||
"""
|
||||
@author: rgthree
|
||||
@title: Comfy Nodes
|
||||
@nickname: rgthree
|
||||
@description: A bunch of nodes I created that I also find useful.
|
||||
"""
|
||||
|
||||
from glob import glob
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
import re
|
||||
import random
|
||||
|
||||
import execution
|
||||
|
||||
from .py.log import log, log_known_message
|
||||
from .py.config import get_config_value
|
||||
from .py.server.rgthree_server import *
|
||||
|
||||
from .py.context import RgthreeContext
|
||||
from .py.context_switch import RgthreeContextSwitch
|
||||
from .py.context_switch_big import RgthreeContextSwitchBig
|
||||
from .py.display_any import RgthreeDisplayAny, RgthreeDisplayInt
|
||||
from .py.lora_stack import RgthreeLoraLoaderStack
|
||||
from .py.seed import RgthreeSeed
|
||||
from .py.sdxl_empty_latent_image import RgthreeSDXLEmptyLatentImage
|
||||
from .py.power_prompt import RgthreePowerPrompt
|
||||
from .py.power_prompt_simple import RgthreePowerPromptSimple
|
||||
from .py.image_inset_crop import RgthreeImageInsetCrop
|
||||
from .py.context_big import RgthreeBigContext
|
||||
from .py.dynamic_context import RgthreeDynamicContext
|
||||
from .py.dynamic_context_switch import RgthreeDynamicContextSwitch
|
||||
from .py.ksampler_config import RgthreeKSamplerConfig
|
||||
from .py.sdxl_power_prompt_postive import RgthreeSDXLPowerPromptPositive
|
||||
from .py.sdxl_power_prompt_simple import RgthreeSDXLPowerPromptSimple
|
||||
from .py.any_switch import RgthreeAnySwitch
|
||||
from .py.context_merge import RgthreeContextMerge
|
||||
from .py.context_merge_big import RgthreeContextMergeBig
|
||||
from .py.image_comparer import RgthreeImageComparer
|
||||
from .py.power_lora_loader import RgthreePowerLoraLoader
|
||||
from .py.power_primitive import RgthreePowerPrimitive
|
||||
from .py.image_or_latent_size import RgthreeImageOrLatentSize
|
||||
from .py.image_resize import RgthreeImageResize
|
||||
from .py.power_puter import RgthreePowerPuter
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
RgthreeBigContext.NAME: RgthreeBigContext,
|
||||
RgthreeContext.NAME: RgthreeContext,
|
||||
RgthreeContextSwitch.NAME: RgthreeContextSwitch,
|
||||
RgthreeContextSwitchBig.NAME: RgthreeContextSwitchBig,
|
||||
RgthreeContextMerge.NAME: RgthreeContextMerge,
|
||||
RgthreeContextMergeBig.NAME: RgthreeContextMergeBig,
|
||||
RgthreeDisplayInt.NAME: RgthreeDisplayInt,
|
||||
RgthreeDisplayAny.NAME: RgthreeDisplayAny,
|
||||
RgthreeLoraLoaderStack.NAME: RgthreeLoraLoaderStack,
|
||||
RgthreeSeed.NAME: RgthreeSeed,
|
||||
RgthreeImageInsetCrop.NAME: RgthreeImageInsetCrop,
|
||||
RgthreePowerPrompt.NAME: RgthreePowerPrompt,
|
||||
RgthreePowerPromptSimple.NAME: RgthreePowerPromptSimple,
|
||||
RgthreeKSamplerConfig.NAME: RgthreeKSamplerConfig,
|
||||
RgthreeSDXLEmptyLatentImage.NAME: RgthreeSDXLEmptyLatentImage,
|
||||
RgthreeSDXLPowerPromptPositive.NAME: RgthreeSDXLPowerPromptPositive,
|
||||
RgthreeSDXLPowerPromptSimple.NAME: RgthreeSDXLPowerPromptSimple,
|
||||
RgthreeAnySwitch.NAME: RgthreeAnySwitch,
|
||||
RgthreeImageComparer.NAME: RgthreeImageComparer,
|
||||
RgthreePowerLoraLoader.NAME: RgthreePowerLoraLoader,
|
||||
RgthreePowerPrimitive.NAME: RgthreePowerPrimitive,
|
||||
RgthreeImageOrLatentSize.NAME: RgthreeImageOrLatentSize,
|
||||
RgthreeImageResize.NAME: RgthreeImageResize,
|
||||
RgthreePowerPuter.NAME: RgthreePowerPuter,
|
||||
}
|
||||
|
||||
if get_config_value('unreleased.dynamic_context.enabled') is True:
|
||||
NODE_CLASS_MAPPINGS[RgthreeDynamicContext.NAME] = RgthreeDynamicContext
|
||||
NODE_CLASS_MAPPINGS[RgthreeDynamicContextSwitch.NAME] = RgthreeDynamicContextSwitch
|
||||
|
||||
# WEB_DIRECTORY is the comfyui nodes directory that ComfyUI will link and auto-load.
|
||||
WEB_DIRECTORY = "./web/comfyui"
|
||||
|
||||
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
DIR_WEB = os.path.abspath(os.path.join(THIS_DIR, WEB_DIRECTORY))
|
||||
DIR_PY = os.path.abspath(os.path.join(THIS_DIR, 'py'))
|
||||
|
||||
# remove old directories
|
||||
OLD_DIRS = [
|
||||
os.path.abspath(os.path.join(THIS_DIR, '..', '..', 'web', 'extensions', 'rgthree')),
|
||||
os.path.abspath(os.path.join(THIS_DIR, '..', '..', 'web', 'extensions', 'rgthree-comfy')),
|
||||
]
|
||||
for old_dir in OLD_DIRS:
|
||||
if os.path.exists(old_dir):
|
||||
shutil.rmtree(old_dir)
|
||||
|
||||
__all__ = ['NODE_CLASS_MAPPINGS', 'WEB_DIRECTORY']
|
||||
|
||||
NOT_NODES = ['constants', 'log', 'utils', 'rgthree', 'rgthree_server', 'image_clipbaord', 'config']
|
||||
|
||||
nodes = []
|
||||
for file in glob(os.path.join(DIR_PY, '*.py')) + glob(os.path.join(DIR_WEB, '*.js')):
|
||||
name = os.path.splitext(os.path.basename(file))[0]
|
||||
if name in NOT_NODES or name in nodes:
|
||||
continue
|
||||
if name.startswith('_') or name.startswith('base') or 'utils' in name:
|
||||
continue
|
||||
nodes.append(name)
|
||||
if name == 'display_any':
|
||||
nodes.append('display_int')
|
||||
|
||||
print()
|
||||
adjs = ['exciting', 'extraordinary', 'epic', 'fantastic', 'magnificent']
|
||||
log(f'Loaded {len(nodes)} {random.choice(adjs)} nodes. 🎉', color='BRIGHT_GREEN')
|
||||
print()
|
||||
|
||||
if get_config_value('announcements.comfy-nodes-20.incompatible', True):
|
||||
log_known_message('NODES2.0')
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
NAMESPACE='rgthree'
|
||||
|
||||
def get_name(name):
|
||||
return '{} ({})'.format(name, NAMESPACE)
|
||||
|
||||
def get_category(sub_dirs = None):
|
||||
if sub_dirs is None:
|
||||
return NAMESPACE
|
||||
else:
|
||||
return "{}/utils".format(NAMESPACE)
|
||||
@@ -0,0 +1,42 @@
|
||||
from nodes import PreviewImage
|
||||
|
||||
from .constants import get_category, get_name
|
||||
|
||||
|
||||
class RgthreeImageComparer(PreviewImage):
|
||||
"""A node that compares two images in the UI."""
|
||||
|
||||
NAME = get_name('Image Comparer')
|
||||
CATEGORY = get_category()
|
||||
FUNCTION = "compare_images"
|
||||
DESCRIPTION = "Compares two images with a hover slider, or click from properties."
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls): # pylint: disable = invalid-name, missing-function-docstring
|
||||
return {
|
||||
"required": {},
|
||||
"optional": {
|
||||
"image_a": ("IMAGE",),
|
||||
"image_b": ("IMAGE",),
|
||||
},
|
||||
"hidden": {
|
||||
"prompt": "PROMPT",
|
||||
"extra_pnginfo": "EXTRA_PNGINFO"
|
||||
},
|
||||
}
|
||||
|
||||
def compare_images(self,
|
||||
image_a=None,
|
||||
image_b=None,
|
||||
filename_prefix="rgthree.compare.",
|
||||
prompt=None,
|
||||
extra_pnginfo=None):
|
||||
|
||||
result = { "ui": { "a_images":[], "b_images": [] } }
|
||||
if image_a is not None and len(image_a) > 0:
|
||||
result['ui']['a_images'] = self.save_images(image_a, filename_prefix, prompt, extra_pnginfo)['ui']['images']
|
||||
|
||||
if image_b is not None and len(image_b) > 0:
|
||||
result['ui']['b_images'] = self.save_images(image_b, filename_prefix, prompt, extra_pnginfo)['ui']['images']
|
||||
|
||||
return result
|
||||
@@ -0,0 +1,365 @@
|
||||
import { app } from "../../scripts/app.js";
|
||||
import { api } from "../../scripts/api.js";
|
||||
import { RgthreeBaseServerNode } from "./base_node.js";
|
||||
import { NodeTypesString } from "./constants.js";
|
||||
import { addConnectionLayoutSupport } from "./utils.js";
|
||||
import { RgthreeBaseWidget } from "./utils_widgets.js";
|
||||
import { measureText } from "./utils_canvas.js";
|
||||
function imageDataToUrl(data) {
|
||||
return api.apiURL(`/view?filename=${encodeURIComponent(data.filename)}&type=${data.type}&subfolder=${data.subfolder}${app.getPreviewFormatParam()}${app.getRandParam()}`);
|
||||
}
|
||||
export class RgthreeImageComparer extends RgthreeBaseServerNode {
|
||||
constructor(title = RgthreeImageComparer.title) {
|
||||
super(title);
|
||||
this.imageIndex = 0;
|
||||
this.imgs = [];
|
||||
this.serialize_widgets = true;
|
||||
this.isPointerDown = false;
|
||||
this.isPointerOver = false;
|
||||
this.pointerOverPos = [0, 0];
|
||||
this.canvasWidget = null;
|
||||
this.properties["comparer_mode"] = "Slide";
|
||||
}
|
||||
onExecuted(output) {
|
||||
var _a;
|
||||
(_a = super.onExecuted) === null || _a === void 0 ? void 0 : _a.call(this, output);
|
||||
if ("images" in output) {
|
||||
this.canvasWidget.value = {
|
||||
images: (output.images || []).map((d, i) => {
|
||||
return {
|
||||
name: i === 0 ? "A" : "B",
|
||||
selected: true,
|
||||
url: imageDataToUrl(d),
|
||||
};
|
||||
}),
|
||||
};
|
||||
}
|
||||
else {
|
||||
output.a_images = output.a_images || [];
|
||||
output.b_images = output.b_images || [];
|
||||
const imagesToChoose = [];
|
||||
const multiple = output.a_images.length + output.b_images.length > 2;
|
||||
for (const [i, d] of output.a_images.entries()) {
|
||||
imagesToChoose.push({
|
||||
name: output.a_images.length > 1 || multiple ? `A${i + 1}` : "A",
|
||||
selected: i === 0,
|
||||
url: imageDataToUrl(d),
|
||||
});
|
||||
}
|
||||
for (const [i, d] of output.b_images.entries()) {
|
||||
imagesToChoose.push({
|
||||
name: output.b_images.length > 1 || multiple ? `B${i + 1}` : "B",
|
||||
selected: i === 0,
|
||||
url: imageDataToUrl(d),
|
||||
});
|
||||
}
|
||||
this.canvasWidget.value = { images: imagesToChoose };
|
||||
}
|
||||
}
|
||||
onSerialize(serialised) {
|
||||
var _a;
|
||||
super.onSerialize && super.onSerialize(serialised);
|
||||
for (let [index, widget_value] of (serialised.widgets_values || []).entries()) {
|
||||
if (((_a = this.widgets[index]) === null || _a === void 0 ? void 0 : _a.name) === "rgthree_comparer") {
|
||||
serialised.widgets_values[index] = this.widgets[index].value.images.map((d) => {
|
||||
d = { ...d };
|
||||
delete d.img;
|
||||
return d;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
onNodeCreated() {
|
||||
this.canvasWidget = this.addCustomWidget(new RgthreeImageComparerWidget("rgthree_comparer", this));
|
||||
this.setSize(this.computeSize());
|
||||
this.setDirtyCanvas(true, true);
|
||||
}
|
||||
setIsPointerDown(down = this.isPointerDown) {
|
||||
const newIsDown = down && !!app.canvas.pointer_is_down;
|
||||
if (this.isPointerDown !== newIsDown) {
|
||||
this.isPointerDown = newIsDown;
|
||||
this.setDirtyCanvas(true, false);
|
||||
}
|
||||
this.imageIndex = this.isPointerDown ? 1 : 0;
|
||||
if (this.isPointerDown) {
|
||||
requestAnimationFrame(() => {
|
||||
this.setIsPointerDown();
|
||||
});
|
||||
}
|
||||
}
|
||||
onMouseDown(event, pos, canvas) {
|
||||
var _a;
|
||||
(_a = super.onMouseDown) === null || _a === void 0 ? void 0 : _a.call(this, event, pos, canvas);
|
||||
this.setIsPointerDown(true);
|
||||
return false;
|
||||
}
|
||||
onMouseEnter(event) {
|
||||
var _a;
|
||||
(_a = super.onMouseEnter) === null || _a === void 0 ? void 0 : _a.call(this, event);
|
||||
this.setIsPointerDown(!!app.canvas.pointer_is_down);
|
||||
this.isPointerOver = true;
|
||||
}
|
||||
onMouseLeave(event) {
|
||||
var _a;
|
||||
(_a = super.onMouseLeave) === null || _a === void 0 ? void 0 : _a.call(this, event);
|
||||
this.setIsPointerDown(false);
|
||||
this.isPointerOver = false;
|
||||
}
|
||||
onMouseMove(event, pos, canvas) {
|
||||
var _a;
|
||||
(_a = super.onMouseMove) === null || _a === void 0 ? void 0 : _a.call(this, event, pos, canvas);
|
||||
this.pointerOverPos = [...pos];
|
||||
this.imageIndex = this.pointerOverPos[0] > this.size[0] / 2 ? 1 : 0;
|
||||
}
|
||||
getHelp() {
|
||||
return `
|
||||
<p>
|
||||
The ${this.type.replace("(rgthree)", "")} node compares two images on top of each other.
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
<strong>Notes</strong>
|
||||
</p>
|
||||
<ul>
|
||||
<li><p>
|
||||
The right-click menu may show image options (Open Image, Save Image, etc.) which will
|
||||
correspond to the first image (image_a) if clicked on the left-half of the node, or
|
||||
the second image if on the right half of the node.
|
||||
</p></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
<strong>Inputs</strong>
|
||||
</p>
|
||||
<ul>
|
||||
<li><p>
|
||||
<code>image_a</code> <i>Optional.</i> The first image to use to compare.
|
||||
image_a.
|
||||
</p></li>
|
||||
<li><p>
|
||||
<code>image_b</code> <i>Optional.</i> The second image to use to compare.
|
||||
</p></li>
|
||||
<li><p>
|
||||
<b>Note</b> <code>image_a</code> and <code>image_b</code> work best when a single
|
||||
image is provided. However, if each/either are a batch, you can choose which item
|
||||
from each batch are chosen to be compared. If either <code>image_a</code> or
|
||||
<code>image_b</code> are not provided, the node will choose the first two from the
|
||||
provided input if it's a batch, otherwise only show the single image (just as
|
||||
Preview Image would).
|
||||
</p></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
<strong>Properties.</strong> You can change the following properties (by right-clicking
|
||||
on the node, and select "Properties" or "Properties Panel" from the menu):
|
||||
</p>
|
||||
<ul>
|
||||
<li><p>
|
||||
<code>comparer_mode</code> - Choose between "Slide" and "Click". Defaults to "Slide".
|
||||
</p></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>`;
|
||||
}
|
||||
static setUp(comfyClass, nodeData) {
|
||||
RgthreeBaseServerNode.registerForOverride(comfyClass, nodeData, RgthreeImageComparer);
|
||||
}
|
||||
static onRegisteredForOverride(comfyClass) {
|
||||
addConnectionLayoutSupport(RgthreeImageComparer, app, [
|
||||
["Left", "Right"],
|
||||
["Right", "Left"],
|
||||
]);
|
||||
setTimeout(() => {
|
||||
RgthreeImageComparer.category = comfyClass.category;
|
||||
});
|
||||
}
|
||||
}
|
||||
RgthreeImageComparer.title = NodeTypesString.IMAGE_COMPARER;
|
||||
RgthreeImageComparer.type = NodeTypesString.IMAGE_COMPARER;
|
||||
RgthreeImageComparer.comfyClass = NodeTypesString.IMAGE_COMPARER;
|
||||
RgthreeImageComparer["@comparer_mode"] = {
|
||||
type: "combo",
|
||||
values: ["Slide", "Click"],
|
||||
};
|
||||
class RgthreeImageComparerWidget extends RgthreeBaseWidget {
|
||||
constructor(name, node) {
|
||||
super(name);
|
||||
this.type = "custom";
|
||||
this.hitAreas = {};
|
||||
this.selected = [];
|
||||
this._value = { images: [] };
|
||||
this.node = node;
|
||||
}
|
||||
set value(v) {
|
||||
let cleanedVal;
|
||||
if (Array.isArray(v)) {
|
||||
cleanedVal = v.map((d, i) => {
|
||||
if (!d || typeof d === "string") {
|
||||
d = { url: d, name: i == 0 ? "A" : "B", selected: true };
|
||||
}
|
||||
return d;
|
||||
});
|
||||
}
|
||||
else {
|
||||
cleanedVal = v.images || [];
|
||||
}
|
||||
if (cleanedVal.length > 2) {
|
||||
const hasAAndB = cleanedVal.some((i) => i.name.startsWith("A")) &&
|
||||
cleanedVal.some((i) => i.name.startsWith("B"));
|
||||
if (!hasAAndB) {
|
||||
cleanedVal = [cleanedVal[0], cleanedVal[1]];
|
||||
}
|
||||
}
|
||||
let selected = cleanedVal.filter((d) => d.selected);
|
||||
if (!selected.length && cleanedVal.length) {
|
||||
cleanedVal[0].selected = true;
|
||||
}
|
||||
selected = cleanedVal.filter((d) => d.selected);
|
||||
if (selected.length === 1 && cleanedVal.length > 1) {
|
||||
cleanedVal.find((d) => !d.selected).selected = true;
|
||||
}
|
||||
this._value.images = cleanedVal;
|
||||
selected = cleanedVal.filter((d) => d.selected);
|
||||
this.setSelected(selected);
|
||||
}
|
||||
get value() {
|
||||
return this._value;
|
||||
}
|
||||
setSelected(selected) {
|
||||
this._value.images.forEach((d) => (d.selected = false));
|
||||
this.node.imgs.length = 0;
|
||||
for (const sel of selected) {
|
||||
if (!sel.img) {
|
||||
sel.img = new Image();
|
||||
sel.img.src = sel.url;
|
||||
this.node.imgs.push(sel.img);
|
||||
}
|
||||
sel.selected = true;
|
||||
}
|
||||
this.selected = selected;
|
||||
}
|
||||
draw(ctx, node, width, y) {
|
||||
var _a;
|
||||
this.hitAreas = {};
|
||||
if (this.value.images.length > 2) {
|
||||
ctx.textAlign = "left";
|
||||
ctx.textBaseline = "top";
|
||||
ctx.font = `14px Arial`;
|
||||
const drawData = [];
|
||||
const spacing = 5;
|
||||
let x = 0;
|
||||
for (const img of this.value.images) {
|
||||
const width = measureText(ctx, img.name);
|
||||
drawData.push({
|
||||
img,
|
||||
text: img.name,
|
||||
x,
|
||||
width: measureText(ctx, img.name),
|
||||
});
|
||||
x += width + spacing;
|
||||
}
|
||||
x = (node.size[0] - (x - spacing)) / 2;
|
||||
for (const d of drawData) {
|
||||
ctx.fillStyle = d.img.selected ? "rgba(180, 180, 180, 1)" : "rgba(180, 180, 180, 0.5)";
|
||||
ctx.fillText(d.text, x, y);
|
||||
this.hitAreas[d.text] = {
|
||||
bounds: [x, y, d.width, 14],
|
||||
data: d.img,
|
||||
onDown: this.onSelectionDown,
|
||||
};
|
||||
x += d.width + spacing;
|
||||
}
|
||||
y += 20;
|
||||
}
|
||||
if (((_a = node.properties) === null || _a === void 0 ? void 0 : _a["comparer_mode"]) === "Click") {
|
||||
this.drawImage(ctx, this.selected[this.node.isPointerDown ? 1 : 0], y);
|
||||
}
|
||||
else {
|
||||
this.drawImage(ctx, this.selected[0], y);
|
||||
if (node.isPointerOver) {
|
||||
this.drawImage(ctx, this.selected[1], y, this.node.pointerOverPos[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
onSelectionDown(event, pos, node, bounds) {
|
||||
const selected = [...this.selected];
|
||||
if (bounds === null || bounds === void 0 ? void 0 : bounds.data.name.startsWith("A")) {
|
||||
selected[0] = bounds.data;
|
||||
}
|
||||
else if (bounds === null || bounds === void 0 ? void 0 : bounds.data.name.startsWith("B")) {
|
||||
selected[1] = bounds.data;
|
||||
}
|
||||
this.setSelected(selected);
|
||||
}
|
||||
drawImage(ctx, image, y, cropX) {
|
||||
var _a, _b;
|
||||
if (!((_a = image === null || image === void 0 ? void 0 : image.img) === null || _a === void 0 ? void 0 : _a.naturalWidth) || !((_b = image === null || image === void 0 ? void 0 : image.img) === null || _b === void 0 ? void 0 : _b.naturalHeight)) {
|
||||
return;
|
||||
}
|
||||
let [nodeWidth, nodeHeight] = this.node.size;
|
||||
const imageAspect = (image === null || image === void 0 ? void 0 : image.img.naturalWidth) / (image === null || image === void 0 ? void 0 : image.img.naturalHeight);
|
||||
let height = nodeHeight - y;
|
||||
const widgetAspect = nodeWidth / height;
|
||||
let targetWidth, targetHeight;
|
||||
let offsetX = 0;
|
||||
if (imageAspect > widgetAspect) {
|
||||
targetWidth = nodeWidth;
|
||||
targetHeight = nodeWidth / imageAspect;
|
||||
}
|
||||
else {
|
||||
targetHeight = height;
|
||||
targetWidth = height * imageAspect;
|
||||
offsetX = (nodeWidth - targetWidth) / 2;
|
||||
}
|
||||
const widthMultiplier = (image === null || image === void 0 ? void 0 : image.img.naturalWidth) / targetWidth;
|
||||
const sourceX = 0;
|
||||
const sourceY = 0;
|
||||
const sourceWidth = cropX != null ? (cropX - offsetX) * widthMultiplier : image === null || image === void 0 ? void 0 : image.img.naturalWidth;
|
||||
const sourceHeight = image === null || image === void 0 ? void 0 : image.img.naturalHeight;
|
||||
const destX = (nodeWidth - targetWidth) / 2;
|
||||
const destY = y + (height - targetHeight) / 2;
|
||||
const destWidth = cropX != null ? cropX - offsetX : targetWidth;
|
||||
const destHeight = targetHeight;
|
||||
ctx.save();
|
||||
ctx.beginPath();
|
||||
let globalCompositeOperation = ctx.globalCompositeOperation;
|
||||
if (cropX) {
|
||||
ctx.rect(destX, destY, destWidth, destHeight);
|
||||
ctx.clip();
|
||||
}
|
||||
ctx.drawImage(image === null || image === void 0 ? void 0 : image.img, sourceX, sourceY, sourceWidth, sourceHeight, destX, destY, destWidth, destHeight);
|
||||
if (cropX != null && cropX >= (nodeWidth - targetWidth) / 2 && cropX <= targetWidth + offsetX) {
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(cropX, destY);
|
||||
ctx.lineTo(cropX, destY + destHeight);
|
||||
ctx.globalCompositeOperation = "difference";
|
||||
ctx.strokeStyle = "rgba(255,255,255, 1)";
|
||||
ctx.stroke();
|
||||
}
|
||||
ctx.globalCompositeOperation = globalCompositeOperation;
|
||||
ctx.restore();
|
||||
}
|
||||
computeSize(width) {
|
||||
return [width, 20];
|
||||
}
|
||||
serializeValue(node, index) {
|
||||
const v = [];
|
||||
for (const data of this._value.images) {
|
||||
const d = { ...data };
|
||||
delete d.img;
|
||||
v.push(d);
|
||||
}
|
||||
return { images: v };
|
||||
}
|
||||
}
|
||||
app.registerExtension({
|
||||
name: "rgthree.ImageComparer",
|
||||
async beforeRegisterNodeDef(nodeType, nodeData) {
|
||||
if (nodeData.name === RgthreeImageComparer.type) {
|
||||
RgthreeImageComparer.setUp(nodeType, nodeData);
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,301 @@
|
||||
{
|
||||
"sources": [
|
||||
{
|
||||
"id": "vosr",
|
||||
"file": "__init__.py",
|
||||
"local_file": "vosr____init__.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/__init__.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "4da7ceb543f7ad94b9207df61733ab083471071f4e0ebcbdd600b71bd43a65f3",
|
||||
"git_blob_sha1": "5e1fd16823138a5e78531927ff563a545c0cbc91"
|
||||
},
|
||||
{
|
||||
"id": "vosr",
|
||||
"file": "nodes_vosr.py",
|
||||
"local_file": "vosr__nodes_vosr.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/nodes_vosr.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "ee4712cd8ea94d5c70e2f13913c2e775673021dce3f42a954ffea2d6b11a4645",
|
||||
"git_blob_sha1": "c559e834e45646ee6f6aaa6f3ccd59a9536cdf1b"
|
||||
},
|
||||
{
|
||||
"id": "vosr",
|
||||
"file": "loader.py",
|
||||
"local_file": "vosr__loader.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/loader.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "629cc249598001d44bb7516f5f0f9d8d7fc2685aebf3a254e9c2c81811dac196",
|
||||
"git_blob_sha1": "9dd229cc8203a02e628b900af4253dbce2bc997d"
|
||||
},
|
||||
{
|
||||
"id": "vosr",
|
||||
"file": "inference.py",
|
||||
"local_file": "vosr__inference.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/inference.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "4b050e154dc9dfde775b2537b6b35b102d8f0a84a0b27d488050305391212a73",
|
||||
"git_blob_sha1": "ccbcfd4afab0ba4dac4ff003f9c2250ebeb8bf27"
|
||||
},
|
||||
{
|
||||
"id": "vosr",
|
||||
"file": "color.py",
|
||||
"local_file": "vosr__color.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/color.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "9154368749c0d77bcdecb649c9534958a9a2c3a81c1d5045330e2e6062f69aa2",
|
||||
"git_blob_sha1": "a6e60a408d49873b5408fb305dee919ac1a4fc5a"
|
||||
},
|
||||
{
|
||||
"id": "vosr",
|
||||
"file": "tiled_vae.py",
|
||||
"local_file": "vosr__tiled_vae.py",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/tiled_vae.py",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "3540cae5ac7680df23f07ac49078a4aad1d107bd193adb56aac278bfa6a0c0ad",
|
||||
"git_blob_sha1": "380fb39798c2900dd3f7e2b6ce84026f4c09556e"
|
||||
},
|
||||
{
|
||||
"id": "vosr",
|
||||
"file": "LICENSE",
|
||||
"local_file": "vosr__LICENSE",
|
||||
"url": "https://raw.githubusercontent.com/ylchen333/ComfyUI-VOSR2/c9450b611e6b0e854212b81fecde2da5d088c1bc/LICENSE",
|
||||
"commit": "c9450b611e6b0e854212b81fecde2da5d088c1bc",
|
||||
"sha256": "de4d0a8b95787defcc0ccaaa783e77750c243f3f0d29f75a7e5e9bf3a5f84863",
|
||||
"git_blob_sha1": "ada5dc2bfdbe0232c59a18747190a14d3c5189ab"
|
||||
},
|
||||
{
|
||||
"id": "core",
|
||||
"file": "nodes.py",
|
||||
"local_file": "core__nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/856a922befab9d94cb66f36a3dce17234d7a6e31/nodes.py",
|
||||
"commit": "856a922befab9d94cb66f36a3dce17234d7a6e31",
|
||||
"sha256": "f7b6a909bf9a47296b974b730e5db0ec2137a3c6a64dda045970951d7382d4c7",
|
||||
"git_blob_sha1": "038b88350daef6b0f3dbcda8d112a6e1655f4887"
|
||||
},
|
||||
{
|
||||
"id": "core",
|
||||
"file": "comfy_extras/nodes_images.py",
|
||||
"local_file": "core__comfy_extras__nodes_images.py",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/856a922befab9d94cb66f36a3dce17234d7a6e31/comfy_extras/nodes_images.py",
|
||||
"commit": "856a922befab9d94cb66f36a3dce17234d7a6e31",
|
||||
"sha256": "c1503a3949530d5708948329e050aa89aedaf739678cdb4084e40d95bea46a60",
|
||||
"git_blob_sha1": "91a3f990c1e1e34e9782f5f2c072ae2c81b1d459"
|
||||
},
|
||||
{
|
||||
"id": "core",
|
||||
"file": "comfy_api/latest/_io.py",
|
||||
"local_file": "core__comfy_api__latest___io.py",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/856a922befab9d94cb66f36a3dce17234d7a6e31/comfy_api/latest/_io.py",
|
||||
"commit": "856a922befab9d94cb66f36a3dce17234d7a6e31",
|
||||
"sha256": "55391c45bee9cfd821c7c86a23ab0f9e12ce9b5b40d77d48308c1d3698ed4080",
|
||||
"git_blob_sha1": "4c062d8aabcfdf056425737d35f153b6a67522f8"
|
||||
},
|
||||
{
|
||||
"id": "core",
|
||||
"file": "folder_paths.py",
|
||||
"local_file": "core__folder_paths.py",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/856a922befab9d94cb66f36a3dce17234d7a6e31/folder_paths.py",
|
||||
"commit": "856a922befab9d94cb66f36a3dce17234d7a6e31",
|
||||
"sha256": "b748be5d1e068ad673f6c4de069fb6b7b723405c40ae3c3c44465d416f7df2db",
|
||||
"git_blob_sha1": "6723e52c867c57003e9ba4ed53ae58f8d79a7752"
|
||||
},
|
||||
{
|
||||
"id": "core",
|
||||
"file": "LICENSE",
|
||||
"local_file": "core__LICENSE",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/856a922befab9d94cb66f36a3dce17234d7a6e31/LICENSE",
|
||||
"commit": "856a922befab9d94cb66f36a3dce17234d7a6e31",
|
||||
"sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
|
||||
"git_blob_sha1": "f288702d2fa16d3cdf0035b15a9fcbc552cd88e7"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"file": "src/scripts/widgets.ts",
|
||||
"local_file": "frontend__src__scripts__widgets.ts",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/71d2f2f2b5c6da9dee281836b5b72f3af368966f/src/scripts/widgets.ts",
|
||||
"commit": "71d2f2f2b5c6da9dee281836b5b72f3af368966f",
|
||||
"sha256": "5f3d26cd1626c72ec4d3f7cc806345d0c771afb86daf7127935ff26a7a1f3d54",
|
||||
"git_blob_sha1": "20bcdf0e541f7f38803be6ad5e9cc8fe411a9432"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"file": "src/scripts/valueControl.ts",
|
||||
"local_file": "frontend__src__scripts__valueControl.ts",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/71d2f2f2b5c6da9dee281836b5b72f3af368966f/src/scripts/valueControl.ts",
|
||||
"commit": "71d2f2f2b5c6da9dee281836b5b72f3af368966f",
|
||||
"sha256": "57f607f240896f28663c40f02ab16bb01d3914470be486f6c58041e4032d87b1",
|
||||
"git_blob_sha1": "b3e29fc07bf4241c41df92de92d4413082679fbb"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"file": "src/extensions/core/uploadImage.ts",
|
||||
"local_file": "frontend__src__extensions__core__uploadImage.ts",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/71d2f2f2b5c6da9dee281836b5b72f3af368966f/src/extensions/core/uploadImage.ts",
|
||||
"commit": "71d2f2f2b5c6da9dee281836b5b72f3af368966f",
|
||||
"sha256": "48d062c2ee95bd77c537c539e6c8f8bc03bd71dcec94c5b82487c014ea3e9c06",
|
||||
"git_blob_sha1": "58e43bb218171534c4713bdced29171ecb96d903"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"file": "src/lib/litegraph/src/LGraphNode.ts",
|
||||
"local_file": "frontend__src__lib__litegraph__src__LGraphNode.ts",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/71d2f2f2b5c6da9dee281836b5b72f3af368966f/src/lib/litegraph/src/LGraphNode.ts",
|
||||
"commit": "71d2f2f2b5c6da9dee281836b5b72f3af368966f",
|
||||
"sha256": "d6263d56f28a5e6c5a95a3a263fe0d6ffe4083a981c01a14ec4ebfca43487e50",
|
||||
"git_blob_sha1": "38723cce556962cb80456239df383d49469134d9"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"file": "LICENSE",
|
||||
"local_file": "frontend__LICENSE",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/71d2f2f2b5c6da9dee281836b5b72f3af368966f/LICENSE",
|
||||
"commit": "71d2f2f2b5c6da9dee281836b5b72f3af368966f",
|
||||
"sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
|
||||
"git_blob_sha1": "f288702d2fa16d3cdf0035b15a9fcbc552cd88e7"
|
||||
},
|
||||
{
|
||||
"id": "rgthree",
|
||||
"file": "__init__.py",
|
||||
"local_file": "rgthree____init__.py",
|
||||
"url": "https://raw.githubusercontent.com/rgthree/rgthree-comfy/2c5342a8cb0eaecaabf61435a5f37dd594c510ba/__init__.py",
|
||||
"commit": "2c5342a8cb0eaecaabf61435a5f37dd594c510ba",
|
||||
"sha256": "c51fdbaf7ed4c397be33413b7464dc3653714711d8a77d4c3e9a410a9d3de152",
|
||||
"git_blob_sha1": "3211d8926c52792d6d99096b4e747315ba9e615c"
|
||||
},
|
||||
{
|
||||
"id": "rgthree",
|
||||
"file": "py/image_comparer.py",
|
||||
"local_file": "rgthree__py__image_comparer.py",
|
||||
"url": "https://raw.githubusercontent.com/rgthree/rgthree-comfy/2c5342a8cb0eaecaabf61435a5f37dd594c510ba/py/image_comparer.py",
|
||||
"commit": "2c5342a8cb0eaecaabf61435a5f37dd594c510ba",
|
||||
"sha256": "43ccce9b6f9413d5196ce4a7a3ef544969ae1ce2b52c44345f6cc8fb28c596fc",
|
||||
"git_blob_sha1": "079ebdbf6051fa86cf89f75f55f8502904d0c93f"
|
||||
},
|
||||
{
|
||||
"id": "rgthree",
|
||||
"file": "py/constants.py",
|
||||
"local_file": "rgthree__py__constants.py",
|
||||
"url": "https://raw.githubusercontent.com/rgthree/rgthree-comfy/2c5342a8cb0eaecaabf61435a5f37dd594c510ba/py/constants.py",
|
||||
"commit": "2c5342a8cb0eaecaabf61435a5f37dd594c510ba",
|
||||
"sha256": "50dee946013b1d88d01fe9d63c2a7ab4d4c59be218cf80171f3542b43f0d8558",
|
||||
"git_blob_sha1": "73b7d687ad24999c3b441f2c2ef39e4e8b3f3d54"
|
||||
},
|
||||
{
|
||||
"id": "rgthree",
|
||||
"file": "web/comfyui/image_comparer.js",
|
||||
"local_file": "rgthree__web__comfyui__image_comparer.js",
|
||||
"url": "https://raw.githubusercontent.com/rgthree/rgthree-comfy/2c5342a8cb0eaecaabf61435a5f37dd594c510ba/web/comfyui/image_comparer.js",
|
||||
"commit": "2c5342a8cb0eaecaabf61435a5f37dd594c510ba",
|
||||
"sha256": "b6dd39b71a2722774ecad101e12823220c6905f9f2a3d1cefca077e1aaa08a49",
|
||||
"git_blob_sha1": "4c5d6b8d8f33f53387d8e385ba6d9ffe4ed4caba"
|
||||
},
|
||||
{
|
||||
"id": "rgthree",
|
||||
"file": "LICENSE",
|
||||
"local_file": "rgthree__LICENSE",
|
||||
"url": "https://raw.githubusercontent.com/rgthree/rgthree-comfy/2c5342a8cb0eaecaabf61435a5f37dd594c510ba/LICENSE",
|
||||
"commit": "2c5342a8cb0eaecaabf61435a5f37dd594c510ba",
|
||||
"sha256": "b34faf7c3e2975fe08d0169958e2b39f076d4d4289cbe2560dd7dd5b1a613ed1",
|
||||
"git_blob_sha1": "5a4eb87c0791b74af3db40c2a4d362469a8b6b43"
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"file": "__init__.py",
|
||||
"local_file": "vhs____init__.py",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/__init__.py",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "d3e74626bfdd628d0e96b190b2c07e25fa1e5ee9f1f402c7c650446f86b0838f",
|
||||
"git_blob_sha1": "9fa995f0ac7e296a62bcba9df68b5250a0f7d041"
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/nodes.py",
|
||||
"local_file": "vhs__videohelpersuite__nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/videohelpersuite/nodes.py",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "1c306fbc759ea4e09534422efd2603f50877c4674ff101e876e1d33426d46218",
|
||||
"git_blob_sha1": "496bf94e41ea11b8a9315ab92d9ea386636e6115"
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/load_video_nodes.py",
|
||||
"local_file": "vhs__videohelpersuite__load_video_nodes.py",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/videohelpersuite/load_video_nodes.py",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "dd0e40047e60eaae7687e1fea812fd94b094187a9808819b74b1130b1819243a",
|
||||
"git_blob_sha1": "5c6bd0b40ac75a8d596a4b3c86253420e8d56bb4"
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/utils.py",
|
||||
"local_file": "vhs__videohelpersuite__utils.py",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/videohelpersuite/utils.py",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a",
|
||||
"git_blob_sha1": "5b35ad47fa3d1412773ab561598031ba6a3b38bc"
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"file": "video_formats/h264-mp4.json",
|
||||
"local_file": "vhs__video_formats__h264-mp4.json",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/video_formats/h264-mp4.json",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "4c15a42816ccbb06cb8a2fb02f8d1831d622c8531b26e432959ec80e50f7b8bc",
|
||||
"git_blob_sha1": "4aa0bd57c6a4cc65334d82e5cdaa7aadb8372321"
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"file": "web/js/VHS.core.js",
|
||||
"local_file": "vhs__web__js__VHS.core.js",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/web/js/VHS.core.js",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "fd0f5e78c3fb40dad605105d6d07fd629d166f6ccb4a9d04a20b5cd1b82b13a1",
|
||||
"git_blob_sha1": "8d7f2c877ad215cb61d4fdd823f18b9d26ccab2e"
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"file": "LICENSE",
|
||||
"local_file": "vhs__LICENSE",
|
||||
"url": "https://raw.githubusercontent.com/Kosinkadink/ComfyUI-VideoHelperSuite/4d907bee61e92c2e65af3bd6383a4e4d356126d1/LICENSE",
|
||||
"commit": "4d907bee61e92c2e65af3bd6383a4e4d356126d1",
|
||||
"sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
|
||||
"git_blob_sha1": "f288702d2fa16d3cdf0035b15a9fcbc552cd88e7"
|
||||
},
|
||||
{
|
||||
"id": "guhai",
|
||||
"file": "__init__.py",
|
||||
"local_file": "guhai____init__.py",
|
||||
"url": "https://raw.githubusercontent.com/goohai/Goohaitools-comfyui/4e11bd3b8471102eef1cadd809c79c94dc8001ee/__init__.py",
|
||||
"commit": "4e11bd3b8471102eef1cadd809c79c94dc8001ee",
|
||||
"sha256": "d1cdc5dce665f9f52aaab69a1742cacabaf2d9617a380b517f8387b4b662d164",
|
||||
"git_blob_sha1": "e5d5dffc4201bff73162a350edad9d00fd0d5e51"
|
||||
},
|
||||
{
|
||||
"id": "guhai",
|
||||
"file": "nodes/\u5ffd\u7565\u591a\u7ec4.py",
|
||||
"local_file": "guhai__nodes__\u5ffd\u7565\u591a\u7ec4.py",
|
||||
"url": "https://raw.githubusercontent.com/goohai/Goohaitools-comfyui/4e11bd3b8471102eef1cadd809c79c94dc8001ee/nodes/\u5ffd\u7565\u591a\u7ec4.py",
|
||||
"commit": "4e11bd3b8471102eef1cadd809c79c94dc8001ee",
|
||||
"sha256": "4350ab38acf4b1e555dbeaf27afe5427223d91b5e9ac4c7a2d4ce25c2931f450",
|
||||
"git_blob_sha1": "fc1992c878179f88b3a0d776f0293cd79108eee5"
|
||||
},
|
||||
{
|
||||
"id": "guhai",
|
||||
"file": "web/js/nodes pass.js",
|
||||
"local_file": "guhai__web__js__nodes pass.js",
|
||||
"url": "https://raw.githubusercontent.com/goohai/Goohaitools-comfyui/4e11bd3b8471102eef1cadd809c79c94dc8001ee/web/js/nodes pass.js",
|
||||
"commit": "4e11bd3b8471102eef1cadd809c79c94dc8001ee",
|
||||
"sha256": "2466edb72013fc93e1685e430042c79bf089b38237bbfab65199d4903e7a3f5f",
|
||||
"git_blob_sha1": "4e3f4e6d2f3e1a8031d63930af7d5caf3f62b8b0"
|
||||
},
|
||||
{
|
||||
"id": "guhai",
|
||||
"file": "README.md",
|
||||
"local_file": "guhai__README.md",
|
||||
"url": "https://raw.githubusercontent.com/goohai/Goohaitools-comfyui/4e11bd3b8471102eef1cadd809c79c94dc8001ee/README.md",
|
||||
"commit": "4e11bd3b8471102eef1cadd809c79c94dc8001ee",
|
||||
"sha256": "7930cd372eda184ec5fc035f4ab202f83021ddaa85a5f868f8923d591f6c8b45",
|
||||
"git_blob_sha1": "5de30a6c14d4dfc93671b04c7d94547b93d79131"
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
@@ -0,0 +1,9 @@
|
||||
from .videohelpersuite.nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
|
||||
import folder_paths
|
||||
from .videohelpersuite.server import server
|
||||
from .videohelpersuite import documentation
|
||||
from .videohelpersuite import latent_preview
|
||||
|
||||
WEB_DIRECTORY = "./web"
|
||||
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
|
||||
documentation.format_descriptions(NODE_CLASS_MAPPINGS)
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"main_pass":
|
||||
[
|
||||
"-n", "-c:v", "libx264",
|
||||
"-pix_fmt", ["pix_fmt", ["yuv420p", "yuv420p10le"]],
|
||||
"-crf", ["crf","INT", {"default": 19, "min": 0, "max": 100, "step": 1}],
|
||||
"-vf", "scale=out_color_matrix=bt709",
|
||||
"-color_range", "tv", "-colorspace", "bt709", "-color_primaries", "bt709", "-color_trc", "bt709"
|
||||
],
|
||||
"fake_trc": "bt709",
|
||||
"audio_pass": ["-c:a", "aac", "-movflags", "use_metadata_tags"],
|
||||
"save_metadata": ["save_metadata", "BOOLEAN", {"default": true}],
|
||||
"trim_to_audio": ["trim_to_audio", "BOOLEAN", {"default": false}],
|
||||
"extension": "mp4"
|
||||
}
|
||||
@@ -0,0 +1,672 @@
|
||||
import os
|
||||
import itertools
|
||||
import numpy as np
|
||||
import torch
|
||||
from PIL import Image, ImageOps
|
||||
import cv2
|
||||
import psutil
|
||||
import subprocess
|
||||
import re
|
||||
import time
|
||||
|
||||
import folder_paths
|
||||
from comfy.utils import common_upscale, ProgressBar
|
||||
import nodes
|
||||
from comfy.k_diffusion.utils import FolderOfImages
|
||||
from .logger import logger
|
||||
from .utils import BIGMAX, DIMMAX, calculate_file_hash, get_sorted_dir_files_from_directory,\
|
||||
lazy_get_audio, hash_path, validate_path, strip_path, try_download_video, \
|
||||
is_url, imageOrLatent, ffmpeg_path, ENCODE_ARGS, floatOrInt
|
||||
|
||||
|
||||
video_extensions = ['webm', 'mp4', 'mkv', 'gif', 'mov']
|
||||
|
||||
VHSLoadFormats = {
|
||||
'None': {},
|
||||
'AnimateDiff': {'target_rate': 8, 'dim': (8,0,512,512)},
|
||||
'Mochi': {'target_rate': 24, 'dim': (16,0,848,480), 'frames':(6,1)},
|
||||
'LTXV': {'target_rate': 24, 'dim': (32,0,768,512), 'frames':(8,1)},
|
||||
'Hunyuan': {'target_rate': 24, 'dim': (16,0,848,480), 'frames':(4,1)},
|
||||
'Cosmos': {'target_rate': 24, 'dim': (16,0,1280,704), 'frames':(8,1)},
|
||||
'Wan': {'target_rate': 16, 'dim': (8,0,832,480), 'frames':(4,1)},
|
||||
'H3': {'target_rate': 24, 'dim': (32,0,1344,768), 'frames':(17,5)},
|
||||
}
|
||||
"""
|
||||
External plugins may add additional formats to nodes.VHSLoadFormats
|
||||
In addition to shorthand options, direct widget names will map a given dict to options.
|
||||
Adding a third arguement to a frames tuple can enable strict checks on number
|
||||
of loaded frames, i.e (8,1,True)
|
||||
"""
|
||||
if not hasattr(nodes, 'VHSLoadFormats'):
|
||||
nodes.VHSLoadFormats = {}
|
||||
|
||||
def get_load_formats():
|
||||
#TODO: check if {**extra_config.VHSLoafFormats, **VHSLoadFormats} has minimum version
|
||||
formats = {}
|
||||
formats.update(nodes.VHSLoadFormats)
|
||||
formats.update(VHSLoadFormats)
|
||||
return (list(formats.keys()),
|
||||
{'default': 'AnimateDiff', 'formats': formats})
|
||||
def get_format(format):
|
||||
if format in VHSLoadFormats:
|
||||
return VHSLoadFormats[format]
|
||||
return nodes.VHSLoadFormats.get(format, {})
|
||||
|
||||
def is_gif(filename) -> bool:
|
||||
file_parts = filename.split('.')
|
||||
return len(file_parts) > 1 and file_parts[-1] == "gif"
|
||||
|
||||
|
||||
def target_size(width, height, custom_width, custom_height, downscale_ratio=8) -> tuple[int, int]:
|
||||
if downscale_ratio is None:
|
||||
downscale_ratio = 8
|
||||
if custom_width == 0 and custom_height == 0:
|
||||
pass
|
||||
elif custom_height == 0:
|
||||
height *= custom_width/width
|
||||
width = custom_width
|
||||
elif custom_width == 0:
|
||||
width *= custom_height/height
|
||||
height = custom_height
|
||||
else:
|
||||
width = custom_width
|
||||
height = custom_height
|
||||
width = int(width/downscale_ratio + 0.5) * downscale_ratio
|
||||
height = int(height/downscale_ratio + 0.5) * downscale_ratio
|
||||
return (width, height)
|
||||
|
||||
def cv_frame_generator(video, force_rate, frame_load_cap, skip_first_frames,
|
||||
select_every_nth, meta_batch=None, unique_id=None):
|
||||
video_cap = cv2.VideoCapture(video)
|
||||
if not video_cap.isOpened() or not video_cap.grab():
|
||||
raise ValueError(f"{video} could not be loaded with cv.")
|
||||
|
||||
# extract video metadata
|
||||
fps = video_cap.get(cv2.CAP_PROP_FPS)
|
||||
width = int(video_cap.get(cv2.CAP_PROP_FRAME_WIDTH))
|
||||
height = int(video_cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
|
||||
total_frames = int(video_cap.get(cv2.CAP_PROP_FRAME_COUNT))
|
||||
duration = total_frames / fps
|
||||
|
||||
width = 0
|
||||
|
||||
if width <=0 or height <=0:
|
||||
_, frame = video_cap.retrieve()
|
||||
height, width, _ = frame.shape
|
||||
|
||||
# set video_cap to look at start_index frame
|
||||
total_frame_count = 0
|
||||
total_frames_evaluated = -1
|
||||
frames_added = 0
|
||||
base_frame_time = 1 / fps
|
||||
prev_frame = None
|
||||
|
||||
if force_rate == 0:
|
||||
target_frame_time = base_frame_time
|
||||
else:
|
||||
target_frame_time = 1/force_rate
|
||||
|
||||
if total_frames > 0:
|
||||
if force_rate != 0:
|
||||
yieldable_frames = int(total_frames / fps * force_rate)
|
||||
else:
|
||||
yieldable_frames = total_frames
|
||||
if select_every_nth:
|
||||
yieldable_frames //= select_every_nth
|
||||
if frame_load_cap != 0:
|
||||
yieldable_frames = min(frame_load_cap, yieldable_frames)
|
||||
else:
|
||||
yieldable_frames = 0
|
||||
yield (width, height, fps, duration, total_frames, target_frame_time, yieldable_frames)
|
||||
pbar = ProgressBar(yieldable_frames)
|
||||
time_offset=target_frame_time
|
||||
while video_cap.isOpened():
|
||||
if time_offset < target_frame_time:
|
||||
is_returned = video_cap.grab()
|
||||
# if didn't return frame, video has ended
|
||||
if not is_returned:
|
||||
break
|
||||
time_offset += base_frame_time
|
||||
if time_offset < target_frame_time:
|
||||
continue
|
||||
time_offset -= target_frame_time
|
||||
# if not at start_index, skip doing anything with frame
|
||||
total_frame_count += 1
|
||||
if total_frame_count <= skip_first_frames:
|
||||
continue
|
||||
else:
|
||||
total_frames_evaluated += 1
|
||||
|
||||
# if should not be selected, skip doing anything with frame
|
||||
if total_frames_evaluated%select_every_nth != 0:
|
||||
continue
|
||||
|
||||
# opencv loads images in BGR format (yuck), so need to convert to RGB for ComfyUI use
|
||||
# follow up: can videos ever have an alpha channel?
|
||||
# To my testing: No. opencv has no support for alpha
|
||||
unused, frame = video_cap.retrieve()
|
||||
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
||||
# convert frame to comfyui's expected format
|
||||
# TODO: frame contains no exif information. Check if opencv2 has already applied
|
||||
frame = np.array(frame, dtype=np.float32)
|
||||
torch.from_numpy(frame).div_(255)
|
||||
if prev_frame is not None:
|
||||
inp = yield prev_frame
|
||||
if inp is not None:
|
||||
#ensure the finally block is called
|
||||
return
|
||||
prev_frame = frame
|
||||
frames_added += 1
|
||||
if pbar is not None:
|
||||
pbar.update_absolute(frames_added, yieldable_frames)
|
||||
# if cap exists and we've reached it, stop processing frames
|
||||
if frame_load_cap > 0 and frames_added >= frame_load_cap:
|
||||
break
|
||||
if meta_batch is not None:
|
||||
meta_batch.inputs.pop(unique_id)
|
||||
meta_batch.has_closed_inputs = True
|
||||
if prev_frame is not None:
|
||||
yield prev_frame
|
||||
|
||||
def ffmpeg_frame_generator(video, force_rate, frame_load_cap, start_time,
|
||||
custom_width, custom_height, downscale_ratio=8,
|
||||
meta_batch=None, unique_id=None):
|
||||
args_input = ["-i", video]
|
||||
args_dummy = [ffmpeg_path] + args_input +['-c', 'copy', '-frames:v', '1', "-f", "null", "-"]
|
||||
size_base = None
|
||||
fps_base = None
|
||||
try:
|
||||
dummy_res = subprocess.run(args_dummy, stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.PIPE, check=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
raise Exception("An error occurred in the ffmpeg subprocess:\n" \
|
||||
+ e.stderr.decode(*ENCODE_ARGS))
|
||||
lines = dummy_res.stderr.decode(*ENCODE_ARGS)
|
||||
if "Video: vp9 " in lines:
|
||||
args_input = ["-c:v", "libvpx-vp9"] + args_input
|
||||
args_dummy = [ffmpeg_path] + args_input +['-c', 'copy', '-frames:v', '1', "-f", "null", "-"]
|
||||
try:
|
||||
dummy_res = subprocess.run(args_dummy, stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.PIPE, check=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
raise Exception("An error occurred in the ffmpeg subprocess:\n" \
|
||||
+ e.stderr.decode(*ENCODE_ARGS))
|
||||
lines = dummy_res.stderr.decode(*ENCODE_ARGS)
|
||||
|
||||
for line in lines.split('\n'):
|
||||
match = re.search("^ *Stream .* Video.*, ([1-9]|\\d{2,})x(\\d+)", line)
|
||||
if match is not None:
|
||||
size_base = [int(match.group(1)), int(match.group(2))]
|
||||
fps_match = re.search(", ([\\d\\.]+) fps", line)
|
||||
if fps_match:
|
||||
fps_base = float(fps_match.group(1))
|
||||
else:
|
||||
fps_base = 1
|
||||
alpha = re.search("(yuva|rgba|bgra|gbra)", line) is not None
|
||||
break
|
||||
else:
|
||||
raise Exception("Failed to parse video/image information. FFMPEG output:\n" + lines)
|
||||
|
||||
durs_match = re.search("Duration: (\\d+:\\d+:\\d+\\.\\d+),", lines)
|
||||
if durs_match:
|
||||
durs = durs_match.group(1).split(':')
|
||||
duration = int(durs[0])*3600 + int(durs[1])*60 + float(durs[2])
|
||||
else:
|
||||
duration = 0
|
||||
|
||||
if start_time > 0:
|
||||
if start_time > 4:
|
||||
post_seek = ['-ss', '4']
|
||||
args_input = ['-ss', str(start_time - 4)] + args_input
|
||||
else:
|
||||
post_seek = ['-ss', str(start_time)]
|
||||
else:
|
||||
post_seek = []
|
||||
args_all_frames = [ffmpeg_path, "-v", "error", "-an"] + \
|
||||
args_input + ["-pix_fmt", "rgba64le"] + post_seek
|
||||
|
||||
vfilters = []
|
||||
if force_rate != 0:
|
||||
vfilters.append("fps=fps="+str(force_rate))
|
||||
if custom_width != 0 or custom_height != 0:
|
||||
size = target_size(size_base[0], size_base[1], custom_width,
|
||||
custom_height, downscale_ratio=downscale_ratio)
|
||||
ar = float(size[0])/float(size[1])
|
||||
if abs(size_base[0]*ar-size_base[1]) >= 1:
|
||||
#Aspect ratio is changed. Crop to new aspect ratio before scale
|
||||
vfilters.append(f"crop=if(gt({ar}\\,a)\\,iw\\,ih*{ar}):if(gt({ar}\\,a)\\,iw/{ar}\\,ih)")
|
||||
size_arg = ':'.join(map(str,size))
|
||||
vfilters.append(f"scale={size_arg}")
|
||||
else:
|
||||
size = size_base
|
||||
if len(vfilters) > 0:
|
||||
args_all_frames += ["-vf", ",".join(vfilters)]
|
||||
yieldable_frames = (force_rate or fps_base)*duration
|
||||
if frame_load_cap > 0:
|
||||
args_all_frames += ["-frames:v", str(frame_load_cap)]
|
||||
yieldable_frames = min(yieldable_frames, frame_load_cap)
|
||||
yield (size_base[0], size_base[1], fps_base, duration, fps_base * duration,
|
||||
1/(force_rate or fps_base), yieldable_frames, size[0], size[1], alpha)
|
||||
|
||||
args_all_frames += ["-f", "rawvideo", "-"]
|
||||
pbar = ProgressBar(yieldable_frames)
|
||||
try:
|
||||
with subprocess.Popen(args_all_frames, stdout=subprocess.PIPE) as proc:
|
||||
#Manually buffer enough bytes for an image
|
||||
bpi = size[0] * size[1] * 8
|
||||
current_bytes = bytearray(bpi)
|
||||
current_offset=0
|
||||
prev_frame = None
|
||||
while True:
|
||||
bytes_read = proc.stdout.read(bpi - current_offset)
|
||||
if bytes_read is None:#sleep to wait for more data
|
||||
time.sleep(.1)
|
||||
continue
|
||||
if len(bytes_read) == 0:#EOF
|
||||
break
|
||||
current_bytes[current_offset:len(bytes_read)] = bytes_read
|
||||
current_offset+=len(bytes_read)
|
||||
if current_offset == bpi:
|
||||
if prev_frame is not None:
|
||||
yield prev_frame
|
||||
pbar.update(1)
|
||||
prev_frame = np.frombuffer(current_bytes, dtype=np.dtype(np.uint16).newbyteorder("<")).reshape(size[1], size[0], 4) / (2**16-1)
|
||||
if not alpha:
|
||||
prev_frame = prev_frame[:, :, :-1]
|
||||
current_offset = 0
|
||||
except BrokenPipeError as e:
|
||||
raise Exception("An error occured in the ffmpeg subprocess:\n" \
|
||||
+ proc.stderr.read().decode(*ENCODE_ARGS))
|
||||
if meta_batch is not None:
|
||||
meta_batch.inputs.pop(unique_id)
|
||||
meta_batch.has_closed_inputs = True
|
||||
if prev_frame is not None:
|
||||
yield prev_frame
|
||||
|
||||
#Python 3.12 adds an itertools.batched, but it's easily replicated for legacy support
|
||||
def batched(it, n):
|
||||
while batch := tuple(itertools.islice(it, n)):
|
||||
yield batch
|
||||
def batched_vae_encode(images, vae, frames_per_batch):
|
||||
for batch in batched(images, frames_per_batch):
|
||||
image_batch = torch.from_numpy(np.array(batch))
|
||||
yield from vae.encode(image_batch).numpy()
|
||||
def resized_cv_frame_gen(custom_width, custom_height, downscale_ratio, **kwargs):
|
||||
gen = cv_frame_generator(**kwargs)
|
||||
info = next(gen)
|
||||
width, height = info[0], info[1]
|
||||
frames_per_batch = (1920 * 1080 * 16) // (width * height) or 1
|
||||
if kwargs.get('meta_batch', None) is not None:
|
||||
frames_per_batch = min(frames_per_batch, kwargs['meta_batch'].frames_per_batch)
|
||||
if custom_width != 0 or custom_height != 0 or downscale_ratio is not None:
|
||||
new_size = target_size(width, height, custom_width, custom_height, downscale_ratio)
|
||||
yield (*info, new_size[0], new_size[1], False)
|
||||
if new_size[0] != width or new_size[1] != height:
|
||||
def rescale(frame):
|
||||
s = torch.from_numpy(np.fromiter(frame, np.dtype((np.float32, (height, width, 3)))))
|
||||
s = s.movedim(-1,1)
|
||||
s = common_upscale(s, new_size[0], new_size[1], "lanczos", "center")
|
||||
return s.movedim(1,-1).numpy()
|
||||
yield from itertools.chain.from_iterable(map(rescale, batched(gen, frames_per_batch)))
|
||||
return
|
||||
else:
|
||||
yield (*info, info[0], info[1], False)
|
||||
yield from gen
|
||||
|
||||
def load_video(meta_batch=None, unique_id=None, memory_limit_mb=None, vae=None,
|
||||
generator=resized_cv_frame_gen, format='None', **kwargs):
|
||||
if 'force_size' in kwargs:
|
||||
kwargs.pop('force_size')
|
||||
logger.warn("force_size has been removed. Did you reload the webpage after updating?")
|
||||
format = get_format(format)
|
||||
kwargs['video'] = strip_path(kwargs['video'])
|
||||
if vae is not None:
|
||||
downscale_ratio = getattr(vae, "downscale_ratio", 8)
|
||||
else:
|
||||
downscale_ratio = format.get('dim', (1,))[0]
|
||||
if meta_batch is None or unique_id not in meta_batch.inputs:
|
||||
gen = generator(meta_batch=meta_batch, unique_id=unique_id, downscale_ratio=downscale_ratio, **kwargs)
|
||||
(width, height, fps, duration, total_frames, target_frame_time, yieldable_frames, new_width, new_height, alpha) = next(gen)
|
||||
|
||||
if meta_batch is not None:
|
||||
meta_batch.inputs[unique_id] = (gen, width, height, fps, duration, total_frames, target_frame_time, yieldable_frames, new_width, new_height, alpha)
|
||||
if yieldable_frames:
|
||||
meta_batch.total_frames = min(meta_batch.total_frames, yieldable_frames)
|
||||
|
||||
else:
|
||||
(gen, width, height, fps, duration, total_frames, target_frame_time, yieldable_frames, new_width, new_height, alpha) = meta_batch.inputs[unique_id]
|
||||
|
||||
memory_limit = None
|
||||
if memory_limit_mb is not None:
|
||||
memory_limit *= 2 ** 20
|
||||
else:
|
||||
#TODO: verify if garbage collection should be performed here.
|
||||
#leaves ~128 MB unreserved for safety
|
||||
try:
|
||||
memory_limit = (psutil.virtual_memory().available + psutil.swap_memory().free) - 2 ** 27
|
||||
except:
|
||||
logger.warn("Failed to calculate available memory. Memory load limit has been disabled")
|
||||
memory_limit = BIGMAX
|
||||
if vae is not None:
|
||||
#space required to load as f32, exist as latent with wiggle room, decode to f32
|
||||
max_loadable_frames = int(memory_limit//(width*height*3*(4+4+1/10)))
|
||||
else:
|
||||
#TODO: use better estimate for when vae is not None
|
||||
#Consider completely ignoring for load_latent case?
|
||||
max_loadable_frames = int(memory_limit//(width*height*3*(.1)))
|
||||
if meta_batch is not None:
|
||||
if 'frames' in format:
|
||||
if meta_batch.frames_per_batch % format['frames'][0] != format['frames'][1]:
|
||||
error = (meta_batch.frames_per_batch - format['frames'][1]) % format['frames'][0]
|
||||
suggested = meta_batch.frames_per_batch - error
|
||||
if error > format['frames'][0] / 2:
|
||||
suggested += format['frames'][0]
|
||||
raise RuntimeError(f"The chosen frames per batch is incompatible with the selected format. Try {suggested}")
|
||||
if meta_batch.frames_per_batch > max_loadable_frames:
|
||||
raise RuntimeError(f"Meta Batch set to {meta_batch.frames_per_batch} frames but only {max_loadable_frames} can fit in memory")
|
||||
gen = itertools.islice(gen, meta_batch.frames_per_batch)
|
||||
else:
|
||||
original_gen = gen
|
||||
gen = itertools.islice(gen, max_loadable_frames)
|
||||
frames_per_batch = (1920 * 1080 * 16) // (width * height) or 1
|
||||
if vae is not None:
|
||||
gen = batched_vae_encode(gen, vae, frames_per_batch)
|
||||
vw,vh = new_width//downscale_ratio, new_height//downscale_ratio
|
||||
channels = getattr(vae, 'latent_channels', 4)
|
||||
images = torch.from_numpy(np.fromiter(gen, np.dtype((np.float32, (channels,vh,vw)))))
|
||||
else:
|
||||
#Some minor wizardry to eliminate a copy and reduce max memory by a factor of ~2
|
||||
images = torch.from_numpy(np.fromiter(gen, np.dtype((np.float32, (new_height, new_width, 4 if alpha else 3)))))
|
||||
if meta_batch is None and memory_limit is not None:
|
||||
try:
|
||||
next(original_gen)
|
||||
raise RuntimeError(f"Memory limit hit after loading {len(images)} frames. Stopping execution.")
|
||||
except StopIteration:
|
||||
pass
|
||||
if len(images) == 0:
|
||||
raise RuntimeError("No frames generated")
|
||||
if 'frames' in format and len(images) % format['frames'][0] != format['frames'][1]:
|
||||
err_msg = f"The number of frames loaded {len(images)}, does not match the requirements of the currently selected format."
|
||||
if len(format['frames']) > 2 and format['frames'][2]:
|
||||
raise RuntimeError(err_msg)
|
||||
div, mod = format['frames'][:2]
|
||||
frames = (len(images) - mod) // div * div + mod
|
||||
images = images[:frames]
|
||||
#Commenting out log message since it's displayed in UI. consider further
|
||||
#logger.warn(err_msg + f" Output has been truncated to {len(images)} frames.")
|
||||
if 'start_time' in kwargs:
|
||||
start_time = kwargs['start_time']
|
||||
else:
|
||||
start_time = kwargs['skip_first_frames'] * target_frame_time
|
||||
target_frame_time *= kwargs.get('select_every_nth', 1)
|
||||
#Setup lambda for lazy audio capture
|
||||
audio = lazy_get_audio(kwargs['video'], start_time, kwargs['frame_load_cap']*target_frame_time)
|
||||
#Adjust target_frame_time for select_every_nth
|
||||
video_info = {
|
||||
"source_fps": fps,
|
||||
"source_frame_count": total_frames,
|
||||
"source_duration": duration,
|
||||
"source_width": width,
|
||||
"source_height": height,
|
||||
"loaded_fps": 1/target_frame_time,
|
||||
"loaded_frame_count": len(images),
|
||||
"loaded_duration": len(images) * target_frame_time,
|
||||
"loaded_width": new_width,
|
||||
"loaded_height": new_height,
|
||||
}
|
||||
if vae is None:
|
||||
return (images, len(images), audio, video_info)
|
||||
else:
|
||||
return ({"samples": images}, len(images), audio, video_info)
|
||||
|
||||
|
||||
|
||||
class LoadVideoUpload:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
input_dir = folder_paths.get_input_directory()
|
||||
files = []
|
||||
for f in os.listdir(input_dir):
|
||||
if os.path.isfile(os.path.join(input_dir, f)):
|
||||
file_parts = f.split('.')
|
||||
if len(file_parts) > 1 and (file_parts[-1].lower() in video_extensions):
|
||||
files.append(f)
|
||||
return {"required": {
|
||||
"video": (sorted(files),),
|
||||
"force_rate": (floatOrInt, {"default": 0, "min": 0, "max": 60, "step": 1, "disable": 0}),
|
||||
"custom_width": ("INT", {"default": 0, "min": 0, "max": DIMMAX, 'disable': 0}),
|
||||
"custom_height": ("INT", {"default": 0, "min": 0, "max": DIMMAX, 'disable': 0}),
|
||||
"frame_load_cap": ("INT", {"default": 0, "min": 0, "max": BIGMAX, "step": 1, "disable": 0}),
|
||||
"skip_first_frames": ("INT", {"default": 0, "min": 0, "max": BIGMAX, "step": 1}),
|
||||
"select_every_nth": ("INT", {"default": 1, "min": 1, "max": BIGMAX, "step": 1}),
|
||||
},
|
||||
"optional": {
|
||||
"meta_batch": ("VHS_BatchManager",),
|
||||
"vae": ("VAE",),
|
||||
"format": get_load_formats(),
|
||||
},
|
||||
"hidden": {
|
||||
"force_size": "STRING",
|
||||
"unique_id": "UNIQUE_ID"
|
||||
},
|
||||
}
|
||||
|
||||
CATEGORY = "Video Helper Suite 🎥🅥🅗🅢"
|
||||
|
||||
RETURN_TYPES = (imageOrLatent, "INT", "AUDIO", "VHS_VIDEOINFO")
|
||||
RETURN_NAMES = ("IMAGE", "frame_count", "audio", "video_info")
|
||||
|
||||
FUNCTION = "load_video"
|
||||
|
||||
def load_video(self, **kwargs):
|
||||
kwargs['video'] = folder_paths.get_annotated_filepath(strip_path(kwargs['video']))
|
||||
return load_video(**kwargs)
|
||||
|
||||
@classmethod
|
||||
def IS_CHANGED(s, video, **kwargs):
|
||||
image_path = folder_paths.get_annotated_filepath(video)
|
||||
return calculate_file_hash(image_path)
|
||||
|
||||
@classmethod
|
||||
def VALIDATE_INPUTS(s, video):
|
||||
if not folder_paths.exists_annotated_filepath(video):
|
||||
return "Invalid video file: {}".format(video)
|
||||
return True
|
||||
|
||||
|
||||
class LoadVideoPath:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return {
|
||||
"required": {
|
||||
"video": ("STRING", {"placeholder": "X://insert/path/here.mp4", "vhs_path_extensions": video_extensions}),
|
||||
"force_rate": (floatOrInt, {"default": 0, "min": 0, "max": 60, "step": 1, "disable": 0}),
|
||||
"custom_width": ("INT", {"default": 0, "min": 0, "max": DIMMAX, 'disable': 0}),
|
||||
"custom_height": ("INT", {"default": 0, "min": 0, "max": DIMMAX, 'disable': 0}),
|
||||
"frame_load_cap": ("INT", {"default": 0, "min": 0, "max": BIGMAX, "step": 1, "disable": 0}),
|
||||
"skip_first_frames": ("INT", {"default": 0, "min": 0, "max": BIGMAX, "step": 1}),
|
||||
"select_every_nth": ("INT", {"default": 1, "min": 1, "max": BIGMAX, "step": 1}),
|
||||
},
|
||||
"optional": {
|
||||
"meta_batch": ("VHS_BatchManager",),
|
||||
"vae": ("VAE",),
|
||||
"format": get_load_formats(),
|
||||
},
|
||||
"hidden": {
|
||||
"force_size": "STRING",
|
||||
"unique_id": "UNIQUE_ID"
|
||||
},
|
||||
}
|
||||
|
||||
CATEGORY = "Video Helper Suite 🎥🅥🅗🅢"
|
||||
|
||||
RETURN_TYPES = (imageOrLatent, "INT", "AUDIO", "VHS_VIDEOINFO")
|
||||
RETURN_NAMES = ("IMAGE", "frame_count", "audio", "video_info")
|
||||
|
||||
FUNCTION = "load_video"
|
||||
|
||||
def load_video(self, **kwargs):
|
||||
if kwargs['video'] is None or validate_path(kwargs['video']) != True:
|
||||
raise Exception("video is not a valid path: " + kwargs['video'])
|
||||
if is_url(kwargs['video']):
|
||||
kwargs['video'] = try_download_video(kwargs['video']) or kwargs['video']
|
||||
return load_video(**kwargs)
|
||||
|
||||
@classmethod
|
||||
def IS_CHANGED(s, video, **kwargs):
|
||||
return hash_path(video)
|
||||
|
||||
@classmethod
|
||||
def VALIDATE_INPUTS(s, video):
|
||||
return validate_path(video, allow_none=True)
|
||||
|
||||
class LoadVideoFFmpegUpload:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
input_dir = folder_paths.get_input_directory()
|
||||
files = []
|
||||
for f in os.listdir(input_dir):
|
||||
if os.path.isfile(os.path.join(input_dir, f)):
|
||||
file_parts = f.split('.')
|
||||
if len(file_parts) > 1 and (file_parts[-1].lower() in video_extensions):
|
||||
files.append(f)
|
||||
return {"required": {
|
||||
"video": (sorted(files),),
|
||||
"force_rate": (floatOrInt, {"default": 0, "min": 0, "max": 60, "step": 1, "disable": 0}),
|
||||
"custom_width": ("INT", {"default": 0, "min": 0, "max": DIMMAX, 'disable': 0}),
|
||||
"custom_height": ("INT", {"default": 0, "min": 0, "max": DIMMAX, 'disable': 0}),
|
||||
"frame_load_cap": ("INT", {"default": 0, "min": 0, "max": BIGMAX, "step": 1, "disable": 0}),
|
||||
"start_time": ("FLOAT", {"default": 0, "min": 0, "max": BIGMAX, "step": .001, "widgetType": "VHSTIMESTAMP"}),
|
||||
},
|
||||
"optional": {
|
||||
"meta_batch": ("VHS_BatchManager",),
|
||||
"vae": ("VAE",),
|
||||
"format": get_load_formats(),
|
||||
},
|
||||
"hidden": {
|
||||
"force_size": "STRING",
|
||||
"unique_id": "UNIQUE_ID"
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
CATEGORY = "Video Helper Suite 🎥🅥🅗🅢"
|
||||
|
||||
RETURN_TYPES = (imageOrLatent, "MASK", "AUDIO", "VHS_VIDEOINFO")
|
||||
RETURN_NAMES = ("IMAGE", "mask", "audio", "video_info")
|
||||
|
||||
FUNCTION = "load_video"
|
||||
|
||||
def load_video(self, **kwargs):
|
||||
kwargs['video'] = folder_paths.get_annotated_filepath(strip_path(kwargs['video']))
|
||||
image, _, audio, video_info = load_video(**kwargs, generator=ffmpeg_frame_generator)
|
||||
if image.size(3) == 4:
|
||||
return (image[:,:,:,:3], 1-image[:,:,:,3], audio, video_info)
|
||||
return (image, torch.zeros(image.size(0), 64, 64, device="cpu"), audio, video_info)
|
||||
|
||||
@classmethod
|
||||
def IS_CHANGED(s, video, **kwargs):
|
||||
image_path = folder_paths.get_annotated_filepath(video)
|
||||
return calculate_file_hash(image_path)
|
||||
|
||||
@classmethod
|
||||
def VALIDATE_INPUTS(s, video):
|
||||
if not folder_paths.exists_annotated_filepath(video):
|
||||
return "Invalid video file: {}".format(video)
|
||||
return True
|
||||
|
||||
|
||||
class LoadVideoFFmpegPath:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return {
|
||||
"required": {
|
||||
"video": ("STRING", {"placeholder": "X://insert/path/here.mp4", "vhs_path_extensions": video_extensions}),
|
||||
"force_rate": (floatOrInt, {"default": 0, "min": 0, "max": 60, "step": 1, "disable": 0}),
|
||||
"custom_width": ("INT", {"default": 0, "min": 0, "max": DIMMAX, 'disable': 0}),
|
||||
"custom_height": ("INT", {"default": 0, "min": 0, "max": DIMMAX, 'disable': 0}),
|
||||
"frame_load_cap": ("INT", {"default": 0, "min": 0, "max": BIGMAX, "step": 1, "disable": 0}),
|
||||
"start_time": ("FLOAT", {"default": 0, "min": 0, "max": BIGMAX, "step": .001, "widgetType": "VHSTIMESTAMP"}),
|
||||
},
|
||||
"optional": {
|
||||
"meta_batch": ("VHS_BatchManager",),
|
||||
"vae": ("VAE",),
|
||||
"format": get_load_formats(),
|
||||
},
|
||||
"hidden": {
|
||||
"force_size": "STRING",
|
||||
"unique_id": "UNIQUE_ID"
|
||||
},
|
||||
}
|
||||
|
||||
CATEGORY = "Video Helper Suite 🎥🅥🅗🅢"
|
||||
|
||||
RETURN_TYPES = (imageOrLatent, "MASK", "AUDIO", "VHS_VIDEOINFO")
|
||||
RETURN_NAMES = ("IMAGE", "mask", "audio", "video_info")
|
||||
|
||||
FUNCTION = "load_video"
|
||||
|
||||
def load_video(self, **kwargs):
|
||||
if kwargs['video'] is None or validate_path(kwargs['video']) != True:
|
||||
raise Exception("video is not a valid path: " + kwargs['video'])
|
||||
if is_url(kwargs['video']):
|
||||
kwargs['video'] = try_download_video(kwargs['video']) or kwargs['video']
|
||||
image, _, audio, video_info = load_video(**kwargs, generator=ffmpeg_frame_generator)
|
||||
if isinstance(image, dict):
|
||||
return (image, None, audio, video_info)
|
||||
if image.size(3) == 4:
|
||||
return (image[:,:,:,:3], 1-image[:,:,:,3], audio, video_info)
|
||||
return (image, torch.zeros(image.size(0), 64, 64, device="cpu"), audio, video_info)
|
||||
|
||||
@classmethod
|
||||
def IS_CHANGED(s, video, **kwargs):
|
||||
return hash_path(video)
|
||||
|
||||
@classmethod
|
||||
def VALIDATE_INPUTS(s, video):
|
||||
return validate_path(video, allow_none=True)
|
||||
|
||||
class LoadImagePath:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return {
|
||||
"required": {
|
||||
"image": ("STRING", {"placeholder": "X://insert/path/here.png", "vhs_path_extensions": list(FolderOfImages.IMG_EXTENSIONS)}),
|
||||
"custom_width": ("INT", {"default": 0, "min": 0, "max": DIMMAX, "step": 8, 'disable': 0}),
|
||||
"custom_height": ("INT", {"default": 0, "min": 0, "max": DIMMAX, "step": 8, 'disable': 0}),
|
||||
},
|
||||
"optional": {
|
||||
"vae": ("VAE",),
|
||||
},
|
||||
"hidden": {
|
||||
"force_size": "STRING",
|
||||
},
|
||||
}
|
||||
|
||||
CATEGORY = "Video Helper Suite 🎥🅥🅗🅢"
|
||||
|
||||
RETURN_TYPES = (imageOrLatent, "MASK")
|
||||
RETURN_NAMES = ("IMAGE", "mask")
|
||||
|
||||
FUNCTION = "load_image"
|
||||
|
||||
def load_image(self, **kwargs):
|
||||
if kwargs['image'] is None or validate_path(kwargs['image']) != True:
|
||||
raise Exception("image is not a valid path: " + kwargs['image'])
|
||||
kwargs.update({'video': kwargs['image'], 'force_rate': 0, 'frame_load_cap': 0,
|
||||
'start_time': 0})
|
||||
kwargs.pop('image')
|
||||
image, _, _, _ = load_video(**kwargs, generator=ffmpeg_frame_generator)
|
||||
if isinstance(image, dict):
|
||||
return (image, None)
|
||||
if image.size(3) == 4:
|
||||
return (image[:,:,:,:3], 1-image[:,:,:,3])
|
||||
return (image, torch.zeros(image.size(0), 64, 64, device="cpu"))
|
||||
|
||||
@classmethod
|
||||
def IS_CHANGED(s, image, **kwargs):
|
||||
return hash_path(image)
|
||||
|
||||
@classmethod
|
||||
def VALIDATE_INPUTS(s, image):
|
||||
return validate_path(image, allow_none=True)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,443 @@
|
||||
import hashlib
|
||||
import os
|
||||
from typing import Iterable
|
||||
import shutil
|
||||
import subprocess
|
||||
import re
|
||||
import time
|
||||
from collections.abc import Mapping
|
||||
from typing import Union
|
||||
import functools
|
||||
import torch
|
||||
from torch import Tensor
|
||||
|
||||
import server
|
||||
from .logger import logger
|
||||
import folder_paths
|
||||
|
||||
BIGMIN = -(2**53-1)
|
||||
BIGMAX = (2**53-1)
|
||||
|
||||
DIMMAX = 8192
|
||||
|
||||
ENCODE_ARGS = ("utf-8", 'backslashreplace')
|
||||
|
||||
def ffmpeg_suitability(path):
|
||||
try:
|
||||
version = subprocess.run([path, "-version"], check=True,
|
||||
capture_output=True).stdout.decode(*ENCODE_ARGS)
|
||||
except:
|
||||
return 0
|
||||
score = 0
|
||||
#rough layout of the importance of various features
|
||||
simple_criterion = [("libvpx", 20),("264",10), ("265",3),
|
||||
("svtav1",5),("libopus", 1)]
|
||||
for criterion in simple_criterion:
|
||||
if version.find(criterion[0]) >= 0:
|
||||
score += criterion[1]
|
||||
#obtain rough compile year from copyright information
|
||||
copyright_index = version.find('2000-2')
|
||||
if copyright_index >= 0:
|
||||
copyright_year = version[copyright_index+6:copyright_index+9]
|
||||
if copyright_year.isnumeric():
|
||||
score += int(copyright_year)
|
||||
return score
|
||||
|
||||
class MultiInput(str):
|
||||
def __new__(cls, string, allowed_types="*"):
|
||||
res = super().__new__(cls, string)
|
||||
res.allowed_types=allowed_types
|
||||
return res
|
||||
def __ne__(self, other):
|
||||
if self.allowed_types == "*" or other == "*":
|
||||
return False
|
||||
return other not in self.allowed_types
|
||||
imageOrLatent = MultiInput("IMAGE", ["IMAGE", "LATENT"])
|
||||
floatOrInt = MultiInput("FLOAT", ["FLOAT", "INT"])
|
||||
|
||||
class ContainsAll(dict):
|
||||
def __contains__(self, other):
|
||||
return True
|
||||
def __getitem__(self, key):
|
||||
return super().get(key, (None, {}))
|
||||
|
||||
if "VHS_FORCE_FFMPEG_PATH" in os.environ:
|
||||
ffmpeg_path = os.environ.get("VHS_FORCE_FFMPEG_PATH")
|
||||
else:
|
||||
ffmpeg_paths = []
|
||||
try:
|
||||
from imageio_ffmpeg import get_ffmpeg_exe
|
||||
imageio_ffmpeg_path = get_ffmpeg_exe()
|
||||
ffmpeg_paths.append(imageio_ffmpeg_path)
|
||||
except:
|
||||
if "VHS_USE_IMAGEIO_FFMPEG" in os.environ:
|
||||
raise
|
||||
logger.warn("Failed to import imageio_ffmpeg")
|
||||
if "VHS_USE_IMAGEIO_FFMPEG" in os.environ:
|
||||
ffmpeg_path = imageio_ffmpeg_path
|
||||
else:
|
||||
system_ffmpeg = shutil.which("ffmpeg")
|
||||
if system_ffmpeg is not None:
|
||||
ffmpeg_paths.append(system_ffmpeg)
|
||||
if os.path.isfile("ffmpeg"):
|
||||
ffmpeg_paths.append(os.path.abspath("ffmpeg"))
|
||||
if os.path.isfile("ffmpeg.exe"):
|
||||
ffmpeg_paths.append(os.path.abspath("ffmpeg.exe"))
|
||||
if len(ffmpeg_paths) == 0:
|
||||
logger.error("No valid ffmpeg found.")
|
||||
ffmpeg_path = None
|
||||
elif len(ffmpeg_paths) == 1:
|
||||
#Evaluation of suitability isn't required, can take sole option
|
||||
#to reduce startup time
|
||||
ffmpeg_path = ffmpeg_paths[0]
|
||||
else:
|
||||
ffmpeg_path = max(ffmpeg_paths, key=ffmpeg_suitability)
|
||||
gifski_path = os.environ.get("VHS_GIFSKI", None)
|
||||
if gifski_path is None:
|
||||
gifski_path = os.environ.get("JOV_GIFSKI", None)
|
||||
if gifski_path is None:
|
||||
gifski_path = shutil.which("gifski")
|
||||
ytdl_path = os.environ.get("VHS_YTDL", None) or shutil.which('yt-dlp') \
|
||||
or shutil.which('youtube-dl')
|
||||
download_history = {}
|
||||
def try_download_video(url):
|
||||
if ytdl_path is None:
|
||||
return None
|
||||
if url in download_history:
|
||||
return download_history[url]
|
||||
os.makedirs(folder_paths.get_temp_directory(), exist_ok=True)
|
||||
#Format information could be added to only download audio for Load Audio,
|
||||
#but this gets hairy if same url is also used for video.
|
||||
#Best to just always keep defaults
|
||||
#dl_format = ['-f', 'ba'] if is_audio else []
|
||||
try:
|
||||
res = subprocess.run([ytdl_path, "--print", "after_move:filepath",
|
||||
"-P", folder_paths.get_temp_directory(), url],
|
||||
capture_output=True, check=True)
|
||||
#strip newline
|
||||
file = res.stdout.decode(*ENCODE_ARGS)[:-1]
|
||||
except subprocess.CalledProcessError as e:
|
||||
raise Exception("An error occurred in the yt-dl process:\n" \
|
||||
+ e.stderr.decode(*ENCODE_ARGS))
|
||||
file = None
|
||||
download_history[url] = file
|
||||
return file
|
||||
|
||||
def is_safe_path(path, strict=False):
|
||||
if "VHS_STRICT_PATHS" not in os.environ and not strict:
|
||||
return True
|
||||
basedir = os.path.abspath('.')
|
||||
try:
|
||||
common_path = os.path.commonpath([basedir, path])
|
||||
except:
|
||||
#Different drive on windows
|
||||
return False
|
||||
return common_path == basedir
|
||||
|
||||
def get_sorted_dir_files_from_directory(directory: str, skip_first_images: int=0, select_every_nth: int=1, extensions: Iterable=None):
|
||||
directory = strip_path(directory)
|
||||
dir_files = os.listdir(directory)
|
||||
dir_files = sorted(dir_files)
|
||||
dir_files = [os.path.join(directory, x) for x in dir_files]
|
||||
dir_files = list(filter(lambda filepath: os.path.isfile(filepath), dir_files))
|
||||
# filter by extension, if needed
|
||||
if extensions is not None:
|
||||
extensions = list(extensions)
|
||||
new_dir_files = []
|
||||
for filepath in dir_files:
|
||||
ext = "." + filepath.split(".")[-1]
|
||||
if ext.lower() in extensions:
|
||||
new_dir_files.append(filepath)
|
||||
dir_files = new_dir_files
|
||||
# start at skip_first_images
|
||||
dir_files = dir_files[skip_first_images:]
|
||||
dir_files = dir_files[0::select_every_nth]
|
||||
return dir_files
|
||||
|
||||
|
||||
# modified from https://stackoverflow.com/questions/22058048/hashing-a-file-in-python
|
||||
def calculate_file_hash(filename: str, hash_every_n: int = 1):
|
||||
#Larger video files were taking >.5 seconds to hash even when cached,
|
||||
#so instead the modified time from the filesystem is used as a hash
|
||||
h = hashlib.sha256()
|
||||
h.update(filename.encode())
|
||||
h.update(str(os.path.getmtime(filename)).encode())
|
||||
return h.hexdigest()
|
||||
|
||||
prompt_queue = server.PromptServer.instance.prompt_queue
|
||||
def requeue_workflow_unchecked():
|
||||
"""Requeues the current workflow without checking for multiple requeues"""
|
||||
currently_running = prompt_queue.currently_running
|
||||
value = next(iter(currently_running.values()))
|
||||
|
||||
# Handle both old (5 values) and new (6 values) ComfyUI versions
|
||||
if len(value) == 6:
|
||||
(_, prompt_id, prompt, extra_data, outputs_to_execute, _) = value
|
||||
else:
|
||||
(_, prompt_id, prompt, extra_data, outputs_to_execute) = value
|
||||
|
||||
#Ensure batch_managers are marked stale
|
||||
prompt = prompt.copy()
|
||||
for uid in prompt:
|
||||
if prompt[uid]['class_type'] == 'VHS_BatchManager':
|
||||
prompt[uid]['inputs']['requeue'] = prompt[uid]['inputs'].get('requeue',0)+1
|
||||
|
||||
#execution.py has guards for concurrency, but server doesn't.
|
||||
#TODO: Check that this won't be an issue
|
||||
number = -server.PromptServer.instance.number
|
||||
server.PromptServer.instance.number += 1
|
||||
prompt_id = str(server.uuid.uuid4())
|
||||
# Put back with 6 elements to match what ComfyUI expects
|
||||
sensitive = value[5] if len(value) > 5 else {}
|
||||
prompt_queue.put((number, prompt_id, prompt, extra_data, outputs_to_execute, sensitive))
|
||||
|
||||
requeue_guard = [None, 0, 0, {}]
|
||||
|
||||
def requeue_workflow(requeue_required=(-1,True)):
|
||||
assert(len(prompt_queue.currently_running) == 1)
|
||||
global requeue_guard
|
||||
|
||||
value = next(iter(prompt_queue.currently_running.values()))
|
||||
|
||||
# Handle both old (5 values) and new (6 values) ComfyUI versions
|
||||
if len(value) == 6:
|
||||
(run_number, _, prompt, extra_data, outputs_to_execute, _) = value
|
||||
else:
|
||||
(run_number, _, prompt, extra_data, outputs_to_execute) = value
|
||||
|
||||
if requeue_guard[0] != run_number:
|
||||
#Calculate a count of how many outputs are managed by a batch manager
|
||||
managed_outputs=0
|
||||
for bm_uid in prompt:
|
||||
if prompt[bm_uid]['class_type'] == 'VHS_BatchManager':
|
||||
for output_uid in prompt:
|
||||
if prompt[output_uid]['class_type'] in ["VHS_VideoCombine"]:
|
||||
for inp in prompt[output_uid]['inputs'].values():
|
||||
if inp == [bm_uid, 0]:
|
||||
managed_outputs+=1
|
||||
requeue_guard = [run_number, 0, managed_outputs, {}]
|
||||
requeue_guard[1] = requeue_guard[1]+1
|
||||
requeue_guard[3][requeue_required[0]] = requeue_required[1]
|
||||
if requeue_guard[1] == requeue_guard[2] and max(requeue_guard[3].values()):
|
||||
requeue_workflow_unchecked()
|
||||
|
||||
def get_audio(file, start_time=0, duration=0):
|
||||
args = [ffmpeg_path, "-i", file]
|
||||
if start_time > 0:
|
||||
args += ["-ss", str(start_time)]
|
||||
if duration > 0:
|
||||
args += ["-t", str(duration)]
|
||||
try:
|
||||
#TODO: scan for sample rate and maintain
|
||||
res = subprocess.run(args + ["-f", "f32le", "-"],
|
||||
capture_output=True, check=True)
|
||||
audio = torch.frombuffer(bytearray(res.stdout), dtype=torch.float32)
|
||||
match = re.search(', (\\d+) Hz, (\\w+), ',res.stderr.decode(*ENCODE_ARGS))
|
||||
except subprocess.CalledProcessError as e:
|
||||
raise Exception(f"VHS failed to extract audio from {file}:\n" \
|
||||
+ e.stderr.decode(*ENCODE_ARGS))
|
||||
if match:
|
||||
ar = int(match.group(1))
|
||||
#NOTE: Just throwing an error for other channel types right now
|
||||
#Will deal with issues if they come
|
||||
ac = {"mono": 1, "stereo": 2}[match.group(2)]
|
||||
else:
|
||||
ar = 44100
|
||||
ac = 2
|
||||
audio = audio.reshape((-1,ac)).transpose(0,1).unsqueeze(0)
|
||||
return {'waveform': audio, 'sample_rate': ar}
|
||||
|
||||
class LazyAudioMap(Mapping):
|
||||
def __init__(self, file, start_time, duration):
|
||||
self.file = file
|
||||
self.start_time=start_time
|
||||
self.duration=duration
|
||||
self._dict=None
|
||||
def __getitem__(self, key):
|
||||
if self._dict is None:
|
||||
self._dict = get_audio(self.file, self.start_time, self.duration)
|
||||
return self._dict[key]
|
||||
def __iter__(self):
|
||||
if self._dict is None:
|
||||
self._dict = get_audio(self.file, self.start_time, self.duration)
|
||||
return iter(self._dict)
|
||||
def __len__(self):
|
||||
if self._dict is None:
|
||||
self._dict = get_audio(self.file, self.start_time, self.duration)
|
||||
return len(self._dict)
|
||||
def lazy_get_audio(file, start_time=0, duration=0, **kwargs):
|
||||
return LazyAudioMap(file, start_time, duration)
|
||||
|
||||
def is_url(url):
|
||||
return url.split("://")[0] in ["http", "https"]
|
||||
|
||||
def validate_sequence(path):
|
||||
#Check if path is a valid ffmpeg sequence that points to at least one file
|
||||
(path, file) = os.path.split(path)
|
||||
if not os.path.isdir(path):
|
||||
return False
|
||||
match = re.search('%0?\\d+d', file)
|
||||
if not match:
|
||||
return False
|
||||
seq = match.group()
|
||||
if seq == '%d':
|
||||
seq = '\\\\d+'
|
||||
else:
|
||||
seq = '\\\\d{%s}' % seq[1:-1]
|
||||
file_matcher = re.compile(re.sub('%0?\\d+d', seq, file))
|
||||
for file in os.listdir(path):
|
||||
if file_matcher.fullmatch(file):
|
||||
return True
|
||||
return False
|
||||
|
||||
def strip_path(path):
|
||||
#This leaves whitespace inside quotes and only a single "
|
||||
#thus ' ""test"' -> '"test'
|
||||
#consider path.strip(string.whitespace+"\"")
|
||||
#or weightier re.fullmatch("[\\s\"]*(.+?)[\\s\"]*", path).group(1)
|
||||
path = path.strip()
|
||||
if path.startswith("\""):
|
||||
path = path[1:]
|
||||
if path.endswith("\""):
|
||||
path = path[:-1]
|
||||
return path
|
||||
def hash_path(path):
|
||||
if path is None:
|
||||
return "input"
|
||||
if is_url(path):
|
||||
return "url"
|
||||
if not os.path.isfile(path):
|
||||
return "DNE"
|
||||
return calculate_file_hash(strip_path(path))
|
||||
|
||||
|
||||
def validate_path(path, allow_none=False, allow_url=True):
|
||||
if path is None:
|
||||
return allow_none
|
||||
if is_url(path):
|
||||
#Probably not feasible to check if url resolves here
|
||||
if not allow_url:
|
||||
return "URLs are unsupported for this path"
|
||||
return is_safe_path(path)
|
||||
if not os.path.isfile(strip_path(path)):
|
||||
return "Invalid file path: {}".format(path)
|
||||
return is_safe_path(path)
|
||||
|
||||
|
||||
def validate_index(index: int, length: int=0, is_range: bool=False, allow_negative=False, allow_missing=False) -> int:
|
||||
# if part of range, do nothing
|
||||
if is_range:
|
||||
return index
|
||||
# otherwise, validate index
|
||||
# validate not out of range - only when latent_count is passed in
|
||||
if length > 0 and index > length-1 and not allow_missing:
|
||||
raise IndexError(f"Index '{index}' out of range for {length} item(s).")
|
||||
# if negative, validate not out of range
|
||||
if index < 0:
|
||||
if not allow_negative:
|
||||
raise IndexError(f"Negative indeces not allowed, but was '{index}'.")
|
||||
conv_index = length+index
|
||||
if conv_index < 0 and not allow_missing:
|
||||
raise IndexError(f"Index '{index}', converted to '{conv_index}' out of range for {length} item(s).")
|
||||
index = conv_index
|
||||
return index
|
||||
|
||||
|
||||
def convert_to_index_int(raw_index: str, length: int=0, is_range: bool=False, allow_negative=False, allow_missing=False) -> int:
|
||||
try:
|
||||
return validate_index(int(raw_index), length=length, is_range=is_range, allow_negative=allow_negative, allow_missing=allow_missing)
|
||||
except ValueError as e:
|
||||
raise ValueError(f"Index '{raw_index}' must be an integer.", e)
|
||||
|
||||
|
||||
def convert_str_to_indexes(indexes_str: str, length: int=0, allow_missing=False) -> list[int]:
|
||||
if not indexes_str:
|
||||
return []
|
||||
int_indexes = list(range(0, length))
|
||||
allow_negative = length > 0
|
||||
chosen_indexes = []
|
||||
# parse string - allow positive ints, negative ints, and ranges separated by ':'
|
||||
groups = indexes_str.split(",")
|
||||
groups = [g.strip() for g in groups]
|
||||
for g in groups:
|
||||
# parse range of indeces (e.g. 2:16)
|
||||
if ':' in g:
|
||||
index_range = g.split(":", 2)
|
||||
index_range = [r.strip() for r in index_range]
|
||||
|
||||
start_index = index_range[0]
|
||||
if len(start_index) > 0:
|
||||
start_index = convert_to_index_int(start_index, length=length, is_range=True, allow_negative=allow_negative, allow_missing=allow_missing)
|
||||
else:
|
||||
start_index = 0
|
||||
end_index = index_range[1]
|
||||
if len(end_index) > 0:
|
||||
end_index = convert_to_index_int(end_index, length=length, is_range=True, allow_negative=allow_negative, allow_missing=allow_missing)
|
||||
else:
|
||||
end_index = length
|
||||
# support step as well, to allow things like reversing, every-other, etc.
|
||||
step = 1
|
||||
if len(index_range) > 2:
|
||||
step = index_range[2]
|
||||
if len(step) > 0:
|
||||
step = convert_to_index_int(step, length=length, is_range=True, allow_negative=True, allow_missing=True)
|
||||
else:
|
||||
step = 1
|
||||
# if latents were passed in, base indeces on known latent count
|
||||
if len(int_indexes) > 0:
|
||||
chosen_indexes.extend(int_indexes[start_index:end_index][::step])
|
||||
# otherwise, assume indeces are valid
|
||||
else:
|
||||
chosen_indexes.extend(list(range(start_index, end_index, step)))
|
||||
# parse individual indeces
|
||||
else:
|
||||
chosen_indexes.append(convert_to_index_int(g, length=length, allow_negative=allow_negative, allow_missing=allow_missing))
|
||||
return chosen_indexes
|
||||
|
||||
|
||||
def select_indexes(input_obj: Union[Tensor, list], idxs: list):
|
||||
if type(input_obj) == Tensor:
|
||||
return input_obj[idxs]
|
||||
else:
|
||||
return [input_obj[i] for i in idxs]
|
||||
|
||||
def merge_filter_args(args, ftype="-vf"):
|
||||
#TODO This doesn't account for filter_complex
|
||||
#Will likely need to convert all filters to filter complex in the future
|
||||
#But that requires source/output deduplication
|
||||
try:
|
||||
start_index = args.index(ftype)+1
|
||||
index = start_index
|
||||
while True:
|
||||
index = args.index(ftype, index)
|
||||
args[start_index] += ',' + args[index+1]
|
||||
args.pop(index)
|
||||
args.pop(index)
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
def select_indexes_from_str(input_obj: Union[Tensor, list], indexes: str, err_if_missing=True, err_if_empty=True):
|
||||
real_idxs = convert_str_to_indexes(indexes, len(input_obj), allow_missing=not err_if_missing)
|
||||
if err_if_empty and len(real_idxs) == 0:
|
||||
raise Exception(f"Nothing was selected based on indexes found in '{indexes}'.")
|
||||
return select_indexes(input_obj, real_idxs)
|
||||
|
||||
def hook(obj, attr):
|
||||
def dec(f):
|
||||
f = functools.update_wrapper(f, getattr(obj,attr))
|
||||
setattr(obj,attr,f)
|
||||
return f
|
||||
return dec
|
||||
|
||||
def cached(duration):
|
||||
def dec(f):
|
||||
cached_ret = None
|
||||
cache_time = 0
|
||||
def cached_func():
|
||||
nonlocal cache_time, cached_ret
|
||||
if time.time() > cache_time + duration or cached_ret is None:
|
||||
cache_time = time.time()
|
||||
cached_ret = f()
|
||||
return cached_ret
|
||||
return cached_func
|
||||
return dec
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or Derivative
|
||||
Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2026 ComfyUI-VOSR2 contributors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,65 @@
|
||||
"""Package entrypoint.
|
||||
|
||||
Runs an explicit dependency/version check *before* importing anything that
|
||||
touches torch, einops, or safetensors at module scope (``nodes_vosr`` ->
|
||||
``loader``/``inference`` -> ``models/*``). Without this, an incompatible
|
||||
environment (old torch missing ``torch.compiler``, a stripped-down install
|
||||
missing ``einops``) fails deep inside a vendored architecture file with an
|
||||
opaque ``AttributeError``/``ImportError``, and ComfyUI just logs "module
|
||||
failed to load" with that traceback -- the node pack silently vanishes from
|
||||
the UI with no actionable message. Failing loudly and clearly here, at the
|
||||
top of the package, keeps that diagnosis one log line instead of a stack
|
||||
trace hunt.
|
||||
"""
|
||||
import logging
|
||||
|
||||
_MIN_TORCH = (2, 1) # torch.compiler.disable (models/pos_embed.py) needs >=2.1;
|
||||
# F.scaled_dot_product_attention needs >=2.0.
|
||||
|
||||
|
||||
def _check_dependencies() -> None:
|
||||
try:
|
||||
import torch
|
||||
except ImportError as exc:
|
||||
msg = (
|
||||
"ComfyUI-VOSR2 requires PyTorch, but it could not be imported. "
|
||||
"This normally ships with ComfyUI itself -- check your ComfyUI "
|
||||
"install."
|
||||
)
|
||||
logging.error("[VOSR2] %s", msg)
|
||||
raise ImportError(msg) from exc
|
||||
|
||||
version = tuple(int(p) for p in torch.__version__.split("+")[0].split(".")[:2])
|
||||
if version < _MIN_TORCH:
|
||||
msg = (
|
||||
f"ComfyUI-VOSR2 requires PyTorch >= {'.'.join(map(str, _MIN_TORCH))} "
|
||||
f"(uses torch.compiler and scaled_dot_product_attention), found "
|
||||
f"{torch.__version__}. Upgrade PyTorch, or update ComfyUI to a build "
|
||||
f"that ships a newer torch."
|
||||
)
|
||||
logging.error("[VOSR2] %s", msg)
|
||||
raise ImportError(msg)
|
||||
|
||||
for pkg in ("einops", "safetensors"):
|
||||
try:
|
||||
__import__(pkg)
|
||||
except ImportError as exc:
|
||||
msg = (
|
||||
f"ComfyUI-VOSR2 requires the '{pkg}' package, which normally "
|
||||
f"ships with ComfyUI core but was not found in this environment. "
|
||||
f"Install it with `pip install {pkg}` in ComfyUI's Python "
|
||||
f"environment."
|
||||
)
|
||||
logging.error("[VOSR2] %s", msg)
|
||||
raise ImportError(msg) from exc
|
||||
|
||||
|
||||
_check_dependencies()
|
||||
|
||||
from .nodes_vosr import comfy_entrypoint
|
||||
|
||||
# Serves web/docs/<node_id>.md as each node's in-UI help page. See
|
||||
# https://docs.comfy.org/custom-nodes/backend/help_page
|
||||
WEB_DIRECTORY = "web"
|
||||
|
||||
__all__ = ["comfy_entrypoint", "WEB_DIRECTORY"]
|
||||
@@ -0,0 +1,76 @@
|
||||
"""Torch-native color alignment, ported from VOSR's inference_vosr_onestep.py.
|
||||
|
||||
Upstream implements `adain_color_fix`/`wavelet_color_fix` via PIL round-trips and
|
||||
OpenCV's GaussianBlur on uint8 arrays. VOSR2's contract requires float precision
|
||||
throughout with no PIL/uint8 quantization and no OpenCV dependency, so both are
|
||||
reimplemented here directly on BCHW float tensors in [0, 1], with a small separable
|
||||
Gaussian blur standing in for `cv2.GaussianBlur`.
|
||||
"""
|
||||
import math
|
||||
|
||||
import torch
|
||||
import torch.nn.functional as F
|
||||
|
||||
ADAIN_EPS = 1e-5
|
||||
WAVELET_SIGMA = 5.0
|
||||
|
||||
|
||||
def _gaussian_kernel1d(sigma: float, radius: int, device, dtype) -> torch.Tensor:
|
||||
x = torch.arange(-radius, radius + 1, device=device, dtype=torch.float32)
|
||||
kernel = torch.exp(-(x**2) / (2.0 * sigma * sigma))
|
||||
kernel = kernel / kernel.sum()
|
||||
return kernel.to(dtype)
|
||||
|
||||
|
||||
def gaussian_blur(x: torch.Tensor, sigma: float) -> torch.Tensor:
|
||||
"""Separable Gaussian blur, reflect-padded, applied per-channel. x: (B, C, H, W).
|
||||
|
||||
Reflect padding requires the pad width to be smaller than the dimension it
|
||||
pads, so each axis' kernel radius is capped to fit -- this only narrows the
|
||||
(already Gaussian-tapered) kernel tail on tiles/images smaller than ~8*sigma
|
||||
pixels, it never errors.
|
||||
"""
|
||||
c, h, w = x.shape[1], x.shape[2], x.shape[3]
|
||||
desired_radius = max(int(math.ceil(sigma * 4.0)), 1)
|
||||
radius_h = max(min(desired_radius, h - 1), 0)
|
||||
radius_w = max(min(desired_radius, w - 1), 0)
|
||||
|
||||
if radius_w > 0:
|
||||
kernel_h = _gaussian_kernel1d(sigma, radius_w, x.device, x.dtype).view(1, 1, 1, -1).expand(c, 1, 1, -1)
|
||||
x = F.pad(x, (radius_w, radius_w, 0, 0), mode="reflect")
|
||||
x = F.conv2d(x, kernel_h, groups=c)
|
||||
if radius_h > 0:
|
||||
kernel_v = _gaussian_kernel1d(sigma, radius_h, x.device, x.dtype).view(1, 1, -1, 1).expand(c, 1, -1, 1)
|
||||
x = F.pad(x, (0, 0, radius_h, radius_h), mode="reflect")
|
||||
x = F.conv2d(x, kernel_v, groups=c)
|
||||
return x
|
||||
|
||||
|
||||
def adain_color_fix(target: torch.Tensor, source: torch.Tensor) -> torch.Tensor:
|
||||
"""Match target's per-channel spatial mean/std to source. Both (B, C, H, W) in [0, 1]."""
|
||||
target_mean = target.mean(dim=[2, 3], keepdim=True)
|
||||
target_std = target.std(dim=[2, 3], keepdim=True) + ADAIN_EPS
|
||||
source_mean = source.mean(dim=[2, 3], keepdim=True)
|
||||
source_std = source.std(dim=[2, 3], keepdim=True) + ADAIN_EPS
|
||||
result = (target - target_mean) / target_std * source_std + source_mean
|
||||
return torch.clamp(result, 0.0, 1.0)
|
||||
|
||||
|
||||
def wavelet_color_fix(target: torch.Tensor, source: torch.Tensor) -> torch.Tensor:
|
||||
"""Combine source's low frequencies with target's high frequencies. Both (B, C, H, W) in [0, 1]."""
|
||||
source_low = gaussian_blur(source, WAVELET_SIGMA)
|
||||
target_low = gaussian_blur(target, WAVELET_SIGMA)
|
||||
target_high = target - target_low
|
||||
result = source_low + target_high
|
||||
return torch.clamp(result, 0.0, 1.0)
|
||||
|
||||
|
||||
def apply_color_alignment(decoded: torch.Tensor, reference: torch.Tensor, mode: str) -> torch.Tensor:
|
||||
"""decoded/reference: (B, C, H, W) float in [0, 1], same spatial size."""
|
||||
if mode == "none":
|
||||
return torch.clamp(decoded, 0.0, 1.0)
|
||||
if mode == "adain":
|
||||
return adain_color_fix(decoded, reference)
|
||||
if mode == "wavelet":
|
||||
return wavelet_color_fix(decoded, reference)
|
||||
raise ValueError(f"Unknown color_alignment mode: {mode!r}")
|
||||
@@ -0,0 +1,218 @@
|
||||
"""VOSR2 inference contract: bicubic pre-scale, pad, encode, one-step denoise,
|
||||
decode, color-align, crop -- with optional DiT/VAE tiling. See VOSR2.md
|
||||
"Inference contract" and "Tiling".
|
||||
|
||||
`forward_flexible` (models/lightningdit.py) asserts a square input -- true of
|
||||
every upstream tiled call (tiles are always cropped `lt_size x lt_size`), but
|
||||
not of a whole non-square image's latent. To support arbitrary aspect ratios
|
||||
without tiling, the untiled path additionally pads to a square before the DiT
|
||||
call and crops back afterward; this is invisible in the output (still cropped
|
||||
to the exact requested size) and only engages when tile_size == 0.
|
||||
"""
|
||||
import logging
|
||||
|
||||
import torch
|
||||
import torch.nn.functional as F
|
||||
|
||||
import comfy.utils
|
||||
|
||||
from .color import apply_color_alignment
|
||||
from .tiled_vae import _gaussian_weights, _make_tile_grid
|
||||
|
||||
AE_FACTOR = 8
|
||||
DIT_PATCH_SIZE = 2
|
||||
PAD_MULTIPLE = AE_FACTOR * DIT_PATCH_SIZE # 16
|
||||
|
||||
|
||||
def _pad_to_multiple(x: torch.Tensor, multiple: int):
|
||||
_, _, h, w = x.shape
|
||||
pad_h = (multiple - h % multiple) % multiple
|
||||
pad_w = (multiple - w % multiple) % multiple
|
||||
if pad_h == 0 and pad_w == 0:
|
||||
return x
|
||||
return F.pad(x, (0, pad_w, 0, pad_h), mode="reflect")
|
||||
|
||||
|
||||
def _pad_to_square(x: torch.Tensor):
|
||||
_, _, h, w = x.shape
|
||||
side = max(h, w)
|
||||
pad_h, pad_w = side - h, side - w
|
||||
if pad_h == 0 and pad_w == 0:
|
||||
return x
|
||||
return F.pad(x, (0, pad_w, 0, pad_h), mode="reflect")
|
||||
|
||||
|
||||
def _generate_noise(shape, seed: int, device, dtype) -> torch.Tensor:
|
||||
"""One item's worth of noise per call; a local CPU Generator keeps global RNG state untouched."""
|
||||
generator = torch.Generator(device="cpu").manual_seed(seed)
|
||||
noise = torch.randn(shape, generator=generator, dtype=torch.float32)
|
||||
return noise.to(device=device, dtype=dtype)
|
||||
|
||||
|
||||
def _generate_noise_batch(shape_per_item, seed: int, batch_size: int, device, dtype) -> torch.Tensor:
|
||||
return torch.stack([_generate_noise(shape_per_item, seed + i, device, dtype) for i in range(batch_size)], dim=0)
|
||||
|
||||
|
||||
def _tile_params(tile_size: int, tile_overlap: int, lh: int, lw: int):
|
||||
"""Pixel tile size/overlap -> latent-space, aligned to the DiT patch size."""
|
||||
lt_size = max((tile_size // AE_FACTOR // DIT_PATCH_SIZE) * DIT_PATCH_SIZE, DIT_PATCH_SIZE)
|
||||
lt_overlap = max(tile_overlap // AE_FACTOR, lt_size // 8)
|
||||
lt_size = min(lt_size, min(lh, lw))
|
||||
lt_overlap = min(lt_overlap, lt_size - 1)
|
||||
return lt_size, lt_overlap
|
||||
|
||||
|
||||
def _resize_to_target(images_bhwc01: torch.Tensor, upscale: int, device) -> torch.Tensor:
|
||||
x = images_bhwc01.movedim(-1, 1).to(device) # BCHW [0, 1]
|
||||
_, _, h, w = x.shape
|
||||
target_h, target_w = h * upscale, w * upscale
|
||||
return F.interpolate(x, size=(target_h, target_w), mode="bicubic").clamp(0.0, 1.0)
|
||||
|
||||
|
||||
def _run_untiled_batch(model, resized01: torch.Tensor, seed: int, vae_tile_size: int, vae_tile_overlap: int) -> torch.Tensor:
|
||||
b, _, h, w = resized01.shape
|
||||
padded01 = _pad_to_multiple(resized01, PAD_MULTIPLE)
|
||||
padded01 = _pad_to_square(padded01)
|
||||
padded_pm1 = padded01 * 2.0 - 1.0
|
||||
|
||||
lq_latent, latents_mean, latents_std = model.encode_tiled(padded_pm1, vae_tile_size, vae_tile_overlap)
|
||||
venc_fea = model.vision_features(padded01)
|
||||
|
||||
noise = _generate_noise_batch(lq_latent.shape[1:], seed, b, lq_latent.device, lq_latent.dtype)
|
||||
sr_latent = model.denoise_one_step(lq_latent, noise, venc_fea)
|
||||
decoded_pm1 = model.decode_tiled(sr_latent, latents_mean, latents_std, vae_tile_size, vae_tile_overlap)
|
||||
|
||||
return decoded_pm1[:, :, :h, :w]
|
||||
|
||||
|
||||
def _count_dit_tiles(h: int, w: int, tile_size: int, tile_overlap: int) -> int:
|
||||
"""Tiles a `run_vosr2` will submit to the DiT for one already-upscaled HxW image, for progress reporting."""
|
||||
padded_h = h + (-h) % PAD_MULTIPLE
|
||||
padded_w = w + (-w) % PAD_MULTIPLE
|
||||
lh, lw = padded_h // AE_FACTOR, padded_w // AE_FACTOR
|
||||
lt_size, lt_overlap = _tile_params(tile_size, tile_overlap, lh, lw)
|
||||
if lh <= lt_size and lw <= lt_size:
|
||||
return 1
|
||||
return len(_make_tile_grid(lh, lt_size, lt_overlap)) * len(_make_tile_grid(lw, lt_size, lt_overlap))
|
||||
|
||||
|
||||
def _run_tiled_single(model, resized01: torch.Tensor, seed: int, tile_size: int, tile_overlap: int,
|
||||
vae_tile_size: int, vae_tile_overlap: int, pbar: comfy.utils.ProgressBar = None) -> torch.Tensor:
|
||||
"""Latent-space tiled DiT inference for one image (B=1). Ported from VOSR's tiled_latent_inference."""
|
||||
_, _, h, w = resized01.shape
|
||||
padded01 = _pad_to_multiple(resized01, PAD_MULTIPLE)
|
||||
padded_pm1 = padded01 * 2.0 - 1.0
|
||||
|
||||
lq_latent, latents_mean, latents_std = model.encode_tiled(padded_pm1, vae_tile_size, vae_tile_overlap)
|
||||
_, lc, lh, lw = lq_latent.shape
|
||||
lt_size, lt_overlap = _tile_params(tile_size, tile_overlap, lh, lw)
|
||||
|
||||
if lh <= lt_size and lw <= lt_size:
|
||||
lq_sq = _pad_to_square(lq_latent)
|
||||
venc_fea = model.vision_features(padded01)
|
||||
noise = _generate_noise(lq_sq.shape[1:], seed, lq_sq.device, lq_sq.dtype).unsqueeze(0)
|
||||
sr_latent = model.denoise_one_step(lq_sq, noise, venc_fea)[:, :, :lh, :lw]
|
||||
if pbar is not None:
|
||||
pbar.update_absolute(pbar.current + 1)
|
||||
else:
|
||||
h_pos = _make_tile_grid(lh, lt_size, lt_overlap)
|
||||
w_pos = _make_tile_grid(lw, lt_size, lt_overlap)
|
||||
g_weight = _gaussian_weights(lt_size, lt_size, lc, lq_latent.device)
|
||||
|
||||
tile_venc = {}
|
||||
for hi in h_pos:
|
||||
for wi in w_pos:
|
||||
ph_s, pw_s = hi * AE_FACTOR, wi * AE_FACTOR
|
||||
ph_e = min((hi + lt_size) * AE_FACTOR, padded01.shape[2])
|
||||
pw_e = min((wi + lt_size) * AE_FACTOR, padded01.shape[3])
|
||||
tile_venc[(hi, wi)] = model.vision_features(padded01[:, :, ph_s:ph_e, pw_s:pw_e])
|
||||
|
||||
noise = _generate_noise(lq_latent.shape[1:], seed, lq_latent.device, lq_latent.dtype).unsqueeze(0)
|
||||
z = noise
|
||||
|
||||
u_acc = torch.zeros_like(lq_latent)
|
||||
w_acc = torch.zeros_like(lq_latent)
|
||||
for hi in h_pos:
|
||||
for wi in w_pos:
|
||||
he, we = hi + lt_size, wi + lt_size
|
||||
inp = torch.cat([lq_latent[:, :, hi:he, wi:we], z[:, :, hi:he, wi:we]], dim=1)
|
||||
u_tile = model.dit_velocity(inp, 1.0, 0.0, tile_venc[(hi, wi)])
|
||||
u_acc[:, :, hi:he, wi:we] += u_tile * g_weight
|
||||
w_acc[:, :, hi:he, wi:we] += g_weight
|
||||
if pbar is not None:
|
||||
pbar.update_absolute(pbar.current + 1)
|
||||
|
||||
sr_latent = z - u_acc / w_acc
|
||||
|
||||
decoded_pm1 = model.decode_tiled(sr_latent, latents_mean, latents_std, vae_tile_size, vae_tile_overlap)
|
||||
return decoded_pm1[:, :, :h, :w]
|
||||
|
||||
|
||||
def run_vosr2(
|
||||
model,
|
||||
images_bhwc01: torch.Tensor,
|
||||
upscale: int,
|
||||
seed: int,
|
||||
color_alignment: str,
|
||||
tile_size: int,
|
||||
tile_overlap: int,
|
||||
vae_tile_size: int,
|
||||
vae_tile_overlap: int,
|
||||
) -> torch.Tensor:
|
||||
if images_bhwc01.shape[-1] != 3:
|
||||
raise ValueError(f"VOSR2Upscale expects a 3-channel RGB IMAGE, got {images_bhwc01.shape[-1]} channels.")
|
||||
if tile_size > 0 and tile_overlap >= tile_size:
|
||||
raise ValueError(f"VOSR2Upscale: tile_overlap ({tile_overlap}) must be smaller than tile_size ({tile_size}).")
|
||||
if vae_tile_size > 0 and vae_tile_overlap >= vae_tile_size:
|
||||
raise ValueError(f"VOSR2Upscale: vae_tile_overlap ({vae_tile_overlap}) must be smaller than vae_tile_size ({vae_tile_size}).")
|
||||
|
||||
device = model.dit_patcher.load_device
|
||||
resized01 = _resize_to_target(images_bhwc01, upscale, device)
|
||||
b, _, h, w = resized01.shape
|
||||
|
||||
if tile_size == 0 and (h > 512 or w > 512):
|
||||
logging.warning(
|
||||
f"VOSR2Upscale: target size {w}x{h} (after {upscale}x upscale) exceeds VOSR 2.0's "
|
||||
f"native 512px training resolution with tile_size=0 (DiT tiling disabled). VOSR2.md "
|
||||
f"states tiling is not optional above 512px -- set tile_size > 0 (e.g. 512) or "
|
||||
f"quality will likely degrade."
|
||||
)
|
||||
if vae_tile_size == 0 and (h > 1024 or w > 1024):
|
||||
logging.warning(
|
||||
f"VOSR2Upscale: target size {w}x{h} (after {upscale}x upscale) with vae_tile_size=0 "
|
||||
f"(VAE tiling disabled) decodes the full image in one pass regardless of tile_size -- "
|
||||
f"this is a common source of CUDA out-of-memory errors at this resolution. Set "
|
||||
f"vae_tile_size > 0 (e.g. 1024) to bound peak VRAM."
|
||||
)
|
||||
|
||||
if tile_size > 0:
|
||||
_, _, h, w = resized01.shape
|
||||
total_tiles = b * _count_dit_tiles(h, w, tile_size, tile_overlap)
|
||||
pbar = comfy.utils.ProgressBar(total_tiles)
|
||||
# Tiling bounds peak VRAM per item, but a batch's items were still
|
||||
# accumulating on GPU here until the final cat -- peak VRAM grew with
|
||||
# batch_size x output resolution regardless of tile_size, defeating
|
||||
# the point for large multi-item batches. Move each item off the GPU
|
||||
# as soon as it's decoded so only one item's output is ever GPU-
|
||||
# resident at a time.
|
||||
#
|
||||
# Color alignment also has to happen per item here, not on the
|
||||
# concatenated batch afterward: wavelet/adain run a Gaussian blur
|
||||
# over the whole tensor at once (color.py), so doing it post-concat
|
||||
# means one CPU allocation sized to the *entire* batch's decoded
|
||||
# output -- for large images/batches that's tens of GB of system
|
||||
# RAM even though nothing is GPU-resident anymore. Aligning each
|
||||
# item right after it's decoded caps that allocation at one item's
|
||||
# size, matching the per-item VRAM bound above.
|
||||
aligned_items = []
|
||||
for i in range(b):
|
||||
item_pm1 = _run_tiled_single(model, resized01[i:i + 1], seed + i, tile_size, tile_overlap, vae_tile_size, vae_tile_overlap, pbar=pbar).cpu()
|
||||
item01 = (item_pm1.clamp(-1.0, 1.0) + 1.0) / 2.0
|
||||
aligned_items.append(apply_color_alignment(item01, resized01[i:i + 1].cpu(), color_alignment))
|
||||
aligned01 = torch.cat(aligned_items, dim=0)
|
||||
else:
|
||||
outputs_pm1 = _run_untiled_batch(model, resized01, seed, vae_tile_size, vae_tile_overlap)
|
||||
decoded01 = (outputs_pm1.clamp(-1.0, 1.0) + 1.0) / 2.0
|
||||
aligned01 = apply_color_alignment(decoded01, resized01, color_alignment)
|
||||
|
||||
return aligned01.movedim(1, -1)
|
||||
@@ -0,0 +1,415 @@
|
||||
"""Discovery and strict loading of a VOSR 2.0 bundle.
|
||||
|
||||
A bundle is a self-contained folder under ``ComfyUI/models/vosr2/`` -- VOSR 2.0
|
||||
is a fixed DiT/VAE/DINOv2 triple (see the layout comment below), so the three
|
||||
pieces are not independently selectable and live together:
|
||||
|
||||
ComfyUI/models/vosr2/<bundle>/
|
||||
args.json
|
||||
checkpoints/ema_model.safetensors (or clean_weights/, or bundle root)
|
||||
Qwen-Image-vae-2d/{config.json, diffusion_pytorch_model.safetensors}
|
||||
dinov2_vitl14.safetensors
|
||||
|
||||
The confirmed bundle is fetched from the pinned Hugging Face repo ``CSWRY/VOSR``
|
||||
on first use, but only for parts that are missing -- once the files are in place
|
||||
nothing here touches the network. See ``ensure_vosr2_files``.
|
||||
|
||||
The ``model`` combo value is re-joined against ``_VOSR2_ROOT`` via
|
||||
``_safe_child_dir``, never taken as -- or resolved through -- an arbitrary path.
|
||||
"""
|
||||
import json
|
||||
import logging
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
import torch
|
||||
from safetensors.torch import load_file, save_file
|
||||
|
||||
import comfy.model_management
|
||||
import comfy.model_patcher
|
||||
import comfy.utils
|
||||
import folder_paths
|
||||
|
||||
from .models.dinov2 import build_dinov2_vitl14
|
||||
from .models.lightningdit import LightningDiT
|
||||
from .models.qwenimage_vae2d import AutoencoderKLQwenImage2D
|
||||
|
||||
VOSR2_FOLDER_KEY = "vosr2"
|
||||
|
||||
_VOSR2_ROOT = Path(folder_paths.models_dir) / "vosr2"
|
||||
_VOSR2_ROOT.mkdir(parents=True, exist_ok=True)
|
||||
folder_paths.add_model_folder_path(VOSR2_FOLDER_KEY, str(_VOSR2_ROOT))
|
||||
|
||||
# VOSR 2.0 is one indivisible artifact: the DiT runs entirely in *this* Qwen 2D
|
||||
# VAE's latent space (its channel count, scale factor, and per-channel
|
||||
# latents_mean/std), and is conditioned on *this* DINOv2-L feature extractor.
|
||||
# None of the three can be swapped independently, so they live together inside a
|
||||
# single bundle folder rather than in ComfyUI's shared vae/ and clip_vision/
|
||||
# trees. A bundle is a subdirectory of models/vosr2/ laid out as:
|
||||
# <bundle>/args.json
|
||||
# <bundle>/checkpoints/ema_model.safetensors (or clean_weights/, or bundle root)
|
||||
# <bundle>/Qwen-Image-vae-2d/{config.json,diffusion_pytorch_model.safetensors}
|
||||
# <bundle>/dinov2_vitl14.safetensors
|
||||
HF_REPO_ID = "CSWRY/VOSR"
|
||||
KNOWN_MODEL = "VOSR2" # the one confirmed bundle; also the combo default
|
||||
_VAE_SUBDIR = "Qwen-Image-vae-2d" # diffusers VAE dir inside the bundle
|
||||
_VAE_FILES = ("config.json", "diffusion_pytorch_model.safetensors")
|
||||
_VISION_FILENAME = "dinov2_vitl14.safetensors" # converted DINOv2-L, inside the bundle
|
||||
|
||||
# Paths of each piece inside the pinned HF repo. The DiT files carry a "VOSR2/"
|
||||
# prefix that becomes the bundle dir; the VAE files are fetched into the bundle.
|
||||
_DIT_HF_FILES = ("VOSR2/args.json", "VOSR2/checkpoints/ema_model.safetensors")
|
||||
_VAE_HF_FILES = tuple(f"{_VAE_SUBDIR}/{name}" for name in _VAE_FILES)
|
||||
# DINOv2-L ships upstream as a raw torch pickle; the loader converts it to
|
||||
# safetensors on download (this package only ever ``load_file``s .safetensors).
|
||||
_DINOV2_HF_FILE = "torch_cache/checkpoints/dinov2_vitl14_pretrain.pth"
|
||||
|
||||
# Required args.json values for a VOSR 2.0 (one-step 1.4B) checkpoint. See
|
||||
# VOSR2.md "Author confirmation" -- these fields are confirmed to have no
|
||||
# effect, or to be architecturally fixed, for this specific release.
|
||||
REQUIRED_ARGS = {
|
||||
"ae_type": "qwen",
|
||||
"dim": 1536,
|
||||
"depth": 36,
|
||||
"num_heads": 24,
|
||||
"patch_size": 2,
|
||||
"enc_type": "dinov2l",
|
||||
"enc_dim": 1024,
|
||||
"layer_dinov2b_list": [17],
|
||||
"auxiliary_time_cond": False,
|
||||
"distill_type": "onestep",
|
||||
}
|
||||
|
||||
# DiT construction params that must be present in args.json but whose value is
|
||||
# taken from the checkpoint rather than pinned by REQUIRED_ARGS.
|
||||
DIT_ARG_KEYS = ("mlp_ratio", "use_qknorm", "use_swiglu", "use_rope", "use_rmsnorm", "encdim_ratio", "resolution")
|
||||
|
||||
# Known training-only key patterns that may be present in an EMA/distillation
|
||||
# checkpoint but have no corresponding module in the inference-only LightningDiT
|
||||
# above (e.g. an EMA wrapper's step counter). Extend this list, don't relax
|
||||
# strict loading, if a real checkpoint surfaces another such key.
|
||||
_TRAINING_ONLY_KEY_PATTERNS = (
|
||||
re.compile(r"^n_averaged$"),
|
||||
re.compile(r"^step_count$"),
|
||||
re.compile(r"^decay$"),
|
||||
)
|
||||
_STRIPPABLE_PREFIXES = ("module.", "_orig_mod.", "ema_model.")
|
||||
|
||||
|
||||
class VOSR2LoadError(RuntimeError):
|
||||
"""Raised for any missing file, incompatible config, or malformed state dict."""
|
||||
|
||||
|
||||
def _safe_child_dir(root: Path, name: str) -> Path:
|
||||
if not name or "/" in name or "\\" in name or name in (".", ".."):
|
||||
raise VOSR2LoadError(f"Invalid VOSR2 selection: {name!r}")
|
||||
candidate = (root / name).resolve()
|
||||
root_resolved = root.resolve()
|
||||
if root_resolved not in candidate.parents and candidate != root_resolved:
|
||||
raise VOSR2LoadError(f"Invalid VOSR2 selection: {name!r}")
|
||||
return candidate
|
||||
|
||||
|
||||
def list_model_bundles() -> list:
|
||||
if not _VOSR2_ROOT.is_dir():
|
||||
return []
|
||||
return sorted(
|
||||
p.name for p in _VOSR2_ROOT.iterdir()
|
||||
if p.is_dir() and (p / "args.json").is_file()
|
||||
)
|
||||
|
||||
|
||||
def model_options() -> list:
|
||||
"""Bundle combo options: whatever is on disk, but always offering ``KNOWN_MODEL``.
|
||||
|
||||
ComfyUI snapshots combo ``options`` when the schema is built, so on a fresh
|
||||
install ``list_model_bundles()`` returns ``[]`` and the dropdown would be
|
||||
empty and unselectable. Seeding it with the confirmed name lets the user pick
|
||||
it and run; the loader then downloads that bundle on first execute.
|
||||
"""
|
||||
found = list_model_bundles()
|
||||
return found if KNOWN_MODEL in found else [KNOWN_MODEL, *found]
|
||||
|
||||
|
||||
def _convert_dinov2_pth_to_safetensors(src_pth: Path, dest: Path) -> None:
|
||||
# comfy.utils.load_torch_file wraps torch.load with ComfyUI's own
|
||||
# conventions (weights_only=True, mmap where supported, state_dict/
|
||||
# single-key unwrapping) instead of calling torch.load directly.
|
||||
state = comfy.utils.load_torch_file(str(src_pth), safe_load=True)
|
||||
if not isinstance(state, dict):
|
||||
raise VOSR2LoadError(
|
||||
f"Unexpected DINOv2 checkpoint format at {src_pth}: expected a flat state dict."
|
||||
)
|
||||
tensors = {k: v.contiguous() for k, v in state.items() if isinstance(v, torch.Tensor)}
|
||||
if not tensors:
|
||||
raise VOSR2LoadError(f"DINOv2 checkpoint at {src_pth} contained no tensors.")
|
||||
dest.parent.mkdir(parents=True, exist_ok=True)
|
||||
tmp = dest.with_name(dest.name + ".tmp")
|
||||
save_file(tensors, str(tmp))
|
||||
tmp.replace(dest)
|
||||
|
||||
|
||||
def ensure_vosr2_files(model_name: str) -> None:
|
||||
"""Fetch the confirmed VOSR 2.0 bundle from ``CSWRY/VOSR`` for missing parts only.
|
||||
|
||||
A no-op once the files are present -- it never contacts the network then.
|
||||
Only ``KNOWN_MODEL`` can be auto-fetched; a custom bundle name that is absent
|
||||
is left for the normal "not found" error in ``load_vosr2``, since this code
|
||||
cannot know where such a bundle would come from.
|
||||
"""
|
||||
if model_name != KNOWN_MODEL:
|
||||
return
|
||||
|
||||
bundle = _VOSR2_ROOT / KNOWN_MODEL
|
||||
vae_dir = bundle / _VAE_SUBDIR
|
||||
|
||||
dit_missing = _find_dit_weight(bundle) is None or not (bundle / "args.json").is_file()
|
||||
vae_missing = not all((vae_dir / name).is_file() for name in _VAE_FILES)
|
||||
vision_missing = not (bundle / _VISION_FILENAME).is_file()
|
||||
|
||||
if not (dit_missing or vae_missing or vision_missing):
|
||||
return
|
||||
|
||||
try:
|
||||
from huggingface_hub import hf_hub_download
|
||||
except ImportError as exc:
|
||||
raise VOSR2LoadError(
|
||||
"VOSR 2.0 model files are missing and huggingface_hub is not available "
|
||||
"to download them. Install huggingface_hub (it normally ships with "
|
||||
"ComfyUI), or place the files manually -- see the README 'Model files' "
|
||||
"section."
|
||||
) from exc
|
||||
|
||||
if dit_missing:
|
||||
logging.info("[VOSR2] downloading DiT bundle from %s ...", HF_REPO_ID)
|
||||
for f in _DIT_HF_FILES:
|
||||
hf_hub_download(HF_REPO_ID, f, local_dir=str(_VOSR2_ROOT))
|
||||
if vae_missing:
|
||||
logging.info("[VOSR2] downloading Qwen-Image 2D VAE from %s ...", HF_REPO_ID)
|
||||
vae_dir.mkdir(parents=True, exist_ok=True)
|
||||
for f in _VAE_HF_FILES:
|
||||
hf_hub_download(HF_REPO_ID, f, local_dir=str(bundle))
|
||||
if vision_missing:
|
||||
logging.info("[VOSR2] downloading + converting DINOv2-L encoder from %s ...", HF_REPO_ID)
|
||||
src = hf_hub_download(HF_REPO_ID, _DINOV2_HF_FILE)
|
||||
_convert_dinov2_pth_to_safetensors(Path(src), bundle / _VISION_FILENAME)
|
||||
|
||||
|
||||
def _load_args_json(bundle_dir: Path) -> dict:
|
||||
args_path = bundle_dir / "args.json"
|
||||
if not args_path.is_file():
|
||||
raise VOSR2LoadError(f"VOSR2 model bundle at {bundle_dir} is missing args.json.")
|
||||
with open(args_path, "r") as f:
|
||||
args = json.load(f)
|
||||
|
||||
for key, expected in REQUIRED_ARGS.items():
|
||||
actual = args.get(key)
|
||||
if actual != expected:
|
||||
raise VOSR2LoadError(
|
||||
f"VOSR2 model bundle at {bundle_dir} has an incompatible config: "
|
||||
f"expected {key}={expected!r}, got {actual!r}. VOSR2 v1 supports only "
|
||||
f"the VOSR 2.0 one-step 1.4B checkpoint."
|
||||
)
|
||||
missing = [k for k in DIT_ARG_KEYS if k not in args]
|
||||
if missing:
|
||||
raise VOSR2LoadError(
|
||||
f"VOSR2 model bundle at {bundle_dir}'s args.json is missing required field(s): {missing}."
|
||||
)
|
||||
return args
|
||||
|
||||
|
||||
def _find_dit_weight(bundle_dir: Path):
|
||||
for candidate in (
|
||||
bundle_dir / "clean_weights" / "ema_model.safetensors",
|
||||
bundle_dir / "checkpoints" / "ema_model.safetensors",
|
||||
bundle_dir / "ema_model.safetensors",
|
||||
):
|
||||
if candidate.is_file():
|
||||
return candidate
|
||||
return None
|
||||
|
||||
|
||||
def _resolve_dit_weight_path(bundle_dir: Path) -> Path:
|
||||
weight = _find_dit_weight(bundle_dir)
|
||||
if weight is None:
|
||||
raise VOSR2LoadError(
|
||||
f"No ema_model.safetensors found under {bundle_dir} "
|
||||
f"(looked in clean_weights/, checkpoints/, and the bundle root)."
|
||||
)
|
||||
return weight
|
||||
|
||||
|
||||
def _clean_state_dict_keys(state_dict: dict) -> dict:
|
||||
cleaned = {}
|
||||
for key, value in state_dict.items():
|
||||
stripped = key
|
||||
for prefix in _STRIPPABLE_PREFIXES:
|
||||
if stripped.startswith(prefix):
|
||||
stripped = stripped[len(prefix):]
|
||||
break
|
||||
if any(pattern.match(stripped) for pattern in _TRAINING_ONLY_KEY_PATTERNS):
|
||||
continue
|
||||
cleaned[stripped] = value
|
||||
return cleaned
|
||||
|
||||
|
||||
def _strict_load(module: torch.nn.Module, state_dict: dict, source: Path):
|
||||
state_dict = _clean_state_dict_keys(state_dict)
|
||||
missing, unexpected = module.load_state_dict(state_dict, strict=False)
|
||||
if missing or unexpected:
|
||||
raise VOSR2LoadError(
|
||||
f"VOSR2 checkpoint at {source} does not match the expected {type(module).__name__} "
|
||||
f"architecture (missing={missing}, unexpected={unexpected})."
|
||||
)
|
||||
|
||||
|
||||
def _resolve_dtype(dtype: str, device) -> torch.dtype:
|
||||
if dtype == "fp16":
|
||||
return torch.float16
|
||||
if dtype == "bf16":
|
||||
return torch.bfloat16
|
||||
if dtype == "default":
|
||||
return comfy.model_management.unet_dtype(device=device)
|
||||
raise VOSR2LoadError(f"Unknown dtype option: {dtype!r}")
|
||||
|
||||
|
||||
class VOSR2Model:
|
||||
"""Runtime bundle: independently offloadable DiT/VAE/vision-encoder plus config.
|
||||
|
||||
Exposes narrow operations (`vision_features`, `encode`, `denoise_one_step`,
|
||||
`decode`) rather than the raw modules, so callers never need to probe for
|
||||
capabilities on the wrapped components.
|
||||
"""
|
||||
|
||||
def __init__(self, dit_patcher, vae_patcher, vision_patcher, args: dict):
|
||||
self.dit_patcher = dit_patcher
|
||||
self.vae_patcher = vae_patcher
|
||||
self.vision_patcher = vision_patcher
|
||||
self.args = args
|
||||
self.vision_layer_index = args["layer_dinov2b_list"][0]
|
||||
self.dinov2_size = args.get("dinov2_size", 448)
|
||||
|
||||
def _load(self, patcher):
|
||||
comfy.model_management.load_models_gpu([patcher], force_full_load=True)
|
||||
return patcher.model, patcher.load_device
|
||||
|
||||
def vision_features(self, lq_bchw_01: torch.Tensor) -> list:
|
||||
"""lq_bchw_01: (B, 3, H, W) in [0, 1]. Returns a one-item list (fixed-index layer)."""
|
||||
model, device = self._load(self.vision_patcher)
|
||||
x = torch.nn.functional.interpolate(lq_bchw_01, size=(self.dinov2_size, self.dinov2_size), mode="bicubic").clamp(0.0, 1.0)
|
||||
mean = torch.tensor((0.485, 0.456, 0.406), device=device, dtype=x.dtype).view(1, 3, 1, 1)
|
||||
std = torch.tensor((0.229, 0.224, 0.225), device=device, dtype=x.dtype).view(1, 3, 1, 1)
|
||||
x = (x.to(device) - mean) / std
|
||||
feats = model.forward_intermediate_layer(x.to(model.pos_embed.dtype), self.vision_layer_index)
|
||||
return [feats]
|
||||
|
||||
def encode(self, x_bchw_neg1_1: torch.Tensor):
|
||||
from . import tiled_vae
|
||||
model, device = self._load(self.vae_patcher)
|
||||
return tiled_vae.encode_latent(model, x_bchw_neg1_1.to(device))
|
||||
|
||||
def encode_tiled(self, x_bchw_neg1_1: torch.Tensor, tile_size: int, tile_overlap: int):
|
||||
from . import tiled_vae
|
||||
model, device = self._load(self.vae_patcher)
|
||||
return tiled_vae.encode_dispatch(model, x_bchw_neg1_1.to(device), tile_size, tile_overlap)
|
||||
|
||||
def decode(self, latent: torch.Tensor, latents_mean, latents_std) -> torch.Tensor:
|
||||
from . import tiled_vae
|
||||
model, device = self._load(self.vae_patcher)
|
||||
return tiled_vae.decode_latent(model, latent.to(device), latents_mean, latents_std)
|
||||
|
||||
def decode_tiled(self, latent: torch.Tensor, latents_mean, latents_std, tile_size: int, tile_overlap: int) -> torch.Tensor:
|
||||
from . import tiled_vae
|
||||
model, device = self._load(self.vae_patcher)
|
||||
return tiled_vae.decode_dispatch(model, latent.to(device), latents_mean, latents_std, tile_size, tile_overlap)
|
||||
|
||||
def dit_velocity(self, inp: torch.Tensor, t_cur: float, t_next: float, venc_fea: list) -> torch.Tensor:
|
||||
"""Single DiT forward: predicted flow velocity for `inp = cat([lq_latent, z], dim=1)`."""
|
||||
model, device = self._load(self.dit_patcher)
|
||||
compute_dtype = model.t_embedder.mlp[0].weight.dtype
|
||||
inp = inp.to(device=device, dtype=compute_dtype)
|
||||
venc_fea = [f.to(device=device, dtype=compute_dtype) for f in venc_fea]
|
||||
b = inp.shape[0]
|
||||
t_cur_t = torch.full((b,), t_cur, device=device, dtype=compute_dtype)
|
||||
t_next_t = torch.full((b,), t_next, device=device, dtype=compute_dtype)
|
||||
return model.forward_flexible(inp, t_cur_t, t_next_t, venc_fea)
|
||||
|
||||
def denoise_one_step(self, lq_latent: torch.Tensor, noise: torch.Tensor, venc_fea: list) -> torch.Tensor:
|
||||
"""One Euler flow-matching update from t=1 to t=0 (VOSR2 is a one-step model)."""
|
||||
device = self.dit_patcher.load_device
|
||||
z = noise.to(device)
|
||||
u = self.dit_velocity(torch.cat([lq_latent.to(device), z], dim=1), 1.0, 0.0, venc_fea)
|
||||
return z - u
|
||||
|
||||
|
||||
def load_vosr2(model_name: str, dtype: str) -> VOSR2Model:
|
||||
ensure_vosr2_files(model_name)
|
||||
|
||||
bundle_dir = _safe_child_dir(_VOSR2_ROOT, model_name)
|
||||
if not bundle_dir.is_dir():
|
||||
raise VOSR2LoadError(f"VOSR2 model bundle not found: {model_name!r}")
|
||||
args = _load_args_json(bundle_dir)
|
||||
dit_weight_path = _resolve_dit_weight_path(bundle_dir)
|
||||
|
||||
# The VAE and vision encoder are part of the bundle -- VOSR 2.0 is a fixed
|
||||
# DiT/VAE/DINOv2 triple, not independently selectable components.
|
||||
vae_dir = bundle_dir / _VAE_SUBDIR
|
||||
if not (vae_dir / "config.json").is_file():
|
||||
raise VOSR2LoadError(
|
||||
f"VOSR2 bundle {bundle_dir} is missing its Qwen-Image 2D VAE "
|
||||
f"({vae_dir}/config.json). The VAE's latent space is tied to this DiT "
|
||||
f"and cannot be substituted."
|
||||
)
|
||||
|
||||
vision_path = bundle_dir / _VISION_FILENAME
|
||||
if not vision_path.is_file():
|
||||
raise VOSR2LoadError(
|
||||
f"VOSR2 bundle {bundle_dir} is missing its DINOv2-L encoder ({vision_path})."
|
||||
)
|
||||
|
||||
load_device = comfy.model_management.get_torch_device()
|
||||
offload_device = comfy.model_management.unet_offload_device()
|
||||
compute_dtype = _resolve_dtype(dtype, load_device)
|
||||
|
||||
base_channels = 16 # Qwen 2D VAE latent channels
|
||||
dit = LightningDiT(
|
||||
input_size=args["resolution"] // 8,
|
||||
patch_size=args["patch_size"],
|
||||
in_channels=2 * base_channels,
|
||||
out_channels=base_channels,
|
||||
hidden_size=args["dim"],
|
||||
depth=args["depth"],
|
||||
num_heads=args["num_heads"],
|
||||
mlp_ratio=args["mlp_ratio"],
|
||||
z_dims=args["enc_dim"],
|
||||
encdim_ratio=args["encdim_ratio"],
|
||||
auxiliary_time_cond=args["auxiliary_time_cond"],
|
||||
use_qknorm=args["use_qknorm"],
|
||||
use_swiglu=args["use_swiglu"],
|
||||
use_rope=args["use_rope"],
|
||||
use_rmsnorm=args["use_rmsnorm"],
|
||||
num_fused_layers=len(args["layer_dinov2b_list"]),
|
||||
)
|
||||
dit_state_dict = load_file(str(dit_weight_path))
|
||||
_strict_load(dit, dit_state_dict, dit_weight_path)
|
||||
dit = dit.eval().to(compute_dtype)
|
||||
for p in dit.parameters():
|
||||
p.requires_grad_(False)
|
||||
|
||||
vae = AutoencoderKLQwenImage2D.from_pretrained(str(vae_dir))
|
||||
vae = vae.eval().float() # Qwen VAE runs in fp32; see VOSR2.md "Device, dtype, and memory".
|
||||
for p in vae.parameters():
|
||||
p.requires_grad_(False)
|
||||
|
||||
vision_encoder = build_dinov2_vitl14()
|
||||
vision_state_dict = load_file(str(vision_path))
|
||||
_strict_load(vision_encoder, vision_state_dict, vision_path)
|
||||
vision_encoder = vision_encoder.eval().to(compute_dtype)
|
||||
for p in vision_encoder.parameters():
|
||||
p.requires_grad_(False)
|
||||
|
||||
dit_patcher = comfy.model_patcher.ModelPatcher(dit, load_device=load_device, offload_device=offload_device)
|
||||
vae_patcher = comfy.model_patcher.ModelPatcher(vae, load_device=load_device, offload_device=offload_device)
|
||||
vision_patcher = comfy.model_patcher.ModelPatcher(vision_encoder, load_device=load_device, offload_device=offload_device)
|
||||
|
||||
return VOSR2Model(dit_patcher, vae_patcher, vision_patcher, args)
|
||||
@@ -0,0 +1,86 @@
|
||||
import sys
|
||||
|
||||
from typing_extensions import override
|
||||
|
||||
from comfy_api.latest import ComfyExtension, io
|
||||
|
||||
from . import loader
|
||||
from .inference import run_vosr2
|
||||
from .loader import VOSR2Model
|
||||
|
||||
|
||||
class VOSR2ModelLoader(io.ComfyNode):
|
||||
@classmethod
|
||||
def define_schema(cls) -> io.Schema:
|
||||
return io.Schema(
|
||||
node_id="VOSR2ModelLoader",
|
||||
display_name="VOSR 2.0 Model Loader",
|
||||
category="image/upscaling/VOSR2",
|
||||
description="Load a VOSR 2.0 (one-step 1.4B) bundle: matched LightningDiT + Qwen-Image 2D VAE + DINOv2-L. The whole bundle is downloaded from the CSWRY/VOSR Hugging Face repo on first run if absent.",
|
||||
inputs=[
|
||||
io.Combo.Input("model", options=loader.model_options(), default=loader.KNOWN_MODEL, tooltip="VOSR 2.0 bundle folder under models/vosr2/ (DiT + its matched VAE + vision encoder). Downloaded from CSWRY/VOSR on first run if absent."),
|
||||
io.Combo.Input("dtype", options=["default", "fp16", "bf16"], default="default", tooltip="Compute dtype for the DiT and vision encoder. The VAE always runs in fp32."),
|
||||
],
|
||||
outputs=[
|
||||
io.Custom("VOSR2_MODEL").Output(display_name="model"),
|
||||
],
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def execute(cls, model, dtype) -> io.NodeOutput:
|
||||
bundle = loader.load_vosr2(model, dtype)
|
||||
return io.NodeOutput(bundle)
|
||||
|
||||
|
||||
class VOSR2Upscale(io.ComfyNode):
|
||||
@classmethod
|
||||
def define_schema(cls) -> io.Schema:
|
||||
return io.Schema(
|
||||
node_id="VOSR2Upscale",
|
||||
display_name="VOSR 2.0 Upscale",
|
||||
category="image/upscaling/VOSR2",
|
||||
description="One-step VOSR 2.0 image super-resolution.",
|
||||
inputs=[
|
||||
io.Custom("VOSR2_MODEL").Input("model", tooltip="Loaded VOSR 2.0 bundle."),
|
||||
io.Image.Input("image"),
|
||||
io.Int.Input("upscale", default=4, min=1, max=sys.maxsize, tooltip="Exact output multiplier. VOSR 2.0 was trained on degradations up to 16x, so higher factors are supported, but there's no general quality guarantee above ~4x -- results depend on the specific image and starting/target resolution, not just the factor. Uncapped so you can experiment; use tiling for large outputs."),
|
||||
io.Int.Input("seed", default=42, min=0, max=sys.maxsize, control_after_generate=io.ControlAfterGenerate.fixed, tooltip="Initial latent-noise seed."),
|
||||
io.Combo.Input("color_alignment", options=["wavelet", "adain", "none"], default="wavelet"),
|
||||
io.Int.Input("tile_size", default=0, min=0, max=4096, step=64, tooltip="DiT pixel tile size; 0 disables tiling. VOSR 2.0 was trained natively at up to 512px, so tiling is required (e.g. 512) whenever the upscaled output exceeds 512x512 -- otherwise quality degrades."),
|
||||
io.Int.Input("tile_overlap", default=32, min=0, max=512, step=8),
|
||||
io.Int.Input("vae_tile_size", default=0, min=0, max=8192, step=64, tooltip="VAE pixel tile size; 0 disables VAE tiling and decodes the full image in one pass regardless of tile_size -- a common source of CUDA OOM once the upscaled output goes much past 1024px. Set a nonzero value (e.g. 1024) for large outputs."),
|
||||
io.Int.Input("vae_tile_overlap", default=32, min=0, max=512, step=8),
|
||||
],
|
||||
outputs=[
|
||||
io.Image.Output(),
|
||||
],
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def validate_inputs(cls, model, image, upscale, seed, color_alignment, tile_size, tile_overlap, vae_tile_size, vae_tile_overlap):
|
||||
if tile_size > 0 and tile_overlap >= tile_size:
|
||||
return f"tile_overlap ({tile_overlap}) must be smaller than tile_size ({tile_size})."
|
||||
if vae_tile_size > 0 and vae_tile_overlap >= vae_tile_size:
|
||||
return f"vae_tile_overlap ({vae_tile_overlap}) must be smaller than vae_tile_size ({vae_tile_size})."
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
def execute(cls, model: VOSR2Model, image, upscale, seed, color_alignment, tile_size, tile_overlap, vae_tile_size, vae_tile_overlap) -> io.NodeOutput:
|
||||
result = run_vosr2(
|
||||
model, image, upscale, seed, color_alignment,
|
||||
tile_size, tile_overlap, vae_tile_size, vae_tile_overlap,
|
||||
)
|
||||
return io.NodeOutput(result)
|
||||
|
||||
|
||||
class VOSR2Extension(ComfyExtension):
|
||||
@override
|
||||
async def get_node_list(self) -> list[type[io.ComfyNode]]:
|
||||
return [
|
||||
VOSR2ModelLoader,
|
||||
VOSR2Upscale,
|
||||
]
|
||||
|
||||
|
||||
async def comfy_entrypoint() -> VOSR2Extension:
|
||||
return VOSR2Extension()
|
||||
@@ -0,0 +1,145 @@
|
||||
"""Gaussian-blended tiled VAE encode/decode for the Qwen-Image 2D VAE.
|
||||
|
||||
Ported from VOSR's tiled_vae.py. Full-image VAE encode/decode of large inputs can
|
||||
OOM (the Qwen VAE runs in fp32 internally); this bounds peak memory to one tile's
|
||||
activations. Encoding uses `latent_dist.mode()` (deterministic) rather than
|
||||
`.sample()`, since sampling draws uncorrelated noise per tile and would create
|
||||
seams at tile boundaries.
|
||||
|
||||
Why plain Gaussian blending is sufficient here (unlike SD/LDM's pad+crop `VAEHook`
|
||||
machinery): the Qwen VAE uses RMSNorm2D, a purely per-pixel/per-channel norm with
|
||||
no cross-tile statistics to reconcile (no GroupNorm), so each tile's forward pass
|
||||
is independent and a weighted blend of overlapping outputs is well-founded.
|
||||
"""
|
||||
import math
|
||||
|
||||
import torch
|
||||
import torch.nn.functional as F
|
||||
|
||||
AE_FACTOR = 8 # Qwen VAE spatial compression ratio
|
||||
|
||||
|
||||
def _gaussian_weights(tile_h: int, tile_w: int, channels: int, device) -> torch.Tensor:
|
||||
"""2-D Gaussian blend mask (1, C, tile_h, tile_w) peaked at the centre."""
|
||||
var = 0.01
|
||||
mid_h, mid_w = (tile_h - 1) / 2, (tile_w - 1) / 2
|
||||
y = torch.arange(tile_h, dtype=torch.float32)
|
||||
x = torch.arange(tile_w, dtype=torch.float32)
|
||||
wy = torch.exp(-((y - mid_h) / tile_h) ** 2 / (2 * var))
|
||||
wx = torch.exp(-((x - mid_w) / tile_w) ** 2 / (2 * var))
|
||||
w = wy[:, None] * wx[None, :]
|
||||
return w.to(device).unsqueeze(0).unsqueeze(0).expand(1, channels, -1, -1)
|
||||
|
||||
|
||||
def _make_tile_grid(length: int, tile: int, overlap: int) -> list:
|
||||
"""Sorted, deduplicated starting positions that cover `length`."""
|
||||
stride = max(tile - overlap, 1)
|
||||
if length <= tile:
|
||||
return [0]
|
||||
positions = list(range(0, length - tile + 1, stride))
|
||||
if positions[-1] + tile < length:
|
||||
positions.append(length - tile)
|
||||
return sorted(set(positions))
|
||||
|
||||
|
||||
def _pad_to_multiple(x: torch.Tensor, multiple: int = 8):
|
||||
_, _, h, w = x.shape
|
||||
pad_h = (multiple - h % multiple) % multiple
|
||||
pad_w = (multiple - w % multiple) % multiple
|
||||
if pad_h == 0 and pad_w == 0:
|
||||
return x, h, w
|
||||
return F.pad(x, (0, pad_w, 0, pad_h), mode="reflect"), h, w
|
||||
|
||||
|
||||
def encode_latent(vae, x: torch.Tensor):
|
||||
"""Single-shot deterministic VAE encode -> normalized latent. Returns (latent, mean, std)."""
|
||||
device = x.device
|
||||
latents_mean = torch.tensor(vae.latents_mean, device=device).view(1, -1, 1, 1)
|
||||
latents_std = 1.0 / torch.tensor(vae.latents_std, device=device).view(1, -1, 1, 1)
|
||||
z = vae.encode(x).latent_dist.mode()
|
||||
return (z - latents_mean) * latents_std, latents_mean, latents_std
|
||||
|
||||
|
||||
def decode_latent(vae, sr_latent: torch.Tensor, latents_mean: torch.Tensor, latents_std: torch.Tensor) -> torch.Tensor:
|
||||
"""Single-shot VAE decode -> pixels in [-1, 1]."""
|
||||
sr_latent = sr_latent / latents_std + latents_mean
|
||||
return vae.decode(sr_latent).sample.clamp(-1, 1)
|
||||
|
||||
|
||||
def _tile_params(tile_size: int, tile_overlap: int, lh: int, lw: int):
|
||||
lt_size = max(tile_size // AE_FACTOR, 1)
|
||||
lt_overlap = max(tile_overlap // AE_FACTOR, lt_size // 8)
|
||||
lt_size = min(lt_size, min(lh, lw))
|
||||
lt_overlap = min(lt_overlap, lt_size - 1)
|
||||
return lt_size, lt_overlap
|
||||
|
||||
|
||||
def tiled_encode_latent(vae, x: torch.Tensor, tile_size: int, tile_overlap: int):
|
||||
"""Output latent shape equals the untiled path: ceil(h/8) x ceil(w/8)."""
|
||||
pad, orig_h, orig_w = _pad_to_multiple(x, 8)
|
||||
lh, lw = pad.shape[2] // 8, pad.shape[3] // 8
|
||||
lt_size, lt_overlap = _tile_params(tile_size, tile_overlap, lh, lw)
|
||||
|
||||
if lh <= lt_size and lw <= lt_size:
|
||||
return encode_latent(vae, pad)
|
||||
|
||||
h_pos = _make_tile_grid(lh, lt_size, lt_overlap)
|
||||
w_pos = _make_tile_grid(lw, lt_size, lt_overlap)
|
||||
|
||||
b = pad.shape[0]
|
||||
acc = wacc = g = None
|
||||
mean = std = None
|
||||
for hi in h_pos:
|
||||
for wi in w_pos:
|
||||
crop = pad[:, :, hi * 8:(hi + lt_size) * 8, wi * 8:(wi + lt_size) * 8]
|
||||
z_tile, mean, std = encode_latent(vae, crop)
|
||||
if acc is None:
|
||||
lc = z_tile.shape[1]
|
||||
g = _gaussian_weights(lt_size, lt_size, lc, x.device)
|
||||
acc = torch.zeros(b, lc, lh, lw, device=x.device, dtype=z_tile.dtype)
|
||||
wacc = torch.zeros_like(acc)
|
||||
acc[:, :, hi:hi + lt_size, wi:wi + lt_size] += z_tile * g
|
||||
wacc[:, :, hi:hi + lt_size, wi:wi + lt_size] += g
|
||||
|
||||
blended = acc / wacc
|
||||
out_lh, out_lw = math.ceil(orig_h / 8), math.ceil(orig_w / 8)
|
||||
return blended[:, :, :out_lh, :out_lw], mean, std
|
||||
|
||||
|
||||
def tiled_decode_latent(vae, sr_latent: torch.Tensor, latents_mean, latents_std, tile_size: int, tile_overlap: int) -> torch.Tensor:
|
||||
"""Decodes in pixel space (3ch): each latent tile maps to an exactly-8x pixel tile."""
|
||||
b, _, lh, lw = sr_latent.shape
|
||||
lt_size, lt_overlap = _tile_params(tile_size, tile_overlap, lh, lw)
|
||||
|
||||
if lh <= lt_size and lw <= lt_size:
|
||||
return decode_latent(vae, sr_latent, latents_mean, latents_std)
|
||||
|
||||
h_pos = _make_tile_grid(lh, lt_size, lt_overlap)
|
||||
w_pos = _make_tile_grid(lw, lt_size, lt_overlap)
|
||||
|
||||
out_h, out_w = lh * 8, lw * 8
|
||||
g = _gaussian_weights(lt_size * 8, lt_size * 8, 3, sr_latent.device)
|
||||
acc = torch.zeros(b, 3, out_h, out_w, device=sr_latent.device, dtype=sr_latent.dtype)
|
||||
wacc = torch.zeros_like(acc)
|
||||
for hi in h_pos:
|
||||
for wi in w_pos:
|
||||
he, we = hi + lt_size, wi + lt_size
|
||||
pix = decode_latent(vae, sr_latent[:, :, hi:he, wi:we], latents_mean, latents_std)
|
||||
acc[:, :, hi * 8:he * 8, wi * 8:we * 8] += pix * g
|
||||
wacc[:, :, hi * 8:he * 8, wi * 8:we * 8] += g
|
||||
|
||||
return (acc / wacc).clamp(-1, 1)
|
||||
|
||||
|
||||
def encode_dispatch(vae, x: torch.Tensor, vae_tile_size: int, vae_tile_overlap: int):
|
||||
"""encode_latent, tiled when vae_tile_size > 0."""
|
||||
if vae_tile_size and vae_tile_size > 0:
|
||||
return tiled_encode_latent(vae, x, vae_tile_size, vae_tile_overlap)
|
||||
return encode_latent(vae, x)
|
||||
|
||||
|
||||
def decode_dispatch(vae, sr_latent: torch.Tensor, latents_mean, latents_std, vae_tile_size: int, vae_tile_overlap: int) -> torch.Tensor:
|
||||
"""decode_latent, tiled when vae_tile_size > 0."""
|
||||
if vae_tile_size and vae_tile_size > 0:
|
||||
return tiled_decode_latent(vae, sr_latent, latents_mean, latents_std, vae_tile_size, vae_tile_overlap)
|
||||
return decode_latent(vae, sr_latent, latents_mean, latents_std)
|
||||
@@ -0,0 +1,92 @@
|
||||
"""Foreground local browser check; stop every owned service before returning."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import signal
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
import urllib.error
|
||||
import urllib.request
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
OUT = ROOT / ".local-evidence/vosr2-document/browser"
|
||||
|
||||
|
||||
def main():
|
||||
OUT.mkdir(parents=True, exist_ok=True)
|
||||
# Refuse to reuse another operator's service or port.
|
||||
import socket
|
||||
|
||||
for port in (8247, 5173):
|
||||
with socket.socket() as sock:
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.bind(("127.0.0.1", port))
|
||||
processes = []
|
||||
logs = []
|
||||
try:
|
||||
commands = [
|
||||
([sys.executable, str(ROOT / "e2e/workflow-document-server.py")], ROOT),
|
||||
(
|
||||
["node", "node_modules/vite/bin/vite.js", "--host", "127.0.0.1"],
|
||||
ROOT / "calliope-web",
|
||||
),
|
||||
]
|
||||
for i, (command, cwd) in enumerate(commands):
|
||||
log = (OUT / f"service-{i}.log").open("w")
|
||||
logs.append(log)
|
||||
processes.append(
|
||||
subprocess.Popen(command, cwd=cwd, stdout=log, stderr=log, start_new_session=True)
|
||||
)
|
||||
for url in (
|
||||
"http://127.0.0.1:8247/api/workflows",
|
||||
"http://127.0.0.1:5173/connections",
|
||||
):
|
||||
deadline = time.monotonic() + 30
|
||||
while True:
|
||||
if any(p.poll() is not None for p in processes):
|
||||
raise RuntimeError("Local service exited; inspect service logs")
|
||||
try:
|
||||
with urllib.request.urlopen(url, timeout=1) as response:
|
||||
if response.status == 200:
|
||||
break
|
||||
except (urllib.error.URLError, TimeoutError):
|
||||
pass
|
||||
if time.monotonic() > deadline:
|
||||
raise TimeoutError(url)
|
||||
time.sleep(0.2)
|
||||
names = ["vosr2"]
|
||||
for name in names:
|
||||
subprocess.run(["node", f"e2e/{name}-document.mjs"], cwd=ROOT, check=True)
|
||||
finally:
|
||||
for p in processes:
|
||||
if p.poll() is None:
|
||||
os.killpg(p.pid, signal.SIGTERM)
|
||||
try:
|
||||
p.wait(timeout=10)
|
||||
except subprocess.TimeoutExpired:
|
||||
os.killpg(p.pid, signal.SIGKILL)
|
||||
p.wait(timeout=5)
|
||||
for log in logs:
|
||||
log.close()
|
||||
import json
|
||||
|
||||
released = []
|
||||
for port in (8247, 5173):
|
||||
with socket.socket() as sock:
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.bind(("127.0.0.1", port))
|
||||
released.append(port)
|
||||
(OUT / "service-stop.json").write_text(
|
||||
json.dumps(
|
||||
dict(ports_released=released, child_exit_codes=[p.returncode for p in processes])
|
||||
)
|
||||
+ "\n"
|
||||
)
|
||||
print("All owned browser services stopped; ports released.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,102 @@
|
||||
// Local GET-only: 46 VOSR2 positions, one complete Note, 32 frozen summaries.
|
||||
import fs from 'node:fs';
|
||||
import assert from 'node:assert/strict';
|
||||
const { chromium } = await import(process.env.PLAYWRIGHT_MODULE || 'playwright');
|
||||
const out='.local-evidence/vosr2-document/browser';fs.mkdirSync(out,{recursive:true});
|
||||
const checks=[],requests=[],errors=[],blockedFonts=[],assertionGroups={},interceptions=[];let group='aggregate';
|
||||
function check(condition,label){assert.ok(condition,label);checks.push(label);assertionGroups[group]=(assertionGroups[group]||0)+1;console.log('PASS '+label);}
|
||||
const browser=await chromium.launch({headless:true,executablePath:process.env.BROWSER_EXECUTABLE});
|
||||
try {
|
||||
const page=await browser.newPage({viewport:{width:1440,height:1000}});
|
||||
await page.route('**/*',route=>{
|
||||
const u=new URL(route.request().url());
|
||||
if(u.hostname==='fonts.googleapis.com'){blockedFonts.push(String(u));return route.fulfill({contentType:'text/css',body:''});}
|
||||
if(route.request().method()!=='GET'||u.hostname!=='127.0.0.1'||u.pathname==='/api/view'||(/\.(mp4|png|wav|mp3|webm)$/i.test(u.pathname)&&u.pathname!=='/favicon.png')){errors.push('Forbidden request '+u);return route.abort();}
|
||||
return route.continue();
|
||||
});
|
||||
page.on('request',r=>{if(r.url().includes('/api/'))requests.push({method:r.method(),url:r.url()});});
|
||||
page.on('pageerror',e=>errors.push(e.message));
|
||||
requests.push({method:'GET',url:'http://127.0.0.1:8247/api/workflows'});
|
||||
const records=await(await fetch('http://127.0.0.1:8247/api/workflows')).json();
|
||||
const names=['VOSR2_图像超分放大','Seedvr2_3b_int8_视频放大','Seedvr2_3b_int8_图像放大','RTX_video_upscale','RTX_image_upscale','手动按分镜视频截取','sam3_图像视频-提示词遮罩分割','多视频合成分屏展示','图像4种添加水印节点','birefnet_图像移除背景','加载本地latent解码','截取视频每一帧','双图像或视频合并显示','视频转gif动图图片','加载图片合成视频','视频倒放','NLF_视频人物动作骨架获取','openpose-video-姿态检测','sdpose_视频人物姿势骨架提取','gemma4_提示词反推(图像视频音频)','图像合并成四宫格','图像分割-多宫格分割','Qwen_image2.1_图像编辑_背景移除','Qwen_image2.1_图像编辑_提示词增强','Qwen_image2.1_文生图_提示词增强','ControlNet_aux_常用样例','Qwen3-ASR-语音转文字','Qwen3-ASR-Subtitle语音转字幕','Minimax-H3提示词增强','音频转MP3格式','音频人声分离','视频-音频分离','图像嵌入文字描述'];
|
||||
const details=[];
|
||||
for(const name of names){const r=records.find(r=>r.name===name);assert.ok(r);const url=`http://127.0.0.1:8247/api/workflows/${r.id}`;requests.push({method:'GET',url});details.push(await(await fetch(url)).json());}
|
||||
check(details.length===33&&details.reduce((n,d)=>n+d.doc_json.fixed_version.fields.length,0)===1034,'33图1034保存位置');
|
||||
check(details.reduce((n,d)=>n+(d.doc_json.source_notes?.length||0),0)===25,'33图25源注释');
|
||||
await page.goto('http://127.0.0.1:5173/connections',{waitUntil:'networkidle'});
|
||||
const dialog=page.getByRole('dialog',{name:'工作流说明'});
|
||||
const fixedCard=dialog.locator('.card').filter({has:page.getByText('固定版本参数说明',{exact:true})});
|
||||
async function begin(name){const row=page.locator('.wf-row').filter({has:page.locator('.wf-name').filter({hasText:name})}).first();const button=row.getByRole('button',{name:'说明',exact:true});await button.focus();await page.keyboard.press('Enter');return button;}
|
||||
async function loaded(){await dialog.getByText('用途与来源',{exact:true}).waitFor();await dialog.evaluate(el=>Promise.all(el.getAnimations().map(a=>a.finished)));}
|
||||
for(const width of [1440,390]){
|
||||
await page.setViewportSize({width,height:width===390?844:1000});
|
||||
for(const d of details){
|
||||
group=details.indexOf(d)<1?'new_vosr2':'old_thirty_two';const b=d.doc_json.fixed_version,button=await begin(d.name);await loaded();
|
||||
const overview=dialog.locator('.card').filter({has:page.getByText('用途与来源',{exact:true})});
|
||||
check((await overview.innerText()).includes(b.user_overview),`${width} ${d.name}默认中文用途`);
|
||||
check(!(await dialog.getByText('源图与审校记录',{exact:true}).locator('..').evaluate(el=>el.open)),`${width} ${d.name}源审校默认折叠`);
|
||||
check(!(await dialog.getByText('核对范围与来源依据',{exact:true}).locator('..').evaluate(el=>el.open)),`${width} ${d.name}技术范围默认折叠`);
|
||||
const visible=await fixedCard.innerText();
|
||||
check(!visible.includes('执行标量')&&!visible.includes('widgetId')&&!visible.includes(b.source_sha256)&&!visible.includes('UUID'),`${width} ${d.name}默认无执行计数/实现标识`);
|
||||
check(visible.includes('依据固定版本整理,目标环境与实际效果未核对。'),`${width} ${d.name}默认依据限制可见`);
|
||||
for(const t of ['说明未定稿','未验证实跑','未检查'])check((await dialog.innerText()).includes(t),`${width} ${d.name} ${t}`);
|
||||
check(!d.is_enabled&&!d.doc_completed_at&&!d.exec_verified_at,`${width} ${d.name}停用/时间戳空`);
|
||||
check(await fixedCard.locator('summary').filter({hasText:/^节点 [\d:]+ · /}).count()===b.fields.length,`${width} ${d.name}参数全保留`);
|
||||
check(await dialog.locator('.drawer-body').evaluate(el=>el.scrollWidth<=el.clientWidth),`${width} ${d.name}默认无溢出`);
|
||||
await dialog.locator('.drawer-body').evaluate(el=>el.scrollTop=0);
|
||||
if(details.indexOf(d)<1)await page.screenshot({path:`${out}/${width}-${d.id}-default.png`});
|
||||
if(details.indexOf(d)>0){await page.keyboard.press('Escape');await dialog.waitFor({state:'hidden'});check(await button.evaluate(el=>el===document.activeElement),`${width} ${d.name}旧图归还焦点`);continue;}
|
||||
await dialog.getByText('源图与审校记录',{exact:true}).click();
|
||||
check((await overview.innerText()).includes(d.doc_json.purpose)&&(await overview.innerText()).includes(d.source_repo_path),`${width} ${d.name}原用途/源路径展开保留`);
|
||||
await dialog.getByText('核对范围与来源依据',{exact:true}).click();
|
||||
const flowText=await fixedCard.innerText();
|
||||
for(const line of b.flow)check(flowText.includes(line),`${width} ${d.name}展开流程 ${b.flow.indexOf(line)}`);
|
||||
if(width===1440){await fixedCard.getByText(b.flow[2],{exact:true}).evaluate(el=>el.scrollIntoView({block:'center'}));await page.screenshot({path:`${out}/${width}-${d.id}-branch-flow.png`});}
|
||||
await dialog.getByText('版本、源图与连线依据',{exact:true}).click();
|
||||
check((await fixedCard.innerText()).includes(b.source_sha256)&&b.versions.every(v=>(v&&true)),`${width} ${d.name}原件摘要可展开`);
|
||||
const versionText=await fixedCard.innerText();
|
||||
for(const v of b.versions)check(versionText.includes(v),`${width} ${d.name}版本 ${b.versions.indexOf(v)}`);
|
||||
if(details.indexOf(d)<1){
|
||||
for(const f of b.fields){
|
||||
const summary=fixedCard.locator(`details[data-fixed-field="${f.pointer}"] > summary`);await summary.focus();await page.keyboard.press('Enter');const box=summary.locator('..');
|
||||
check(await box.evaluate(el=>el.open),`${width} ${f.node_id}.${f.field}键盘展开`);
|
||||
let text=await box.innerText();check(text.includes(f.effect)&&text.includes(f.limits)&&text.includes(f.schema_default)&&text.includes(f.execution_note)&&text.includes(f.unit),`${width} ${f.node_id}.${f.field}用途/单位/范围/来源条件`);
|
||||
check(await box.locator(':scope > pre').textContent()===(typeof f.value==='string'?f.value:JSON.stringify(f.value,null,2)),`${width} ${f.node_id}.${f.field}精确保留现值`);
|
||||
check(!text.includes(f.pointer),`${width} ${f.node_id}.${f.field}指针默认折叠`);
|
||||
await box.getByText('来源依据',{exact:true}).click();text=await box.innerText();
|
||||
check(text.includes(f.pointer)&&text.includes(f.class_type)&&text.includes(f.json_type)&&f.evidence.every(i=>{const e=b.sources[i];return text.includes(e.commit)&&text.includes(e.sha256)&&text.includes(e.lines.join('~'));}),`${width} ${f.node_id}.${f.field}精确源码/类型/指针`);
|
||||
check(await dialog.locator('.drawer-body').evaluate(el=>el.scrollWidth<=el.clientWidth),`${width} ${f.node_id}.${f.field}展开无溢出`);
|
||||
if(width===1440&&f.field==='tile_overlap'&&f.node_id==='27')await page.screenshot({path:`${out}/${width}-${d.id}-${f.node_id}-${f.field}.png`});
|
||||
await summary.click();
|
||||
}
|
||||
for(const n of b.comments){const summary=dialog.getByText(`节点 ${n.node_id}`,{exact:true});await summary.click();const expected=d.doc_json.source_notes.find(x=>String(x.node_id)===n.node_id);check(await summary.locator('..').locator('pre').textContent()===JSON.stringify(expected.content,null,2),`${width}注释${n.node_id}全文`);check(await dialog.locator('.drawer-body').evaluate(el=>el.scrollWidth<=el.clientWidth),`${width}注释${n.node_id}无溢出`);if(width===390){await summary.evaluate(el=>el.scrollIntoView({block:'start'}));await page.screenshot({path:`${out}/${width}-${d.id}-${n.node_id}-note.png`});}await summary.click();}
|
||||
await dialog.getByRole('button',{name:'关闭',exact:true}).focus();await page.keyboard.press('Tab');check(await dialog.evaluate(el=>el.contains(document.activeElement)),`${width}Tab焦点保留`);await page.keyboard.press('Shift+Tab');check(await dialog.evaluate(el=>el.contains(document.activeElement)),`${width}ShiftTab焦点保留`);
|
||||
}
|
||||
await page.keyboard.press('Escape');await dialog.waitFor({state:'hidden'});check(await button.evaluate(el=>el===document.activeElement),`${width} ${d.name}关闭归还焦点`);
|
||||
}
|
||||
}
|
||||
group='shared_regressions';
|
||||
for(const name of ['旧工作流回退(隔离测试夹具)','空说明回退(隔离测试夹具)']){await begin(name);await loaded();check((await dialog.innerText()).includes('隔离库旧条目回退测试'),'旧/空说明回退 '+name);await page.keyboard.press('Escape');}
|
||||
// Missing summary and mismatched bindings are tested with local GET fixtures, without writes.
|
||||
for(const variant of ['missing-overview','mismatched','html-summary']){
|
||||
const d=structuredClone(details[0]);
|
||||
if(variant==='missing-overview')delete d.doc_json.fixed_version.user_overview;
|
||||
if(variant==='mismatched')d.doc_json.fixed_version={matched:false,notice:'固定版本参数说明待核对:源文件、声明版本或说明依据未匹配,未采用旧定义。'};
|
||||
if(variant==='html-summary')d.doc_json.fixed_version.user_overview='<img src="https://example.invalid/forbidden">仅纯文本';
|
||||
await page.route(`**/api/workflows/${d.id}`,route=>{interceptions.push({variant,url:route.request().url()});return route.fulfill({json:d});});await begin(d.name);await loaded();
|
||||
if(variant==='missing-overview')check((await dialog.innerText()).includes('这张图的用途和操作重点可在下方使用步骤中查看;目标环境与实际效果仍待核对。'),'缺摘要自然中文回退');
|
||||
if(variant==='mismatched')check((await dialog.innerText()).includes(d.doc_json.fixed_version.notice)&&!await dialog.getByText('核对范围与来源依据',{exact:true}).count(),'错绑定提示明确且不展示旧字段');
|
||||
if(variant==='html-summary')check((await dialog.innerText()).includes(d.doc_json.fixed_version.user_overview)&&await dialog.locator('img').count()===0,'摘要HTML仅纯文本不创建图像或请求');
|
||||
check(!(await dialog.innerText()).includes('undefined'),'回退不暴露undefined');await page.keyboard.press('Escape');await page.unroute(`**/api/workflows/${d.id}`);
|
||||
}
|
||||
let release,entered,delivered;const hold=new Promise(r=>release=r),intercept=new Promise(r=>entered=r),done=new Promise(r=>delivered=r);
|
||||
await page.route(`**/api/workflows/${details[0].id}`,async route=>{interceptions.push({variant:"late",url:route.request().url()});entered();await hold;await route.fulfill({json:details[0]});delivered();});
|
||||
await begin(details[0].name);await intercept;await page.keyboard.press('Escape');await begin(details[1].name);await loaded();release();await done;
|
||||
check((await dialog.innerText()).includes(details[1].doc_json.fixed_version.user_overview)&&await fixedCard.locator('summary').filter({hasText:/^节点 [\d:]+ · /}).count()===details[1].doc_json.fixed_version.fields.length,'迟到VOSR2响应不覆盖旧SeedVR2视频摘要/47字段');await page.keyboard.press('Escape');await page.unroute(`**/api/workflows/${details[0].id}`);
|
||||
await page.route(`**/api/workflows/${details[0].id}`,route=>{interceptions.push({variant:'failure',url:route.request().url()});return route.fulfill({status:500,json:{detail:'隔离失败夹具'}});});await begin(details[0].name);await dialog.getByRole('alert').waitFor({timeout:20000});check(await dialog.getByRole('button',{name:'重试',exact:true}).isVisible(),'GET失败显示重试');check(await dialog.getByText('用途与来源',{exact:true}).count()===0,'读取失败隐藏旧摘要');await page.unroute(`**/api/workflows/${details[0].id}`);await dialog.getByRole('button',{name:'重试',exact:true}).click();await loaded();check((await dialog.innerText()).includes(details[0].doc_json.fixed_version.user_overview),'重试恢复摘要');await page.keyboard.press('Escape');
|
||||
check(errors.length===0,'无脚本错误或禁止请求 '+JSON.stringify(errors));check(requests.every(r=>r.method==='GET'&&new URL(r.url).hostname==='127.0.0.1'&&!r.url.includes('/api/view')),'全程本地GET无写/生成/目标/历史预览请求');
|
||||
const polling=requests.filter(r=>['/api/jobs','/api/events'].includes(new URL(r.url).pathname));
|
||||
const fixed=requests.filter(r=>!polling.includes(r));
|
||||
const frequencies=rs=>Object.fromEntries([...new Set(rs.map(r=>new URL(r.url).pathname))].sort().map(p=>[p,rs.filter(r=>new URL(r.url).pathname===p).length]));
|
||||
fs.writeFileSync(`${out}/browser-results.json`,JSON.stringify({request_accounting:{fixed_count:fixed.length,fixed_paths:frequencies(fixed),polling_count:polling.length,polling_paths:frequencies(polling),polling_tolerance:1,reason:'定时轮询可因浏览耗时与计时器边界相差±1;固定请求逐条保存,不忽略真实新请求,禁止请求零容忍。'},assertion_count:checks.length,assertionGroups,interceptions,checks,requests,errors,blockedFonts,viewports:[1440,390]},null,2));
|
||||
} finally {await browser.close();}
|
||||
Reference in New Issue
Block a user