HEL-892: bind OpenPose video reference documentation to exact source and package
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -15,6 +15,11 @@ DEFINITION_SHA256 = "c4c7f04fde29dc7485a341207397fcf6191e3fcbe89ecc2d238f4a4f5bc
|
||||
|
||||
# Explicit path allowlist; a recomputed caller-supplied digest cannot extend trust.
|
||||
DEFINITIONS = {
|
||||
(
|
||||
"example_ComfyUI_workflows/0-基础处理:图像合并-音频"
|
||||
"分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video"
|
||||
"-姿态检测.json"
|
||||
): "b3b87aa0c9d47b6266bcb14e6b1fb268d70e9b2830f62149ab7fd8668783905b",
|
||||
(
|
||||
"example_ComfyUI_workflows/0-基础处理:图像合并-音频"
|
||||
"分离-视频截取合并-图像视频放大/人物骨骼姿势提取/sdpose_视频人物姿势骨"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -202,10 +202,11 @@ def test_ten_documents_only_gain_overview_and_new_block_is_independent():
|
||||
"图像分割-多宫格分割.json",
|
||||
"gemma4_提示词反推(图像视频音频).json",
|
||||
"sdpose_视频人物姿势骨架提取.json",
|
||||
"openpose-video-姿态检测.json",
|
||||
)
|
||||
)
|
||||
]
|
||||
assert len(additions) == 4
|
||||
assert len(additions) == 5
|
||||
for p in additions:
|
||||
now[p].pop("fixed_version_document")
|
||||
historical = [p for p in DEFINITIONS if p not in additions]
|
||||
|
||||
@@ -203,7 +203,7 @@ def test_graph_specific_semantics_and_companion():
|
||||
|
||||
|
||||
def test_other_documents_and_block_swaps():
|
||||
assert len(DEFINITIONS) == 15
|
||||
assert len(DEFINITIONS) == 16
|
||||
for path in DEFINITIONS:
|
||||
if path == PATH:
|
||||
continue
|
||||
|
||||
@@ -153,10 +153,12 @@ def test_real_document_and_frozen_old_thirteen_blocks():
|
||||
resource = "calliope-backend/src/calliope/comfyui/source_reviews.json"
|
||||
old = json.loads(subprocess.check_output(["git", "show", "9dac1b4:" + resource], cwd=REPO))
|
||||
now = json.loads((REPO / resource).read_bytes())
|
||||
openpose = next(p for p in now if p.endswith("openpose-video-姿态检测.json"))
|
||||
now[openpose].pop("fixed_version_document")
|
||||
# SDPose is independently frozen against 7291887 in its own suite.
|
||||
sdpose = next(p for p in now if p.endswith("sdpose_视频人物姿势骨架提取.json"))
|
||||
now[sdpose].pop("fixed_version_document")
|
||||
assert len(now) == 156 and len(DEFINITIONS) == 15
|
||||
assert len(now) == 156 and len(DEFINITIONS) == 16
|
||||
assert len([r for r in old.values() if "fixed_version_document" in r]) == 13
|
||||
assert (
|
||||
sum(
|
||||
|
||||
@@ -171,13 +171,15 @@ def test_only_two_reviews_change_and_all_old_blocks_preserved():
|
||||
resource = "calliope-backend/src/calliope/comfyui/source_reviews.json"
|
||||
old = json.loads(subprocess.check_output(["git", "show", "27e6d56:" + resource], cwd=REPO))
|
||||
now = json.loads((REPO / resource).read_bytes())
|
||||
openpose = next(p for p in now if p.endswith("openpose-video-姿态检测.json"))
|
||||
now[openpose].pop("fixed_version_document")
|
||||
# SDPose is independently frozen against 7291887 in its own suite.
|
||||
sdpose = next(p for p in now if p.endswith("sdpose_视频人物姿势骨架提取.json"))
|
||||
now[sdpose].pop("fixed_version_document")
|
||||
# Gemma addition is independently protected against 9dac1b4 in its own suite.
|
||||
gemma = next(p for p in now if p.endswith("gemma4_提示词反推(图像视频音频).json"))
|
||||
now[gemma].pop("fixed_version_document")
|
||||
assert len(DEFINITIONS) == 15
|
||||
assert len(DEFINITIONS) == 16
|
||||
assert (
|
||||
sum(
|
||||
len(r["fixed_version_document"]["fields"])
|
||||
|
||||
@@ -0,0 +1,236 @@
|
||||
"""Exact source, nested preview types, package citations and old fifteen definitions."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
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/openpose-document-evidence"
|
||||
PATH = next(p for p in DEFINITIONS if p.endswith("openpose-video-姿态检测.json"))
|
||||
RAW = (REPO / PATH).read_bytes()
|
||||
SOURCE = json.loads(RAW)
|
||||
REVIEW = review_for(PATH, hashlib.sha1(RAW).hexdigest())
|
||||
BLOCK = REVIEW["fixed_version_document"]
|
||||
|
||||
|
||||
def pointer(obj, path):
|
||||
for part in path.strip("/").split("/"):
|
||||
part = part.replace("~1", "/").replace("~0", "~")
|
||||
obj = obj[int(part)] if isinstance(obj, list) else obj[part]
|
||||
return obj
|
||||
|
||||
|
||||
def set_value(obj, path, value):
|
||||
parent, _, key = path.rpartition("/")
|
||||
target = pointer(obj, parent)
|
||||
target[int(key) if isinstance(target, list) else key] = value
|
||||
|
||||
|
||||
def doc(source=None, review=None, path=PATH):
|
||||
return build_document(
|
||||
path,
|
||||
SOURCE if source is None else source,
|
||||
None,
|
||||
None,
|
||||
[],
|
||||
REVIEW if review is None else review,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("field", BLOCK["fields"], ids=lambda f: f["node_id"] + "." + f["field"])
|
||||
def test_values_types_citations(field):
|
||||
v = pointer(SOURCE, field["pointer"])
|
||||
assert canonical(v) == canonical(field["value"]) and type(v).__name__ == field["json_type"]
|
||||
node = pointer(SOURCE, field["pointer"].split("/widgets_values/")[0])
|
||||
assert str(node["id"]) == field["node_id"] and node["type"] == field["class_type"]
|
||||
for k in ["label", "schema_default", "unit", "limits", "effect", "execution_note"]:
|
||||
assert field[k]
|
||||
for k in field["evidence"]:
|
||||
e = BLOCK["sources"][k]
|
||||
raw = (OUT / e["local_file"]).read_bytes()
|
||||
assert hashlib.sha256(raw).hexdigest() == e["sha256"]
|
||||
if e["id"] == "vhs":
|
||||
assert e["git_commit_binding"] == "unknown" and "发布包SHA256:" in e["commit"]
|
||||
else:
|
||||
assert len(e["commit"]) == 40 and e["commit"] in e["url"]
|
||||
assert 1 <= e["lines"][0] <= e["lines"][1] <= len(raw.decode().splitlines())
|
||||
|
||||
|
||||
@pytest.mark.parametrize("index", range(27))
|
||||
@pytest.mark.parametrize("kind", ["value", "type", "pointer", "citation", "role", "default"])
|
||||
def test_forged_field_and_recalculated_digest_refused(index, kind):
|
||||
source, review = copy.deepcopy(SOURCE), copy.deepcopy(REVIEW)
|
||||
b = review["fixed_version_document"]
|
||||
f = b["fields"][index]
|
||||
if kind in ["value", "type"]:
|
||||
set_value(source, f["pointer"], {"forged": True} if kind == "value" else None)
|
||||
f["value"] = pointer(source, f["pointer"])
|
||||
f["json_type"] = type(f["value"]).__name__
|
||||
elif kind == "citation":
|
||||
b["sources"][f["evidence"][0]]["sha256"] = "0" * 64
|
||||
else:
|
||||
f[{"default": "schema_default"}.get(kind, kind)] = "forged"
|
||||
b["canonical_sha256"] = hashlib.sha256(canonical(source)).hexdigest()
|
||||
review["caller_digest"] = hashlib.sha256(canonical(b)).hexdigest()
|
||||
actual = doc(source, review)["fixed_version"]
|
||||
assert not actual["matched"] and "fields" not in actual
|
||||
|
||||
|
||||
def leaves(obj, path):
|
||||
if isinstance(obj, dict):
|
||||
for key, value in obj.items():
|
||||
yield from leaves(value, path + "/" + key)
|
||||
else:
|
||||
yield path
|
||||
|
||||
|
||||
MUTATIONS = (
|
||||
[f"/links/{i}/{j}" for i in range(4) for j in range(6)]
|
||||
+ ["/extra/frontendVersion", "/nodes/0/widgets_values/0"]
|
||||
+ [
|
||||
f"/nodes/{i}/{suffix}"
|
||||
for i in range(5)
|
||||
for suffix in [
|
||||
"mode",
|
||||
"type",
|
||||
"properties/ue_properties/version",
|
||||
"properties/ue_properties/widget_ue_connectable",
|
||||
"properties/ue_properties/input_ue_unconnectable",
|
||||
]
|
||||
]
|
||||
+ [f"/nodes/{i}/properties/{key}" for i in range(1, 5) for key in ["cnr_id", "ver"]]
|
||||
+ [
|
||||
p
|
||||
for i in [2, 4]
|
||||
for p in leaves(
|
||||
SOURCE["nodes"][i]["widgets_values"]["videopreview"],
|
||||
f"/nodes/{i}/widgets_values/videopreview",
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("path", MUTATIONS)
|
||||
def test_graph_versions_nested_cache_notes_and_ue_fail_closed(path):
|
||||
source, review = copy.deepcopy(SOURCE), copy.deepcopy(REVIEW)
|
||||
set_value(source, path, "forged")
|
||||
review["fixed_version_document"]["canonical_sha256"] = hashlib.sha256(
|
||||
canonical(source)
|
||||
).hexdigest()
|
||||
review["caller_digest"] = hashlib.sha256(
|
||||
canonical(review["fixed_version_document"])
|
||||
).hexdigest()
|
||||
assert not doc(source, review)["fixed_version"]["matched"]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("value", [None, [], "missing"])
|
||||
def test_empty_object_not_missing_null_or_list(value):
|
||||
source = copy.deepcopy(SOURCE)
|
||||
if value == "missing":
|
||||
del source["nodes"][3]["widgets_values"]
|
||||
else:
|
||||
source["nodes"][3]["widgets_values"] = value
|
||||
assert not doc(source=source)["fixed_version"]["matched"]
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"key",
|
||||
[
|
||||
"source_path",
|
||||
"source_sha1",
|
||||
"source_sha256",
|
||||
"notice",
|
||||
"user_overview",
|
||||
"versions",
|
||||
"comments",
|
||||
"flow",
|
||||
"sources",
|
||||
],
|
||||
)
|
||||
def test_editorial_forgery_refused(key):
|
||||
review = copy.deepcopy(REVIEW)
|
||||
review["fixed_version_document"][key] = "forged"
|
||||
review["caller_digest"] = hashlib.sha256(
|
||||
canonical(review["fixed_version_document"])
|
||||
).hexdigest()
|
||||
assert not doc(review=review)["fixed_version"]["matched"]
|
||||
|
||||
|
||||
def test_exact_document_topology_and_preservation():
|
||||
d = doc()
|
||||
assert d["fixed_version"]["matched"] and d["fixed_version"]["fields"] == BLOCK["fields"]
|
||||
assert len(BLOCK["fields"]) == 27 and len(BLOCK["comments"]) == 1
|
||||
assert sum(isinstance(f["value"], dict) for f in BLOCK["fields"]) == 2
|
||||
assert len(SOURCE["nodes"]) == 5 and len(SOURCE["links"]) == 4
|
||||
assert SOURCE["links"] == [
|
||||
[4, 1, 0, 4, 0, "IMAGE"],
|
||||
[10, 2, 0, 1, 0, "IMAGE"],
|
||||
[11, 2, 3, 9, 0, "VHS_VIDEOINFO"],
|
||||
[12, 9, 0, 4, 4, "FLOAT"],
|
||||
]
|
||||
nodes = {n["id"]: n for n in SOURCE["nodes"]}
|
||||
for edge, origin, slot, target, inp, typ in SOURCE["links"]:
|
||||
assert edge in nodes[origin]["outputs"][slot]["links"]
|
||||
assert nodes[target]["inputs"][inp]["link"] == edge
|
||||
assert nodes[target]["inputs"][inp]["type"] == typ
|
||||
assert nodes[9]["widgets_values"] == {} and type(nodes[9]["widgets_values"]) is dict
|
||||
assert all(n["mode"] == 0 for n in SOURCE["nodes"])
|
||||
assert pointer(SOURCE, BLOCK["comments"][0]["pointer"]) == BLOCK["comments"][0]["text"]
|
||||
assert not BLOCK["counts"]["final_prompt_constructed"]
|
||||
assert all(
|
||||
s in "".join(BLOCK["flow"])
|
||||
for s in [
|
||||
"未实跑",
|
||||
"包同字节不等于提交绑定",
|
||||
"loaded_fps",
|
||||
"外线覆盖",
|
||||
"音频",
|
||||
"UE7.5.2",
|
||||
"空对象",
|
||||
"不是缺键/null/[]",
|
||||
]
|
||||
)
|
||||
resource = "calliope-backend/src/calliope/comfyui/source_reviews.json"
|
||||
previous = json.loads(subprocess.check_output(["git", "show", "fec5cca:" + resource], cwd=REPO))
|
||||
current = json.loads((REPO / resource).read_bytes())
|
||||
assert current[PATH].pop("fixed_version_document") == BLOCK
|
||||
assert current == previous and len(DEFINITIONS) == 16
|
||||
old = [r["fixed_version_document"] for r in previous.values() if "fixed_version_document" in r]
|
||||
assert len(old) == 15 and sum(len(b["fields"]) for b in old) == 394
|
||||
assert sum(len(b.get("comments", [])) for b in old) == 13 # one historical ASR flow note
|
||||
assert d["status"] == dict(imported=True, doc_done=False, exec_verified=False)
|
||||
assert d["dependencies"]["check_state"] == "unchecked"
|
||||
assert not doc(path="untrusted.json").get("fixed_version")
|
||||
for p in DEFINITIONS:
|
||||
if p == PATH:
|
||||
continue
|
||||
r = copy.deepcopy(REVIEW)
|
||||
r["fixed_version_document"] = previous[p]["fixed_version_document"]
|
||||
assert not doc(review=r)["fixed_version"]["matched"]
|
||||
|
||||
|
||||
def test_raw_source_identity_and_missing_packages(tmp_path):
|
||||
assert review_for(PATH, "0" * 40) is None
|
||||
r = copy.deepcopy(REVIEW)
|
||||
r["source_sha"] = "0" * 40
|
||||
assert not doc(review=r)["fixed_version"]["matched"]
|
||||
import sys
|
||||
|
||||
code = (
|
||||
"import runpy,sys; from pathlib import Path; ns=runpy.run_path('recompute.py'); "
|
||||
"ns['require_packages'].__globals__['REPO']=Path(sys.argv[1]); ns['require_packages']()"
|
||||
)
|
||||
result = subprocess.run(
|
||||
[sys.executable, "-c", code, str(tmp_path)], cwd=OUT, capture_output=True, text=True
|
||||
)
|
||||
assert result.returncode != 0 and "缺少wheel/sdist包产物" in result.stderr
|
||||
assert "uv build --project calliope-backend --offline" in result.stderr
|
||||
@@ -245,10 +245,11 @@ def test_old_nine_blocks_and_other_editorial_content_preserved():
|
||||
"图像分割-多宫格分割.json",
|
||||
"gemma4_提示词反推(图像视频音频).json",
|
||||
"sdpose_视频人物姿势骨架提取.json",
|
||||
"openpose-video-姿态检测.json",
|
||||
)
|
||||
)
|
||||
]
|
||||
assert len(additions) == 4
|
||||
assert len(additions) == 5
|
||||
for p in additions:
|
||||
now[p].pop("fixed_version_document")
|
||||
for entry in now.values():
|
||||
|
||||
@@ -153,10 +153,12 @@ def test_real_document_and_frozen_old_fourteen_blocks():
|
||||
other = next(p for p in DEFINITIONS if p != PATH)
|
||||
resource = "calliope-backend/src/calliope/comfyui/source_reviews.json"
|
||||
now = json.loads((REPO / resource).read_bytes())
|
||||
openpose = next(p for p in now if p.endswith("openpose-video-姿态检测.json"))
|
||||
review["fixed_version_document"] = now[other]["fixed_version_document"]
|
||||
assert not doc(review=review)["fixed_version"]["matched"]
|
||||
now[openpose].pop("fixed_version_document")
|
||||
old = json.loads(subprocess.check_output(["git", "show", "7291887:" + resource], cwd=REPO))
|
||||
assert len(now) == 156 and len(DEFINITIONS) == 15
|
||||
assert len(now) == 156 and len(DEFINITIONS) == 16
|
||||
old_blocks = [
|
||||
r["fixed_version_document"] for r in old.values() if "fixed_version_document" in r
|
||||
]
|
||||
|
||||
@@ -0,0 +1,884 @@
|
||||
# OpenPose视频姿态图固定参考中文说明
|
||||
|
||||
27新顶层保存位置(25标量+2历史预览对象)+1新注释;旧15图394保存位置+14注释逐对象不变。16图421位置+15注释展示,155定稿0、实跑0、新增转换0。
|
||||
|
||||
复用SQLite来源库→正常GET详情→现有说明抽屉;仅新增source_reviews说明块和显式受信摘要,不改变转换/执行链。
|
||||
|
||||
## openpose-video-姿态检测
|
||||
|
||||
这张图拟把视频画面交给DWPose绘制人物姿态,再合成视频;关键点第二出口和音频均未接,不能称输出关键点文件或保留原音轨。合成帧率有外线覆盖,保存24与两处历史预览均不是实跑结果。插件、UE和真实媒体未核对,转换仍关闭。
|
||||
|
||||
固定版本参考说明;历史预览不是执行结果,环境/UE和实际效果未核对,转换仍关闭。
|
||||
|
||||
源路径:`example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json`
|
||||
|
||||
SHA1:1eeeab4e68accd810c54a326a88b9022846ee8ae
|
||||
|
||||
原字节SHA256:43f76f599f15058b6e62ae0dfb105518a37532008eed23ef7118e4950b37a608
|
||||
|
||||
规范全图SHA256:8881dcd31b226e95d9ce141e5f06067f4d5cb4bd11af88104d779422478d6201
|
||||
|
||||
DW源声明完整commit=136f125c89aed92ced1b6fbb491e13719b72fcc0(精确文本参考,非安装证明)
|
||||
|
||||
VHS源声明1.7.9:官方registry发布包SHA256=ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;Git提交绑定未知,包同字节不等于提交绑定
|
||||
|
||||
frontend源声明1.36.12→官方tag完整commit52bb58d307242a34103998ef1da8007e47501d5b;UE7.5.2钩子次序和目标安装未知
|
||||
|
||||
### 具体连线与处理条件
|
||||
|
||||
5源节点(4实体+MarkdownNote8)、4物理边,全mode0、无子图。27顶层保存位置=7个DW数组项+9个Load对象键+11个Combine对象键,其中25标量、2个预览对象;另1源注释。嵌套叶子不重复计数。
|
||||
|
||||
边10 LoadVideo2槽0→DW1.image输入槽0;边4 DW1图像槽0→Combine4.images槽0。DW的POSE_KEYPOINT槽1未接;不据标题当核心SDPose或已输出关键点文件。
|
||||
|
||||
边11 LoadVideo2槽3→Info9.video_info输入槽0;边12 Info9槽0→Combine4.frame_rate输入槽4。固定包Info槽0取loaded_fps,外线覆盖保存24,依Load的target_frame_time及select_every_nth构造;中文FPS🟦仅源显示名,不能单独证明语义。保存24与预览24均不是最终FPS,force_rate=0不证明原FPS。
|
||||
|
||||
VHS_VideoInfoLoaded9原widgets_values={}为空对象、零保存位置;不是缺键/null/[]。其余四出口帧数/时长/宽度/高度未接。Load帧数/音频出口未接、VAE/meta_batch未接,Combine.audio/meta_batch/vae也未接;不能称保留原音轨。
|
||||
|
||||
DW精确源提交136f125c89aed92ced1b6fbb491e13719b72fcc0,真实注册DWPreprocessor→DWPose_Preprocessor;不是case01 AIO e8b689a。分辨率在本提交检测后缩放画布,三个开关控制绘制而非保证跳过检测。模型文件名不证明安装,静态缺文件下载/加载分支未调用。
|
||||
|
||||
VHS声明1.7.9已取官方registry精确发布包并核注册/成员哈希;注册表无Git commit字段,包同字节不等于提交绑定。三类VHS及DW均为插件,不假借core来源,也不把包来源当目标安装证明。
|
||||
|
||||
frontend1.36.12官方tag对应52bb58d307242a34103998ef1da8007e47501d5b。核心先按序恢复再onConfigure,VHS随后具名恢复并回调;核心先数组保存再onSerialize,VHS覆盖具名对象。format回调可重建控件/改reset条件,不能按保存对象键顺序推断最终输入。
|
||||
|
||||
各节点UE7.5.2(含注释),空widget_ue_connectable/input_ue_unconnectable和extra空ue_links不证明无改写;真实安装、钩子次序/动态成员及最终恢复未知。固定前端先控件后连线只在参考契约成立范围说明覆盖,不导入执行上游或创建生产可信注册。
|
||||
|
||||
两videopreview完整历史对象独立保存和展示,含E盘fullpath及PNG workflow缓存;不读取文件/视频,不请求api/view或媒体URL,不把缓存当实际产物/最终FPS。filename_prefix=AnimateDiff是保存前缀,区别于旧绝对路径。
|
||||
|
||||
h264-mp4静态格式含libx264、pix_fmt、crf和元数据/音频选项;schema范围不保证编码器运行合法。实际ffmpeg/编码器/目录/文件、音轨存在性、姿态效果、速度/显存全部未知。未实跑、未定稿、未启用,不增加可靠转换或候选。
|
||||
|
||||
源物理边:[4, 1, 0, 4, 0, "IMAGE"]
|
||||
|
||||
源物理边:[10, 2, 0, 1, 0, "IMAGE"]
|
||||
|
||||
源物理边:[11, 2, 3, 9, 0, "VHS_VIDEOINFO"]
|
||||
|
||||
源物理边:[12, 9, 0, 4, 4, "FLOAT"]
|
||||
|
||||
源节点8 MarkdownNote:mode=0;UE={"widget_ue_connectable": {}, "version": "7.5.2", "input_ue_unconnectable": {}}
|
||||
|
||||
源节点1 DWPreprocessor:mode=0;UE={"widget_ue_connectable": {}, "version": "7.5.2", "input_ue_unconnectable": {}}
|
||||
|
||||
源节点2 VHS_LoadVideo:mode=0;UE={"widget_ue_connectable": {}, "version": "7.5.2", "input_ue_unconnectable": {}}
|
||||
|
||||
源节点9 VHS_VideoInfoLoaded:mode=0;UE={"widget_ue_connectable": {}, "input_ue_unconnectable": {}, "version": "7.5.2"}
|
||||
|
||||
源节点4 VHS_VideoCombine:mode=0;UE={"widget_ue_connectable": {}, "version": "7.5.2", "input_ue_unconnectable": {}}
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/2/widgets_values/videopreview/hidden [bool]=false
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/2/widgets_values/videopreview/paused [bool]=false
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/2/widgets_values/videopreview/params/force_rate [int]=0
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/2/widgets_values/videopreview/params/custom_width [int]=0
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/2/widgets_values/videopreview/params/custom_height [int]=0
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/2/widgets_values/videopreview/params/frame_load_cap [int]=0
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/2/widgets_values/videopreview/params/skip_first_frames [int]=0
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/2/widgets_values/videopreview/params/select_every_nth [int]=1
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/2/widgets_values/videopreview/params/filename [str]="1月11日-1.mp4"
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/2/widgets_values/videopreview/params/type [str]="input"
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/2/widgets_values/videopreview/params/format [str]="video/mp4"
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/4/widgets_values/videopreview/hidden [bool]=false
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/4/widgets_values/videopreview/paused [bool]=false
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/4/widgets_values/videopreview/params/filename [str]="AnimateDiff_00006.mp4"
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/4/widgets_values/videopreview/params/format [str]="video/h264-mp4"
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/4/widgets_values/videopreview/params/frame_rate [int]=24
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/4/widgets_values/videopreview/params/fullpath [str]="E:\\ComfyUI-Data\\output\\AnimateDiff_00006.mp4"
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/4/widgets_values/videopreview/params/subfolder [str]=""
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/4/widgets_values/videopreview/params/type [str]="output"
|
||||
|
||||
历史预览嵌套(不另计保存位置)/nodes/4/widgets_values/videopreview/params/workflow [str]="AnimateDiff_00006.png"
|
||||
|
||||
### 使用与核对
|
||||
|
||||
这张图拟把视频画面交给DWPose绘制人物姿态,再合成视频;关键点第二出口和音频均未接,不能称输出关键点文件或保留原音轨。合成帧率有外线覆盖,保存24与两处历史预览均不是实跑结果。插件、UE和真实媒体未核对,转换仍关闭。
|
||||
|
||||
先看视频引用、姿态三个绘制开关和模型文件名;素材、模型、插件均待核对,不读取或执行。
|
||||
|
||||
核对输出分辨率、加载尺寸/抽帧/上限、帧率外线与编码预设;两预览对象只读历史文本,不能当运行参数。
|
||||
|
||||
保持停用、未检查、未定稿、未实跑;实际环境、UE、ffmpeg和效果待确认,不生成prompt或访问媒体。
|
||||
|
||||
### 逐保存位置说明
|
||||
|
||||
#### 1. 节点1 · 手部绘制开关(detect_hand)
|
||||
|
||||
源保存enable字符串,包装器以等于enable转布尔再传include_hand控制绘制。模型先检测后绘制;关闭某部分不证明省去该部分推理,也不承诺人数、精度或速度。源值不改bool。
|
||||
|
||||
```json
|
||||
"enable"
|
||||
```
|
||||
|
||||
类:DWPreprocessor;JSON类型:str;角色:scalar。
|
||||
|
||||
源位置:`/nodes/1/widgets_values/0`
|
||||
|
||||
定义默认:enable;单位:字符串枚举
|
||||
|
||||
范围/条件:enable / disable
|
||||
|
||||
源mode=0,声明comfyui_controlnet_aux@136f125c89aed92ced1b6fbb491e13719b72fcc0;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [0] DWPose schema、字符串开关、权重来源选择、调用和双出口;node_wrappers/dwpose.py 32~105行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 0d357a3960a01faeeb1cd921c99166a2fa4d2efd3736a73624565f3e1849465f;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/node_wrappers/dwpose.py
|
||||
- [1] DWPreprocessor真实注册;node_wrappers/dwpose.py 159~165行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 0d357a3960a01faeeb1cd921c99166a2fa4d2efd3736a73624565f3e1849465f;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/node_wrappers/dwpose.py
|
||||
- [2] 扫描node_wrappers合并注册;失败可缺失节点;__init__.py 25~66行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 9a5786ef9569223acd235676c08297aff78b2de1e46ab69c96665222b8c2a4b4;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/__init__.py
|
||||
- [3] 默认、范围、逐帧调用和resolution传递;utils.py 62~120行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 6883c2f1cd912c3d53419dfaa460f904056033db920a36c39a276284bfc994a5;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/utils.py
|
||||
- [4] 权重加载、检测、绘制与结果缩放顺序;src/custom_controlnet_aux/dwpose/__init__.py 217~279行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 11733916809df84a53cfe98c3a2a448ab953f085b89280860cfffa053201cae3;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/__init__.py
|
||||
|
||||
#### 2. 节点1 · 身体绘制开关(detect_body)
|
||||
|
||||
源保存enable字符串,包装器以等于enable转布尔再传include_body控制绘制。模型先检测后绘制;关闭某部分不证明省去该部分推理,也不承诺人数、精度或速度。源值不改bool。
|
||||
|
||||
```json
|
||||
"enable"
|
||||
```
|
||||
|
||||
类:DWPreprocessor;JSON类型:str;角色:scalar。
|
||||
|
||||
源位置:`/nodes/1/widgets_values/1`
|
||||
|
||||
定义默认:enable;单位:字符串枚举
|
||||
|
||||
范围/条件:enable / disable
|
||||
|
||||
源mode=0,声明comfyui_controlnet_aux@136f125c89aed92ced1b6fbb491e13719b72fcc0;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [0] DWPose schema、字符串开关、权重来源选择、调用和双出口;node_wrappers/dwpose.py 32~105行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 0d357a3960a01faeeb1cd921c99166a2fa4d2efd3736a73624565f3e1849465f;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/node_wrappers/dwpose.py
|
||||
- [1] DWPreprocessor真实注册;node_wrappers/dwpose.py 159~165行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 0d357a3960a01faeeb1cd921c99166a2fa4d2efd3736a73624565f3e1849465f;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/node_wrappers/dwpose.py
|
||||
- [2] 扫描node_wrappers合并注册;失败可缺失节点;__init__.py 25~66行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 9a5786ef9569223acd235676c08297aff78b2de1e46ab69c96665222b8c2a4b4;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/__init__.py
|
||||
- [3] 默认、范围、逐帧调用和resolution传递;utils.py 62~120行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 6883c2f1cd912c3d53419dfaa460f904056033db920a36c39a276284bfc994a5;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/utils.py
|
||||
- [4] 权重加载、检测、绘制与结果缩放顺序;src/custom_controlnet_aux/dwpose/__init__.py 217~279行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 11733916809df84a53cfe98c3a2a448ab953f085b89280860cfffa053201cae3;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/__init__.py
|
||||
|
||||
#### 3. 节点1 · 面部绘制开关(detect_face)
|
||||
|
||||
源保存enable字符串,包装器以等于enable转布尔再传include_face控制绘制。模型先检测后绘制;关闭某部分不证明省去该部分推理,也不承诺人数、精度或速度。源值不改bool。
|
||||
|
||||
```json
|
||||
"enable"
|
||||
```
|
||||
|
||||
类:DWPreprocessor;JSON类型:str;角色:scalar。
|
||||
|
||||
源位置:`/nodes/1/widgets_values/2`
|
||||
|
||||
定义默认:enable;单位:字符串枚举
|
||||
|
||||
范围/条件:enable / disable
|
||||
|
||||
源mode=0,声明comfyui_controlnet_aux@136f125c89aed92ced1b6fbb491e13719b72fcc0;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [0] DWPose schema、字符串开关、权重来源选择、调用和双出口;node_wrappers/dwpose.py 32~105行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 0d357a3960a01faeeb1cd921c99166a2fa4d2efd3736a73624565f3e1849465f;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/node_wrappers/dwpose.py
|
||||
- [1] DWPreprocessor真实注册;node_wrappers/dwpose.py 159~165行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 0d357a3960a01faeeb1cd921c99166a2fa4d2efd3736a73624565f3e1849465f;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/node_wrappers/dwpose.py
|
||||
- [2] 扫描node_wrappers合并注册;失败可缺失节点;__init__.py 25~66行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 9a5786ef9569223acd235676c08297aff78b2de1e46ab69c96665222b8c2a4b4;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/__init__.py
|
||||
- [3] 默认、范围、逐帧调用和resolution传递;utils.py 62~120行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 6883c2f1cd912c3d53419dfaa460f904056033db920a36c39a276284bfc994a5;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/utils.py
|
||||
- [4] 权重加载、检测、绘制与结果缩放顺序;src/custom_controlnet_aux/dwpose/__init__.py 217~279行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 11733916809df84a53cfe98c3a2a448ab953f085b89280860cfffa053201cae3;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/__init__.py
|
||||
|
||||
#### 4. 节点1 · 姿态图输出分辨率(resolution)
|
||||
|
||||
源1024传detect_resolution。此固定实现先以resolution=0处理输入、检测姿态并绘制,随后将画布短边缩放到目标并填充到64倍数,再去填充;不是保证检测器先以1024推理,不是视频宽度/总帧数或模型超分。比例取整及原素材尺寸决定实际尺寸,未计算真实输出。
|
||||
|
||||
```json
|
||||
1024
|
||||
```
|
||||
|
||||
类:DWPreprocessor;JSON类型:int;角色:scalar。
|
||||
|
||||
源位置:`/nodes/1/widgets_values/3`
|
||||
|
||||
定义默认:512;单位:像素(输出短边目标)
|
||||
|
||||
范围/条件:schema64~16384,step64;helper只接受>=64的int,否则回退512
|
||||
|
||||
源mode=0,声明comfyui_controlnet_aux@136f125c89aed92ced1b6fbb491e13719b72fcc0;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [0] DWPose schema、字符串开关、权重来源选择、调用和双出口;node_wrappers/dwpose.py 32~105行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 0d357a3960a01faeeb1cd921c99166a2fa4d2efd3736a73624565f3e1849465f;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/node_wrappers/dwpose.py
|
||||
- [3] 默认、范围、逐帧调用和resolution传递;utils.py 62~120行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 6883c2f1cd912c3d53419dfaa460f904056033db920a36c39a276284bfc994a5;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/utils.py
|
||||
- [4] 权重加载、检测、绘制与结果缩放顺序;src/custom_controlnet_aux/dwpose/__init__.py 217~279行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 11733916809df84a53cfe98c3a2a448ab953f085b89280860cfffa053201cae3;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/__init__.py
|
||||
- [7] 短边比例缩放与64倍数填充/去填充闭包;src/custom_controlnet_aux/util.py 155~183行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 956ff6eb649148c98e68591824e9d029be527ea8f52eb1841b1b1c9f18f37b34;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/util.py
|
||||
|
||||
#### 5. 节点1 · 人体框检测模型引用(bbox_detector)
|
||||
|
||||
源yolox_l.onnx选择yzd-v/DWPose来源;det_filename传加载器。缺本地文件时custom_hf_download可进入下载分支,随后依文件类型加载;仅静态说明,不下载或运行。文件名不证明安装/兼容、可下载或显存速度。
|
||||
|
||||
```json
|
||||
"yolox_l.onnx"
|
||||
```
|
||||
|
||||
类:DWPreprocessor;JSON类型:str;角色:scalar。
|
||||
|
||||
源位置:`/nodes/1/widgets_values/4`
|
||||
|
||||
定义默认:yolox_l.onnx;单位:文件名枚举
|
||||
|
||||
范围/条件:None / yolox_l.torchscript.pt / yolox_l.onnx / yolo_nas_l_fp16.onnx / yolo_nas_m_fp16.onnx / yolo_nas_s_fp16.onnx
|
||||
|
||||
源mode=0,声明comfyui_controlnet_aux@136f125c89aed92ced1b6fbb491e13719b72fcc0;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [0] DWPose schema、字符串开关、权重来源选择、调用和双出口;node_wrappers/dwpose.py 32~105行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 0d357a3960a01faeeb1cd921c99166a2fa4d2efd3736a73624565f3e1849465f;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/node_wrappers/dwpose.py
|
||||
- [4] 权重加载、检测、绘制与结果缩放顺序;src/custom_controlnet_aux/dwpose/__init__.py 217~279行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 11733916809df84a53cfe98c3a2a448ab953f085b89280860cfffa053201cae3;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/__init__.py
|
||||
- [8] 文件缺失时静态下载分支;不授权下载;src/custom_controlnet_aux/util.py 289~342行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 956ff6eb649148c98e68591824e9d029be527ea8f52eb1841b1b1c9f18f37b34;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/util.py
|
||||
- [5] 模型类型分支及加载设备,仅静态条件;src/custom_controlnet_aux/dwpose/wholebody.py 19~78行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 89c871f4aed3440c2bafcf4987e79ffeed15fb28031951c36b7614374fd9df0f;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/wholebody.py
|
||||
|
||||
#### 6. 节点1 · 姿态估计模型引用(pose_estimator)
|
||||
|
||||
源TorchScript文件选择hr16/DWPose-TorchScript-BatchSize5。schema默认是此文件,estimate_pose函数签名默认却为dw-ll_ucoco_384.onnx,不能混写。静态from_pretrained可触发缺文件下载和加载,本轮均未调用。名称bs5不证明本视频每批5帧或目标性能。
|
||||
|
||||
```json
|
||||
"dw-ll_ucoco_384_bs5.torchscript.pt"
|
||||
```
|
||||
|
||||
类:DWPreprocessor;JSON类型:str;角色:scalar。
|
||||
|
||||
源位置:`/nodes/1/widgets_values/5`
|
||||
|
||||
定义默认:dw-ll_ucoco_384_bs5.torchscript.pt;单位:文件名枚举
|
||||
|
||||
范围/条件:dw-ll_ucoco_384_bs5.torchscript.pt / dw-ll_ucoco_384.onnx / dw-ll_ucoco.onnx
|
||||
|
||||
源mode=0,声明comfyui_controlnet_aux@136f125c89aed92ced1b6fbb491e13719b72fcc0;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [0] DWPose schema、字符串开关、权重来源选择、调用和双出口;node_wrappers/dwpose.py 32~105行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 0d357a3960a01faeeb1cd921c99166a2fa4d2efd3736a73624565f3e1849465f;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/node_wrappers/dwpose.py
|
||||
- [4] 权重加载、检测、绘制与结果缩放顺序;src/custom_controlnet_aux/dwpose/__init__.py 217~279行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 11733916809df84a53cfe98c3a2a448ab953f085b89280860cfffa053201cae3;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/__init__.py
|
||||
- [8] 文件缺失时静态下载分支;不授权下载;src/custom_controlnet_aux/util.py 289~342行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 956ff6eb649148c98e68591824e9d029be527ea8f52eb1841b1b1c9f18f37b34;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/util.py
|
||||
- [5] 模型类型分支及加载设备,仅静态条件;src/custom_controlnet_aux/dwpose/wholebody.py 19~78行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 89c871f4aed3440c2bafcf4987e79ffeed15fb28031951c36b7614374fd9df0f;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/wholebody.py
|
||||
|
||||
#### 7. 节点1 · 身体骨架线宽缩放开关(scale_stick_for_xinsr_cn)
|
||||
|
||||
源disable,转false传xinsr_stick_scaling。固定draw_bodypose基础stickwidth=4,关闭倍率1,开启按画布最大边分档;不是图像模型超分或目标安装证明。身体绘制关闭时不能据此保证有身体线条。
|
||||
|
||||
```json
|
||||
"disable"
|
||||
```
|
||||
|
||||
类:DWPreprocessor;JSON类型:str;角色:scalar。
|
||||
|
||||
源位置:`/nodes/1/widgets_values/6`
|
||||
|
||||
定义默认:disable;单位:字符串枚举
|
||||
|
||||
范围/条件:disable / enable;开启时max_side<500倍率1,否则min(2+max_side//1000,7)
|
||||
|
||||
源mode=0,声明comfyui_controlnet_aux@136f125c89aed92ced1b6fbb491e13719b72fcc0;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [0] DWPose schema、字符串开关、权重来源选择、调用和双出口;node_wrappers/dwpose.py 32~105行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 0d357a3960a01faeeb1cd921c99166a2fa4d2efd3736a73624565f3e1849465f;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/node_wrappers/dwpose.py
|
||||
- [4] 权重加载、检测、绘制与结果缩放顺序;src/custom_controlnet_aux/dwpose/__init__.py 217~279行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 11733916809df84a53cfe98c3a2a448ab953f085b89280860cfffa053201cae3;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/__init__.py
|
||||
- [6] 身体骨架线宽缩放条件;src/custom_controlnet_aux/dwpose/util.py 82~138行;commit 136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 e6050a00f0cd2173e37f1da41a7f9ad3ea5cd57d73388bcd0e91cf0e393d5d3c;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/util.py
|
||||
|
||||
#### 8. 节点2 · 输入视频文件引用(video)
|
||||
|
||||
源1月11日-1.mp4保持原文,参考LoadVideoUpload转annotated filepath后加载。未访问此媒体;真实时长、分辨率、帧数、原FPS及音频存在性未知。
|
||||
|
||||
```json
|
||||
"1月11日-1.mp4"
|
||||
```
|
||||
|
||||
类:VHS_LoadVideo;JSON类型:str;角色:scalar。
|
||||
|
||||
源位置:`/nodes/2/widgets_values/video`
|
||||
|
||||
定义默认:动态input目录文件列表,无固定文件默认;单位:文件名
|
||||
|
||||
范围/条件:目录文件扩展webm/mp4/mkv/gif/mov;目标列表未知
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [9] VHS_LoadVideo注册类LoadVideoUpload准确schema与路径引用;videohelpersuite/load_video_nodes.py 423~474行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [11] 加载尺寸/内存上限、格式、loaded_fps和四出口;videohelpersuite/load_video_nodes.py 293~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
#### 9. 节点2 · 强制读取帧率(force_rate)
|
||||
|
||||
源整数0:cv生成器以原fps决定target_frame_time,非已知原FPS;非零用倒数目标时间重采样。后续select_every_nth还会改变loaded_fps;AnimateDiff前端回调恢复条件及UE未知,不能称最终FPS=0/8/24。
|
||||
|
||||
```json
|
||||
0
|
||||
```
|
||||
|
||||
类:VHS_LoadVideo;JSON类型:int;角色:scalar。
|
||||
|
||||
源位置:`/nodes/2/widgets_values/force_rate`
|
||||
|
||||
定义默认:0;单位:帧/秒
|
||||
|
||||
范围/条件:0~60,step1,0禁用强制重采样
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [9] VHS_LoadVideo注册类LoadVideoUpload准确schema与路径引用;videohelpersuite/load_video_nodes.py 423~474行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [10] 尺寸取整、force_rate、跳帧、间隔与上限;videohelpersuite/load_video_nodes.py 59~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [11] 加载尺寸/内存上限、格式、loaded_fps和四出口;videohelpersuite/load_video_nodes.py 293~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [12] AnimateDiff格式默认及dim/target_rate,非最终帧率证明;videohelpersuite/load_video_nodes.py 22~52行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [22] 加载格式回调只在wasDefault条件重设值,随后逐控件回调;web/js/VHS.core.js 670~711行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [21] 具名对象恢复:先旧回调,逐控件赋值并回调;保存覆盖成对象;web/js/VHS.core.js 6~169行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
#### 10. 节点2 · 自定义宽度(custom_width)
|
||||
|
||||
两维均0时先保留原比例尺寸,再按格式downscale_ratio对齐取整;AnimateDiff dim[0]=8。单维非零时另一维按比例推算,两维非零时分别指定。源两维0并不证明像素尺寸完全不变。前端format回调可设置step/mod/reset,只有wasDefault条件会改value;最终恢复取值和素材未知。
|
||||
|
||||
```json
|
||||
0
|
||||
```
|
||||
|
||||
类:VHS_LoadVideo;JSON类型:int;角色:scalar。
|
||||
|
||||
源位置:`/nodes/2/widgets_values/custom_width`
|
||||
|
||||
定义默认:0;单位:像素
|
||||
|
||||
范围/条件:0~8192;0禁用该维强制尺寸
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [9] VHS_LoadVideo注册类LoadVideoUpload准确schema与路径引用;videohelpersuite/load_video_nodes.py 423~474行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [10] 尺寸取整、force_rate、跳帧、间隔与上限;videohelpersuite/load_video_nodes.py 59~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [11] 加载尺寸/内存上限、格式、loaded_fps和四出口;videohelpersuite/load_video_nodes.py 293~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [12] AnimateDiff格式默认及dim/target_rate,非最终帧率证明;videohelpersuite/load_video_nodes.py 22~52行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [13] DIMMAX8192、BIGMAX2**53-1和FLOAT/INT兼容;videohelpersuite/utils.py 19~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [22] 加载格式回调只在wasDefault条件重设值,随后逐控件回调;web/js/VHS.core.js 670~711行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [21] 具名对象恢复:先旧回调,逐控件赋值并回调;保存覆盖成对象;web/js/VHS.core.js 6~169行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
#### 11. 节点2 · 自定义高度(custom_height)
|
||||
|
||||
两维均0时先保留原比例尺寸,再按格式downscale_ratio对齐取整;AnimateDiff dim[0]=8。单维非零时另一维按比例推算,两维非零时分别指定。源两维0并不证明像素尺寸完全不变。前端format回调可设置step/mod/reset,只有wasDefault条件会改value;最终恢复取值和素材未知。
|
||||
|
||||
```json
|
||||
0
|
||||
```
|
||||
|
||||
类:VHS_LoadVideo;JSON类型:int;角色:scalar。
|
||||
|
||||
源位置:`/nodes/2/widgets_values/custom_height`
|
||||
|
||||
定义默认:0;单位:像素
|
||||
|
||||
范围/条件:0~8192;0禁用该维强制尺寸
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [9] VHS_LoadVideo注册类LoadVideoUpload准确schema与路径引用;videohelpersuite/load_video_nodes.py 423~474行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [10] 尺寸取整、force_rate、跳帧、间隔与上限;videohelpersuite/load_video_nodes.py 59~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [11] 加载尺寸/内存上限、格式、loaded_fps和四出口;videohelpersuite/load_video_nodes.py 293~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [12] AnimateDiff格式默认及dim/target_rate,非最终帧率证明;videohelpersuite/load_video_nodes.py 22~52行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [13] DIMMAX8192、BIGMAX2**53-1和FLOAT/INT兼容;videohelpersuite/utils.py 19~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [22] 加载格式回调只在wasDefault条件重设值,随后逐控件回调;web/js/VHS.core.js 670~711行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [21] 具名对象恢复:先旧回调,逐控件赋值并回调;保存覆盖成对象;web/js/VHS.core.js 6~169行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
#### 12. 节点2 · 读取帧数上限(frame_load_cap)
|
||||
|
||||
源0不表示零帧,非零在生成循环限制frames_added;内存、素材结束或格式条件仍可限制加载,不能称无限加载或已读取全部。
|
||||
|
||||
```json
|
||||
0
|
||||
```
|
||||
|
||||
类:VHS_LoadVideo;JSON类型:int;角色:scalar。
|
||||
|
||||
源位置:`/nodes/2/widgets_values/frame_load_cap`
|
||||
|
||||
定义默认:0;单位:帧
|
||||
|
||||
范围/条件:0~9007199254740991,step1;0不设置此项帧上限
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [9] VHS_LoadVideo注册类LoadVideoUpload准确schema与路径引用;videohelpersuite/load_video_nodes.py 423~474行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [10] 尺寸取整、force_rate、跳帧、间隔与上限;videohelpersuite/load_video_nodes.py 59~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [11] 加载尺寸/内存上限、格式、loaded_fps和四出口;videohelpersuite/load_video_nodes.py 293~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [13] DIMMAX8192、BIGMAX2**53-1和FLOAT/INT兼容;videohelpersuite/utils.py 19~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
#### 13. 节点2 · 跳过开头帧数(skip_first_frames)
|
||||
|
||||
源0不主动跳开头;cv循环先累计total_frame_count并跳过<=skip_first_frames部分,然后处理nth选择。不是秒或视频时间戳;强制帧率与实际输入决定时间关系。
|
||||
|
||||
```json
|
||||
0
|
||||
```
|
||||
|
||||
类:VHS_LoadVideo;JSON类型:int;角色:scalar。
|
||||
|
||||
源位置:`/nodes/2/widgets_values/skip_first_frames`
|
||||
|
||||
定义默认:0;单位:生成器计数的帧
|
||||
|
||||
范围/条件:0~9007199254740991,step1
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [9] VHS_LoadVideo注册类LoadVideoUpload准确schema与路径引用;videohelpersuite/load_video_nodes.py 423~474行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [10] 尺寸取整、force_rate、跳帧、间隔与上限;videohelpersuite/load_video_nodes.py 59~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [11] 加载尺寸/内存上限、格式、loaded_fps和四出口;videohelpersuite/load_video_nodes.py 293~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [13] DIMMAX8192、BIGMAX2**53-1和FLOAT/INT兼容;videohelpersuite/utils.py 19~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
#### 14. 节点2 · 读取间隔(select_every_nth)
|
||||
|
||||
源1保留生成器每个可选帧;cv循环按计数取模选择。loaded_fps由target_frame_time再乘此间隔后的倒数给出,不直接用标题或缓存猜帧率。
|
||||
|
||||
```json
|
||||
1
|
||||
```
|
||||
|
||||
类:VHS_LoadVideo;JSON类型:int;角色:scalar。
|
||||
|
||||
源位置:`/nodes/2/widgets_values/select_every_nth`
|
||||
|
||||
定义默认:1;单位:帧间隔倍率
|
||||
|
||||
范围/条件:1~9007199254740991,step1
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [9] VHS_LoadVideo注册类LoadVideoUpload准确schema与路径引用;videohelpersuite/load_video_nodes.py 423~474行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [10] 尺寸取整、force_rate、跳帧、间隔与上限;videohelpersuite/load_video_nodes.py 59~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [11] 加载尺寸/内存上限、格式、loaded_fps和四出口;videohelpersuite/load_video_nodes.py 293~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [13] DIMMAX8192、BIGMAX2**53-1和FLOAT/INT兼容;videohelpersuite/utils.py 19~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
#### 15. 节点2 · 加载格式约束(format)
|
||||
|
||||
源AnimateDiff定义target_rate=8、dim=(8,0,512,512)。后端用dim决定尺寸对齐,不把target_rate自动当最终帧率。前端format回调将rate reset设8、尺寸reset设512,只在原值等于旧reset时改value并回调;具名恢复按实际控件顺序赋值并触发回调,无法只看对象键顺序推断最终控件值。UE7.5.2钩子次序未知。
|
||||
|
||||
```json
|
||||
"AnimateDiff"
|
||||
```
|
||||
|
||||
类:VHS_LoadVideo;JSON类型:str;角色:scalar。
|
||||
|
||||
源位置:`/nodes/2/widgets_values/format`
|
||||
|
||||
定义默认:AnimateDiff;单位:格式预设
|
||||
|
||||
范围/条件:固定包内None/AnimateDiff/Mochi/LTXV/Hunyuan/Cosmos/Wan;允许外部增补,目标动态成员未知
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [12] AnimateDiff格式默认及dim/target_rate,非最终帧率证明;videohelpersuite/load_video_nodes.py 22~52行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [11] 加载尺寸/内存上限、格式、loaded_fps和四出口;videohelpersuite/load_video_nodes.py 293~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [22] 加载格式回调只在wasDefault条件重设值,随后逐控件回调;web/js/VHS.core.js 670~711行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [21] 具名对象恢复:先旧回调,逐控件赋值并回调;保存覆盖成对象;web/js/VHS.core.js 6~169行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
#### 16. 节点2 · 历史视频预览缓存(非运行参数)(videopreview)
|
||||
|
||||
这是前端历史预览状态对象,完整嵌套原文按原JSON类型展示,不作为执行输入或已生成证明。hidden/paused是界面可见和暂停状态;params中的filename/type/format/尺寸/读取选项或frame_rate/workflow/fullpath只是缓存。Load params.type=input与Combine type=output不能证明媒体存在;E:\ComfyUI-Data\output\AnimateDiff_00006.mp4是旧路径,workflow是旧PNG名;不读取路径、不请求api/view或媒体URL。DOM widget options.serialize=false与VHS自定义onSerialize枚举全部widgets并不相同,VHS仍可把预览对象存进工作流;API是否排除取决固定前端控件options,目标UE钩子未知。
|
||||
|
||||
```json
|
||||
{
|
||||
"hidden": false,
|
||||
"paused": false,
|
||||
"params": {
|
||||
"force_rate": 0,
|
||||
"custom_width": 0,
|
||||
"custom_height": 0,
|
||||
"frame_load_cap": 0,
|
||||
"skip_first_frames": 0,
|
||||
"select_every_nth": 1,
|
||||
"filename": "1月11日-1.mp4",
|
||||
"type": "input",
|
||||
"format": "video/mp4"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
类:VHS_LoadVideo;JSON类型:dict;角色:frontend_history。
|
||||
|
||||
源位置:`/nodes/2/widgets_values/videopreview`
|
||||
|
||||
定义默认:无后端schema默认;单位:前端状态
|
||||
|
||||
范围/条件:对象及嵌套JSON类型原样保留,不递归计作新增运行参数
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [24] videopreview DOM状态serialize=false;VHS自定义保存仍枚举全部widget;web/js/VHS.core.js 934~943行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [21] 具名对象恢复:先旧回调,逐控件赋值并回调;保存覆盖成对象;web/js/VHS.core.js 6~169行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [25] 核心先按序恢复再onConfigure,VHS对象须由插件具名回调恢复;src/lib/litegraph/src/LGraphNode.ts 862~875行;commit 52bb58d307242a34103998ef1da8007e47501d5b;SHA256 ce4078003ea69ec804d8f4c5e6ca021a952c05c299a3dab6c20f7e4123b8619f;https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/src/lib/litegraph/src/LGraphNode.ts
|
||||
- [26] 核心先数组保存再onSerialize,VHS回调覆盖对象;src/lib/litegraph/src/LGraphNode.ts 907~929行;commit 52bb58d307242a34103998ef1da8007e47501d5b;SHA256 ce4078003ea69ec804d8f4c5e6ca021a952c05c299a3dab6c20f7e4123b8619f;https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/src/lib/litegraph/src/LGraphNode.ts
|
||||
- [27] 先可序列化控件后物理连线,外线覆盖同名frame_rate;src/utils/executionUtil.ts 86~127行;commit 52bb58d307242a34103998ef1da8007e47501d5b;SHA256 4e51bc54e35cb7ac9bb7cba418a74ccdd5974f640b9b088aa4ae7668f746ab36;https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/src/utils/executionUtil.ts
|
||||
|
||||
#### 17. 节点4 · 合成帧率保存缓存(外线覆盖)(frame_rate)
|
||||
|
||||
保存24与预览24均不是最终FPS。物理link12从Info9槽0接Combine4输入槽4 frame_rate;固定包Info依次取loaded_fps等键,槽0读video_info.loaded_fps。Load2按target_frame_time和间隔构造此值。固定前端先控件后写解析外线覆盖同名输入;仅在该参考契约成立范围解释,目标UE/媒体/最终FPS未知。
|
||||
|
||||
```json
|
||||
24
|
||||
```
|
||||
|
||||
类:VHS_VideoCombine;JSON类型:int;角色:linked_saved。
|
||||
|
||||
源位置:`/nodes/4/widgets_values/frame_rate`
|
||||
|
||||
定义默认:8;单位:帧/秒
|
||||
|
||||
范围/条件:schema min1、step1,无显式max;源int24并有link12
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [14] 合成schema默认、可选输入与签名;videohelpersuite/nodes.py 235~289行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [19] VideoInfoLoaded依次取loaded_fps/frame_count/duration/width/height;videohelpersuite/nodes.py 941~970行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [11] 加载尺寸/内存上限、格式、loaded_fps和四出口;videohelpersuite/load_video_nodes.py 293~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [27] 先可序列化控件后物理连线,外线覆盖同名frame_rate;src/utils/executionUtil.ts 86~127行;commit 52bb58d307242a34103998ef1da8007e47501d5b;SHA256 4e51bc54e35cb7ac9bb7cba418a74ccdd5974f640b9b088aa4ae7668f746ab36;https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/src/utils/executionUtil.ts
|
||||
|
||||
#### 18. 节点4 · 视频循环次数设置(loop_count)
|
||||
|
||||
源0走空loop_args,不添加ffmpeg loop过滤器;>0按loop/size=num_frames构造。这是当前video格式分支;不能套GIF的无限循环解释或保证播放器循环行为。
|
||||
|
||||
```json
|
||||
0
|
||||
```
|
||||
|
||||
类:VHS_VideoCombine;JSON类型:int;角色:scalar。
|
||||
|
||||
源位置:`/nodes/4/widgets_values/loop_count`
|
||||
|
||||
定义默认:0;单位:循环参数
|
||||
|
||||
范围/条件:0~100,step1
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [14] 合成schema默认、可选输入与签名;videohelpersuite/nodes.py 235~289行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [15] 输出/临时目录、前缀、循环、ffmpeg、音频条件与预览返回;videohelpersuite/nodes.py 328~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
#### 19. 节点4 · 保存文件名前缀(filename_prefix)
|
||||
|
||||
源AnimateDiff用于输出名称及计数,save_output=true选择输出目录;不等于预览对象E盘历史fullpath已可访问,不证明任何文件已生成。
|
||||
|
||||
```json
|
||||
"AnimateDiff"
|
||||
```
|
||||
|
||||
类:VHS_VideoCombine;JSON类型:str;角色:scalar。
|
||||
|
||||
源位置:`/nodes/4/widgets_values/filename_prefix`
|
||||
|
||||
定义默认:AnimateDiff;单位:相对前缀字符串
|
||||
|
||||
范围/条件:由folder_paths输出目录规则解析;真实目录未知
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [14] 合成schema默认、可选输入与签名;videohelpersuite/nodes.py 235~289行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [15] 输出/临时目录、前缀、循环、ffmpeg、音频条件与预览返回;videohelpersuite/nodes.py 328~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
#### 20. 节点4 · 视频封装和编码预设(format)
|
||||
|
||||
固定包h264-mp4.json提供mp4扩展、libx264、bt709及动态pix_fmt/crf/save_metadata/trim_to_audio。前端format回调插入具名动态控件/输入,VHS保存对象具名恢复;实际目标包、ffmpeg和恢复钩子未核对。
|
||||
|
||||
```json
|
||||
"video/h264-mp4"
|
||||
```
|
||||
|
||||
类:VHS_VideoCombine;JSON类型:str;角色:scalar。
|
||||
|
||||
源位置:`/nodes/4/widgets_values/format`
|
||||
|
||||
定义默认:schema首项image/gif,无显式default;单位:预设选择
|
||||
|
||||
范围/条件:当前video/h264-mp4;动态格式目录和运行编码器可用性未知
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [14] 合成schema默认、可选输入与签名;videohelpersuite/nodes.py 235~289行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [18] h264-mp4的pix_fmt/crf/元数据/音频截取定义和libx264;video_formats/h264-mp4.json 1~15行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [17] 格式发现和动态控件,不推定目标安装可用;videohelpersuite/nodes.py 46~108行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [23] 合成format回调重建动态控件及同名输入;web/js/VHS.core.js 1241~1298行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [21] 具名对象恢复:先旧回调,逐控件赋值并回调;保存覆盖成对象;web/js/VHS.core.js 6~169行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
#### 21. 节点4 · 输出像素格式(pix_fmt)
|
||||
|
||||
源yuv420p传ffmpeg -pix_fmt;只解释固定h264-mp4定义,不保证目标编码器可用或实际成片色彩效果。
|
||||
|
||||
```json
|
||||
"yuv420p"
|
||||
```
|
||||
|
||||
类:VHS_VideoCombine;JSON类型:str;角色:scalar。
|
||||
|
||||
源位置:`/nodes/4/widgets_values/pix_fmt`
|
||||
|
||||
定义默认:首项yuv420p;单位:像素格式枚举
|
||||
|
||||
范围/条件:yuv420p / yuv420p10le
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [18] h264-mp4的pix_fmt/crf/元数据/音频截取定义和libx264;video_formats/h264-mp4.json 1~15行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [17] 格式发现和动态控件,不推定目标安装可用;videohelpersuite/nodes.py 46~108行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [16] 动态格式默认替换、元数据ffmpeg分支;videohelpersuite/nodes.py 94~191行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [15] 输出/临时目录、前缀、循环、ffmpeg、音频条件与预览返回;videohelpersuite/nodes.py 328~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [23] 合成format回调重建动态控件及同名输入;web/js/VHS.core.js 1241~1298行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
#### 22. 节点4 · H264恒定质量参数(crf)
|
||||
|
||||
源12替换格式-crf参数,通常较小数值请求较高质量/较大体积,但目标编码器合法域、产物与体积均未实测;不能把schema上限当编码器运行保证。
|
||||
|
||||
```json
|
||||
12
|
||||
```
|
||||
|
||||
类:VHS_VideoCombine;JSON类型:int;角色:scalar。
|
||||
|
||||
源位置:`/nodes/4/widgets_values/crf`
|
||||
|
||||
定义默认:19;单位:CRF值
|
||||
|
||||
范围/条件:固定格式schema0~100,step1;不是目标libx264已接受所有值的证明
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [18] h264-mp4的pix_fmt/crf/元数据/音频截取定义和libx264;video_formats/h264-mp4.json 1~15行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [16] 动态格式默认替换、元数据ffmpeg分支;videohelpersuite/nodes.py 94~191行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [15] 输出/临时目录、前缀、循环、ffmpeg、音频条件与预览返回;videohelpersuite/nodes.py 328~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [23] 合成format回调重建动态控件及同名输入;web/js/VHS.core.js 1241~1298行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
#### 23. 节点4 · 视频元数据保存开关(save_metadata)
|
||||
|
||||
源true选择ffmpeg元数据写入分支,将prompt及extra_pnginfo等静态构造为元数据;具体文件、内容和成功情况未验证。不是当前流程已运行或预览PNG已存在的证据。
|
||||
|
||||
```json
|
||||
true
|
||||
```
|
||||
|
||||
类:VHS_VideoCombine;JSON类型:bool;角色:scalar。
|
||||
|
||||
源位置:`/nodes/4/widgets_values/save_metadata`
|
||||
|
||||
定义默认:true;单位:布尔
|
||||
|
||||
范围/条件:true / false;固定动态格式字段
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [18] h264-mp4的pix_fmt/crf/元数据/音频截取定义和libx264;video_formats/h264-mp4.json 1~15行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [16] 动态格式默认替换、元数据ffmpeg分支;videohelpersuite/nodes.py 94~191行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [15] 输出/临时目录、前缀、循环、ffmpeg、音频条件与预览返回;videohelpersuite/nodes.py 328~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
#### 24. 节点4 · 音轨截取条件(trim_to_audio)
|
||||
|
||||
源false在有音频的参考分支设置apad并-shortest,true不加该apad。本图Combine.audio未接,Load音频出口也未接;false不能证明有音频,更不能称保留原音轨。
|
||||
|
||||
```json
|
||||
false
|
||||
```
|
||||
|
||||
类:VHS_VideoCombine;JSON类型:bool;角色:scalar。
|
||||
|
||||
源位置:`/nodes/4/widgets_values/trim_to_audio`
|
||||
|
||||
定义默认:false;单位:布尔
|
||||
|
||||
范围/条件:true / false;仅有audio输入/音频数据的合成分支生效
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [18] h264-mp4的pix_fmt/crf/元数据/音频截取定义和libx264;video_formats/h264-mp4.json 1~15行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [15] 输出/临时目录、前缀、循环、ffmpeg、音频条件与预览返回;videohelpersuite/nodes.py 328~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
#### 25. 节点4 · 往返帧序列开关(pingpong)
|
||||
|
||||
源false不调用to_pingpong;true时改帧序列并与meta_batch有不兼容提示。不是循环次数或FPS。
|
||||
|
||||
```json
|
||||
false
|
||||
```
|
||||
|
||||
类:VHS_VideoCombine;JSON类型:bool;角色:scalar。
|
||||
|
||||
源位置:`/nodes/4/widgets_values/pingpong`
|
||||
|
||||
定义默认:false;单位:布尔
|
||||
|
||||
范围/条件:true / false
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [14] 合成schema默认、可选输入与签名;videohelpersuite/nodes.py 235~289行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [15] 输出/临时目录、前缀、循环、ffmpeg、音频条件与预览返回;videohelpersuite/nodes.py 328~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
#### 26. 节点4 · 保存目录选择(save_output)
|
||||
|
||||
源true选择folder_paths输出目录,false选临时目录;不等于当前文件已保存。真实目录配置/权限/编码器/文件/时长与姿态视频效果均未知。
|
||||
|
||||
```json
|
||||
true
|
||||
```
|
||||
|
||||
类:VHS_VideoCombine;JSON类型:bool;角色:scalar。
|
||||
|
||||
源位置:`/nodes/4/widgets_values/save_output`
|
||||
|
||||
定义默认:true;单位:布尔
|
||||
|
||||
范围/条件:true / false
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [14] 合成schema默认、可选输入与签名;videohelpersuite/nodes.py 235~289行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [15] 输出/临时目录、前缀、循环、ffmpeg、音频条件与预览返回;videohelpersuite/nodes.py 328~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
#### 27. 节点4 · 历史视频预览缓存(非运行参数)(videopreview)
|
||||
|
||||
这是前端历史预览状态对象,完整嵌套原文按原JSON类型展示,不作为执行输入或已生成证明。hidden/paused是界面可见和暂停状态;params中的filename/type/format/尺寸/读取选项或frame_rate/workflow/fullpath只是缓存。Load params.type=input与Combine type=output不能证明媒体存在;E:\ComfyUI-Data\output\AnimateDiff_00006.mp4是旧路径,workflow是旧PNG名;不读取路径、不请求api/view或媒体URL。DOM widget options.serialize=false与VHS自定义onSerialize枚举全部widgets并不相同,VHS仍可把预览对象存进工作流;API是否排除取决固定前端控件options,目标UE钩子未知。
|
||||
|
||||
```json
|
||||
{
|
||||
"hidden": false,
|
||||
"paused": false,
|
||||
"params": {
|
||||
"filename": "AnimateDiff_00006.mp4",
|
||||
"format": "video/h264-mp4",
|
||||
"frame_rate": 24,
|
||||
"fullpath": "E:\\ComfyUI-Data\\output\\AnimateDiff_00006.mp4",
|
||||
"subfolder": "",
|
||||
"type": "output",
|
||||
"workflow": "AnimateDiff_00006.png"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
类:VHS_VideoCombine;JSON类型:dict;角色:frontend_history。
|
||||
|
||||
源位置:`/nodes/4/widgets_values/videopreview`
|
||||
|
||||
定义默认:无后端schema默认;单位:前端状态
|
||||
|
||||
范围/条件:对象及嵌套JSON类型原样保留,不递归计作新增运行参数
|
||||
|
||||
源mode=0,声明comfyui-videohelpersuite@1.7.9;仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。
|
||||
|
||||
依据:
|
||||
- [24] videopreview DOM状态serialize=false;VHS自定义保存仍枚举全部widget;web/js/VHS.core.js 934~943行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [21] 具名对象恢复:先旧回调,逐控件赋值并回调;保存覆盖成对象;web/js/VHS.core.js 6~169行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
- [25] 核心先按序恢复再onConfigure,VHS对象须由插件具名回调恢复;src/lib/litegraph/src/LGraphNode.ts 862~875行;commit 52bb58d307242a34103998ef1da8007e47501d5b;SHA256 ce4078003ea69ec804d8f4c5e6ca021a952c05c299a3dab6c20f7e4123b8619f;https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/src/lib/litegraph/src/LGraphNode.ts
|
||||
- [26] 核心先数组保存再onSerialize,VHS回调覆盖对象;src/lib/litegraph/src/LGraphNode.ts 907~929行;commit 52bb58d307242a34103998ef1da8007e47501d5b;SHA256 ce4078003ea69ec804d8f4c5e6ca021a952c05c299a3dab6c20f7e4123b8619f;https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/src/lib/litegraph/src/LGraphNode.ts
|
||||
- [27] 先可序列化控件后物理连线,外线覆盖同名frame_rate;src/utils/executionUtil.ts 86~127行;commit 52bb58d307242a34103998ef1da8007e47501d5b;SHA256 4e51bc54e35cb7ac9bb7cba418a74ccdd5974f640b9b088aa4ae7668f746ab36;https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/src/utils/executionUtil.ts
|
||||
|
||||
### 零保存节点与源注释
|
||||
|
||||
9 VHS_VideoInfoLoaded:VHS_VideoInfoLoaded9原widgets_values={}为空对象、零保存位置;不是缺键/null/[]。其余四出口帧数/时长/宽度/高度未接。Load帧数/音频出口未接、VAE/meta_batch未接,Combine.audio/meta_batch/vae也未接;不能称保留原音轨。
|
||||
|
||||
节点8,位置`/nodes/0/widgets_values/0`
|
||||
|
||||
作者插件链接、更新和准备模型建议,仅为源注释,不证明目标安装或授权更新、下载、停TTS。
|
||||
|
||||
```text
|
||||
## Custom Nodes
|
||||
|
||||
- [Fannovel16/comfyui_controlnet_aux](https://github.com/Fannovel16/comfyui_controlnet_aux)
|
||||
- [Kosinkadink/ComfyUI-VideoHelperSuite](https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite)
|
||||
|
||||
## Report Issue
|
||||
|
||||
Note: Please update ComfyUI first ([guide](https://docs.comfy.org/zh-CN/installation/update_comfyui)) and prepare required models. Desktop/Cloud ship stable builds; nightly-supported models may not be included yet, please wait for the next stable release.
|
||||
|
||||
- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)
|
||||
- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)
|
||||
- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)
|
||||
|
||||
```
|
||||
|
||||
### 固定原件索引
|
||||
|
||||
0. DWPose schema、字符串开关、权重来源选择、调用和双出口;node_wrappers/dwpose.py 第32~105行;提交136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 0d357a3960a01faeeb1cd921c99166a2fa4d2efd3736a73624565f3e1849465f;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/node_wrappers/dwpose.py
|
||||
|
||||
1. DWPreprocessor真实注册;node_wrappers/dwpose.py 第159~165行;提交136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 0d357a3960a01faeeb1cd921c99166a2fa4d2efd3736a73624565f3e1849465f;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/node_wrappers/dwpose.py
|
||||
|
||||
2. 扫描node_wrappers合并注册;失败可缺失节点;__init__.py 第25~66行;提交136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 9a5786ef9569223acd235676c08297aff78b2de1e46ab69c96665222b8c2a4b4;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/__init__.py
|
||||
|
||||
3. 默认、范围、逐帧调用和resolution传递;utils.py 第62~120行;提交136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 6883c2f1cd912c3d53419dfaa460f904056033db920a36c39a276284bfc994a5;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/utils.py
|
||||
|
||||
4. 权重加载、检测、绘制与结果缩放顺序;src/custom_controlnet_aux/dwpose/__init__.py 第217~279行;提交136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 11733916809df84a53cfe98c3a2a448ab953f085b89280860cfffa053201cae3;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/__init__.py
|
||||
|
||||
5. 模型类型分支及加载设备,仅静态条件;src/custom_controlnet_aux/dwpose/wholebody.py 第19~78行;提交136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 89c871f4aed3440c2bafcf4987e79ffeed15fb28031951c36b7614374fd9df0f;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/wholebody.py
|
||||
|
||||
6. 身体骨架线宽缩放条件;src/custom_controlnet_aux/dwpose/util.py 第82~138行;提交136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 e6050a00f0cd2173e37f1da41a7f9ad3ea5cd57d73388bcd0e91cf0e393d5d3c;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/util.py
|
||||
|
||||
7. 短边比例缩放与64倍数填充/去填充闭包;src/custom_controlnet_aux/util.py 第155~183行;提交136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 956ff6eb649148c98e68591824e9d029be527ea8f52eb1841b1b1c9f18f37b34;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/util.py
|
||||
|
||||
8. 文件缺失时静态下载分支;不授权下载;src/custom_controlnet_aux/util.py 第289~342行;提交136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 956ff6eb649148c98e68591824e9d029be527ea8f52eb1841b1b1c9f18f37b34;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/util.py
|
||||
|
||||
9. VHS_LoadVideo注册类LoadVideoUpload准确schema与路径引用;videohelpersuite/load_video_nodes.py 第423~474行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
10. 尺寸取整、force_rate、跳帧、间隔与上限;videohelpersuite/load_video_nodes.py 第59~168行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
11. 加载尺寸/内存上限、格式、loaded_fps和四出口;videohelpersuite/load_video_nodes.py 第293~420行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
12. AnimateDiff格式默认及dim/target_rate,非最终帧率证明;videohelpersuite/load_video_nodes.py 第22~52行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
13. DIMMAX8192、BIGMAX2**53-1和FLOAT/INT兼容;videohelpersuite/utils.py 第19~56行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
14. 合成schema默认、可选输入与签名;videohelpersuite/nodes.py 第235~289行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
15. 输出/临时目录、前缀、循环、ffmpeg、音频条件与预览返回;videohelpersuite/nodes.py 第328~625行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
16. 动态格式默认替换、元数据ffmpeg分支;videohelpersuite/nodes.py 第94~191行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
17. 格式发现和动态控件,不推定目标安装可用;videohelpersuite/nodes.py 第46~108行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
18. h264-mp4的pix_fmt/crf/元数据/音频截取定义和libx264;video_formats/h264-mp4.json 第1~15行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
19. VideoInfoLoaded依次取loaded_fps/frame_count/duration/width/height;videohelpersuite/nodes.py 第941~970行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
20. VHS三个节点真实类注册,均插件而非核心;videohelpersuite/nodes.py 第1024~1043行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
21. 具名对象恢复:先旧回调,逐控件赋值并回调;保存覆盖成对象;web/js/VHS.core.js 第6~169行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
22. 加载格式回调只在wasDefault条件重设值,随后逐控件回调;web/js/VHS.core.js 第670~711行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
23. 合成format回调重建动态控件及同名输入;web/js/VHS.core.js 第1241~1298行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
24. videopreview DOM状态serialize=false;VHS自定义保存仍枚举全部widget;web/js/VHS.core.js 第934~943行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
25. 核心先按序恢复再onConfigure,VHS对象须由插件具名回调恢复;src/lib/litegraph/src/LGraphNode.ts 第862~875行;提交52bb58d307242a34103998ef1da8007e47501d5b;SHA256 ce4078003ea69ec804d8f4c5e6ca021a952c05c299a3dab6c20f7e4123b8619f;https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/src/lib/litegraph/src/LGraphNode.ts
|
||||
|
||||
26. 核心先数组保存再onSerialize,VHS回调覆盖对象;src/lib/litegraph/src/LGraphNode.ts 第907~929行;提交52bb58d307242a34103998ef1da8007e47501d5b;SHA256 ce4078003ea69ec804d8f4c5e6ca021a952c05c299a3dab6c20f7e4123b8619f;https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/src/lib/litegraph/src/LGraphNode.ts
|
||||
|
||||
27. 先可序列化控件后物理连线,外线覆盖同名frame_rate;src/utils/executionUtil.ts 第86~127行;提交52bb58d307242a34103998ef1da8007e47501d5b;SHA256 4e51bc54e35cb7ac9bb7cba418a74ccdd5974f640b9b088aa4ae7668f746ab36;https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/src/utils/executionUtil.ts
|
||||
|
||||
28. MarkdownNote前端注释;src/extensions/core/noteNode.ts 第1~80行;提交52bb58d307242a34103998ef1da8007e47501d5b;SHA256 1014f719e3d67d9c5183a5e8631d4c2d6581dfe67083f32eb23774ec3074bef2;https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/src/extensions/core/noteNode.ts
|
||||
|
||||
29. 原仓许可文本,逐文件声明保持;未安装执行;LICENSE.txt 第1~8行;提交136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/LICENSE.txt
|
||||
|
||||
30. 原仓许可文本,逐文件声明保持;未安装执行;LICENSE 第1~8行;提交52bb58d307242a34103998ef1da8007e47501d5b;SHA256 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986;https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/LICENSE
|
||||
|
||||
31. 原仓许可文本,逐文件声明保持;未安装执行;LICENSE 第1~8行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip
|
||||
|
||||
32. 本文件另保留CMU非商业声明;不把仓级许可当全部文件许可;src/custom_controlnet_aux/dwpose/__init__.py 第1~7行;提交136f125c89aed92ced1b6fbb491e13719b72fcc0;SHA256 11733916809df84a53cfe98c3a2a448ab953f085b89280860cfffa053201cae3;https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/__init__.py
|
||||
@@ -0,0 +1 @@
|
||||
__pycache__/
|
||||
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,4 @@
|
||||
Building source distribution...
|
||||
Building wheel from source distribution...
|
||||
Successfully built calliope-backend/dist/calliope-1.5.8.tar.gz
|
||||
Successfully built calliope-backend/dist/calliope-1.5.8-py3-none-any.whl
|
||||
@@ -0,0 +1,728 @@
|
||||
{
|
||||
"base": "fec5ccab441dace8f489fd3eaacc68fa25c47f8e",
|
||||
"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_fifteen_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,668 @@
|
||||
"""Source-bound OpenPose editorial reference; no conversion or upstream execution."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
REPO = Path(__file__).resolve().parents[3]
|
||||
OUT = Path(__file__).resolve().parent
|
||||
PATHS = [
|
||||
"example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/"
|
||||
"人物骨骼姿势提取/openpose-video-姿态检测.json"
|
||||
]
|
||||
|
||||
|
||||
def canonical(value):
|
||||
return json.dumps(value, ensure_ascii=False, sort_keys=True, separators=(",", ":")).encode()
|
||||
|
||||
|
||||
def build(index=0):
|
||||
path = PATHS[index]
|
||||
raw = (REPO / path).read_bytes()
|
||||
source = json.loads(raw)
|
||||
base = OUT.parent / "openpose-reference"
|
||||
entries = json.loads((base / "sources.json").read_bytes())["sources"]
|
||||
refs = []
|
||||
|
||||
def ref(repo, file, start, end, claim):
|
||||
e = next(e for e in entries if e["id"] == repo and e["file"] == file)
|
||||
data = (base / e["local_file"]).read_bytes()
|
||||
assert hashlib.sha256(data).hexdigest() == e["sha256"]
|
||||
assert 1 <= start <= end <= len(data.decode().splitlines())
|
||||
refs.append(
|
||||
{
|
||||
**e,
|
||||
"local_file": "../openpose-reference/" + e["local_file"],
|
||||
"lines": [start, end],
|
||||
"claim": claim,
|
||||
}
|
||||
)
|
||||
return len(refs) - 1
|
||||
|
||||
dw = ref(
|
||||
"dw",
|
||||
"node_wrappers/dwpose.py",
|
||||
32,
|
||||
105,
|
||||
"DWPose schema、字符串开关、权重来源选择、调用和双出口",
|
||||
)
|
||||
dwreg = ref("dw", "node_wrappers/dwpose.py", 159, 165, "DWPreprocessor真实注册")
|
||||
loader = ref("dw", "__init__.py", 25, 66, "扫描node_wrappers合并注册;失败可缺失节点")
|
||||
helper = ref("dw", "utils.py", 62, 120, "默认、范围、逐帧调用和resolution传递")
|
||||
detector = ref(
|
||||
"dw",
|
||||
"src/custom_controlnet_aux/dwpose/__init__.py",
|
||||
217,
|
||||
279,
|
||||
"权重加载、检测、绘制与结果缩放顺序",
|
||||
)
|
||||
model_load = ref(
|
||||
"dw",
|
||||
"src/custom_controlnet_aux/dwpose/wholebody.py",
|
||||
19,
|
||||
78,
|
||||
"模型类型分支及加载设备,仅静态条件",
|
||||
)
|
||||
drawing = ref("dw", "src/custom_controlnet_aux/dwpose/util.py", 82, 138, "身体骨架线宽缩放条件")
|
||||
common = ref(
|
||||
"dw", "src/custom_controlnet_aux/util.py", 155, 183, "短边比例缩放与64倍数填充/去填充闭包"
|
||||
)
|
||||
download = ref(
|
||||
"dw", "src/custom_controlnet_aux/util.py", 289, 342, "文件缺失时静态下载分支;不授权下载"
|
||||
)
|
||||
load = ref(
|
||||
"vhs",
|
||||
"videohelpersuite/load_video_nodes.py",
|
||||
423,
|
||||
474,
|
||||
"VHS_LoadVideo注册类LoadVideoUpload准确schema与路径引用",
|
||||
)
|
||||
gen = ref(
|
||||
"vhs",
|
||||
"videohelpersuite/load_video_nodes.py",
|
||||
59,
|
||||
168,
|
||||
"尺寸取整、force_rate、跳帧、间隔与上限",
|
||||
)
|
||||
loadrun = ref(
|
||||
"vhs",
|
||||
"videohelpersuite/load_video_nodes.py",
|
||||
293,
|
||||
420,
|
||||
"加载尺寸/内存上限、格式、loaded_fps和四出口",
|
||||
)
|
||||
loadfmt = ref(
|
||||
"vhs",
|
||||
"videohelpersuite/load_video_nodes.py",
|
||||
22,
|
||||
52,
|
||||
"AnimateDiff格式默认及dim/target_rate,非最终帧率证明",
|
||||
)
|
||||
constants = ref(
|
||||
"vhs", "videohelpersuite/utils.py", 19, 56, "DIMMAX8192、BIGMAX2**53-1和FLOAT/INT兼容"
|
||||
)
|
||||
combine = ref("vhs", "videohelpersuite/nodes.py", 235, 289, "合成schema默认、可选输入与签名")
|
||||
combine_run = ref(
|
||||
"vhs",
|
||||
"videohelpersuite/nodes.py",
|
||||
328,
|
||||
625,
|
||||
"输出/临时目录、前缀、循环、ffmpeg、音频条件与预览返回",
|
||||
)
|
||||
metadata = ref(
|
||||
"vhs", "videohelpersuite/nodes.py", 94, 191, "动态格式默认替换、元数据ffmpeg分支"
|
||||
)
|
||||
formats = ref(
|
||||
"vhs", "videohelpersuite/nodes.py", 46, 108, "格式发现和动态控件,不推定目标安装可用"
|
||||
)
|
||||
h264 = ref(
|
||||
"vhs",
|
||||
"video_formats/h264-mp4.json",
|
||||
1,
|
||||
15,
|
||||
"h264-mp4的pix_fmt/crf/元数据/音频截取定义和libx264",
|
||||
)
|
||||
info = ref(
|
||||
"vhs",
|
||||
"videohelpersuite/nodes.py",
|
||||
941,
|
||||
970,
|
||||
"VideoInfoLoaded依次取loaded_fps/frame_count/duration/width/height",
|
||||
)
|
||||
registry = ref(
|
||||
"vhs", "videohelpersuite/nodes.py", 1024, 1043, "VHS三个节点真实类注册,均插件而非核心"
|
||||
)
|
||||
kv = ref(
|
||||
"vhs",
|
||||
"web/js/VHS.core.js",
|
||||
6,
|
||||
169,
|
||||
"具名对象恢复:先旧回调,逐控件赋值并回调;保存覆盖成对象",
|
||||
)
|
||||
loadcb = ref(
|
||||
"vhs",
|
||||
"web/js/VHS.core.js",
|
||||
670,
|
||||
711,
|
||||
"加载格式回调只在wasDefault条件重设值,随后逐控件回调",
|
||||
)
|
||||
dyn = ref("vhs", "web/js/VHS.core.js", 1241, 1298, "合成format回调重建动态控件及同名输入")
|
||||
preview = ref(
|
||||
"vhs",
|
||||
"web/js/VHS.core.js",
|
||||
934,
|
||||
943,
|
||||
"videopreview DOM状态serialize=false;VHS自定义保存仍枚举全部widget",
|
||||
)
|
||||
restore = ref(
|
||||
"frontend",
|
||||
"src/lib/litegraph/src/LGraphNode.ts",
|
||||
862,
|
||||
875,
|
||||
"核心先按序恢复再onConfigure,VHS对象须由插件具名回调恢复",
|
||||
)
|
||||
persist = ref(
|
||||
"frontend",
|
||||
"src/lib/litegraph/src/LGraphNode.ts",
|
||||
907,
|
||||
929,
|
||||
"核心先数组保存再onSerialize,VHS回调覆盖对象",
|
||||
)
|
||||
execute = ref(
|
||||
"frontend",
|
||||
"src/utils/executionUtil.ts",
|
||||
86,
|
||||
127,
|
||||
"先可序列化控件后物理连线,外线覆盖同名frame_rate",
|
||||
)
|
||||
note = ref("frontend", "src/extensions/core/noteNode.ts", 1, 80, "MarkdownNote前端注释")
|
||||
for repo, file in [("dw", "LICENSE.txt"), ("frontend", "LICENSE"), ("vhs", "LICENSE")]:
|
||||
ref(repo, file, 1, 8, "原仓许可文本,逐文件声明保持;未安装执行")
|
||||
ref(
|
||||
"dw",
|
||||
"src/custom_controlnet_aux/dwpose/__init__.py",
|
||||
1,
|
||||
7,
|
||||
"本文件另保留CMU非商业声明;不把仓级许可当全部文件许可",
|
||||
)
|
||||
|
||||
specs = {}
|
||||
|
||||
def spec(cls, name, label, typ, default, unit, limits, effect, evidence, role="scalar"):
|
||||
specs[cls, name] = dict(
|
||||
field=name,
|
||||
label=label,
|
||||
type=typ,
|
||||
schema_default=default,
|
||||
unit=unit,
|
||||
limits=limits,
|
||||
effect=effect,
|
||||
evidence=evidence,
|
||||
role=role,
|
||||
)
|
||||
|
||||
for name, label, flag in [
|
||||
("detect_hand", "手部绘制开关", "include_hand"),
|
||||
("detect_body", "身体绘制开关", "include_body"),
|
||||
("detect_face", "面部绘制开关", "include_face"),
|
||||
]:
|
||||
spec(
|
||||
"DWPreprocessor",
|
||||
name,
|
||||
label,
|
||||
"COMBO",
|
||||
"enable",
|
||||
"字符串枚举",
|
||||
"enable / disable",
|
||||
f"源保存enable字符串,包装器以等于enable转布尔再传{flag}控制绘制。"
|
||||
"模型先检测后绘制;关闭某部分不证明省去该部分推理,也不承诺人数、精度或速度。源值不改bool。",
|
||||
[dw, dwreg, loader, helper, detector],
|
||||
)
|
||||
spec(
|
||||
"DWPreprocessor",
|
||||
"resolution",
|
||||
"姿态图输出分辨率",
|
||||
"INT",
|
||||
"512",
|
||||
"像素(输出短边目标)",
|
||||
"schema64~16384,step64;helper只接受>=64的int,否则回退512",
|
||||
"源1024传detect_resolution。此固定实现先以resolution=0处理输入、检测姿态并绘制,"
|
||||
"随后将画布短边缩放到目标并填充到64倍数,再去填充;不是保证检测器先以1024推理,"
|
||||
"不是视频宽度/总帧数或模型超分。比例取整及原素材尺寸决定实际尺寸,未计算真实输出。",
|
||||
[dw, helper, detector, common],
|
||||
)
|
||||
spec(
|
||||
"DWPreprocessor",
|
||||
"bbox_detector",
|
||||
"人体框检测模型引用",
|
||||
"COMBO",
|
||||
"yolox_l.onnx",
|
||||
"文件名枚举",
|
||||
"None / yolox_l.torchscript.pt / yolox_l."
|
||||
"onnx / yolo_nas_l_fp16.onnx / yolo_nas_m"
|
||||
"_fp16.onnx / yolo_nas_s_fp16.onnx",
|
||||
"源yolox_l.onnx选择yzd-v/DWPose来源;det_filename传加载器。缺本地文件时custom_hf_download可进入下载分支,"
|
||||
"随后依文件类型加载;仅静态说明,不下载或运行。文件名不证明安装/兼容、可下载或显存速度。",
|
||||
[dw, detector, download, model_load],
|
||||
)
|
||||
spec(
|
||||
"DWPreprocessor",
|
||||
"pose_estimator",
|
||||
"姿态估计模型引用",
|
||||
"COMBO",
|
||||
"dw-ll_ucoco_384_bs5.torchscript.pt",
|
||||
"文件名枚举",
|
||||
"dw-ll_ucoco_384_bs5.torchscript.pt / dw-ll_ucoco_384.onnx / dw-ll_ucoco.onnx",
|
||||
"源TorchScript文件选择hr16/DWPose-TorchScript-BatchSize5。schema默认是此文件,"
|
||||
"estimate_pose函数签名默认却为dw-ll_ucoco_384.onnx,不能混写。静态from_pretrained可触发缺文件下载和加载,"
|
||||
"本轮均未调用。名称bs5不证明本视频每批5帧或目标性能。",
|
||||
[dw, detector, download, model_load],
|
||||
)
|
||||
spec(
|
||||
"DWPreprocessor",
|
||||
"scale_stick_for_xinsr_cn",
|
||||
"身体骨架线宽缩放开关",
|
||||
"COMBO",
|
||||
"disable",
|
||||
"字符串枚举",
|
||||
"disable / enable;开启时max_side<500倍率1,否则min(2+max_side//1000,7)",
|
||||
"源disable,转false传xinsr_stick_scaling。固定draw_bodypose基础stickwidth=4,"
|
||||
"关闭倍率1,开启按画布最大边分档;不是图像模型超分或目标安装证明。身体绘制关闭时不能据此保证有身体线条。",
|
||||
[dw, detector, drawing],
|
||||
)
|
||||
spec(
|
||||
"VHS_LoadVideo",
|
||||
"video",
|
||||
"输入视频文件引用",
|
||||
"COMBO",
|
||||
"动态input目录文件列表,无固定文件默认",
|
||||
"文件名",
|
||||
"目录文件扩展webm/mp4/mkv/gif/mov;目标列表未知",
|
||||
"源1月11日-1.mp4保持原文,参考LoadVideoUpload转annotated filepath后加载。未访问此媒体;"
|
||||
"真实时长、分辨率、帧数、原FPS及音频存在性未知。",
|
||||
[load, loadrun],
|
||||
)
|
||||
spec(
|
||||
"VHS_LoadVideo",
|
||||
"force_rate",
|
||||
"强制读取帧率",
|
||||
"FLOAT/INT",
|
||||
"0",
|
||||
"帧/秒",
|
||||
"0~60,step1,0禁用强制重采样",
|
||||
"源整数0:cv生成器以原fps决定target_frame_time,非已知原FPS;非零用倒数目标时间重采样。"
|
||||
"后续select_every_nth还会改变loaded_fps;AnimateDiff前端回调恢复条件及UE未知,不能称最终FPS=0/8/24。",
|
||||
[load, gen, loadrun, loadfmt, loadcb, kv],
|
||||
)
|
||||
for name, label in [("custom_width", "自定义宽度"), ("custom_height", "自定义高度")]:
|
||||
spec(
|
||||
"VHS_LoadVideo",
|
||||
name,
|
||||
label,
|
||||
"INT",
|
||||
"0",
|
||||
"像素",
|
||||
"0~8192;0禁用该维强制尺寸",
|
||||
"两维均0时先保留原比例尺寸,再按格式downscale_ratio对齐取整;AnimateDiff dim[0]=8。"
|
||||
"单维非零时另一维按比例推算,两维非零时分别指定。源两维0并不证明像素尺寸完全不变。"
|
||||
"前端format回调可设置step/mod/reset,只有wasDefault条件会改value;最终恢复取值和素材未知。",
|
||||
[load, gen, loadrun, loadfmt, constants, loadcb, kv],
|
||||
)
|
||||
spec(
|
||||
"VHS_LoadVideo",
|
||||
"frame_load_cap",
|
||||
"读取帧数上限",
|
||||
"INT",
|
||||
"0",
|
||||
"帧",
|
||||
"0~9007199254740991,step1;0不设置此项帧上限",
|
||||
"源0不表示零帧,非零在生成循环限制frames_added;内存、素材结束或格式条件仍可限制加载,"
|
||||
"不能称无限加载或已读取全部。",
|
||||
[load, gen, loadrun, constants],
|
||||
)
|
||||
spec(
|
||||
"VHS_LoadVideo",
|
||||
"skip_first_frames",
|
||||
"跳过开头帧数",
|
||||
"INT",
|
||||
"0",
|
||||
"生成器计数的帧",
|
||||
"0~9007199254740991,step1",
|
||||
"源0不主动跳开头;cv循环先累计total_frame_count并跳过<=skip_first_frames部分,然后处理nth选择。"
|
||||
"不是秒或视频时间戳;强制帧率与实际输入决定时间关系。",
|
||||
[load, gen, loadrun, constants],
|
||||
)
|
||||
spec(
|
||||
"VHS_LoadVideo",
|
||||
"select_every_nth",
|
||||
"读取间隔",
|
||||
"INT",
|
||||
"1",
|
||||
"帧间隔倍率",
|
||||
"1~9007199254740991,step1",
|
||||
"源1保留生成器每个可选帧;cv循环按计数取模选择。loaded_fps由target_frame_time再乘此间隔后的倒数给出,"
|
||||
"不直接用标题或缓存猜帧率。",
|
||||
[load, gen, loadrun, constants],
|
||||
)
|
||||
spec(
|
||||
"VHS_LoadVideo",
|
||||
"format",
|
||||
"加载格式约束",
|
||||
"COMBO",
|
||||
"AnimateDiff",
|
||||
"格式预设",
|
||||
"固定包内None/AnimateDiff/Mochi/LTXV/Hunyuan/Cosmos/Wan;允许外部增补,目标动态成员未知",
|
||||
"源AnimateDiff定义target_rate=8、dim=(8,0,512,512)。后端用dim决定尺寸对齐,不把target_rate自动当最终帧率。"
|
||||
"前端format回调将rate reset设8、尺寸reset设512,只在原值等于旧reset时改value并回调;"
|
||||
"具名恢复按实际控件顺序赋值并触发回调,无法只看对象键顺序推断最终控件值。UE7.5.2钩子次序未知。",
|
||||
[loadfmt, loadrun, loadcb, kv],
|
||||
)
|
||||
spec(
|
||||
"VHS_VideoCombine",
|
||||
"frame_rate",
|
||||
"合成帧率保存缓存(外线覆盖)",
|
||||
"FLOAT/INT",
|
||||
"8",
|
||||
"帧/秒",
|
||||
"schema min1、step1,无显式max;源int24并有link12",
|
||||
"保存24与预览24均不是最终FPS。物理link12从Info9槽0接Combine4输入槽4 frame_rate;"
|
||||
"固定包Info依次取loaded_fps等键,槽0读video_info.loaded_fps。Load2按target_frame_time和间隔构造此值。"
|
||||
"固定前端先控件后写解析外线覆盖同名输入;仅在该参考契约成立范围解释,目标UE/媒体/最终FPS未知。",
|
||||
[combine, info, loadrun, execute],
|
||||
"linked_saved",
|
||||
)
|
||||
spec(
|
||||
"VHS_VideoCombine",
|
||||
"loop_count",
|
||||
"视频循环次数设置",
|
||||
"INT",
|
||||
"0",
|
||||
"循环参数",
|
||||
"0~100,step1",
|
||||
"源0走空loop_args,不添加ffmpeg loop过滤器;>0按loop/size=num_frames构造。"
|
||||
"这是当前video格式分支;不能套GIF的无限循环解释或保证播放器循环行为。",
|
||||
[combine, combine_run],
|
||||
)
|
||||
spec(
|
||||
"VHS_VideoCombine",
|
||||
"filename_prefix",
|
||||
"保存文件名前缀",
|
||||
"STRING",
|
||||
"AnimateDiff",
|
||||
"相对前缀字符串",
|
||||
"由folder_paths输出目录规则解析;真实目录未知",
|
||||
"源AnimateDiff用于输出名称及计数,save_output=true选择输出目录;"
|
||||
"不等于预览对象E盘历史fullpath已可访问,不证明任何文件已生成。",
|
||||
[combine, combine_run],
|
||||
)
|
||||
spec(
|
||||
"VHS_VideoCombine",
|
||||
"format",
|
||||
"视频封装和编码预设",
|
||||
"COMBO",
|
||||
"schema首项image/gif,无显式default",
|
||||
"预设选择",
|
||||
"当前video/h264-mp4;动态格式目录和运行编码器可用性未知",
|
||||
"固定包h264-mp4.json提供mp4扩展、libx264、bt709及动态pix_fmt/crf/save_metadata/trim_to_audio。"
|
||||
"前端format回调插入具名动态控件/输入,VHS保存对象具名恢复;实际目标包、ffmpeg和恢复钩子未核对。",
|
||||
[combine, h264, formats, dyn, kv],
|
||||
)
|
||||
spec(
|
||||
"VHS_VideoCombine",
|
||||
"pix_fmt",
|
||||
"输出像素格式",
|
||||
"COMBO",
|
||||
"首项yuv420p",
|
||||
"像素格式枚举",
|
||||
"yuv420p / yuv420p10le",
|
||||
"源yuv420p传ffmpeg -pix_fmt;只解释固定h264-mp4定义,"
|
||||
"不保证目标编码器可用或实际成片色彩效果。",
|
||||
[h264, formats, metadata, combine_run, dyn],
|
||||
)
|
||||
spec(
|
||||
"VHS_VideoCombine",
|
||||
"crf",
|
||||
"H264恒定质量参数",
|
||||
"INT",
|
||||
"19",
|
||||
"CRF值",
|
||||
"固定格式schema0~100,step1;不是目标libx264已接受所有值的证明",
|
||||
"源12替换格式-crf参数,通常较小数值请求较高质量/较大体积,但目标编码器合法域、产物与体积均未实测;"
|
||||
"不能把schema上限当编码器运行保证。",
|
||||
[h264, metadata, combine_run, dyn],
|
||||
)
|
||||
spec(
|
||||
"VHS_VideoCombine",
|
||||
"save_metadata",
|
||||
"视频元数据保存开关",
|
||||
"BOOLEAN",
|
||||
"true",
|
||||
"布尔",
|
||||
"true / false;固定动态格式字段",
|
||||
"源true选择ffmpeg元数据写入分支,将prompt及extra_pnginfo等静态构造为元数据;具体文件、内容和成功情况未验证。"
|
||||
"不是当前流程已运行或预览PNG已存在的证据。",
|
||||
[h264, metadata, combine_run],
|
||||
)
|
||||
spec(
|
||||
"VHS_VideoCombine",
|
||||
"trim_to_audio",
|
||||
"音轨截取条件",
|
||||
"BOOLEAN",
|
||||
"false",
|
||||
"布尔",
|
||||
"true / false;仅有audio输入/音频数据的合成分支生效",
|
||||
"源false在有音频的参考分支设置apad并-shortest,true不加该apad。"
|
||||
"本图Combine.audio未接,Load音频出口也未接;false不能证明有音频,更不能称保留原音轨。",
|
||||
[h264, combine_run],
|
||||
)
|
||||
spec(
|
||||
"VHS_VideoCombine",
|
||||
"pingpong",
|
||||
"往返帧序列开关",
|
||||
"BOOLEAN",
|
||||
"false",
|
||||
"布尔",
|
||||
"true / false",
|
||||
"源false不调用to_pingpong;true时改帧序列并与meta_batch有不兼容提示。不是循环次数或FPS。",
|
||||
[combine, combine_run],
|
||||
)
|
||||
spec(
|
||||
"VHS_VideoCombine",
|
||||
"save_output",
|
||||
"保存目录选择",
|
||||
"BOOLEAN",
|
||||
"true",
|
||||
"布尔",
|
||||
"true / false",
|
||||
"源true选择folder_paths输出目录,false选临时目录;不等于当前文件已保存。"
|
||||
"真实目录配置/权限/编码器/文件/时长与姿态视频效果均未知。",
|
||||
[combine, combine_run],
|
||||
)
|
||||
preview_note = (
|
||||
"这是前端历史预览状态对象,完整嵌套原文按原JSON类型展示,不作为执行输入或已生成证明。"
|
||||
"hidden/paused是界面可见和暂停状态;params中的filename/type/format/尺寸/读取选项或frame_rate/workflow/fullpath"
|
||||
"只是缓存。Load params.type=input与Combine type=output不能证明媒体存在;"
|
||||
"E:\\ComfyUI-Data\\output\\AnimateDiff_00006"
|
||||
".mp4是旧路径,workflow是旧PNG名;不读取路径、不请求api/vie"
|
||||
"w或媒体URL。"
|
||||
"DOM widget options.serialize=false与VHS自定义onSerialize枚举全部widgets并不相同,"
|
||||
"VHS仍可把预览对象存进工作流;API是否排除取决固定前端控件options,目标UE钩子未知。"
|
||||
)
|
||||
for cls in ["VHS_LoadVideo", "VHS_VideoCombine"]:
|
||||
spec(
|
||||
cls,
|
||||
"videopreview",
|
||||
"历史视频预览缓存(非运行参数)",
|
||||
"OBJECT",
|
||||
"无后端schema默认",
|
||||
"前端状态",
|
||||
"对象及嵌套JSON类型原样保留,不递归计作新增运行参数",
|
||||
preview_note,
|
||||
[preview, kv, restore, persist, execute],
|
||||
"frontend_history",
|
||||
)
|
||||
|
||||
fields, comments = [], []
|
||||
dw_names = [
|
||||
"detect_hand",
|
||||
"detect_body",
|
||||
"detect_face",
|
||||
"resolution",
|
||||
"bbox_detector",
|
||||
"pose_estimator",
|
||||
"scale_stick_for_xinsr_cn",
|
||||
]
|
||||
for i, n in enumerate(source["nodes"]):
|
||||
values = n["widgets_values"]
|
||||
if n["type"] == "MarkdownNote":
|
||||
comments.append(
|
||||
dict(
|
||||
node_id=str(n["id"]),
|
||||
pointer=f"/nodes/{i}/widgets_values/0",
|
||||
text=values[0],
|
||||
evidence=[note],
|
||||
meaning="作者插件链接、更新和准备模型建议,仅为源注释,不证明目标安装或授权更新、下载、停TTS。",
|
||||
)
|
||||
)
|
||||
continue
|
||||
if n["type"] == "VHS_VideoInfoLoaded":
|
||||
assert values == {} and type(values) is dict
|
||||
continue
|
||||
pairs = zip(dw_names, values, strict=True) if isinstance(values, list) else values.items()
|
||||
for j, (name, value) in enumerate(pairs):
|
||||
fields.append(
|
||||
{
|
||||
**specs[n["type"], name],
|
||||
"node_id": str(n["id"]),
|
||||
"definition_node_id": str(n["id"]),
|
||||
"class_type": n["type"],
|
||||
"scope": "root",
|
||||
"pointer": f"/nodes/{i}/widgets_values/"
|
||||
f"{j if isinstance(values, list) else name}",
|
||||
"value": value,
|
||||
"json_type": type(value).__name__,
|
||||
"execution_note": f"源mode={n['mode']},声明"
|
||||
f"{n['properties']['cnr_id']}@{n['properties']['ver']};"
|
||||
"仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。",
|
||||
}
|
||||
)
|
||||
assert len(fields) == 27 and len(comments) == 1
|
||||
overview = (
|
||||
"这张图拟把视频画面交给DWPose绘制人物姿态,再合成视频;关键点第二出口和音频均未接,不能称输出关键点文件或保留原音轨。"
|
||||
"合成帧率有外线覆盖,保存24与两处历史预览均不是实跑结果。插件、UE和真实媒体未核对,转换仍关闭。"
|
||||
)
|
||||
flow = [
|
||||
"5源节点(4实体+MarkdownNote8)、4物理边,全mode0、无子图。"
|
||||
"27顶层保存位置=7个DW数组项+9个Load对象键+11个Combine对象键"
|
||||
",其中25标量、2个预览对象;另1源注释。嵌套叶子不重复计数。",
|
||||
"边10 LoadVideo2槽0→DW1.image输入槽0;边4 DW1图像槽"
|
||||
"0→Combine4.images槽0。DW的POSE_KEYPOINT槽1未接"
|
||||
";不据标题当核心SDPose或已输出关键点文件。",
|
||||
"边11 LoadVideo2槽3→Info9.video_info输入槽0;边1"
|
||||
"2 Info9槽0→Combine4.frame_rate输入槽4。固定包Inf"
|
||||
"o槽0取loaded_fps,外线覆盖保存24,依Load的target_fra"
|
||||
"me_time及select_every_nth构造;中文FPS🟦仅源显示名,不"
|
||||
"能单独证明语义。保存24与预览24均不是最终FPS,force_rate=0不证"
|
||||
"明原FPS。",
|
||||
"VHS_VideoInfoLoaded9原widgets_values={}为空"
|
||||
"对象、零保存位置;不是缺键/null/[]。其余四出口帧数/时长/宽度/高度未接"
|
||||
"。Load帧数/音频出口未接、VAE/meta_batch未接,Combine."
|
||||
"audio/meta_batch/vae也未接;不能称保留原音轨。",
|
||||
"DW精确源提交136f125c89aed92ced1b6fbb491e13719"
|
||||
"b72fcc0,真实注册DWPreprocessor→DWPose_Prepro"
|
||||
"cessor;不是case01 AIO e8b689a。分辨率在本提交检测后缩放"
|
||||
"画布,三个开关控制绘制而非保证跳过检测。模型文件名不证明安装,静态缺文件下载/加"
|
||||
"载分支未调用。",
|
||||
"VHS声明1.7.9已取官方registry精确发布包并核注册/成员哈希;注册表"
|
||||
"无Git commit字段,包同字节不等于提交绑定。三类VHS及DW均为插件,不"
|
||||
"假借core来源,也不把包来源当目标安装证明。",
|
||||
"frontend1.36.12官方tag对应52bb58d307242a3410"
|
||||
"3998ef1da8007e47501d5b。核心先按序恢复再onConfigu"
|
||||
"re,VHS随后具名恢复并回调;核心先数组保存再onSerialize,VHS覆"
|
||||
"盖具名对象。format回调可重建控件/改reset条件,不能按保存对象键顺序推"
|
||||
"断最终输入。",
|
||||
"各节点UE7.5.2(含注释),空widget_ue_connectable/i"
|
||||
"nput_ue_unconnectable和extra空ue_links不证明无"
|
||||
"改写;真实安装、钩子次序/动态成员及最终恢复未知。固定前端先控件后连线只在参考契"
|
||||
"约成立范围说明覆盖,不导入执行上游或创建生产可信注册。",
|
||||
"两videopreview完整历史对象独立保存和展示,含E盘fullpath及P"
|
||||
"NG workflow缓存;不读取文件/视频,不请求api/view或媒体URL"
|
||||
",不把缓存当实际产物/最终FPS。filename_prefix=Animate"
|
||||
"Diff是保存前缀,区别于旧绝对路径。",
|
||||
"h264-mp4静态格式含libx264、pix_fmt、crf和元数据/音频选"
|
||||
"项;schema范围不保证编码器运行合法。实际ffmpeg/编码器/目录/文件、"
|
||||
"音轨存在性、姿态效果、速度/显存全部未知。未实跑、未定稿、未启用,不增加可靠转换"
|
||||
"或候选。",
|
||||
]
|
||||
flow += ["源物理边:" + json.dumps(e, ensure_ascii=False) for e in source["links"]]
|
||||
flow += [
|
||||
f"源节点{n['id']} {n['type']}:mode={n['mode']};UE="
|
||||
+ json.dumps(n["properties"]["ue_properties"], ensure_ascii=False)
|
||||
for n in source["nodes"]
|
||||
]
|
||||
|
||||
# Complete nested preview pointer/value/type table, visible through existing flow details.
|
||||
def leaves(obj, pointer):
|
||||
if isinstance(obj, dict):
|
||||
for key, value in obj.items():
|
||||
yield from leaves(value, pointer + "/" + key)
|
||||
else:
|
||||
yield pointer, obj
|
||||
|
||||
for field in fields:
|
||||
if field["field"] == "videopreview":
|
||||
flow += [
|
||||
f"历史预览嵌套(不另计保存位置){p} [{type(v).__name__}]="
|
||||
+ json.dumps(v, ensure_ascii=False)
|
||||
for p, v in leaves(field["value"], field["pointer"])
|
||||
]
|
||||
return dict(
|
||||
source_path=path,
|
||||
source_sha1=hashlib.sha1(raw).hexdigest(),
|
||||
source_sha256=hashlib.sha256(raw).hexdigest(),
|
||||
canonical_sha256=hashlib.sha256(canonical(source)).hexdigest(),
|
||||
notice="固定版本参考说明;历史预览不是执行结果,环境/UE和实际效果未核对,转换仍关闭。",
|
||||
user_overview=overview,
|
||||
versions=[
|
||||
"DW源声明完整commit=136f125c89aed92ced1b6fbb491e13719b72fcc0(精确文本参考,非安装证明)",
|
||||
"VHS源声明1.7.9:官方registry发布包SHA256=ac63991d"
|
||||
"8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9"
|
||||
"d5fe61059f57cdf8;Git提交绑定未知,包同字节不等于提交绑定",
|
||||
"frontend源声明1.36.12→官方tag完整commit52bb58d3"
|
||||
"07242a34103998ef1da8007e47501d5b;UE7.5.2"
|
||||
"钩子次序和目标安装未知",
|
||||
],
|
||||
counts=dict(
|
||||
saved_fields=27,
|
||||
scalar_saved_positions=25,
|
||||
history_objects=2,
|
||||
source_notes=1,
|
||||
source_nodes=5,
|
||||
physical_edges=4,
|
||||
linked_saved_fields=1,
|
||||
frontend_only=2,
|
||||
final_scalars=0,
|
||||
final_prompt_constructed=False,
|
||||
),
|
||||
fields=fields,
|
||||
sources=refs,
|
||||
comments=comments,
|
||||
flow=flow,
|
||||
flow_evidence=list(range(len(refs))),
|
||||
zero_saved_nodes=[
|
||||
dict(
|
||||
node_id="9",
|
||||
class_type="VHS_VideoInfoLoaded",
|
||||
evidence=[info, registry],
|
||||
effect=flow[3],
|
||||
)
|
||||
],
|
||||
steps=[
|
||||
overview,
|
||||
"先看视频引用、姿态三个绘制开关和模型文件名;素材、模型、插件均待核对,不读取或执行。",
|
||||
"核对输出分辨率、加载尺寸/抽帧/上限、帧率外线与编码预设;两预览对象只读历史文本,不能当运行参数。",
|
||||
"保持停用、未检查、未定稿、未实跑;实际环境、UE、ffmpeg和效果待确认,不生成prompt或访问媒体。",
|
||||
],
|
||||
)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
||||
初期取GitHub API遇403限流,改固定git ls-remote tag记录、完整commit raw文本及patch原文;DW许可原文件是LICENSE.txt(初取LICENSE返回404已纠正)。未做广域历史搜索,未重扫SDPose。DW merge的.patch包含被合并提交序列,不能把其首行From当merge SHA;精确源地址使用声明的完整commit,patch仅保留原件。
|
||||
|
||||
开发中Ruff初检发现未用变量和长行(lint-initial.txt),修正引用与折行;新专项初跑281通过/1失败(中文流程缺外线覆盖字样),补清实际说明;受影响初跑2715通过/1失败(SDPose历史比较先移除新块后又取其交换定义),调整移除顺序保留交换拒绝断言。最终受影响2716通过/0失败/1警告,Ruff check/format均0;历史失败记录不覆盖成绿。新专项282例已包含最终总数,不另行相加。
|
||||
@@ -0,0 +1,156 @@
|
||||
"""Fetch fixed source text and registry archive; never import upstream code."""
|
||||
|
||||
import hashlib
|
||||
import io
|
||||
import json
|
||||
import subprocess
|
||||
import urllib.request
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
|
||||
OUT = Path(__file__).resolve().parent.parent / "openpose-reference"
|
||||
FILES = {
|
||||
"dw": (
|
||||
"Fannovel16/comfyui_controlnet_aux",
|
||||
"136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
[
|
||||
"LICENSE.txt",
|
||||
"__init__.py",
|
||||
"node_wrappers/dwpose.py",
|
||||
"utils.py",
|
||||
"src/custom_controlnet_aux/dwpose/__init__.py",
|
||||
"src/custom_controlnet_aux/dwpose/wholebody.py",
|
||||
"src/custom_controlnet_aux/dwpose/util.py",
|
||||
"src/custom_controlnet_aux/util.py",
|
||||
],
|
||||
),
|
||||
"frontend": (
|
||||
"Comfy-Org/ComfyUI_frontend",
|
||||
"v1.36.12",
|
||||
[
|
||||
"LICENSE",
|
||||
"src/lib/litegraph/src/LGraphNode.ts",
|
||||
"src/utils/executionUtil.ts",
|
||||
"src/extensions/core/noteNode.ts",
|
||||
],
|
||||
),
|
||||
}
|
||||
VHS = [
|
||||
"LICENSE",
|
||||
"__init__.py",
|
||||
"pyproject.toml",
|
||||
"videohelpersuite/nodes.py",
|
||||
"videohelpersuite/load_video_nodes.py",
|
||||
"videohelpersuite/utils.py",
|
||||
"video_formats/h264-mp4.json",
|
||||
"web/js/VHS.core.js",
|
||||
"web/js/videoinfo.js",
|
||||
]
|
||||
|
||||
|
||||
def get(url):
|
||||
return urllib.request.urlopen(
|
||||
urllib.request.Request(url, headers={"User-Agent": "static-reference"}), timeout=30
|
||||
).read()
|
||||
|
||||
|
||||
def main():
|
||||
OUT.mkdir(exist_ok=True)
|
||||
sources, identities = [], []
|
||||
for key, (repo, revision, files) in FILES.items():
|
||||
if revision.startswith("v"):
|
||||
raw = subprocess.check_output(
|
||||
[
|
||||
"git",
|
||||
"ls-remote",
|
||||
"https://github.com/" + repo + ".git",
|
||||
"refs/tags/" + revision,
|
||||
],
|
||||
timeout=45,
|
||||
)
|
||||
commit = raw.decode().split()[0]
|
||||
(OUT / (key + "-tag.txt")).write_bytes(raw)
|
||||
else:
|
||||
commit = revision
|
||||
url = f"https://github.com/{repo}/commit/{commit}.patch"
|
||||
raw = get(url)
|
||||
assert b"diff --git" in raw
|
||||
(OUT / (key + "-commit.patch")).write_bytes(raw)
|
||||
identities.append(
|
||||
dict(repo=repo, id=key, revision=revision, commit=commit, installed=False)
|
||||
)
|
||||
for file in files:
|
||||
url = f"https://raw.githubusercontent.com/{repo}/{commit}/{file}"
|
||||
raw = get(url)
|
||||
local = key + "__" + file.replace("/", "__")
|
||||
(OUT / local).write_bytes(raw)
|
||||
sources.append(
|
||||
dict(
|
||||
id=key,
|
||||
file=file,
|
||||
local_file=local,
|
||||
url=url,
|
||||
commit=commit,
|
||||
sha256=hashlib.sha256(raw).hexdigest(),
|
||||
)
|
||||
)
|
||||
url = "https://api.comfy.org/nodes/comfyui-videohelpersuite/versions/1.7.9"
|
||||
raw = get(url)
|
||||
(OUT / "vhs-registry.json").write_bytes(raw)
|
||||
release = json.loads(raw)
|
||||
raw = get(release["downloadUrl"])
|
||||
(OUT / "vhs-1.7.9.zip").write_bytes(raw)
|
||||
sha = hashlib.sha256(raw).hexdigest()
|
||||
with zipfile.ZipFile(io.BytesIO(raw)) as z:
|
||||
members = [
|
||||
dict(file=n, sha256=hashlib.sha256(z.read(n)).hexdigest())
|
||||
for n in z.namelist()
|
||||
if not n.endswith("/")
|
||||
]
|
||||
for file in VHS:
|
||||
raw = z.read(file)
|
||||
local = "vhs__" + file.replace("/", "__")
|
||||
(OUT / local).write_bytes(raw)
|
||||
sources.append(
|
||||
dict(
|
||||
id="vhs",
|
||||
file=file,
|
||||
local_file=local,
|
||||
url=release["downloadUrl"],
|
||||
commit="发布包SHA256:" + sha,
|
||||
sha256=hashlib.sha256(raw).hexdigest(),
|
||||
git_commit_binding="unknown",
|
||||
)
|
||||
)
|
||||
(OUT / "vhs-package-index.json").write_text(
|
||||
json.dumps(
|
||||
dict(
|
||||
url=release["downloadUrl"],
|
||||
sha256=sha,
|
||||
members=members,
|
||||
git_commit_binding="unknown",
|
||||
note="发布包同字节不等于提交绑定",
|
||||
),
|
||||
ensure_ascii=False,
|
||||
indent=2,
|
||||
)
|
||||
+ "\n"
|
||||
)
|
||||
identities.append(
|
||||
dict(
|
||||
id="vhs",
|
||||
version="1.7.9",
|
||||
package_sha256=sha,
|
||||
git_commit_binding="unknown",
|
||||
installed=False,
|
||||
)
|
||||
)
|
||||
(OUT / "sources.json").write_text(
|
||||
json.dumps(dict(sources=sources), ensure_ascii=False, indent=2) + "\n"
|
||||
)
|
||||
(OUT / "identity.json").write_text(json.dumps(identities, ensure_ascii=False, indent=2) + "\n")
|
||||
print("Fixed DW, frontend and VHS package source text only")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,481 @@
|
||||
[
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "dw",
|
||||
"file": "node_wrappers/dwpose.py",
|
||||
"local_file": "../openpose-reference/dw__node_wrappers__dwpose.py",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/node_wrappers/dwpose.py",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "0d357a3960a01faeeb1cd921c99166a2fa4d2efd3736a73624565f3e1849465f",
|
||||
"lines": [
|
||||
32,
|
||||
105
|
||||
],
|
||||
"claim": "DWPose schema、字符串开关、权重来源选择、调用和双出口"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "dw",
|
||||
"file": "node_wrappers/dwpose.py",
|
||||
"local_file": "../openpose-reference/dw__node_wrappers__dwpose.py",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/node_wrappers/dwpose.py",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "0d357a3960a01faeeb1cd921c99166a2fa4d2efd3736a73624565f3e1849465f",
|
||||
"lines": [
|
||||
159,
|
||||
165
|
||||
],
|
||||
"claim": "DWPreprocessor真实注册"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "dw",
|
||||
"file": "__init__.py",
|
||||
"local_file": "../openpose-reference/dw____init__.py",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/__init__.py",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "9a5786ef9569223acd235676c08297aff78b2de1e46ab69c96665222b8c2a4b4",
|
||||
"lines": [
|
||||
25,
|
||||
66
|
||||
],
|
||||
"claim": "扫描node_wrappers合并注册;失败可缺失节点"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "dw",
|
||||
"file": "utils.py",
|
||||
"local_file": "../openpose-reference/dw__utils.py",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/utils.py",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "6883c2f1cd912c3d53419dfaa460f904056033db920a36c39a276284bfc994a5",
|
||||
"lines": [
|
||||
62,
|
||||
120
|
||||
],
|
||||
"claim": "默认、范围、逐帧调用和resolution传递"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "dw",
|
||||
"file": "src/custom_controlnet_aux/dwpose/__init__.py",
|
||||
"local_file": "../openpose-reference/dw__src__custom_controlnet_aux__dwpose____init__.py",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/__init__.py",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "11733916809df84a53cfe98c3a2a448ab953f085b89280860cfffa053201cae3",
|
||||
"lines": [
|
||||
217,
|
||||
279
|
||||
],
|
||||
"claim": "权重加载、检测、绘制与结果缩放顺序"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "dw",
|
||||
"file": "src/custom_controlnet_aux/dwpose/wholebody.py",
|
||||
"local_file": "../openpose-reference/dw__src__custom_controlnet_aux__dwpose__wholebody.py",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/wholebody.py",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "89c871f4aed3440c2bafcf4987e79ffeed15fb28031951c36b7614374fd9df0f",
|
||||
"lines": [
|
||||
19,
|
||||
78
|
||||
],
|
||||
"claim": "模型类型分支及加载设备,仅静态条件"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "dw",
|
||||
"file": "src/custom_controlnet_aux/dwpose/util.py",
|
||||
"local_file": "../openpose-reference/dw__src__custom_controlnet_aux__dwpose__util.py",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/util.py",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "e6050a00f0cd2173e37f1da41a7f9ad3ea5cd57d73388bcd0e91cf0e393d5d3c",
|
||||
"lines": [
|
||||
82,
|
||||
138
|
||||
],
|
||||
"claim": "身体骨架线宽缩放条件"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "dw",
|
||||
"file": "src/custom_controlnet_aux/util.py",
|
||||
"local_file": "../openpose-reference/dw__src__custom_controlnet_aux__util.py",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/util.py",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "956ff6eb649148c98e68591824e9d029be527ea8f52eb1841b1b1c9f18f37b34",
|
||||
"lines": [
|
||||
155,
|
||||
183
|
||||
],
|
||||
"claim": "短边比例缩放与64倍数填充/去填充闭包"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "dw",
|
||||
"file": "src/custom_controlnet_aux/util.py",
|
||||
"local_file": "../openpose-reference/dw__src__custom_controlnet_aux__util.py",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/util.py",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "956ff6eb649148c98e68591824e9d029be527ea8f52eb1841b1b1c9f18f37b34",
|
||||
"lines": [
|
||||
289,
|
||||
342
|
||||
],
|
||||
"claim": "文件缺失时静态下载分支;不授权下载"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/load_video_nodes.py",
|
||||
"local_file": "../openpose-reference/vhs__videohelpersuite__load_video_nodes.py",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee",
|
||||
"git_commit_binding": "unknown",
|
||||
"lines": [
|
||||
423,
|
||||
474
|
||||
],
|
||||
"claim": "VHS_LoadVideo注册类LoadVideoUpload准确schema与路径引用"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/load_video_nodes.py",
|
||||
"local_file": "../openpose-reference/vhs__videohelpersuite__load_video_nodes.py",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee",
|
||||
"git_commit_binding": "unknown",
|
||||
"lines": [
|
||||
59,
|
||||
168
|
||||
],
|
||||
"claim": "尺寸取整、force_rate、跳帧、间隔与上限"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/load_video_nodes.py",
|
||||
"local_file": "../openpose-reference/vhs__videohelpersuite__load_video_nodes.py",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee",
|
||||
"git_commit_binding": "unknown",
|
||||
"lines": [
|
||||
293,
|
||||
420
|
||||
],
|
||||
"claim": "加载尺寸/内存上限、格式、loaded_fps和四出口"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/load_video_nodes.py",
|
||||
"local_file": "../openpose-reference/vhs__videohelpersuite__load_video_nodes.py",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee",
|
||||
"git_commit_binding": "unknown",
|
||||
"lines": [
|
||||
22,
|
||||
52
|
||||
],
|
||||
"claim": "AnimateDiff格式默认及dim/target_rate,非最终帧率证明"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/utils.py",
|
||||
"local_file": "../openpose-reference/vhs__videohelpersuite__utils.py",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a",
|
||||
"git_commit_binding": "unknown",
|
||||
"lines": [
|
||||
19,
|
||||
56
|
||||
],
|
||||
"claim": "DIMMAX8192、BIGMAX2**53-1和FLOAT/INT兼容"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/nodes.py",
|
||||
"local_file": "../openpose-reference/vhs__videohelpersuite__nodes.py",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442",
|
||||
"git_commit_binding": "unknown",
|
||||
"lines": [
|
||||
235,
|
||||
289
|
||||
],
|
||||
"claim": "合成schema默认、可选输入与签名"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/nodes.py",
|
||||
"local_file": "../openpose-reference/vhs__videohelpersuite__nodes.py",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442",
|
||||
"git_commit_binding": "unknown",
|
||||
"lines": [
|
||||
328,
|
||||
625
|
||||
],
|
||||
"claim": "输出/临时目录、前缀、循环、ffmpeg、音频条件与预览返回"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/nodes.py",
|
||||
"local_file": "../openpose-reference/vhs__videohelpersuite__nodes.py",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442",
|
||||
"git_commit_binding": "unknown",
|
||||
"lines": [
|
||||
94,
|
||||
191
|
||||
],
|
||||
"claim": "动态格式默认替换、元数据ffmpeg分支"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/nodes.py",
|
||||
"local_file": "../openpose-reference/vhs__videohelpersuite__nodes.py",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442",
|
||||
"git_commit_binding": "unknown",
|
||||
"lines": [
|
||||
46,
|
||||
108
|
||||
],
|
||||
"claim": "格式发现和动态控件,不推定目标安装可用"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "vhs",
|
||||
"file": "video_formats/h264-mp4.json",
|
||||
"local_file": "../openpose-reference/vhs__video_formats__h264-mp4.json",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8",
|
||||
"git_commit_binding": "unknown",
|
||||
"lines": [
|
||||
1,
|
||||
15
|
||||
],
|
||||
"claim": "h264-mp4的pix_fmt/crf/元数据/音频截取定义和libx264"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/nodes.py",
|
||||
"local_file": "../openpose-reference/vhs__videohelpersuite__nodes.py",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442",
|
||||
"git_commit_binding": "unknown",
|
||||
"lines": [
|
||||
941,
|
||||
970
|
||||
],
|
||||
"claim": "VideoInfoLoaded依次取loaded_fps/frame_count/duration/width/height"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/nodes.py",
|
||||
"local_file": "../openpose-reference/vhs__videohelpersuite__nodes.py",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442",
|
||||
"git_commit_binding": "unknown",
|
||||
"lines": [
|
||||
1024,
|
||||
1043
|
||||
],
|
||||
"claim": "VHS三个节点真实类注册,均插件而非核心"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "vhs",
|
||||
"file": "web/js/VHS.core.js",
|
||||
"local_file": "../openpose-reference/vhs__web__js__VHS.core.js",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f",
|
||||
"git_commit_binding": "unknown",
|
||||
"lines": [
|
||||
6,
|
||||
169
|
||||
],
|
||||
"claim": "具名对象恢复:先旧回调,逐控件赋值并回调;保存覆盖成对象"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "vhs",
|
||||
"file": "web/js/VHS.core.js",
|
||||
"local_file": "../openpose-reference/vhs__web__js__VHS.core.js",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f",
|
||||
"git_commit_binding": "unknown",
|
||||
"lines": [
|
||||
670,
|
||||
711
|
||||
],
|
||||
"claim": "加载格式回调只在wasDefault条件重设值,随后逐控件回调"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "vhs",
|
||||
"file": "web/js/VHS.core.js",
|
||||
"local_file": "../openpose-reference/vhs__web__js__VHS.core.js",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f",
|
||||
"git_commit_binding": "unknown",
|
||||
"lines": [
|
||||
1241,
|
||||
1298
|
||||
],
|
||||
"claim": "合成format回调重建动态控件及同名输入"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "vhs",
|
||||
"file": "web/js/VHS.core.js",
|
||||
"local_file": "../openpose-reference/vhs__web__js__VHS.core.js",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f",
|
||||
"git_commit_binding": "unknown",
|
||||
"lines": [
|
||||
934,
|
||||
943
|
||||
],
|
||||
"claim": "videopreview DOM状态serialize=false;VHS自定义保存仍枚举全部widget"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "frontend",
|
||||
"file": "src/lib/litegraph/src/LGraphNode.ts",
|
||||
"local_file": "../openpose-reference/frontend__src__lib__litegraph__src__LGraphNode.ts",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/src/lib/litegraph/src/LGraphNode.ts",
|
||||
"commit": "52bb58d307242a34103998ef1da8007e47501d5b",
|
||||
"sha256": "ce4078003ea69ec804d8f4c5e6ca021a952c05c299a3dab6c20f7e4123b8619f",
|
||||
"lines": [
|
||||
862,
|
||||
875
|
||||
],
|
||||
"claim": "核心先按序恢复再onConfigure,VHS对象须由插件具名回调恢复"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "frontend",
|
||||
"file": "src/lib/litegraph/src/LGraphNode.ts",
|
||||
"local_file": "../openpose-reference/frontend__src__lib__litegraph__src__LGraphNode.ts",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/src/lib/litegraph/src/LGraphNode.ts",
|
||||
"commit": "52bb58d307242a34103998ef1da8007e47501d5b",
|
||||
"sha256": "ce4078003ea69ec804d8f4c5e6ca021a952c05c299a3dab6c20f7e4123b8619f",
|
||||
"lines": [
|
||||
907,
|
||||
929
|
||||
],
|
||||
"claim": "核心先数组保存再onSerialize,VHS回调覆盖对象"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "frontend",
|
||||
"file": "src/utils/executionUtil.ts",
|
||||
"local_file": "../openpose-reference/frontend__src__utils__executionUtil.ts",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/src/utils/executionUtil.ts",
|
||||
"commit": "52bb58d307242a34103998ef1da8007e47501d5b",
|
||||
"sha256": "4e51bc54e35cb7ac9bb7cba418a74ccdd5974f640b9b088aa4ae7668f746ab36",
|
||||
"lines": [
|
||||
86,
|
||||
127
|
||||
],
|
||||
"claim": "先可序列化控件后物理连线,外线覆盖同名frame_rate"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "frontend",
|
||||
"file": "src/extensions/core/noteNode.ts",
|
||||
"local_file": "../openpose-reference/frontend__src__extensions__core__noteNode.ts",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/src/extensions/core/noteNode.ts",
|
||||
"commit": "52bb58d307242a34103998ef1da8007e47501d5b",
|
||||
"sha256": "1014f719e3d67d9c5183a5e8631d4c2d6581dfe67083f32eb23774ec3074bef2",
|
||||
"lines": [
|
||||
1,
|
||||
80
|
||||
],
|
||||
"claim": "MarkdownNote前端注释"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "dw",
|
||||
"file": "LICENSE.txt",
|
||||
"local_file": "../openpose-reference/dw__LICENSE.txt",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/LICENSE.txt",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4",
|
||||
"lines": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"claim": "原仓许可文本,逐文件声明保持;未安装执行"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "frontend",
|
||||
"file": "LICENSE",
|
||||
"local_file": "../openpose-reference/frontend__LICENSE",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/LICENSE",
|
||||
"commit": "52bb58d307242a34103998ef1da8007e47501d5b",
|
||||
"sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
|
||||
"lines": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"claim": "原仓许可文本,逐文件声明保持;未安装执行"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "vhs",
|
||||
"file": "LICENSE",
|
||||
"local_file": "../openpose-reference/vhs__LICENSE",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
|
||||
"git_commit_binding": "unknown",
|
||||
"lines": [
|
||||
1,
|
||||
8
|
||||
],
|
||||
"claim": "原仓许可文本,逐文件声明保持;未安装执行"
|
||||
},
|
||||
{
|
||||
"document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"id": "dw",
|
||||
"file": "src/custom_controlnet_aux/dwpose/__init__.py",
|
||||
"local_file": "../openpose-reference/dw__src__custom_controlnet_aux__dwpose____init__.py",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/__init__.py",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "11733916809df84a53cfe98c3a2a448ab953f085b89280860cfffa053201cae3",
|
||||
"lines": [
|
||||
1,
|
||||
7
|
||||
],
|
||||
"claim": "本文件另保留CMU非商业声明;不把仓级许可当全部文件许可"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
added 255 packages, and audited 256 packages in 1s
|
||||
|
||||
59 packages are looking for funding
|
||||
run `npm fund` for details
|
||||
|
||||
found 0 vulnerabilities
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"base": "fec5ccab441dace8f489fd3eaacc68fa25c47f8e",
|
||||
"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": 27,
|
||||
"new_notes": 1,
|
||||
"old_saved": 394,
|
||||
"old_notes": 14,
|
||||
"overviews": 16,
|
||||
"all_disabled": true,
|
||||
"doc_done": 0,
|
||||
"executed": 0
|
||||
}
|
||||
@@ -0,0 +1,567 @@
|
||||
E501 Line too long (104 > 100)
|
||||
--> calliope-backend/tests/test_openpose_fixed_document.py:106:101
|
||||
|
|
||||
104 | source, review = copy.deepcopy(SOURCE), copy.deepcopy(REVIEW)
|
||||
105 | set_value(source, path, "forged")
|
||||
106 | review["fixed_version_document"]["canonical_sha256"] = hashlib.sha256(canonical(source)).hexdigest()
|
||||
| ^^^^
|
||||
107 | review["caller_digest"] = hashlib.sha256(canonical(review["fixed_version_document"])).hexdigest()
|
||||
108 | assert not doc(source, review)["fixed_version"]["matched"]
|
||||
|
|
||||
|
||||
E501 Line too long (101 > 100)
|
||||
--> calliope-backend/tests/test_openpose_fixed_document.py:107:101
|
||||
|
|
||||
105 | set_value(source, path, "forged")
|
||||
106 | review["fixed_version_document"]["canonical_sha256"] = hashlib.sha256(canonical(source)).hexdigest()
|
||||
107 | review["caller_digest"] = hashlib.sha256(canonical(review["fixed_version_document"])).hexdigest()
|
||||
| ^
|
||||
108 | assert not doc(source, review)["fixed_version"]["matched"]
|
||||
|
|
||||
|
||||
E501 Line too long (101 > 100)
|
||||
--> calliope-backend/tests/test_openpose_fixed_document.py:126:101
|
||||
|
|
||||
124 | review = copy.deepcopy(REVIEW)
|
||||
125 | review["fixed_version_document"][key] = "forged"
|
||||
126 | review["caller_digest"] = hashlib.sha256(canonical(review["fixed_version_document"])).hexdigest()
|
||||
| ^
|
||||
127 | assert not doc(review=review)["fixed_version"]["matched"]
|
||||
|
|
||||
|
||||
E501 Line too long (101 > 100)
|
||||
--> calliope-backend/tests/test_openpose_fixed_document.py:175:101
|
||||
|
|
||||
173 | import sys
|
||||
174 | code = ("import runpy,sys; from pathlib import Path; ns=runpy.run_path('recompute.py'); "
|
||||
175 | "ns['require_packages'].__globals__['REPO']=Path(sys.argv[1]); ns['require_packages']()")
|
||||
| ^
|
||||
176 | result = subprocess.run([sys.executable, "-c", code, str(tmp_path)], cwd=OUT,
|
||||
177 | capture_output=True, text=True)
|
||||
|
|
||||
|
||||
F841 Local variable `dwreg` is assigned to but never used
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:39:5
|
||||
|
|
||||
37 | dw = ref("dw", "node_wrappers/dwpose.py", 32, 105,
|
||||
38 | "DWPose schema、字符串开关、权重来源选择、调用和双出口")
|
||||
39 | dwreg = ref("dw", "node_wrappers/dwpose.py", 159, 165, "DWPreprocessor真实注册")
|
||||
| ^^^^^
|
||||
40 | loader = ref("dw", "__init__.py", 25, 66, "扫描node_wrappers合并注册;失败可缺失节点")
|
||||
41 | helper = ref("dw", "utils.py", 62, 120, "默认、范围、逐帧调用和resolution传递")
|
||||
|
|
||||
help: Remove assignment to unused variable `dwreg`
|
||||
|
||||
F841 Local variable `loader` is assigned to but never used
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:40:5
|
||||
|
|
||||
38 | "DWPose schema、字符串开关、权重来源选择、调用和双出口")
|
||||
39 | dwreg = ref("dw", "node_wrappers/dwpose.py", 159, 165, "DWPreprocessor真实注册")
|
||||
40 | loader = ref("dw", "__init__.py", 25, 66, "扫描node_wrappers合并注册;失败可缺失节点")
|
||||
| ^^^^^^
|
||||
41 | helper = ref("dw", "utils.py", 62, 120, "默认、范围、逐帧调用和resolution传递")
|
||||
42 | detector = ref("dw", "src/custom_controlnet_aux/dwpose/__init__.py", 217, 279,
|
||||
|
|
||||
help: Remove assignment to unused variable `loader`
|
||||
|
||||
F841 Local variable `restore` is assigned to but never used
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:82:5
|
||||
|
|
||||
80 | preview = ref("vhs", "web/js/VHS.core.js", 934, 943,
|
||||
81 | "videopreview DOM状态serialize=false;VHS自定义保存仍枚举全部widget")
|
||||
82 | restore = ref("frontend", "src/lib/litegraph/src/LGraphNode.ts", 862, 875,
|
||||
| ^^^^^^^
|
||||
83 | "核心先按序恢复再onConfigure,VHS对象须由插件具名回调恢复")
|
||||
84 | persist = ref("frontend", "src/lib/litegraph/src/LGraphNode.ts", 907, 929,
|
||||
|
|
||||
help: Remove assignment to unused variable `restore`
|
||||
|
||||
E501 Line too long (104 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:115:88
|
||||
|
|
||||
113 | "不是视频宽度/总帧数或模型超分。比例取整及原素材尺寸决定实际尺寸,未计算真实输出。",
|
||||
114 | [dw, helper, detector, common])
|
||||
115 | spec("DWPreprocessor", "bbox_detector", "人体框检测模型引用", "COMBO", "yolox_l.onnx", "文件名枚举",
|
||||
| ^^^^
|
||||
116 | "None / yolox_l.torchscript.pt / yolox_l.onnx / yolo_nas_l_fp16.onnx / yolo_nas_m_fp16.onnx / yolo_nas_s_fp16.onnx",
|
||||
117 | "源yolox_l.onnx选择yzd-v/DWPose来源;det_filename传加载器。缺本地文件时custom_hf_download可进入下载分支,"
|
||||
|
|
||||
|
||||
E501 Line too long (125 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:116:101
|
||||
|
|
||||
114 | [dw, helper, detector, common])
|
||||
115 | spec("DWPreprocessor", "bbox_detector", "人体框检测模型引用", "COMBO", "yolox_l.onnx", "文件名枚举",
|
||||
116 | "None / yolox_l.torchscript.pt / yolox_l.onnx / yolo_nas_l_fp16.onnx / yolo_nas_m_fp16.onnx / yolo_nas_s_fp16.onnx",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
117 | "源yolox_l.onnx选择yzd-v/DWPose来源;det_filename传加载器。缺本地文件时custom_hf_download可进入下载分支,"
|
||||
118 | "随后依文件类型加载;仅静态说明,不下载或运行。文件名不证明安装/兼容、可下载或显存速度。",
|
||||
|
|
||||
|
||||
E501 Line too long (125 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:120:93
|
||||
|
|
||||
118 | "随后依文件类型加载;仅静态说明,不下载或运行。文件名不证明安装/兼容、可下载或显存速度。",
|
||||
119 | [dw, detector, download])
|
||||
120 | spec("DWPreprocessor", "pose_estimator", "姿态估计模型引用", "COMBO", "dw-ll_ucoco_384_bs5.torchscript.pt", "文件名枚举",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
121 | "dw-ll_ucoco_384_bs5.torchscript.pt / dw-ll_ucoco_384.onnx / dw-ll_ucoco.onnx",
|
||||
122 | "源TorchScript文件选择hr16/DWPose-TorchScript-BatchSize5。schema默认是此文件,"
|
||||
|
|
||||
|
||||
E501 Line too long (112 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:126:91
|
||||
|
|
||||
124 | "本轮均未调用。名称bs5不证明本视频每批5帧或目标性能。",
|
||||
125 | [dw, detector, download])
|
||||
126 | spec("DWPreprocessor", "scale_stick_for_xinsr_cn", "身体骨架线宽缩放开关", "COMBO", "disable", "字符串枚举",
|
||||
| ^^^^^^^^^^^^
|
||||
127 | "disable / enable;开启时max_side<500倍率1,否则min(2+max_side//1000,7)",
|
||||
128 | "源disable,转false传xinsr_stick_scaling。固定draw_bodypose基础stickwidth=4,"
|
||||
|
|
||||
|
||||
E501 Line too long (114 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:131:78
|
||||
|
|
||||
129 | "关闭倍率1,开启按画布最大边分档;不是图像模型超分或目标安装证明。身体绘制关闭时不能据此保证有身体线条。",
|
||||
130 | [dw, detector, drawing])
|
||||
131 | spec("VHS_LoadVideo", "video", "输入视频文件引用", "COMBO", "动态input目录文件列表,无固定文件默认", "文件名",
|
||||
| ^^^^^^^^^^^^^^
|
||||
132 | "目录文件扩展webm/mp4/mkv/gif/mov;目标列表未知",
|
||||
133 | "源1月11日-1.mp4保持原文,参考LoadVideoUpload转annotated filepath后加载。未访问此媒体;"
|
||||
|
|
||||
|
||||
E501 Line too long (101 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:164:85
|
||||
|
|
||||
162 | "具名恢复按实际控件顺序赋值并触发回调,无法只看对象键顺序推断最终控件值。UE7.5.2钩子次序未知。",
|
||||
163 | [loadfmt, loadrun, loadcb, kv])
|
||||
164 | spec("VHS_VideoCombine", "frame_rate", "合成帧率保存缓存(外线覆盖)", "FLOAT/INT", "8", "帧/秒",
|
||||
| ^
|
||||
165 | "schema min1、step1,无显式max;源int24并有link12",
|
||||
166 | "保存24与预览24均不是最终FPS。物理link12从Info9槽0接Combine4输入槽4 frame_rate;"
|
||||
|
|
||||
|
||||
E501 Line too long (103 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:170:87
|
||||
|
|
||||
168 | "固定前端先控件后写解析外线覆盖同名输入;仅在该参考契约成立范围解释,目标UE/媒体/最终FPS未知。",
|
||||
169 | [combine, info, loadrun, execute], "linked_saved")
|
||||
170 | spec("VHS_VideoCombine", "loop_count", "视频循环次数设置", "INT", "0", "循环参数", "0~100,step1",
|
||||
| ^^^
|
||||
171 | "源0走空loop_args,不添加ffmpeg loop过滤器;>0按loop/size=num_frames构造。"
|
||||
172 | "这是当前video格式分支;不能套GIF的无限循环解释或保证播放器循环行为。", [combine, combine_run])
|
||||
|
|
||||
|
||||
E501 Line too long (104 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:172:71
|
||||
|
|
||||
170 | spec("VHS_VideoCombine", "loop_count", "视频循环次数设置", "INT", "0", "循环参数", "0~100,step1",
|
||||
171 | "源0走空loop_args,不添加ffmpeg loop过滤器;>0按loop/size=num_frames构造。"
|
||||
172 | "这是当前video格式分支;不能套GIF的无限循环解释或保证播放器循环行为。", [combine, combine_run])
|
||||
| ^^^^
|
||||
173 | spec("VHS_VideoCombine", "filename_prefix", "保存文件名前缀", "STRING", "AnimateDiff", "相对前缀字符串",
|
||||
174 | "由folder_paths输出目录规则解析;真实目录未知",
|
||||
|
|
||||
|
||||
E501 Line too long (108 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:173:90
|
||||
|
|
||||
171 | "源0走空loop_args,不添加ffmpeg loop过滤器;>0按loop/size=num_frames构造。"
|
||||
172 | "这是当前video格式分支;不能套GIF的无限循环解释或保证播放器循环行为。", [combine, combine_run])
|
||||
173 | spec("VHS_VideoCombine", "filename_prefix", "保存文件名前缀", "STRING", "AnimateDiff", "相对前缀字符串",
|
||||
| ^^^^^^^^
|
||||
174 | "由folder_paths输出目录规则解析;真实目录未知",
|
||||
175 | "源AnimateDiff用于输出名称及计数,save_output=true选择输出目录;"
|
||||
|
|
||||
|
||||
E501 Line too long (119 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:177:86
|
||||
|
|
||||
175 | "源AnimateDiff用于输出名称及计数,save_output=true选择输出目录;"
|
||||
176 | "不等于预览对象E盘历史fullpath已可访问,不证明任何文件已生成。", [combine, combine_run])
|
||||
177 | spec("VHS_VideoCombine", "format", "视频封装和编码预设", "COMBO", "schema首项image/gif,无显式default", "预设选择",
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
178 | "当前video/h264-mp4;动态格式目录和运行编码器可用性未知",
|
||||
179 | "固定包h264-mp4.json提供mp4扩展、libx264、bt709及动态pix_fmt/crf/save_metadata/trim_to_audio。"
|
||||
|
|
||||
|
||||
E501 Line too long (104 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:184:71
|
||||
|
|
||||
182 | spec("VHS_VideoCombine", "pix_fmt", "输出像素格式", "COMBO", "首项yuv420p", "像素格式枚举",
|
||||
183 | "yuv420p / yuv420p10le",
|
||||
184 | "源yuv420p传ffmpeg -pix_fmt;只解释固定h264-mp4定义,不保证目标编码器可用或实际成片色彩效果。",
|
||||
| ^^^^
|
||||
185 | [h264, formats, metadata, combine_run, dyn])
|
||||
186 | spec("VHS_VideoCombine", "crf", "H264恒定质量参数", "INT", "19", "CRF值",
|
||||
|
|
||||
|
||||
E501 Line too long (102 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:199:92
|
||||
|
|
||||
197 | "本图Combine.audio未接,Load音频出口也未接;false不能证明有音频,更不能称保留原音轨。",
|
||||
198 | [h264, combine_run])
|
||||
199 | spec("VHS_VideoCombine", "pingpong", "往返帧序列开关", "BOOLEAN", "false", "布尔", "true / false",
|
||||
| ^^
|
||||
200 | "源false不调用to_pingpong;true时改帧序列并与meta_batch有不兼容提示。不是循环次数或FPS。",
|
||||
201 | [combine, combine_run])
|
||||
|
|
||||
|
||||
E501 Line too long (102 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:202:93
|
||||
|
|
||||
200 | "源false不调用to_pingpong;true时改帧序列并与meta_batch有不兼容提示。不是循环次数或FPS。",
|
||||
201 | [combine, combine_run])
|
||||
202 | spec("VHS_VideoCombine", "save_output", "保存目录选择", "BOOLEAN", "true", "布尔", "true / false",
|
||||
| ^^
|
||||
203 | "源true选择folder_paths输出目录,false选临时目录;不等于当前文件已保存。"
|
||||
204 | "真实目录配置/权限/编码器/文件/时长与姿态视频效果均未知。", [combine, combine_run])
|
||||
|
|
||||
|
||||
E501 Line too long (109 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:214:81
|
||||
|
|
||||
212 | )
|
||||
213 | for cls in ["VHS_LoadVideo", "VHS_VideoCombine"]:
|
||||
214 | spec(cls, "videopreview", "历史视频预览缓存(非运行参数)", "OBJECT", "无后端schema默认", "前端状态",
|
||||
| ^^^^^^^^
|
||||
215 | "对象及嵌套JSON类型原样保留,不递归计作新增运行参数", preview_note,
|
||||
216 | [preview, kv, persist, execute], "frontend_history")
|
||||
|
|
||||
|
||||
E501 Line too long (137 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:219:101
|
||||
|
|
||||
218 | …
|
||||
219 | …_face", "resolution", "bbox_detector", "pose_estimator", "scale_stick_for_xinsr_cn"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
220 | …
|
||||
221 | …
|
||||
|
|
||||
|
||||
E501 Line too long (104 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:233:101
|
||||
|
|
||||
231 | for j, (name, value) in enumerate(pairs):
|
||||
232 | fields.append({**specs[n["type"], name], "node_id": str(n["id"]),
|
||||
233 | "definition_node_id": str(n["id"]), "class_type": n["type"], "scope": "root",
|
||||
| ^^^^
|
||||
234 | "pointer": f"/nodes/{i}/widgets_values/{j if isinstance(values, list) else name}",
|
||||
235 | "value": value, "json_type": type(value).__name__,
|
||||
|
|
||||
|
||||
E501 Line too long (109 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:234:101
|
||||
|
|
||||
232 | fields.append({**specs[n["type"], name], "node_id": str(n["id"]),
|
||||
233 | "definition_node_id": str(n["id"]), "class_type": n["type"], "scope": "root",
|
||||
234 | "pointer": f"/nodes/{i}/widgets_values/{j if isinstance(values, list) else name}",
|
||||
| ^^^^^^^^^
|
||||
235 | "value": value, "json_type": type(value).__name__,
|
||||
236 | "execution_note": f"源mode={n['mode']},声明{n['properties']['cnr_id']}@{n['properties']['ver']};"
|
||||
|
|
||||
|
||||
E501 Line too long (126 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:236:97
|
||||
|
|
||||
234 | "pointer": f"/nodes/{i}/widgets_values/{j if isinstance(values, list) else name}",
|
||||
235 | "value": value, "json_type": type(value).__name__,
|
||||
236 | "execution_note": f"源mode={n['mode']},声明{n['properties']['cnr_id']}@{n['properties']['ver']};"
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
237 | "仅静态参考,真实安装、UE7.5.2钩子顺序及效果未知,未生成prompt。"})
|
||||
238 | assert len(fields) == 27 and len(comments) == 1
|
||||
|
|
||||
|
||||
E501 Line too long (149 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:245:87
|
||||
|
|
||||
243 | …
|
||||
244 | … 无子图。27顶层保存位置=7个DW数组项+9个Load对象键+11个Combine对象键,其中25标量、2个预览对象;另1源注释。嵌套叶子不重复计数。",
|
||||
245 | …→Combine4.images槽0。DW的POSE_KEYPOINT槽1未接;不据标题当核心SDPose或已输出关键点文件。",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
246 | …nfo9槽0→Combine4.frame_rate输入槽4。固定包Info槽0取loaded_fps,依Load的target_frame_time及select_every_nth构造;中文FPS🟦仅源显示名…
|
||||
247 | … 保存位置;不是缺键/null/[]。其余四出口帧数/时长/宽度/高度未接。Load帧数/音频出口未接、VAE/meta_batch未接,Combine.audio/meta_batch/…
|
||||
|
|
||||
|
||||
E501 Line too long (266 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:246:87
|
||||
|
|
||||
244 | …个Load对象键+11个Combine对象键,其中25标量、2个预览对象;另1源注释。嵌套叶子不重复计数。",
|
||||
245 | …NT槽1未接;不据标题当核心SDPose或已输出关键点文件。",
|
||||
246 | … 定包Info槽0取loaded_fps,依Load的target_frame_time及select_every_nth构造;中文FPS🟦仅源显示名,不能单独证明语义。保存24与预览24均不是最终FPS,force_rate=0不证明原FPS。",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
247 | … 帧数/时长/宽度/高度未接。Load帧数/音频出口未接、VAE/meta_batch未接,Combine.audio/meta_batch/vae也未接;不能称保留原音轨。",
|
||||
248 | …processor;不是case01 AIO e8b689a。分辨率在本提交检测后缩放画布,三个开关控制绘制而非保证跳过检测。模型文件名不证明安装,静态缺文件下载/加载分支未调用。",
|
||||
|
|
||||
|
||||
E501 Line too long (250 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:248:91
|
||||
|
|
||||
246 | … 定包Info槽0取loaded_fps,依Load的target_frame_time及select_every_nth构造;中文FPS🟦仅源显示名,不能单独证明语义。保存24与预览24均不是最终FPS,force_rate=0不证…
|
||||
247 | … 口帧数/时长/宽度/高度未接。Load帧数/音频出口未接、VAE/meta_batch未接,Combine.audio/meta_batch/vae也未接;不能称保留原音轨。",
|
||||
248 | …eprocessor;不是case01 AIO e8b689a。分辨率在本提交检测后缩放画布,三个开关控制绘制而非保证跳过检测。模型文件名不证明安装,静态缺文件下载/加载分支未调用。",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
249 | … 节不等于提交绑定。三类VHS及DW均为插件,不假借core来源,也不把包来源当目标安装证明。",
|
||||
250 | …Configure,VHS随后具名恢复并回调;核心先数组保存再onSerialize,VHS覆盖具名对象。format回调可重建控件/改reset条件,不能按保存对象键顺序推断最终输入。",
|
||||
|
|
||||
|
||||
E501 Line too long (181 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:249:69
|
||||
|
|
||||
247 | … 键/null/[]。其余四出口帧数/时长/宽度/高度未接。Load帧数/音频出口未接、VAE/meta_batch未接,Combine.audio/meta_batch/vae也未接;不能…
|
||||
248 | …eprocessor→DWPose_Preprocessor;不是case01 AIO e8b689a。分辨率在本提交检测后缩放画布,三个开关控制绘制而非保证跳过检测。模型文件名…
|
||||
249 | …it commit字段,包同字节不等于提交绑定。三类VHS及DW均为插件,不假借core来源,也不把包来源当目标安装证明。",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
250 | …。核心先按序恢复再onConfigure,VHS随后具名恢复并回调;核心先数组保存再onSerialize,VHS覆盖具名对象。format回调可重建控件/改reset条…
|
||||
251 | …table和extra空ue_links不证明无改写;真实安装、钩子次序/动态成员及最终恢复未知。固定前端先控件后连线只在参考契约成立范围说明覆盖,不…
|
||||
|
|
||||
|
||||
E501 Line too long (213 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:252:73
|
||||
|
|
||||
250 | … onConfigure,VHS随后具名恢复并回调;核心先数组保存再onSerialize,VHS覆盖具名对象。format回调可重建控件/改reset条件,不能按保存对象…
|
||||
251 | …_links不证明无改写;真实安装、钩子次序/动态成员及最终恢复未知。固定前端先控件后连线只在参考契约成立范围说明覆盖,不导入执行上游或创…
|
||||
252 | … 件/视频,不请求api/view或媒体URL,不把缓存当实际产物/最终FPS。filename_prefix=AnimateDiff是保存前缀,区别于旧绝对路径。",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
253 | … 合法。实际ffmpeg/编码器/目录/文件、音轨存在性、姿态效果、速度/显存全部未知。未实跑、未定稿、未启用,不增加可靠转换或候选。",
|
||||
254 | …
|
||||
|
|
||||
|
||||
E501 Line too long (159 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:256:96
|
||||
|
|
||||
254 | …
|
||||
255 | …r e in source["links"]]
|
||||
256 | …=" + json.dumps(n["properties"]["ue_properties"], ensure_ascii=False) for n in source["nodes"]]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
257 | …through existing flow details.
|
||||
258 | …
|
||||
|
|
||||
|
||||
E501 Line too long (169 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:266:86
|
||||
|
|
||||
264 | …
|
||||
265 | …
|
||||
266 | …name__}]=" + json.dumps(v, ensure_ascii=False) for p, v in leaves(field["value"], field["pointer"])]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
267 | …
|
||||
268 | …source_sha256=hashlib.sha256(raw).hexdigest(),
|
||||
|
|
||||
|
||||
E501 Line too long (115 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:268:101
|
||||
|
|
||||
266 | flow += [f"历史预览嵌套(不另计保存位置){p} [{type(v).__name__}]=" + json.dumps(v, ensure_ascii=False) for p, v in leave…
|
||||
267 | return dict(
|
||||
268 | source_path=path, source_sha1=hashlib.sha1(raw).hexdigest(), source_sha256=hashlib.sha256(raw).hexdigest(),
|
||||
| ^^^^^^^^^^^^^^^
|
||||
269 | canonical_sha256=hashlib.sha256(canonical(source)).hexdigest(),
|
||||
270 | notice="固定版本参考说明;历史预览不是执行结果,环境/UE和实际效果未核对,转换仍关闭。",
|
||||
|
|
||||
|
||||
E501 Line too long (104 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:278:101
|
||||
|
|
||||
276 | source_nodes=5, physical_edges=4, linked_saved_fields=1, frontend_only=2,
|
||||
277 | final_scalars=0, final_prompt_constructed=False),
|
||||
278 | fields=fields, sources=refs, comments=comments, flow=flow, flow_evidence=list(range(len(refs))),
|
||||
| ^^^^
|
||||
279 | zero_saved_nodes=[dict(node_id="9", class_type="VHS_VideoInfoLoaded", evidence=[info, registry], effect=flow[3])],
|
||||
280 | steps=[overview, "先看视频引用、姿态三个绘制开关和模型文件名;素材、模型、插件均待核对,不读取或执行。",
|
||||
|
|
||||
|
||||
E501 Line too long (122 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:279:101
|
||||
|
|
||||
277 | final_scalars=0, final_prompt_constructed=False),
|
||||
278 | fields=fields, sources=refs, comments=comments, flow=flow, flow_evidence=list(range(len(refs))),
|
||||
279 | zero_saved_nodes=[dict(node_id="9", class_type="VHS_VideoInfoLoaded", evidence=[info, registry], effect=flow[3])],
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
280 | steps=[overview, "先看视频引用、姿态三个绘制开关和模型文件名;素材、模型、插件均待核对,不读取或执行。",
|
||||
281 | "核对输出分辨率、加载尺寸/抽帧/上限、帧率外线与编码预设;两预览对象只读历史文本,不能当运行参数。",
|
||||
|
|
||||
|
||||
E501 Line too long (112 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/build_definition.py:280:64
|
||||
|
|
||||
278 | fields=fields, sources=refs, comments=comments, flow=flow, flow_evidence=list(range(len(refs))),
|
||||
279 | zero_saved_nodes=[dict(node_id="9", class_type="VHS_VideoInfoLoaded", evidence=[info, registry], effect=flow[3])],
|
||||
280 | steps=[overview, "先看视频引用、姿态三个绘制开关和模型文件名;素材、模型、插件均待核对,不读取或执行。",
|
||||
| ^^^^^^^^^^^^
|
||||
281 | "核对输出分辨率、加载尺寸/抽帧/上限、帧率外线与编码预设;两预览对象只读历史文本,不能当运行参数。",
|
||||
282 | "保持停用、未检查、未定稿、未实跑;实际环境、UE、ffmpeg和效果待确认,不生成prompt或访问媒体。"],
|
||||
|
|
||||
|
||||
E501 Line too long (341 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/fetch_sources.py:12:101
|
||||
|
|
||||
10 | …
|
||||
11 | …
|
||||
12 | …ICENSE.txt", "__init__.py", "node_wrappers/dwpose.py", "utils.py", "src/custom_controlnet_aux/dwpose/__init__.py", "src/custom_controlnet_aux/dwpose/wholebody.py", "src/custom_controlnet_aux/dwpose/util.py", "src/custom_controlnet_aux/util.py"]),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
13 | …GraphNode.ts", "src/utils/executionUtil.ts", "src/extensions/core/noteNode.ts"]),
|
||||
14 | …
|
||||
|
|
||||
|
||||
E501 Line too long (176 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/fetch_sources.py:13:101
|
||||
|
|
||||
11 | …
|
||||
12 | …b491e13719b72fcc0", ["LICENSE.txt", "__init__.py", "node_wrappers/dwpose.py", "utils.py", "src/custom_controlnet_aux/dwpose/__init__.…
|
||||
13 | …src/lib/litegraph/src/LGraphNode.ts", "src/utils/executionUtil.ts", "src/extensions/core/noteNode.ts"]),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
14 | …
|
||||
15 | …es.py", "videohelpersuite/load_video_nodes.py", "videohelpersuite/utils.py", "video_formats/h264-mp4.json", "web/js/VHS.core.js", "we…
|
||||
|
|
||||
|
||||
E501 Line too long (224 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/fetch_sources.py:15:101
|
||||
|
|
||||
13 | …GraphNode.ts", "src/utils/executionUtil.ts", "src/extensions/core/noteNode.ts"]),
|
||||
14 | …
|
||||
15 | …te/load_video_nodes.py", "videohelpersuite/utils.py", "video_formats/h264-mp4.json", "web/js/VHS.core.js", "web/js/videoinfo.js"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
E501 Line too long (125 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/fetch_sources.py:19:101
|
||||
|
|
||||
18 | def get(url):
|
||||
19 | return urllib.request.urlopen(urllib.request.Request(url, headers={"User-Agent": "static-reference"}), timeout=30).read()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
E501 Line too long (139 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/fetch_sources.py:27:101
|
||||
|
|
||||
25 | …:
|
||||
26 | …
|
||||
27 | …-remote", "https://github.com/" + repo + ".git", "refs/tags/" + revision], timeout=45)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
28 | …
|
||||
29 | …w)
|
||||
|
|
||||
|
||||
E501 Line too long (101 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/fetch_sources.py:36:101
|
||||
|
|
||||
34 | assert b"diff --git" in raw
|
||||
35 | (OUT / (key + "-commit.patch")).write_bytes(raw)
|
||||
36 | identities.append(dict(repo=repo, id=key, revision=revision, commit=commit, installed=False))
|
||||
| ^
|
||||
37 | for file in files:
|
||||
38 | url = f"https://raw.githubusercontent.com/{repo}/{commit}/{file}"
|
||||
|
|
||||
|
||||
E501 Line too long (133 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/fetch_sources.py:42:101
|
||||
|
|
||||
40 | local = key + "__" + file.replace("/", "__")
|
||||
41 | (OUT / local).write_bytes(raw)
|
||||
42 | sources.append(dict(id=key, file=file, local_file=local, url=url, commit=commit, sha256=hashlib.sha256(raw).hexdigest()))
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
43 | url = "https://api.comfy.org/nodes/comfyui-videohelpersuite/versions/1.7.9"
|
||||
44 | raw = get(url)
|
||||
|
|
||||
|
||||
E501 Line too long (123 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/fetch_sources.py:51:101
|
||||
|
|
||||
49 | sha = hashlib.sha256(raw).hexdigest()
|
||||
50 | with zipfile.ZipFile(io.BytesIO(raw)) as z:
|
||||
51 | members = [dict(file=n, sha256=hashlib.sha256(z.read(n)).hexdigest()) for n in z.namelist() if not n.endswith("/")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
52 | for file in VHS:
|
||||
53 | raw = z.read(file)
|
||||
|
|
||||
|
||||
E501 Line too long (199 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/fetch_sources.py:56:101
|
||||
|
|
||||
54 | …
|
||||
55 | …
|
||||
56 | …"downloadUrl"], commit="发布包SHA256:" + sha, sha256=hashlib.sha256(raw).hexdigest(), git_commit_binding="unknown"))
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
57 | …adUrl"], sha256=sha, members=members, git_commit_binding="unknown", note="发布包同字节不等于提交绑定"), ensure_ascii=False, indent=2)…
|
||||
58 | …t_binding="unknown", installed=False))
|
||||
|
|
||||
|
||||
E501 Line too long (224 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/fetch_sources.py:57:101
|
||||
|
|
||||
55 | …
|
||||
56 | …"], commit="发布包SHA256:" + sha, sha256=hashlib.sha256(raw).hexdigest(), git_commit_binding="unknown"))
|
||||
57 | …256=sha, members=members, git_commit_binding="unknown", note="发布包同字节不等于提交绑定"), ensure_ascii=False, indent=2) + "\n")
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
58 | …nknown", installed=False))
|
||||
59 | …ent=2) + "\n")
|
||||
|
|
||||
|
||||
E501 Line too long (121 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/fetch_sources.py:58:101
|
||||
|
|
||||
56 | sources.append(dict(id="vhs", file=file, local_file=local, url=release["downloadUrl"], commit="发布包SHA256:" + sha, sha25…
|
||||
57 | (OUT / "vhs-package-index.json").write_text(json.dumps(dict(url=release["downloadUrl"], sha256=sha, members=members, git_commit_bi…
|
||||
58 | identities.append(dict(id="vhs", version="1.7.9", package_sha256=sha, git_commit_binding="unknown", installed=False))
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
59 | (OUT / "sources.json").write_text(json.dumps(dict(sources=sources), ensure_ascii=False, indent=2) + "\n")
|
||||
60 | (OUT / "identity.json").write_text(json.dumps(identities, ensure_ascii=False, indent=2) + "\n")
|
||||
|
|
||||
|
||||
E501 Line too long (109 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/fetch_sources.py:59:101
|
||||
|
|
||||
57 | (OUT / "vhs-package-index.json").write_text(json.dumps(dict(url=release["downloadUrl"], sha256=sha, members=members, git_commit_bi…
|
||||
58 | identities.append(dict(id="vhs", version="1.7.9", package_sha256=sha, git_commit_binding="unknown", installed=False))
|
||||
59 | (OUT / "sources.json").write_text(json.dumps(dict(sources=sources), ensure_ascii=False, indent=2) + "\n")
|
||||
| ^^^^^^^^^
|
||||
60 | (OUT / "identity.json").write_text(json.dumps(identities, ensure_ascii=False, indent=2) + "\n")
|
||||
61 | print("Fixed DW, frontend and VHS package source text only")
|
||||
|
|
||||
|
||||
E501 Line too long (104 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/recompute.py:64:101
|
||||
|
|
||||
62 | assert release["version"] == "1.7.9" and release["downloadUrl"] == index["url"]
|
||||
63 | with zipfile.ZipFile(io.BytesIO(archive)) as z:
|
||||
64 | assert [n for n in z.namelist() if not n.endswith("/")] == [e["file"] for e in index["members"]]
|
||||
| ^^^^
|
||||
65 | for e in index["members"]:
|
||||
66 | assert hashlib.sha256(z.read(e["file"])).hexdigest() == e["sha256"]
|
||||
|
|
||||
|
||||
E501 Line too long (103 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/recompute.py:70:101
|
||||
|
|
||||
68 | if e["id"] == "vhs":
|
||||
69 | assert z.read(e["file"]) == (reference / e["local_file"]).read_bytes()
|
||||
70 | write("source-check.json", dict(fixed_originals=len(source_records), members=len(index["members"]),
|
||||
| ^^^
|
||||
71 | package_sha256=index["sha256"], frontend_tag=tag, checked_sha256=True,
|
||||
72 | git_commit_binding="unknown", imported_upstream=False))
|
||||
|
|
||||
|
||||
E501 Line too long (107 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/recompute.py:85:101
|
||||
|
|
||||
83 | assert by_id[target]["inputs"][inp]["link"] == eid
|
||||
84 | assert by_id[target]["inputs"][inp]["type"] == typ
|
||||
85 | write("source-graph.json", dict(source_path=PATHS[0], raw_sha256=hashlib.sha256(graph_raw).hexdigest(),
|
||||
| ^^^^^^^
|
||||
86 | canonical_sha256=hashlib.sha256(canonical(graph)).hexdigest(), nodes=nodes, links=graph["links"],
|
||||
87 | no_subgraphs=True, saved_fields=27, scalar_positions=25, history_objects=2, notes=1,
|
||||
|
|
||||
|
||||
E501 Line too long (107 > 100)
|
||||
--> docs/hel-892/openpose-document-evidence/recompute.py:86:101
|
||||
|
|
||||
84 | assert by_id[target]["inputs"][inp]["type"] == typ
|
||||
85 | write("source-graph.json", dict(source_path=PATHS[0], raw_sha256=hashlib.sha256(graph_raw).hexdigest(),
|
||||
86 | canonical_sha256=hashlib.sha256(canonical(graph)).hexdigest(), nodes=nodes, links=graph["links"],
|
||||
| ^^^^^^^
|
||||
87 | no_subgraphs=True, saved_fields=27, scalar_positions=25, history_objects=2, notes=1,
|
||||
88 | extra_sha256=hashlib.sha256(canonical(graph["extra"])).hexdigest()))
|
||||
|
|
||||
|
||||
Found 52 errors.
|
||||
No fixes available (3 hidden fixes can be enabled with the `--unsafe-fixes` option).
|
||||
@@ -0,0 +1,23 @@
|
||||
[
|
||||
{
|
||||
"file": "fixed_document.py",
|
||||
"sha256": "cffb0b459eb63d2e1b632d7b18fef57b0a9b711418f239046b4b743ffc14057c",
|
||||
"wheel": true,
|
||||
"sdist": true,
|
||||
"definitions": 16
|
||||
},
|
||||
{
|
||||
"file": "source_reviews.json",
|
||||
"sha256": "e0b76a933c40085e9ee58a246c65fd66c7fd7b503194c2121ed55fedb2addc13",
|
||||
"wheel": true,
|
||||
"sdist": true,
|
||||
"definitions": 16
|
||||
},
|
||||
{
|
||||
"file": "library.py",
|
||||
"sha256": "b9cbfce28267642e6db3ebe9d591cf8dd260c7772a5a21a8d36cb98915eca13c",
|
||||
"wheel": true,
|
||||
"sdist": true,
|
||||
"definitions": 16
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json": "b3b87aa0c9d47b6266bcb14e6b1fb268d70e9b2830f62149ab7fd8668783905b"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"url": "http://gitea.xbay.cc/leefer/aigc-home/pulls/25",
|
||||
"state": "open",
|
||||
"head": "agent/agent/a64a969a6a44",
|
||||
"head_sha": "fec5ccab441dace8f489fd3eaacc68fa25c47f8e",
|
||||
"base": "main",
|
||||
"merged": false
|
||||
}
|
||||
@@ -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 = "fec5ccab441dace8f489fd3eaacc68fa25c47f8e"
|
||||
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 15 blocks unchanged")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,364 @@
|
||||
"""Actual fec5cca database 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()
|
||||
reference = OUT.parent / "openpose-reference"
|
||||
source_records = json.loads((reference / "sources.json").read_bytes())["sources"]
|
||||
for e in source_records:
|
||||
raw = (reference / e["local_file"]).read_bytes()
|
||||
assert hashlib.sha256(raw).hexdigest() == e["sha256"]
|
||||
if e["id"] != "vhs":
|
||||
assert len(e["commit"]) == 40 and e["commit"] in e["url"]
|
||||
tag = (reference / "frontend-tag.txt").read_text().split()
|
||||
assert tag == ["52bb58d307242a34103998ef1da8007e47501d5b", "refs/tags/v1.36.12"]
|
||||
index = json.loads((reference / "vhs-package-index.json").read_bytes())
|
||||
archive = (reference / "vhs-1.7.9.zip").read_bytes()
|
||||
assert hashlib.sha256(archive).hexdigest() == index["sha256"]
|
||||
assert index["git_commit_binding"] == "unknown"
|
||||
release = json.loads((reference / "vhs-registry.json").read_bytes())
|
||||
assert release["version"] == "1.7.9" and release["downloadUrl"] == index["url"]
|
||||
with zipfile.ZipFile(io.BytesIO(archive)) as z:
|
||||
assert [n for n in z.namelist() if not n.endswith("/")] == [
|
||||
e["file"] for e in index["members"]
|
||||
]
|
||||
for e in index["members"]:
|
||||
assert hashlib.sha256(z.read(e["file"])).hexdigest() == e["sha256"]
|
||||
for e in source_records:
|
||||
if e["id"] == "vhs":
|
||||
assert z.read(e["file"]) == (reference / e["local_file"]).read_bytes()
|
||||
write(
|
||||
"source-check.json",
|
||||
dict(
|
||||
fixed_originals=len(source_records),
|
||||
members=len(index["members"]),
|
||||
package_sha256=index["sha256"],
|
||||
frontend_tag=tag,
|
||||
checked_sha256=True,
|
||||
git_commit_binding="unknown",
|
||||
imported_upstream=False,
|
||||
),
|
||||
)
|
||||
graph_raw = (REPO / PATHS[0]).read_bytes()
|
||||
graph = json.loads(graph_raw)
|
||||
nodes = graph["nodes"]
|
||||
assert len(nodes) == 5 and len(graph["links"]) == 4
|
||||
assert all(n["mode"] == 0 for n in nodes) and "definitions" not in graph
|
||||
assert sum(len(n["widgets_values"]) for n in nodes if n["type"] != "MarkdownNote") == 27
|
||||
assert nodes[3]["widgets_values"] == {} and type(nodes[3]["widgets_values"]) is dict
|
||||
by_id = {n["id"]: n for n in nodes}
|
||||
for eid, origin, slot, target, inp, typ in graph["links"]:
|
||||
assert eid in by_id[origin]["outputs"][slot]["links"]
|
||||
assert by_id[target]["inputs"][inp]["link"] == eid
|
||||
assert by_id[target]["inputs"][inp]["type"] == typ
|
||||
write(
|
||||
"source-graph.json",
|
||||
dict(
|
||||
source_path=PATHS[0],
|
||||
raw_sha256=hashlib.sha256(graph_raw).hexdigest(),
|
||||
canonical_sha256=hashlib.sha256(canonical(graph)).hexdigest(),
|
||||
nodes=nodes,
|
||||
links=graph["links"],
|
||||
no_subgraphs=True,
|
||||
saved_fields=27,
|
||||
scalar_positions=25,
|
||||
history_objects=2,
|
||||
notes=1,
|
||||
extra_sha256=hashlib.sha256(canonical(graph["extra"])).hexdigest(),
|
||||
),
|
||||
)
|
||||
|
||||
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) == 15
|
||||
assert all(rebuilt[p]["fixed_version_document"] == b for p, b in old_blocks.items())
|
||||
write(
|
||||
"review-delta.json",
|
||||
dict(
|
||||
base=BASE,
|
||||
changed_paths=PATHS,
|
||||
other_reviews_unchanged=len(previous) - 1,
|
||||
old_blocks_unchanged=15,
|
||||
old_saved=394,
|
||||
old_notes=14,
|
||||
new_saved=27,
|
||||
new_notes=1,
|
||||
total_documents=16,
|
||||
total_saved=421,
|
||||
total_notes=15,
|
||||
),
|
||||
)
|
||||
for p, d in DEFINITIONS.items():
|
||||
assert hashlib.sha256(canonical(rebuilt[p]["fixed_version_document"])).hexdigest() == d
|
||||
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=27,
|
||||
new_notes=1,
|
||||
old_saved=394,
|
||||
old_notes=14,
|
||||
overviews=16,
|
||||
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_fifteen_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",
|
||||
),
|
||||
)
|
||||
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=16,
|
||||
)
|
||||
)
|
||||
write("package-check.json", packages)
|
||||
print(
|
||||
(
|
||||
"PASS actual fec5cca upgrade1/skip154, "
|
||||
"repeat155, rollback1, edits1/29cols, f"
|
||||
"resh155, 1217/3660/294, 16 definitions"
|
||||
", frozen boundaries, wheel/sdist"
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1 @@
|
||||
PASS actual fec5cca upgrade1/skip154, repeat155, rollback1, edits1/29cols, fresh155, 1217/3660/294, 16 definitions, frozen boundaries, wheel/sdist
|
||||
@@ -0,0 +1,111 @@
|
||||
"""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 = [
|
||||
"# OpenPose视频姿态图固定参考中文说明",
|
||||
"",
|
||||
"27新顶层保存位置(25标量+2历史预览对象)+1新注释;旧15图394保存位置+14注释逐对象不变。16图421位置+15注释展示,155定稿0、实跑0、新增转换0。",
|
||||
"",
|
||||
"复用SQLite来源库→正常GET详情→现有说明抽屉;仅新增source_reviews说明块和显式受信摘要,不改变转换/执行链。",
|
||||
"",
|
||||
]
|
||||
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["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']}"
|
||||
]
|
||||
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 / "OpenPose视频姿态图固定参考中文说明.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,50 @@
|
||||
"""Repeat every deterministic audit and compare reviewed resource/package byte identities."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from build_definition import OUT, REPO, canonical
|
||||
from rebuild import RESOURCE, build_all
|
||||
|
||||
|
||||
def main():
|
||||
a, overview = build_all()
|
||||
b, again = build_all()
|
||||
assert a == b and overview == again
|
||||
assert a == json.loads((REPO / RESOURCE).read_bytes())
|
||||
names = [
|
||||
"audit-summary.json",
|
||||
"review-delta.json",
|
||||
"import-protection.json",
|
||||
"boundaries.json",
|
||||
"package-check.json",
|
||||
"source-check.json",
|
||||
"source-graph.json",
|
||||
]
|
||||
subprocess.run([sys.executable, str(OUT / "recompute.py")], cwd=REPO, check=True)
|
||||
before = {p: hashlib.sha256((OUT / p).read_bytes()).hexdigest() for p in names}
|
||||
subprocess.run([sys.executable, str(OUT / "recompute.py")], cwd=REPO, check=True)
|
||||
assert before == {p: hashlib.sha256((OUT / p).read_bytes()).hexdigest() for p in names}
|
||||
(OUT / "repeatability.json").write_text(
|
||||
json.dumps(
|
||||
dict(
|
||||
definitions=16,
|
||||
repeated_build_equal=True,
|
||||
repeated_audits_equal=True,
|
||||
resource_sha256=hashlib.sha256(canonical(a)).hexdigest(),
|
||||
artifacts=before,
|
||||
),
|
||||
ensure_ascii=False,
|
||||
indent=2,
|
||||
)
|
||||
+ "\n"
|
||||
)
|
||||
print("PASS repeated 16 definitions and upgrade/audit/package recomputation: zero difference")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,3 @@
|
||||
PASS actual fec5cca upgrade1/skip154, repeat155, rollback1, edits1/29cols, fresh155, 1217/3660/294, 16 definitions, frozen boundaries, wheel/sdist
|
||||
PASS actual fec5cca upgrade1/skip154, repeat155, rollback1, edits1/29cols, fresh155, 1217/3660/294, 16 definitions, frozen boundaries, wheel/sdist
|
||||
PASS repeated 16 definitions and upgrade/audit/package recomputation: zero difference
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"definitions": 16,
|
||||
"repeated_build_equal": true,
|
||||
"repeated_audits_equal": true,
|
||||
"resource_sha256": "9cccbfbda7b078fae7b00521d8245b4cbe7789f0c29aada3d754967ecd7dac66",
|
||||
"artifacts": {
|
||||
"audit-summary.json": "b79c3f138241cc4c82f8530637349ec411fc8bd92de0668a07e2a88c4a2cbb7a",
|
||||
"review-delta.json": "dfbbc5f3df7332dd20589fc68d57518041157522e5a8e097d1ba0ca6435134eb",
|
||||
"import-protection.json": "0fce5cd41e0767183c63596fece0d6b05c8641c3be4dcc50299cb55dd08177eb",
|
||||
"boundaries.json": "562ee02b0d0bdbf5aa8b594c4fa986698f3dfa1a3ad7eab0d3b7cdcf43fc0d85",
|
||||
"package-check.json": "57dfc8a32455dac20eb2ba158083f999e4536f160e8ed36cbe959916c56b2c89",
|
||||
"source-check.json": "5995cdc40c36c86c094b04621a8d3eae647a4106f1c8ab6906d4578059ca64ac",
|
||||
"source-graph.json": "2ee36834939565d19ffed60041c64c8b8793459d931022459e89395699fdc589"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"base": "fec5ccab441dace8f489fd3eaacc68fa25c47f8e",
|
||||
"changed_paths": [
|
||||
"example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json"
|
||||
],
|
||||
"other_reviews_unchanged": 155,
|
||||
"old_blocks_unchanged": 15,
|
||||
"old_saved": 394,
|
||||
"old_notes": 14,
|
||||
"new_saved": 27,
|
||||
"new_notes": 1,
|
||||
"total_documents": 16,
|
||||
"total_saved": 421,
|
||||
"total_notes": 15
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
All checks passed!
|
||||
@@ -0,0 +1 @@
|
||||
15 files already formatted
|
||||
@@ -0,0 +1,4 @@
|
||||
........................................................................ [ 37%]
|
||||
........................................................................ [ 75%]
|
||||
................................................ [100%]
|
||||
192 passed, 1 warning in 0.38s
|
||||
@@ -0,0 +1,73 @@
|
||||
INFO: Started server process [513037]
|
||||
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:40400 - "GET /api/workflows HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40408 - "GET /api/workflows HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40412 - "GET /api/workflows/6 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40408 - "GET /api/workflows/7 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40412 - "GET /api/workflows/19 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40408 - "GET /api/workflows/13 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40412 - "GET /api/workflows/12 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40408 - "GET /api/workflows/64 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40412 - "GET /api/workflows/62 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40408 - "GET /api/workflows/70 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40412 - "GET /api/workflows/1 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40408 - "GET /api/workflows/36 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40412 - "GET /api/workflows/35 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40408 - "GET /api/workflows/2 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40412 - "GET /api/workflows/25 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40408 - "GET /api/workflows/24 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40412 - "GET /api/workflows/21 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40408 - "GET /api/workflows/14 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40430 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:40424 - "GET /api/settings HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40444 - "GET /api/workflows HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40458 - "GET /api/workflows/6 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40472 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:40482 - "GET /api/workflows/7 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:40486 - "GET /api/workflows/19 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37364 - "GET /api/workflows/13 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37376 - "GET /api/workflows/12 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37390 - "GET /api/workflows/64 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37404 - "GET /api/workflows/62 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37414 - "GET /api/workflows/70 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37416 - "GET /api/workflows/1 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37422 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:37432 - "GET /api/workflows/36 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37434 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:37436 - "GET /api/workflows/35 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37450 - "GET /api/workflows/2 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37456 - "GET /api/workflows/25 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37466 - "GET /api/workflows/24 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37476 - "GET /api/workflows/21 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37482 - "GET /api/workflows/14 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:37492 - "GET /api/workflows/6 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:42680 - "GET /api/workflows/7 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:42682 - "GET /api/workflows/19 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:42690 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:42704 - "GET /api/workflows/13 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:42716 - "GET /api/workflows/12 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:42718 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:42720 - "GET /api/workflows/64 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:42726 - "GET /api/workflows/62 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:42728 - "GET /api/workflows/70 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:42730 - "GET /api/workflows/1 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:42740 - "GET /api/workflows/36 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:42746 - "GET /api/workflows/35 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:42762 - "GET /api/workflows/2 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:42770 - "GET /api/workflows/25 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:42776 - "GET /api/workflows/24 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:42780 - "GET /api/workflows/21 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:42794 - "GET /api/workflows/14 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:42800 - "GET /api/workflows/156 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:33614 - "GET /api/workflows/157 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:33624 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:33634 - "GET /api/workflows/7 HTTP/1.1" 200 OK
|
||||
INFO: 127.0.0.1:33642 - "GET /api/jobs HTTP/1.1" 404 Not Found
|
||||
INFO: 127.0.0.1:33646 - "GET /api/workflows/6 HTTP/1.1" 200 OK
|
||||
INFO: Shutting down
|
||||
INFO: Waiting for application shutdown.
|
||||
INFO: Application shutdown complete.
|
||||
INFO: Finished server process [513037]
|
||||
@@ -0,0 +1,11 @@
|
||||
▲ [WARNING] Cannot find base config file "./.svelte-kit/tsconfig.json" [tsconfig.json]
|
||||
|
||||
tsconfig.json:2:12:
|
||||
2 │ "extends": "./.svelte-kit/tsconfig.json",
|
||||
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
3:17:51 PM [vite] (client) Forced re-optimization of dependencies
|
||||
|
||||
VITE v6.4.3 ready in 431 ms
|
||||
|
||||
➜ Local: http://127.0.0.1:5173/
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"fixed_originals": 21,
|
||||
"members": 45,
|
||||
"package_sha256": "ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"frontend_tag": [
|
||||
"52bb58d307242a34103998ef1da8007e47501d5b",
|
||||
"refs/tags/v1.36.12"
|
||||
],
|
||||
"checked_sha256": true,
|
||||
"git_commit_binding": "unknown",
|
||||
"imported_upstream": false
|
||||
}
|
||||
@@ -0,0 +1,650 @@
|
||||
{
|
||||
"source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/人物骨骼姿势提取/openpose-video-姿态检测.json",
|
||||
"raw_sha256": "43f76f599f15058b6e62ae0dfb105518a37532008eed23ef7118e4950b37a608",
|
||||
"canonical_sha256": "8881dcd31b226e95d9ce141e5f06067f4d5cb4bd11af88104d779422478d6201",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 8,
|
||||
"type": "MarkdownNote",
|
||||
"pos": [
|
||||
-221.66666666666666,
|
||||
-1236.6666668633015
|
||||
],
|
||||
"size": [
|
||||
425,
|
||||
282.31770833333337
|
||||
],
|
||||
"flags": {},
|
||||
"order": 0,
|
||||
"mode": 0,
|
||||
"inputs": [],
|
||||
"outputs": [],
|
||||
"title": "For Local Users",
|
||||
"properties": {
|
||||
"ue_properties": {
|
||||
"widget_ue_connectable": {},
|
||||
"version": "7.5.2",
|
||||
"input_ue_unconnectable": {}
|
||||
}
|
||||
},
|
||||
"widgets_values": [
|
||||
"## Custom Nodes\n\n- [Fannovel16/comfyui_controlnet_aux](https://github.com/Fannovel16/comfyui_controlnet_aux)\n- [Kosinkadink/ComfyUI-VideoHelperSuite](https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite)\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/zh-CN/installation/update_comfyui)) and prepare required models. Desktop/Cloud ship stable builds; nightly-supported models may not be included yet, please wait for the next stable release.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"
|
||||
],
|
||||
"color": "#222",
|
||||
"bgcolor": "#000"
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"type": "DWPreprocessor",
|
||||
"pos": [
|
||||
520.5947318412174,
|
||||
-1233.628961743877
|
||||
],
|
||||
"size": [
|
||||
340,
|
||||
230
|
||||
],
|
||||
"flags": {},
|
||||
"order": 2,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"label": "图像",
|
||||
"localized_name": "图像",
|
||||
"name": "image",
|
||||
"type": "IMAGE",
|
||||
"link": 10
|
||||
},
|
||||
{
|
||||
"label": "检测手部",
|
||||
"localized_name": "检测手部",
|
||||
"name": "detect_hand",
|
||||
"shape": 7,
|
||||
"type": "COMBO",
|
||||
"widget": {
|
||||
"name": "detect_hand"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "检测身体",
|
||||
"localized_name": "检测身体",
|
||||
"name": "detect_body",
|
||||
"shape": 7,
|
||||
"type": "COMBO",
|
||||
"widget": {
|
||||
"name": "detect_body"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "检测面部",
|
||||
"localized_name": "检测面部",
|
||||
"name": "detect_face",
|
||||
"shape": 7,
|
||||
"type": "COMBO",
|
||||
"widget": {
|
||||
"name": "detect_face"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "分辨率",
|
||||
"localized_name": "分辨率",
|
||||
"name": "resolution",
|
||||
"shape": 7,
|
||||
"type": "INT",
|
||||
"widget": {
|
||||
"name": "resolution"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "BBox检测",
|
||||
"localized_name": "BBox检测",
|
||||
"name": "bbox_detector",
|
||||
"shape": 7,
|
||||
"type": "COMBO",
|
||||
"widget": {
|
||||
"name": "bbox_detector"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "姿态预估",
|
||||
"localized_name": "姿态预估",
|
||||
"name": "pose_estimator",
|
||||
"shape": 7,
|
||||
"type": "COMBO",
|
||||
"widget": {
|
||||
"name": "pose_estimator"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "新超分辨率ControlNet缩放工具",
|
||||
"localized_name": "新超分辨率ControlNet缩放工具",
|
||||
"name": "scale_stick_for_xinsr_cn",
|
||||
"shape": 7,
|
||||
"type": "COMBO",
|
||||
"widget": {
|
||||
"name": "scale_stick_for_xinsr_cn"
|
||||
},
|
||||
"link": null
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"localized_name": "图像",
|
||||
"name": "图像",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
4
|
||||
]
|
||||
},
|
||||
{
|
||||
"localized_name": "姿态关键点",
|
||||
"name": "姿态关键点",
|
||||
"type": "POSE_KEYPOINT",
|
||||
"links": null
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfyui_controlnet_aux",
|
||||
"ver": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"Node name for S&R": "DWPreprocessor",
|
||||
"ue_properties": {
|
||||
"widget_ue_connectable": {},
|
||||
"version": "7.5.2",
|
||||
"input_ue_unconnectable": {}
|
||||
}
|
||||
},
|
||||
"widgets_values": [
|
||||
"enable",
|
||||
"enable",
|
||||
"enable",
|
||||
1024,
|
||||
"yolox_l.onnx",
|
||||
"dw-ll_ucoco_384_bs5.torchscript.pt",
|
||||
"disable"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"type": "VHS_LoadVideo",
|
||||
"pos": [
|
||||
220.00004950195887,
|
||||
-1236.6666678464755
|
||||
],
|
||||
"size": [
|
||||
255.8203125,
|
||||
746.573978237792
|
||||
],
|
||||
"flags": {},
|
||||
"order": 1,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"label": "批次管理",
|
||||
"localized_name": "批次管理",
|
||||
"name": "meta_batch",
|
||||
"shape": 7,
|
||||
"type": "VHS_BatchManager",
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"localized_name": "vae",
|
||||
"name": "vae",
|
||||
"shape": 7,
|
||||
"type": "VAE",
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "视频",
|
||||
"localized_name": "视频",
|
||||
"name": "video",
|
||||
"type": "COMBO",
|
||||
"widget": {
|
||||
"name": "video"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "强制帧率",
|
||||
"localized_name": "强制帧率",
|
||||
"name": "force_rate",
|
||||
"type": "FLOAT",
|
||||
"widget": {
|
||||
"name": "force_rate"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "自定义宽度",
|
||||
"localized_name": "自定义宽度",
|
||||
"name": "custom_width",
|
||||
"type": "INT",
|
||||
"widget": {
|
||||
"name": "custom_width"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "自定义高度",
|
||||
"localized_name": "自定义高度",
|
||||
"name": "custom_height",
|
||||
"type": "INT",
|
||||
"widget": {
|
||||
"name": "custom_height"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "帧数读取上限",
|
||||
"localized_name": "帧数读取上限",
|
||||
"name": "frame_load_cap",
|
||||
"type": "INT",
|
||||
"widget": {
|
||||
"name": "frame_load_cap"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "跳过前X帧",
|
||||
"localized_name": "跳过前X帧",
|
||||
"name": "skip_first_frames",
|
||||
"type": "INT",
|
||||
"widget": {
|
||||
"name": "skip_first_frames"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "间隔",
|
||||
"localized_name": "间隔",
|
||||
"name": "select_every_nth",
|
||||
"type": "INT",
|
||||
"widget": {
|
||||
"name": "select_every_nth"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "格式",
|
||||
"localized_name": "格式",
|
||||
"name": "format",
|
||||
"shape": 7,
|
||||
"type": "COMBO",
|
||||
"widget": {
|
||||
"name": "format"
|
||||
},
|
||||
"link": null
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"label": "图像",
|
||||
"localized_name": "图像",
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"localized_name": "帧计数",
|
||||
"name": "帧计数",
|
||||
"type": "INT",
|
||||
"links": null
|
||||
},
|
||||
{
|
||||
"localized_name": "音频",
|
||||
"name": "音频",
|
||||
"type": "AUDIO",
|
||||
"links": null
|
||||
},
|
||||
{
|
||||
"localized_name": "视频信息",
|
||||
"name": "视频信息",
|
||||
"type": "VHS_VIDEOINFO",
|
||||
"links": [
|
||||
11
|
||||
]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfyui-videohelpersuite",
|
||||
"ver": "1.7.9",
|
||||
"Node name for S&R": "VHS_LoadVideo",
|
||||
"ue_properties": {
|
||||
"widget_ue_connectable": {},
|
||||
"version": "7.5.2",
|
||||
"input_ue_unconnectable": {}
|
||||
}
|
||||
},
|
||||
"widgets_values": {
|
||||
"video": "1月11日-1.mp4",
|
||||
"force_rate": 0,
|
||||
"custom_width": 0,
|
||||
"custom_height": 0,
|
||||
"frame_load_cap": 0,
|
||||
"skip_first_frames": 0,
|
||||
"select_every_nth": 1,
|
||||
"format": "AnimateDiff",
|
||||
"videopreview": {
|
||||
"hidden": false,
|
||||
"paused": false,
|
||||
"params": {
|
||||
"force_rate": 0,
|
||||
"custom_width": 0,
|
||||
"custom_height": 0,
|
||||
"frame_load_cap": 0,
|
||||
"skip_first_frames": 0,
|
||||
"select_every_nth": 1,
|
||||
"filename": "1月11日-1.mp4",
|
||||
"type": "input",
|
||||
"format": "video/mp4"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"type": "VHS_VideoInfoLoaded",
|
||||
"pos": [
|
||||
580,
|
||||
-890
|
||||
],
|
||||
"size": [
|
||||
186,
|
||||
106
|
||||
],
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"label": "视频信息",
|
||||
"localized_name": "视频信息",
|
||||
"name": "video_info",
|
||||
"type": "VHS_VIDEOINFO",
|
||||
"link": 11
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"localized_name": "FPS🟦",
|
||||
"name": "FPS🟦",
|
||||
"type": "FLOAT",
|
||||
"links": [
|
||||
12
|
||||
]
|
||||
},
|
||||
{
|
||||
"localized_name": "帧数🟦",
|
||||
"name": "帧数🟦",
|
||||
"type": "INT",
|
||||
"links": null
|
||||
},
|
||||
{
|
||||
"localized_name": "时长🟦",
|
||||
"name": "时长🟦",
|
||||
"type": "FLOAT",
|
||||
"links": null
|
||||
},
|
||||
{
|
||||
"localized_name": "宽度🟦",
|
||||
"name": "宽度🟦",
|
||||
"type": "INT",
|
||||
"links": null
|
||||
},
|
||||
{
|
||||
"localized_name": "高度🟦",
|
||||
"name": "高度🟦",
|
||||
"type": "INT",
|
||||
"links": null
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfyui-videohelpersuite",
|
||||
"ver": "1.7.9",
|
||||
"Node name for S&R": "VHS_VideoInfoLoaded",
|
||||
"ue_properties": {
|
||||
"widget_ue_connectable": {},
|
||||
"input_ue_unconnectable": {},
|
||||
"version": "7.5.2"
|
||||
}
|
||||
},
|
||||
"widgets_values": {}
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"type": "VHS_VideoCombine",
|
||||
"pos": [
|
||||
960,
|
||||
-1240
|
||||
],
|
||||
"size": [
|
||||
260,
|
||||
778.3125
|
||||
],
|
||||
"flags": {},
|
||||
"order": 4,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"label": "图像",
|
||||
"localized_name": "图像",
|
||||
"name": "images",
|
||||
"type": "IMAGE",
|
||||
"link": 4
|
||||
},
|
||||
{
|
||||
"label": "音频",
|
||||
"localized_name": "音频",
|
||||
"name": "audio",
|
||||
"shape": 7,
|
||||
"type": "AUDIO",
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "批次管理",
|
||||
"localized_name": "批次管理",
|
||||
"name": "meta_batch",
|
||||
"shape": 7,
|
||||
"type": "VHS_BatchManager",
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"localized_name": "vae",
|
||||
"name": "vae",
|
||||
"shape": 7,
|
||||
"type": "VAE",
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "帧率",
|
||||
"localized_name": "帧率",
|
||||
"name": "frame_rate",
|
||||
"type": "FLOAT",
|
||||
"widget": {
|
||||
"name": "frame_rate"
|
||||
},
|
||||
"link": 12
|
||||
},
|
||||
{
|
||||
"label": "循环次数",
|
||||
"localized_name": "循环次数",
|
||||
"name": "loop_count",
|
||||
"type": "INT",
|
||||
"widget": {
|
||||
"name": "loop_count"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "文件名前缀",
|
||||
"localized_name": "文件名前缀",
|
||||
"name": "filename_prefix",
|
||||
"type": "STRING",
|
||||
"widget": {
|
||||
"name": "filename_prefix"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "格式",
|
||||
"localized_name": "格式",
|
||||
"name": "format",
|
||||
"type": "COMBO",
|
||||
"widget": {
|
||||
"name": "format"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "Ping-Pong",
|
||||
"localized_name": "Ping-Pong",
|
||||
"name": "pingpong",
|
||||
"type": "BOOLEAN",
|
||||
"widget": {
|
||||
"name": "pingpong"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "保存到输出文件夹",
|
||||
"localized_name": "保存到输出文件夹",
|
||||
"name": "save_output",
|
||||
"type": "BOOLEAN",
|
||||
"widget": {
|
||||
"name": "save_output"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"name": "pix_fmt",
|
||||
"type": [
|
||||
"yuv420p",
|
||||
"yuv420p10le"
|
||||
],
|
||||
"widget": {
|
||||
"name": "pix_fmt"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"name": "crf",
|
||||
"type": "INT",
|
||||
"widget": {
|
||||
"name": "crf"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "保存元数据",
|
||||
"localized_name": "保存元数据",
|
||||
"name": "save_metadata",
|
||||
"type": "BOOLEAN",
|
||||
"widget": {
|
||||
"name": "save_metadata"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"label": "修剪音频",
|
||||
"localized_name": "修剪音频",
|
||||
"name": "trim_to_audio",
|
||||
"type": "BOOLEAN",
|
||||
"widget": {
|
||||
"name": "trim_to_audio"
|
||||
},
|
||||
"link": null
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"localized_name": "文件名",
|
||||
"name": "文件名",
|
||||
"type": "VHS_FILENAMES",
|
||||
"links": null
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"cnr_id": "comfyui-videohelpersuite",
|
||||
"ver": "1.7.9",
|
||||
"Node name for S&R": "VHS_VideoCombine",
|
||||
"ue_properties": {
|
||||
"widget_ue_connectable": {},
|
||||
"version": "7.5.2",
|
||||
"input_ue_unconnectable": {}
|
||||
}
|
||||
},
|
||||
"widgets_values": {
|
||||
"frame_rate": 24,
|
||||
"loop_count": 0,
|
||||
"filename_prefix": "AnimateDiff",
|
||||
"format": "video/h264-mp4",
|
||||
"pix_fmt": "yuv420p",
|
||||
"crf": 12,
|
||||
"save_metadata": true,
|
||||
"trim_to_audio": false,
|
||||
"pingpong": false,
|
||||
"save_output": true,
|
||||
"videopreview": {
|
||||
"hidden": false,
|
||||
"paused": false,
|
||||
"params": {
|
||||
"filename": "AnimateDiff_00006.mp4",
|
||||
"format": "video/h264-mp4",
|
||||
"frame_rate": 24,
|
||||
"fullpath": "E:\\ComfyUI-Data\\output\\AnimateDiff_00006.mp4",
|
||||
"subfolder": "",
|
||||
"type": "output",
|
||||
"workflow": "AnimateDiff_00006.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
[
|
||||
4,
|
||||
1,
|
||||
0,
|
||||
4,
|
||||
0,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
10,
|
||||
2,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
11,
|
||||
2,
|
||||
3,
|
||||
9,
|
||||
0,
|
||||
"VHS_VIDEOINFO"
|
||||
],
|
||||
[
|
||||
12,
|
||||
9,
|
||||
0,
|
||||
4,
|
||||
4,
|
||||
"FLOAT"
|
||||
]
|
||||
],
|
||||
"no_subgraphs": true,
|
||||
"saved_fields": 27,
|
||||
"scalar_positions": 25,
|
||||
"history_objects": 2,
|
||||
"notes": 1,
|
||||
"extra_sha256": "3abff18296863b95d0f0eed9e8c08669e8b25e29b826fc41b5d068b27ae5a115"
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
........................................................................ [ 2%]
|
||||
........................................................................ [ 5%]
|
||||
........................................................................ [ 7%]
|
||||
........................................................................ [ 10%]
|
||||
........................................................................ [ 13%]
|
||||
........................................................................ [ 15%]
|
||||
........................................................................ [ 18%]
|
||||
........................................................................ [ 21%]
|
||||
........................................................................ [ 23%]
|
||||
........................................................................ [ 26%]
|
||||
........................................................................ [ 29%]
|
||||
........................................................................ [ 31%]
|
||||
........................................................................ [ 34%]
|
||||
........................................................................ [ 37%]
|
||||
........................................................................ [ 39%]
|
||||
........................................................................ [ 42%]
|
||||
........................................................................ [ 45%]
|
||||
........................................................................ [ 47%]
|
||||
........................................................................ [ 50%]
|
||||
........................................................................ [ 53%]
|
||||
........................................................................ [ 55%]
|
||||
........................................................................ [ 58%]
|
||||
........................................................................ [ 60%]
|
||||
........................................................................ [ 63%]
|
||||
........................................................................ [ 66%]
|
||||
........................................................................ [ 68%]
|
||||
........................................................................ [ 71%]
|
||||
........................................................................ [ 74%]
|
||||
........................................................................ [ 76%]
|
||||
........................................................................ [ 79%]
|
||||
........................................................................ [ 82%]
|
||||
........................................................................ [ 84%]
|
||||
........................................................................ [ 87%]
|
||||
........................................................................ [ 90%]
|
||||
........................................................................ [ 92%]
|
||||
........................................................................ [ 95%]
|
||||
........................................................................ [ 98%]
|
||||
.................................................... [100%]
|
||||
2716 passed, 1 warning in 15.91s
|
||||
@@ -0,0 +1,48 @@
|
||||
........................................................................ [ 25%]
|
||||
........................................................................ [ 51%]
|
||||
........................................................................ [ 76%]
|
||||
................................................................F. [100%]
|
||||
=================================== FAILURES ===================================
|
||||
________________ test_exact_document_topology_and_preservation _________________
|
||||
|
||||
def test_exact_document_topology_and_preservation():
|
||||
d = doc()
|
||||
assert d["fixed_version"]["matched"] and d["fixed_version"]["fields"] == BLOCK["fields"]
|
||||
assert len(BLOCK["fields"]) == 27 and len(BLOCK["comments"]) == 1
|
||||
assert sum(isinstance(f["value"], dict) for f in BLOCK["fields"]) == 2
|
||||
assert len(SOURCE["nodes"]) == 5 and len(SOURCE["links"]) == 4
|
||||
assert SOURCE["links"] == [
|
||||
[4, 1, 0, 4, 0, "IMAGE"],
|
||||
[10, 2, 0, 1, 0, "IMAGE"],
|
||||
[11, 2, 3, 9, 0, "VHS_VIDEOINFO"],
|
||||
[12, 9, 0, 4, 4, "FLOAT"],
|
||||
]
|
||||
nodes = {n["id"]: n for n in SOURCE["nodes"]}
|
||||
for edge, origin, slot, target, inp, typ in SOURCE["links"]:
|
||||
assert edge in nodes[origin]["outputs"][slot]["links"]
|
||||
assert nodes[target]["inputs"][inp]["link"] == edge
|
||||
assert nodes[target]["inputs"][inp]["type"] == typ
|
||||
assert nodes[9]["widgets_values"] == {} and type(nodes[9]["widgets_values"]) is dict
|
||||
assert all(n["mode"] == 0 for n in SOURCE["nodes"])
|
||||
assert pointer(SOURCE, BLOCK["comments"][0]["pointer"]) == BLOCK["comments"][0]["text"]
|
||||
assert not BLOCK["counts"]["final_prompt_constructed"]
|
||||
> assert all(
|
||||
s in "".join(BLOCK["flow"])
|
||||
for s in [
|
||||
"未实跑",
|
||||
"包同字节不等于提交绑定",
|
||||
"loaded_fps",
|
||||
"外线覆盖",
|
||||
"音频",
|
||||
"UE7.5.2",
|
||||
"空对象",
|
||||
"不是缺键/null/[]",
|
||||
]
|
||||
)
|
||||
E assert False
|
||||
E + where False = all(<generator object test_exact_document_topology_and_preservation.<locals>.<genexpr> at 0x7fd54576af20>)
|
||||
|
||||
calliope-backend/tests/test_openpose_fixed_document.py:189: AssertionError
|
||||
=========================== short test summary info ============================
|
||||
FAILED calliope-backend/tests/test_openpose_fixed_document.py::test_exact_document_topology_and_preservation
|
||||
1 failed, 281 passed, 1 warning in 0.57s
|
||||
@@ -0,0 +1,61 @@
|
||||
........................................................................ [ 2%]
|
||||
........................................................................ [ 5%]
|
||||
........................................................................ [ 7%]
|
||||
........................................................................ [ 10%]
|
||||
........................................................................ [ 13%]
|
||||
........................................................................ [ 15%]
|
||||
....................................F................................... [ 18%]
|
||||
........................................................................ [ 21%]
|
||||
........................................................................ [ 23%]
|
||||
........................................................................ [ 26%]
|
||||
........................................................................ [ 29%]
|
||||
........................................................................ [ 31%]
|
||||
........................................................................ [ 34%]
|
||||
........................................................................ [ 37%]
|
||||
........................................................................ [ 39%]
|
||||
........................................................................ [ 42%]
|
||||
........................................................................ [ 45%]
|
||||
........................................................................ [ 47%]
|
||||
........................................................................ [ 50%]
|
||||
........................................................................ [ 53%]
|
||||
........................................................................ [ 55%]
|
||||
........................................................................ [ 58%]
|
||||
........................................................................ [ 60%]
|
||||
........................................................................ [ 63%]
|
||||
........................................................................ [ 66%]
|
||||
........................................................................ [ 68%]
|
||||
........................................................................ [ 71%]
|
||||
........................................................................ [ 74%]
|
||||
........................................................................ [ 76%]
|
||||
........................................................................ [ 79%]
|
||||
........................................................................ [ 82%]
|
||||
........................................................................ [ 84%]
|
||||
........................................................................ [ 87%]
|
||||
........................................................................ [ 90%]
|
||||
........................................................................ [ 92%]
|
||||
........................................................................ [ 95%]
|
||||
........................................................................ [ 98%]
|
||||
.................................................... [100%]
|
||||
=================================== FAILURES ===================================
|
||||
______________ test_real_document_and_frozen_old_fourteen_blocks _______________
|
||||
|
||||
def test_real_document_and_frozen_old_fourteen_blocks():
|
||||
d = doc()
|
||||
assert d["fixed_version"]["matched"] and d["fixed_version"]["fields"] == BLOCK["fields"]
|
||||
assert d["status"] == dict(imported=True, doc_done=False, exec_verified=False)
|
||||
assert d["dependencies"]["check_state"] == "unchecked"
|
||||
assert "fixed_version" not in doc(path="untrusted.json")
|
||||
review = copy.deepcopy(REVIEW)
|
||||
other = next(p for p in DEFINITIONS if p != PATH)
|
||||
resource = "calliope-backend/src/calliope/comfyui/source_reviews.json"
|
||||
now = json.loads((REPO / resource).read_bytes())
|
||||
openpose = next(p for p in now if p.endswith("openpose-video-姿态检测.json"))
|
||||
now[openpose].pop("fixed_version_document")
|
||||
> review["fixed_version_document"] = now[other]["fixed_version_document"]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
E KeyError: 'fixed_version_document'
|
||||
|
||||
calliope-backend/tests/test_sdpose_fixed_document.py:158: KeyError
|
||||
=========================== short test summary info ============================
|
||||
FAILED calliope-backend/tests/test_sdpose_fixed_document.py::test_real_document_and_frozen_old_fourteen_blocks
|
||||
1 failed, 2715 passed, 1 warning in 16.06s
|
||||
@@ -0,0 +1,16 @@
|
||||
# 仓库根前台运行,Python3.11,既有锁定依赖;不访问目标机/媒体/权重
|
||||
uv sync --project calliope-backend --frozen --extra dev --python 3.11 --offline
|
||||
npm ci --prefix calliope-web --ignore-scripts --offline
|
||||
# 原件已固定;fetch_sources.py是可选在线文本重取,不在离线复算中联网
|
||||
python3 docs/hel-892/openpose-document-evidence/rebuild.py
|
||||
uv run --project calliope-backend --offline ruff check --config calliope-backend/pyproject.toml docs/hel-892/openpose-document-evidence/build_definition.py docs/hel-892/openpose-document-evidence/fetch_sources.py docs/hel-892/openpose-document-evidence/rebuild.py docs/hel-892/openpose-document-evidence/recompute.py docs/hel-892/openpose-document-evidence/render_report.py docs/hel-892/openpose-document-evidence/repeat.py calliope-backend/src/calliope/comfyui/fixed_document.py calliope-backend/tests/test_openpose_fixed_document.py calliope-backend/tests/test_sdpose_fixed_document.py calliope-backend/tests/test_gemma_fixed_document.py calliope-backend/tests/test_grid_fixed_document.py calliope-backend/tests/test_background_fixed_document.py calliope-backend/tests/test_qwen_edit_fixed_document.py calliope-backend/tests/test_controlnet_fixed_document.py e2e/run-openpose-document.py
|
||||
uv run --project calliope-backend --offline ruff format --check --config calliope-backend/pyproject.toml docs/hel-892/openpose-document-evidence/build_definition.py docs/hel-892/openpose-document-evidence/fetch_sources.py docs/hel-892/openpose-document-evidence/rebuild.py docs/hel-892/openpose-document-evidence/recompute.py docs/hel-892/openpose-document-evidence/render_report.py docs/hel-892/openpose-document-evidence/repeat.py calliope-backend/src/calliope/comfyui/fixed_document.py calliope-backend/tests/test_openpose_fixed_document.py calliope-backend/tests/test_sdpose_fixed_document.py calliope-backend/tests/test_gemma_fixed_document.py calliope-backend/tests/test_grid_fixed_document.py calliope-backend/tests/test_background_fixed_document.py calliope-backend/tests/test_qwen_edit_fixed_document.py calliope-backend/tests/test_controlnet_fixed_document.py e2e/run-openpose-document.py
|
||||
node --check e2e/openpose-document.mjs
|
||||
uv run --project calliope-backend --offline pytest calliope-backend/tests/test_openpose_fixed_document.py calliope-backend/tests/test_sdpose_fixed_document.py calliope-backend/tests/test_gemma_fixed_document.py calliope-backend/tests/test_grid_fixed_document.py calliope-backend/tests/test_background_fixed_document.py calliope-backend/tests/test_qwen_edit_fixed_document.py calliope-backend/tests/test_qwen_fixed_document.py calliope-backend/tests/test_controlnet_fixed_document.py calliope-backend/tests/test_asr_fixed_document.py calliope-backend/tests/test_media_fixed_document.py calliope-backend/tests/test_audio_fixed_document.py calliope-backend/tests/test_fixed_document.py calliope-backend/tests/test_workflow_library.py calliope-backend/tests/test_supplied_companions.py calliope-backend/tests/test_delivery_scope.py calliope-backend/tests/test_case04_saved_reference.py -q --disable-warnings
|
||||
uv build --project calliope-backend --offline
|
||||
uv run --project calliope-backend --offline python docs/hel-892/openpose-document-evidence/recompute.py
|
||||
uv run --project calliope-backend --offline python docs/hel-892/openpose-document-evidence/repeat.py
|
||||
python3 docs/hel-892/openpose-document-evidence/render_report.py
|
||||
# 实际本地浏览命令;服务finally停止,不复用其他服务
|
||||
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-openpose-document.py
|
||||
# 缺dist测试通过test_raw_source_identity_and_missing_packages覆盖,不删除真实包;未复跑全后台/全前端/冻结转换组。
|
||||
@@ -0,0 +1 @@
|
||||
实际目验1440-6-default、390-6-default、1440-frame_rate和390-videopreview四张截图。两屏中文概要、未定稿/未实跑及转换关闭可读;无明显遮挡/横溢。FPS展开清楚区分24缓存与loaded_fps外线;预览展开保留完整JSON/类型/旧E盘路径并标历史状态,未加载媒体。其余38张仅作为自动截图,不声称逐张人工目验。42截图与1次字体CSS本地拦截单列,不算PASS断言。
|
||||
@@ -0,0 +1,177 @@
|
||||
From eb9ef257a95f931c248edb35b05cf18068c8c4ad Mon Sep 17 00:00:00 2001
|
||||
From: Dw_03 <madduck634858934@protonmail.com>
|
||||
Date: Tue, 4 Nov 2025 10:32:00 +0100
|
||||
Subject: [PATCH 1/8] Add MIGraphXExecutionProvider to ORT_PROVIDERS
|
||||
|
||||
---
|
||||
utils.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/utils.py b/utils.py
|
||||
index cf3dd6e6..813b9520 100644
|
||||
--- a/utils.py
|
||||
+++ b/utils.py
|
||||
@@ -46,7 +46,7 @@
|
||||
annotator_ckpts_path = str(Path(here, "./ckpts"))
|
||||
TEMP_DIR = tempfile.gettempdir()
|
||||
USE_SYMLINKS = False
|
||||
- ORT_PROVIDERS = ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CPUExecutionProvider", "CoreMLExecutionProvider"]
|
||||
+ ORT_PROVIDERS = ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CPUExecutionProvider", "CoreMLExecutionProvider", "MIGraphXExecutionProvider"]
|
||||
|
||||
os.environ['AUX_ANNOTATOR_CKPTS_PATH'] = os.getenv('AUX_ANNOTATOR_CKPTS_PATH', annotator_ckpts_path)
|
||||
os.environ['AUX_TEMP_DIR'] = os.getenv('AUX_TEMP_DIR', str(TEMP_DIR))
|
||||
|
||||
From 2c754a7cd9d4a44c251676c4b022f65ea824c4d3 Mon Sep 17 00:00:00 2001
|
||||
From: Dw_03 <madduck634858934@protonmail.com>
|
||||
Date: Tue, 4 Nov 2025 10:32:15 +0100
|
||||
Subject: [PATCH 2/8] Update config.example.yaml
|
||||
|
||||
---
|
||||
config.example.yaml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/config.example.yaml b/config.example.yaml
|
||||
index 6734ad02..1de7d738 100644
|
||||
--- a/config.example.yaml
|
||||
+++ b/config.example.yaml
|
||||
@@ -17,4 +17,4 @@ USE_SYMLINKS: False
|
||||
# empty list or only keep ["CPUExecutionProvider"] means you use cv2.dnn.readNetFromONNX to load onnx models
|
||||
# if your onnx models can only run on the CPU or have other issues, we recommend using pt model instead.
|
||||
# default value is ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CPUExecutionProvider"]
|
||||
-EP_list: ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CPUExecutionProvider"]
|
||||
+EP_list: ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CPUExecutionProvider", "MIGraphXExecutionProvider"]
|
||||
|
||||
From 9cca5c69ba4892dfb0afb30652490fe64154aa91 Mon Sep 17 00:00:00 2001
|
||||
From: Dw_03 <madduck634858934@protonmail.com>
|
||||
Date: Tue, 4 Nov 2025 10:32:30 +0100
|
||||
Subject: [PATCH 3/8] Add MIGraphXExecutionProvider to GPU providers
|
||||
|
||||
---
|
||||
node_wrappers/dwpose.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/node_wrappers/dwpose.py b/node_wrappers/dwpose.py
|
||||
index f0422588..34905037 100644
|
||||
--- a/node_wrappers/dwpose.py
|
||||
+++ b/node_wrappers/dwpose.py
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
DWPOSE_MODEL_NAME = "yzd-v/DWPose"
|
||||
#Trigger startup caching for onnxruntime
|
||||
-GPU_PROVIDERS = ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CoreMLExecutionProvider"]
|
||||
+GPU_PROVIDERS = ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CoreMLExecutionProvider", "MIGraphXExecutionProvider"]
|
||||
def check_ort_gpu():
|
||||
try:
|
||||
import onnxruntime as ort
|
||||
|
||||
From d23b24f17217c03a0f9101feea4495cb205974f6 Mon Sep 17 00:00:00 2001
|
||||
From: Dw_03 <madduck634858934@protonmail.com>
|
||||
Date: Tue, 4 Nov 2025 10:33:42 +0100
|
||||
Subject: [PATCH 4/8] Add MIGraphXExecutionProvider to ONNX_PROVIDERS
|
||||
|
||||
---
|
||||
src/custom_controlnet_aux/dwpose/util.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/custom_controlnet_aux/dwpose/util.py b/src/custom_controlnet_aux/dwpose/util.py
|
||||
index 42874b33..92de18d7 100644
|
||||
--- a/src/custom_controlnet_aux/dwpose/util.py
|
||||
+++ b/src/custom_controlnet_aux/dwpose/util.py
|
||||
@@ -436,7 +436,7 @@ def guess_onnx_input_shape_dtype(filename):
|
||||
if os.getenv('AUX_ORT_PROVIDERS'):
|
||||
ONNX_PROVIDERS = os.getenv('AUX_ORT_PROVIDERS').split(',')
|
||||
else:
|
||||
- ONNX_PROVIDERS = ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CPUExecutionProvider"]
|
||||
+ ONNX_PROVIDERS = ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CPUExecutionProvider", "MIGraphXExecutionProvider"]
|
||||
def get_ort_providers() -> List[str]:
|
||||
providers = []
|
||||
try:
|
||||
|
||||
From 4a55dbc32337a8ecfbe948bfe8a68189ba4e079a Mon Sep 17 00:00:00 2001
|
||||
From: Dw_03 <madduck634858934@protonmail.com>
|
||||
Date: Tue, 4 Nov 2025 10:38:03 +0100
|
||||
Subject: [PATCH 5/8] Update config.example.yaml
|
||||
|
||||
---
|
||||
config.example.yaml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/config.example.yaml b/config.example.yaml
|
||||
index 1de7d738..280a6212 100644
|
||||
--- a/config.example.yaml
|
||||
+++ b/config.example.yaml
|
||||
@@ -16,5 +16,5 @@ USE_SYMLINKS: False
|
||||
# for example, if you have CUDA installed, you can set it to: ["CUDAExecutionProvider", "CPUExecutionProvider"]
|
||||
# empty list or only keep ["CPUExecutionProvider"] means you use cv2.dnn.readNetFromONNX to load onnx models
|
||||
# if your onnx models can only run on the CPU or have other issues, we recommend using pt model instead.
|
||||
-# default value is ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CPUExecutionProvider"]
|
||||
+# default value is ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CPUExecutionProvider", "MIGraphXExecutionProvider"]
|
||||
EP_list: ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CPUExecutionProvider", "MIGraphXExecutionProvider"]
|
||||
|
||||
From 24b4572d2c87bba2cb55fe6f666f05638f591371 Mon Sep 17 00:00:00 2001
|
||||
From: Dw_03 <madduck634858934@protonmail.com>
|
||||
Date: Tue, 4 Nov 2025 14:10:30 +0100
|
||||
Subject: [PATCH 6/8] Update EP_list default value in config example
|
||||
|
||||
---
|
||||
config.example.yaml | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/config.example.yaml b/config.example.yaml
|
||||
index 280a6212..527be3fa 100644
|
||||
--- a/config.example.yaml
|
||||
+++ b/config.example.yaml
|
||||
@@ -16,5 +16,5 @@ USE_SYMLINKS: False
|
||||
# for example, if you have CUDA installed, you can set it to: ["CUDAExecutionProvider", "CPUExecutionProvider"]
|
||||
# empty list or only keep ["CPUExecutionProvider"] means you use cv2.dnn.readNetFromONNX to load onnx models
|
||||
# if your onnx models can only run on the CPU or have other issues, we recommend using pt model instead.
|
||||
-# default value is ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CPUExecutionProvider", "MIGraphXExecutionProvider"]
|
||||
-EP_list: ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CPUExecutionProvider", "MIGraphXExecutionProvider"]
|
||||
+# default value is ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "MIGraphXExecutionProvider", "CPUExecutionProvider"]
|
||||
+EP_list: ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "MIGraphXExecutionProvider", "CPUExecutionProvider"]
|
||||
|
||||
From 6965b98dcfb33e6b4da415ec660c76672c984633 Mon Sep 17 00:00:00 2001
|
||||
From: Dw_03 <madduck634858934@protonmail.com>
|
||||
Date: Tue, 4 Nov 2025 14:11:04 +0100
|
||||
Subject: [PATCH 7/8] Reorder ONNX_PROVIDERS list for consistency
|
||||
|
||||
---
|
||||
src/custom_controlnet_aux/dwpose/util.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/custom_controlnet_aux/dwpose/util.py b/src/custom_controlnet_aux/dwpose/util.py
|
||||
index 92de18d7..921c9294 100644
|
||||
--- a/src/custom_controlnet_aux/dwpose/util.py
|
||||
+++ b/src/custom_controlnet_aux/dwpose/util.py
|
||||
@@ -436,7 +436,7 @@ def guess_onnx_input_shape_dtype(filename):
|
||||
if os.getenv('AUX_ORT_PROVIDERS'):
|
||||
ONNX_PROVIDERS = os.getenv('AUX_ORT_PROVIDERS').split(',')
|
||||
else:
|
||||
- ONNX_PROVIDERS = ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CPUExecutionProvider", "MIGraphXExecutionProvider"]
|
||||
+ ONNX_PROVIDERS = ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "MIGraphXExecutionProvider", "CPUExecutionProvider"]
|
||||
def get_ort_providers() -> List[str]:
|
||||
providers = []
|
||||
try:
|
||||
|
||||
From cb5790ad75c621729068b6164392728e6cdaf8d5 Mon Sep 17 00:00:00 2001
|
||||
From: Dw_03 <madduck634858934@protonmail.com>
|
||||
Date: Tue, 4 Nov 2025 14:11:52 +0100
|
||||
Subject: [PATCH 8/8] Update utils.py
|
||||
|
||||
---
|
||||
utils.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/utils.py b/utils.py
|
||||
index 813b9520..c37f9411 100644
|
||||
--- a/utils.py
|
||||
+++ b/utils.py
|
||||
@@ -46,7 +46,7 @@
|
||||
annotator_ckpts_path = str(Path(here, "./ckpts"))
|
||||
TEMP_DIR = tempfile.gettempdir()
|
||||
USE_SYMLINKS = False
|
||||
- ORT_PROVIDERS = ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CPUExecutionProvider", "CoreMLExecutionProvider", "MIGraphXExecutionProvider"]
|
||||
+ ORT_PROVIDERS = ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "MIGraphXExecutionProvider", "CPUExecutionProvider", "CoreMLExecutionProvider"]
|
||||
|
||||
os.environ['AUX_ANNOTATOR_CKPTS_PATH'] = os.getenv('AUX_ANNOTATOR_CKPTS_PATH', annotator_ckpts_path)
|
||||
os.environ['AUX_TEMP_DIR'] = os.getenv('AUX_TEMP_DIR', str(TEMP_DIR))
|
||||
@@ -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 [yyyy] [name of copyright owner]
|
||||
|
||||
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,224 @@
|
||||
import sys, os
|
||||
|
||||
# Disable NPU device initialization and problematic MMCV ops to prevent RuntimeError
|
||||
# Must be set BEFORE any MMCV imports happen anywhere in ComfyUI
|
||||
os.environ['NPU_DEVICE_COUNT'] = '0'
|
||||
os.environ['MMCV_WITH_OPS'] = '0'
|
||||
from .utils import here, define_preprocessor_inputs, INPUT
|
||||
from pathlib import Path
|
||||
import traceback
|
||||
import importlib
|
||||
from .log import log, blue_text, cyan_text, get_summary, get_label
|
||||
from .hint_image_enchance import NODE_CLASS_MAPPINGS as HIE_NODE_CLASS_MAPPINGS
|
||||
from .hint_image_enchance import NODE_DISPLAY_NAME_MAPPINGS as HIE_NODE_DISPLAY_NAME_MAPPINGS
|
||||
#Ref: https://github.com/comfyanonymous/ComfyUI/blob/76d53c4622fc06372975ed2a43ad345935b8a551/nodes.py#L17
|
||||
sys.path.insert(0, str(Path(here, "src").resolve()))
|
||||
for pkg_name in ["custom_controlnet_aux", "custom_mmpkg"]:
|
||||
sys.path.append(str(Path(here, "src", pkg_name).resolve()))
|
||||
|
||||
#Enable CPU fallback for ops not being supported by MPS like upsample_bicubic2d.out
|
||||
#https://github.com/pytorch/pytorch/issues/77764
|
||||
#https://github.com/Fannovel16/comfyui_controlnet_aux/issues/2#issuecomment-1763579485
|
||||
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = os.getenv("PYTORCH_ENABLE_MPS_FALLBACK", '1')
|
||||
|
||||
|
||||
def load_nodes():
|
||||
shorted_errors = []
|
||||
full_error_messages = []
|
||||
node_class_mappings = {}
|
||||
node_display_name_mappings = {}
|
||||
|
||||
for filename in (here / "node_wrappers").iterdir():
|
||||
module_name = filename.stem
|
||||
if module_name.startswith('.'): continue #Skip hidden files created by the OS (e.g. [.DS_Store](https://en.wikipedia.org/wiki/.DS_Store))
|
||||
try:
|
||||
module = importlib.import_module(
|
||||
f".node_wrappers.{module_name}", package=__package__
|
||||
)
|
||||
node_class_mappings.update(getattr(module, "NODE_CLASS_MAPPINGS"))
|
||||
if hasattr(module, "NODE_DISPLAY_NAME_MAPPINGS"):
|
||||
node_display_name_mappings.update(getattr(module, "NODE_DISPLAY_NAME_MAPPINGS"))
|
||||
|
||||
log.debug(f"Imported {module_name} nodes")
|
||||
|
||||
except AttributeError:
|
||||
pass # wip nodes
|
||||
except Exception:
|
||||
error_message = traceback.format_exc()
|
||||
full_error_messages.append(error_message)
|
||||
error_message = error_message.splitlines()[-1]
|
||||
shorted_errors.append(
|
||||
f"Failed to import module {module_name} because {error_message}"
|
||||
)
|
||||
|
||||
if len(shorted_errors) > 0:
|
||||
full_err_log = '\n\n'.join(full_error_messages)
|
||||
print(f"\n\nFull error log from comfyui_controlnet_aux: \n{full_err_log}\n\n")
|
||||
log.info(
|
||||
f"Some nodes failed to load:\n\t"
|
||||
+ "\n\t".join(shorted_errors)
|
||||
+ "\n\n"
|
||||
+ "Check that you properly installed the dependencies.\n"
|
||||
+ "If you think this is a bug, please report it on the github page (https://github.com/Fannovel16/comfyui_controlnet_aux/issues)"
|
||||
)
|
||||
return node_class_mappings, node_display_name_mappings
|
||||
|
||||
AUX_NODE_MAPPINGS, AUX_DISPLAY_NAME_MAPPINGS = load_nodes()
|
||||
|
||||
#For nodes not mapping image to image or has special requirements
|
||||
AIO_NOT_SUPPORTED = ["InpaintPreprocessor", "MeshGraphormer+ImpactDetector-DepthMapPreprocessor", "DiffusionEdge_Preprocessor"]
|
||||
AIO_NOT_SUPPORTED += ["SavePoseKpsAsJsonFile", "FacialPartColoringFromPoseKps", "UpperBodyTrackingFromPoseKps", "RenderPeopleKps", "RenderAnimalKps"]
|
||||
AIO_NOT_SUPPORTED += ["Unimatch_OptFlowPreprocessor", "MaskOptFlow"]
|
||||
|
||||
def preprocessor_options():
|
||||
auxs = list(AUX_NODE_MAPPINGS.keys())
|
||||
auxs.insert(0, "none")
|
||||
for name in AIO_NOT_SUPPORTED:
|
||||
if name in auxs:
|
||||
auxs.remove(name)
|
||||
return auxs
|
||||
|
||||
|
||||
PREPROCESSOR_OPTIONS = preprocessor_options()
|
||||
|
||||
class AIO_Preprocessor:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return define_preprocessor_inputs(
|
||||
preprocessor=INPUT.COMBO(PREPROCESSOR_OPTIONS, default="none"),
|
||||
resolution=INPUT.RESOLUTION()
|
||||
)
|
||||
|
||||
RETURN_TYPES = ("IMAGE",)
|
||||
FUNCTION = "execute"
|
||||
|
||||
CATEGORY = "ControlNet Preprocessors"
|
||||
|
||||
def execute(self, preprocessor, image, resolution=512):
|
||||
if preprocessor == "none":
|
||||
return (image, )
|
||||
else:
|
||||
aux_class = AUX_NODE_MAPPINGS[preprocessor]
|
||||
input_types = aux_class.INPUT_TYPES()
|
||||
input_types = {
|
||||
**input_types["required"],
|
||||
**(input_types["optional"] if "optional" in input_types else {})
|
||||
}
|
||||
params = {}
|
||||
for name, input_type in input_types.items():
|
||||
if name == "image":
|
||||
params[name] = image
|
||||
continue
|
||||
|
||||
if name == "resolution":
|
||||
params[name] = resolution
|
||||
continue
|
||||
|
||||
if len(input_type) == 2 and ("default" in input_type[1]):
|
||||
params[name] = input_type[1]["default"]
|
||||
continue
|
||||
|
||||
default_values = { "INT": 0, "FLOAT": 0.0 }
|
||||
if type(input_type[0]) is list:
|
||||
for input_type_value in input_type[0]:
|
||||
if input_type_value in default_values:
|
||||
params[name] = default_values[input_type[0]]
|
||||
else:
|
||||
if input_type[0] in default_values:
|
||||
params[name] = default_values[input_type[0]]
|
||||
|
||||
return getattr(aux_class(), aux_class.FUNCTION)(**params)
|
||||
|
||||
class ControlNetAuxSimpleAddText:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return dict(
|
||||
required=dict(image=INPUT.IMAGE(), text=INPUT.STRING())
|
||||
)
|
||||
|
||||
RETURN_TYPES = ("IMAGE",)
|
||||
FUNCTION = "execute"
|
||||
CATEGORY = "ControlNet Preprocessors"
|
||||
def execute(self, image, text):
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
import numpy as np
|
||||
import torch
|
||||
|
||||
font = ImageFont.truetype(str((here / "NotoSans-Regular.ttf").resolve()), 40)
|
||||
img = Image.fromarray(image[0].cpu().numpy().__mul__(255.).astype(np.uint8))
|
||||
ImageDraw.Draw(img).text((0,0), text, fill=(0,255,0), font=font)
|
||||
return (torch.from_numpy(np.array(img)).unsqueeze(0) / 255.,)
|
||||
|
||||
class ExecuteAllControlNetPreprocessors:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return define_preprocessor_inputs(resolution=INPUT.RESOLUTION())
|
||||
RETURN_TYPES = ("IMAGE",)
|
||||
FUNCTION = "execute"
|
||||
|
||||
CATEGORY = "ControlNet Preprocessors"
|
||||
|
||||
def execute(self, image, resolution=512):
|
||||
try:
|
||||
from comfy_execution.graph_utils import GraphBuilder
|
||||
except:
|
||||
raise RuntimeError("ExecuteAllControlNetPreprocessor requries [Execution Model Inversion](https://github.com/comfyanonymous/ComfyUI/commit/5cfe38). Update ComfyUI/SwarmUI to get this feature")
|
||||
|
||||
graph = GraphBuilder()
|
||||
curr_outputs = []
|
||||
for preprocc in PREPROCESSOR_OPTIONS:
|
||||
preprocc_node = graph.node("AIO_Preprocessor", preprocessor=preprocc, image=image, resolution=resolution)
|
||||
hint_img = preprocc_node.out(0)
|
||||
add_text_node = graph.node("ControlNetAuxSimpleAddText", image=hint_img, text=preprocc)
|
||||
curr_outputs.append(add_text_node.out(0))
|
||||
|
||||
while len(curr_outputs) > 1:
|
||||
_outputs = []
|
||||
for i in range(0, len(curr_outputs), 2):
|
||||
if i+1 < len(curr_outputs):
|
||||
image_batch = graph.node("ImageBatch", image1=curr_outputs[i], image2=curr_outputs[i+1])
|
||||
_outputs.append(image_batch.out(0))
|
||||
else:
|
||||
_outputs.append(curr_outputs[i])
|
||||
curr_outputs = _outputs
|
||||
|
||||
return {
|
||||
"result": (curr_outputs[0],),
|
||||
"expand": graph.finalize(),
|
||||
}
|
||||
|
||||
class ControlNetPreprocessorSelector:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return {
|
||||
"required": {
|
||||
"preprocessor": (PREPROCESSOR_OPTIONS,),
|
||||
}
|
||||
}
|
||||
|
||||
RETURN_TYPES = (PREPROCESSOR_OPTIONS,)
|
||||
RETURN_NAMES = ("preprocessor",)
|
||||
FUNCTION = "get_preprocessor"
|
||||
|
||||
CATEGORY = "ControlNet Preprocessors"
|
||||
|
||||
def get_preprocessor(self, preprocessor: str):
|
||||
return (preprocessor,)
|
||||
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
**AUX_NODE_MAPPINGS,
|
||||
"AIO_Preprocessor": AIO_Preprocessor,
|
||||
"ControlNetPreprocessorSelector": ControlNetPreprocessorSelector,
|
||||
**HIE_NODE_CLASS_MAPPINGS,
|
||||
"ExecuteAllControlNetPreprocessors": ExecuteAllControlNetPreprocessors,
|
||||
"ControlNetAuxSimpleAddText": ControlNetAuxSimpleAddText
|
||||
}
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
**AUX_DISPLAY_NAME_MAPPINGS,
|
||||
"AIO_Preprocessor": "AIO Aux Preprocessor",
|
||||
"ControlNetPreprocessorSelector": "Preprocessor Selector",
|
||||
**HIE_NODE_DISPLAY_NAME_MAPPINGS,
|
||||
"ExecuteAllControlNetPreprocessors": "Execute All ControlNet Preprocessors"
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
from ..utils import common_annotator_call, define_preprocessor_inputs, INPUT
|
||||
import comfy.model_management as model_management
|
||||
import numpy as np
|
||||
import warnings
|
||||
from ..src.custom_controlnet_aux.dwpose import DwposeDetector, AnimalposeDetector
|
||||
import os
|
||||
import json
|
||||
|
||||
DWPOSE_MODEL_NAME = "yzd-v/DWPose"
|
||||
#Trigger startup caching for onnxruntime
|
||||
GPU_PROVIDERS = ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CoreMLExecutionProvider", "MIGraphXExecutionProvider"]
|
||||
def check_ort_gpu():
|
||||
try:
|
||||
import onnxruntime as ort
|
||||
for provider in GPU_PROVIDERS:
|
||||
if provider in ort.get_available_providers():
|
||||
return True
|
||||
return False
|
||||
except:
|
||||
return False
|
||||
|
||||
if not os.environ.get("DWPOSE_ONNXRT_CHECKED"):
|
||||
if check_ort_gpu():
|
||||
print("DWPose: Onnxruntime with acceleration providers detected")
|
||||
else:
|
||||
warnings.warn("DWPose: Onnxruntime not found or doesn't come with acceleration providers, switch to OpenCV with CPU device. DWPose might run very slowly")
|
||||
os.environ['AUX_ORT_PROVIDERS'] = ''
|
||||
os.environ["DWPOSE_ONNXRT_CHECKED"] = '1'
|
||||
|
||||
class DWPose_Preprocessor:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return define_preprocessor_inputs(
|
||||
detect_hand=INPUT.COMBO(["enable", "disable"]),
|
||||
detect_body=INPUT.COMBO(["enable", "disable"]),
|
||||
detect_face=INPUT.COMBO(["enable", "disable"]),
|
||||
resolution=INPUT.RESOLUTION(),
|
||||
bbox_detector=INPUT.COMBO(
|
||||
["None"] + ["yolox_l.torchscript.pt", "yolox_l.onnx", "yolo_nas_l_fp16.onnx", "yolo_nas_m_fp16.onnx", "yolo_nas_s_fp16.onnx"],
|
||||
default="yolox_l.onnx"
|
||||
),
|
||||
pose_estimator=INPUT.COMBO(
|
||||
["dw-ll_ucoco_384_bs5.torchscript.pt", "dw-ll_ucoco_384.onnx", "dw-ll_ucoco.onnx"],
|
||||
default="dw-ll_ucoco_384_bs5.torchscript.pt"
|
||||
),
|
||||
scale_stick_for_xinsr_cn=INPUT.COMBO(["disable", "enable"])
|
||||
)
|
||||
|
||||
RETURN_TYPES = ("IMAGE", "POSE_KEYPOINT")
|
||||
FUNCTION = "estimate_pose"
|
||||
|
||||
CATEGORY = "ControlNet Preprocessors/Faces and Poses Estimators"
|
||||
|
||||
def estimate_pose(self, image, detect_hand="enable", detect_body="enable", detect_face="enable", resolution=512, bbox_detector="yolox_l.onnx", pose_estimator="dw-ll_ucoco_384.onnx", scale_stick_for_xinsr_cn="disable", **kwargs):
|
||||
if bbox_detector == "None":
|
||||
yolo_repo = DWPOSE_MODEL_NAME
|
||||
elif bbox_detector == "yolox_l.onnx":
|
||||
yolo_repo = DWPOSE_MODEL_NAME
|
||||
elif "yolox" in bbox_detector:
|
||||
yolo_repo = "hr16/yolox-onnx"
|
||||
elif "yolo_nas" in bbox_detector:
|
||||
yolo_repo = "hr16/yolo-nas-fp16"
|
||||
else:
|
||||
raise NotImplementedError(f"Download mechanism for {bbox_detector}")
|
||||
|
||||
if pose_estimator == "dw-ll_ucoco_384.onnx":
|
||||
pose_repo = DWPOSE_MODEL_NAME
|
||||
elif pose_estimator.endswith(".onnx"):
|
||||
pose_repo = "hr16/UnJIT-DWPose"
|
||||
elif pose_estimator.endswith(".torchscript.pt"):
|
||||
pose_repo = "hr16/DWPose-TorchScript-BatchSize5"
|
||||
else:
|
||||
raise NotImplementedError(f"Download mechanism for {pose_estimator}")
|
||||
|
||||
model = DwposeDetector.from_pretrained(
|
||||
pose_repo,
|
||||
yolo_repo,
|
||||
det_filename=(None if bbox_detector == "None" else bbox_detector), pose_filename=pose_estimator,
|
||||
torchscript_device=model_management.get_torch_device()
|
||||
)
|
||||
detect_hand = detect_hand == "enable"
|
||||
detect_body = detect_body == "enable"
|
||||
detect_face = detect_face == "enable"
|
||||
scale_stick_for_xinsr_cn = scale_stick_for_xinsr_cn == "enable"
|
||||
self.openpose_dicts = []
|
||||
def func(image, **kwargs):
|
||||
pose_img, openpose_dict = model(image, **kwargs)
|
||||
self.openpose_dicts.append(openpose_dict)
|
||||
return pose_img
|
||||
|
||||
out = common_annotator_call(func, image, include_hand=detect_hand, include_face=detect_face, include_body=detect_body, image_and_json=True, resolution=resolution, xinsr_stick_scaling=scale_stick_for_xinsr_cn)
|
||||
del model
|
||||
return {
|
||||
'ui': { "openpose_json": [json.dumps(self.openpose_dicts, indent=4)] },
|
||||
"result": (out, self.openpose_dicts)
|
||||
}
|
||||
|
||||
class AnimalPose_Preprocessor:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return define_preprocessor_inputs(
|
||||
bbox_detector = INPUT.COMBO(
|
||||
["None"] + ["yolox_l.torchscript.pt", "yolox_l.onnx", "yolo_nas_l_fp16.onnx", "yolo_nas_m_fp16.onnx", "yolo_nas_s_fp16.onnx"],
|
||||
default="yolox_l.torchscript.pt"
|
||||
),
|
||||
pose_estimator = INPUT.COMBO(
|
||||
["rtmpose-m_ap10k_256_bs5.torchscript.pt", "rtmpose-m_ap10k_256.onnx"],
|
||||
default="rtmpose-m_ap10k_256_bs5.torchscript.pt"
|
||||
),
|
||||
resolution = INPUT.RESOLUTION()
|
||||
)
|
||||
|
||||
RETURN_TYPES = ("IMAGE", "POSE_KEYPOINT")
|
||||
FUNCTION = "estimate_pose"
|
||||
|
||||
CATEGORY = "ControlNet Preprocessors/Faces and Poses Estimators"
|
||||
|
||||
def estimate_pose(self, image, resolution=512, bbox_detector="yolox_l.onnx", pose_estimator="rtmpose-m_ap10k_256.onnx", **kwargs):
|
||||
if bbox_detector == "None":
|
||||
yolo_repo = DWPOSE_MODEL_NAME
|
||||
elif bbox_detector == "yolox_l.onnx":
|
||||
yolo_repo = DWPOSE_MODEL_NAME
|
||||
elif "yolox" in bbox_detector:
|
||||
yolo_repo = "hr16/yolox-onnx"
|
||||
elif "yolo_nas" in bbox_detector:
|
||||
yolo_repo = "hr16/yolo-nas-fp16"
|
||||
else:
|
||||
raise NotImplementedError(f"Download mechanism for {bbox_detector}")
|
||||
|
||||
if pose_estimator == "dw-ll_ucoco_384.onnx":
|
||||
pose_repo = DWPOSE_MODEL_NAME
|
||||
elif pose_estimator.endswith(".onnx"):
|
||||
pose_repo = "hr16/UnJIT-DWPose"
|
||||
elif pose_estimator.endswith(".torchscript.pt"):
|
||||
pose_repo = "hr16/DWPose-TorchScript-BatchSize5"
|
||||
else:
|
||||
raise NotImplementedError(f"Download mechanism for {pose_estimator}")
|
||||
|
||||
model = AnimalposeDetector.from_pretrained(
|
||||
pose_repo,
|
||||
yolo_repo,
|
||||
det_filename=(None if bbox_detector == "None" else bbox_detector), pose_filename=pose_estimator,
|
||||
torchscript_device=model_management.get_torch_device()
|
||||
)
|
||||
|
||||
self.openpose_dicts = []
|
||||
def func(image, **kwargs):
|
||||
pose_img, openpose_dict = model(image, **kwargs)
|
||||
self.openpose_dicts.append(openpose_dict)
|
||||
return pose_img
|
||||
|
||||
out = common_annotator_call(func, image, image_and_json=True, resolution=resolution)
|
||||
del model
|
||||
return {
|
||||
'ui': { "openpose_json": [json.dumps(self.openpose_dicts, indent=4)] },
|
||||
"result": (out, self.openpose_dicts)
|
||||
}
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
"DWPreprocessor": DWPose_Preprocessor,
|
||||
"AnimalPosePreprocessor": AnimalPose_Preprocessor
|
||||
}
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"DWPreprocessor": "DWPose Estimator",
|
||||
"AnimalPosePreprocessor": "AnimalPose Estimator (AP10K)"
|
||||
}
|
||||
@@ -0,0 +1,332 @@
|
||||
# Openpose
|
||||
# Original from CMU https://github.com/CMU-Perceptual-Computing-Lab/openpose
|
||||
# 2nd Edited by https://github.com/Hzzone/pytorch-openpose
|
||||
# 3rd Edited by ControlNet
|
||||
# 4th Edited by ControlNet (added face and correct hands)
|
||||
# 5th Edited by ControlNet (Improved JSON serialization/deserialization, and lots of bug fixs)
|
||||
# This preprocessor is licensed by CMU for non-commercial use only.
|
||||
|
||||
import os
|
||||
os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"
|
||||
|
||||
import json
|
||||
import torch
|
||||
import numpy as np
|
||||
from . import util
|
||||
from .body import Body, BodyResult, Keypoint
|
||||
from .hand import Hand
|
||||
from .face import Face
|
||||
from .types import PoseResult, HandResult, FaceResult, AnimalPoseResult
|
||||
from huggingface_hub import hf_hub_download
|
||||
from .wholebody import Wholebody
|
||||
import warnings
|
||||
from custom_controlnet_aux.util import HWC3, resize_image_with_pad, common_input_validate, custom_hf_download
|
||||
import cv2
|
||||
from PIL import Image
|
||||
from .animalpose import AnimalPoseImage
|
||||
|
||||
from typing import Tuple, List, Callable, Union, Optional
|
||||
|
||||
|
||||
def draw_animalposes(animals: list[list[Keypoint]], H: int, W: int) -> np.ndarray:
|
||||
canvas = np.zeros(shape=(H, W, 3), dtype=np.uint8)
|
||||
for animal_pose in animals:
|
||||
canvas = draw_animalpose(canvas, animal_pose)
|
||||
return canvas
|
||||
|
||||
|
||||
def draw_animalpose(canvas: np.ndarray, keypoints: list[Keypoint]) -> np.ndarray:
|
||||
# order of the keypoints for AP10k and a standardized list of colors for limbs
|
||||
keypointPairsList = [
|
||||
(1, 2),
|
||||
(2, 3),
|
||||
(1, 3),
|
||||
(3, 4),
|
||||
(4, 9),
|
||||
(9, 10),
|
||||
(10, 11),
|
||||
(4, 6),
|
||||
(6, 7),
|
||||
(7, 8),
|
||||
(4, 5),
|
||||
(5, 15),
|
||||
(15, 16),
|
||||
(16, 17),
|
||||
(5, 12),
|
||||
(12, 13),
|
||||
(13, 14),
|
||||
]
|
||||
colorsList = [
|
||||
(255, 255, 255),
|
||||
(100, 255, 100),
|
||||
(150, 255, 255),
|
||||
(100, 50, 255),
|
||||
(50, 150, 200),
|
||||
(0, 255, 255),
|
||||
(0, 150, 0),
|
||||
(0, 0, 255),
|
||||
(0, 0, 150),
|
||||
(255, 50, 255),
|
||||
(255, 0, 255),
|
||||
(255, 0, 0),
|
||||
(150, 0, 0),
|
||||
(255, 255, 100),
|
||||
(0, 150, 0),
|
||||
(255, 255, 0),
|
||||
(150, 150, 150),
|
||||
] # 16 colors needed
|
||||
|
||||
for ind, (i, j) in enumerate(keypointPairsList):
|
||||
p1 = keypoints[i - 1]
|
||||
p2 = keypoints[j - 1]
|
||||
|
||||
if p1 is not None and p2 is not None:
|
||||
cv2.line(
|
||||
canvas,
|
||||
(int(p1.x), int(p1.y)),
|
||||
(int(p2.x), int(p2.y)),
|
||||
colorsList[ind],
|
||||
5,
|
||||
)
|
||||
return canvas
|
||||
|
||||
|
||||
def draw_poses(poses: List[PoseResult], H, W, draw_body=True, draw_hand=True, draw_face=True, xinsr_stick_scaling=False):
|
||||
"""
|
||||
Draw the detected poses on an empty canvas.
|
||||
|
||||
Args:
|
||||
poses (List[PoseResult]): A list of PoseResult objects containing the detected poses.
|
||||
H (int): The height of the canvas.
|
||||
W (int): The width of the canvas.
|
||||
draw_body (bool, optional): Whether to draw body keypoints. Defaults to True.
|
||||
draw_hand (bool, optional): Whether to draw hand keypoints. Defaults to True.
|
||||
draw_face (bool, optional): Whether to draw face keypoints. Defaults to True.
|
||||
|
||||
Returns:
|
||||
numpy.ndarray: A 3D numpy array representing the canvas with the drawn poses.
|
||||
"""
|
||||
canvas = np.zeros(shape=(H, W, 3), dtype=np.uint8)
|
||||
|
||||
for pose in poses:
|
||||
if draw_body:
|
||||
canvas = util.draw_bodypose(canvas, pose.body.keypoints, xinsr_stick_scaling)
|
||||
|
||||
if draw_hand:
|
||||
canvas = util.draw_handpose(canvas, pose.left_hand)
|
||||
canvas = util.draw_handpose(canvas, pose.right_hand)
|
||||
|
||||
if draw_face:
|
||||
canvas = util.draw_facepose(canvas, pose.face)
|
||||
|
||||
return canvas
|
||||
|
||||
|
||||
def decode_json_as_poses(
|
||||
pose_json: dict,
|
||||
) -> Tuple[List[PoseResult], List[AnimalPoseResult], int, int]:
|
||||
"""Decode the json_string complying with the openpose JSON output format
|
||||
to poses that controlnet recognizes.
|
||||
https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/02_output.md
|
||||
|
||||
Args:
|
||||
json_string: The json string to decode.
|
||||
|
||||
Returns:
|
||||
human_poses
|
||||
animal_poses
|
||||
canvas_height
|
||||
canvas_width
|
||||
"""
|
||||
height = pose_json["canvas_height"]
|
||||
width = pose_json["canvas_width"]
|
||||
|
||||
def chunks(lst, n):
|
||||
"""Yield successive n-sized chunks from lst."""
|
||||
for i in range(0, len(lst), n):
|
||||
yield lst[i : i + n]
|
||||
|
||||
def decompress_keypoints(
|
||||
numbers: Optional[List[float]],
|
||||
) -> Optional[List[Optional[Keypoint]]]:
|
||||
if not numbers:
|
||||
return None
|
||||
|
||||
assert len(numbers) % 3 == 0
|
||||
|
||||
def create_keypoint(x, y, c):
|
||||
if c < 1.0:
|
||||
return None
|
||||
keypoint = Keypoint(x, y)
|
||||
return keypoint
|
||||
|
||||
return [create_keypoint(x, y, c) for x, y, c in chunks(numbers, n=3)]
|
||||
|
||||
return (
|
||||
[
|
||||
PoseResult(
|
||||
body=BodyResult(
|
||||
keypoints=decompress_keypoints(pose.get("pose_keypoints_2d"))
|
||||
),
|
||||
left_hand=decompress_keypoints(pose.get("hand_left_keypoints_2d")),
|
||||
right_hand=decompress_keypoints(pose.get("hand_right_keypoints_2d")),
|
||||
face=decompress_keypoints(pose.get("face_keypoints_2d")),
|
||||
)
|
||||
for pose in pose_json.get("people", [])
|
||||
],
|
||||
[decompress_keypoints(pose) for pose in pose_json.get("animals", [])],
|
||||
height,
|
||||
width,
|
||||
)
|
||||
|
||||
|
||||
def encode_poses_as_dict(poses: List[PoseResult], canvas_height: int, canvas_width: int) -> str:
|
||||
""" Encode the pose as a dict following openpose JSON output format:
|
||||
https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/02_output.md
|
||||
"""
|
||||
def compress_keypoints(keypoints: Union[List[Keypoint], None]) -> Union[List[float], None]:
|
||||
if not keypoints:
|
||||
return None
|
||||
|
||||
return [
|
||||
value
|
||||
for keypoint in keypoints
|
||||
for value in (
|
||||
[float(keypoint.x), float(keypoint.y), 1.0]
|
||||
if keypoint is not None
|
||||
else [0.0, 0.0, 0.0]
|
||||
)
|
||||
]
|
||||
|
||||
return {
|
||||
'people': [
|
||||
{
|
||||
'pose_keypoints_2d': compress_keypoints(pose.body.keypoints),
|
||||
"face_keypoints_2d": compress_keypoints(pose.face),
|
||||
"hand_left_keypoints_2d": compress_keypoints(pose.left_hand),
|
||||
"hand_right_keypoints_2d":compress_keypoints(pose.right_hand),
|
||||
}
|
||||
for pose in poses
|
||||
],
|
||||
'canvas_height': canvas_height,
|
||||
'canvas_width': canvas_width,
|
||||
}
|
||||
|
||||
global_cached_dwpose = Wholebody()
|
||||
|
||||
class DwposeDetector:
|
||||
"""
|
||||
A class for detecting human poses in images using the Dwpose model.
|
||||
|
||||
Attributes:
|
||||
model_dir (str): Path to the directory where the pose models are stored.
|
||||
"""
|
||||
def __init__(self, dw_pose_estimation):
|
||||
self.dw_pose_estimation = dw_pose_estimation
|
||||
|
||||
@classmethod
|
||||
def from_pretrained(cls, pretrained_model_or_path, pretrained_det_model_or_path=None, det_filename=None, pose_filename=None, torchscript_device="cuda"):
|
||||
global global_cached_dwpose
|
||||
pretrained_det_model_or_path = pretrained_det_model_or_path or pretrained_model_or_path
|
||||
|
||||
pose_filename = pose_filename or "dw-ll_ucoco_384.onnx"
|
||||
|
||||
det_model_path = None
|
||||
if det_filename is not None:
|
||||
det_model_path = custom_hf_download(pretrained_det_model_or_path, det_filename)
|
||||
pose_model_path = custom_hf_download(pretrained_model_or_path, pose_filename)
|
||||
|
||||
print(f"\nDWPose: Using {det_filename} for bbox detection and {pose_filename} for pose estimation")
|
||||
if global_cached_dwpose.det is None or global_cached_dwpose.det_filename != det_filename:
|
||||
t = Wholebody(det_model_path, None, torchscript_device=torchscript_device)
|
||||
t.pose = global_cached_dwpose.pose
|
||||
t.pose_filename = global_cached_dwpose.pose
|
||||
global_cached_dwpose = t
|
||||
|
||||
if global_cached_dwpose.pose is None or global_cached_dwpose.pose_filename != pose_filename:
|
||||
t = Wholebody(None, pose_model_path, torchscript_device=torchscript_device)
|
||||
t.det = global_cached_dwpose.det
|
||||
t.det_filename = global_cached_dwpose.det_filename
|
||||
global_cached_dwpose = t
|
||||
return cls(global_cached_dwpose)
|
||||
|
||||
def detect_poses(self, oriImg) -> List[PoseResult]:
|
||||
with torch.no_grad():
|
||||
keypoints_info = self.dw_pose_estimation(oriImg.copy())
|
||||
return Wholebody.format_result(keypoints_info)
|
||||
|
||||
def __call__(self, input_image, detect_resolution=512, include_body=True, include_hand=False, include_face=False, hand_and_face=None, output_type="pil", image_and_json=False, upscale_method="INTER_CUBIC", xinsr_stick_scaling=False, **kwargs):
|
||||
if hand_and_face is not None:
|
||||
warnings.warn("hand_and_face is deprecated. Use include_hand and include_face instead.", DeprecationWarning)
|
||||
include_hand = hand_and_face
|
||||
include_face = hand_and_face
|
||||
|
||||
input_image, output_type = common_input_validate(input_image, output_type, **kwargs)
|
||||
input_image, _ = resize_image_with_pad(input_image, 0, upscale_method)
|
||||
poses = self.detect_poses(input_image)
|
||||
|
||||
canvas = draw_poses(poses, input_image.shape[0], input_image.shape[1], draw_body=include_body, draw_hand=include_hand, draw_face=include_face, xinsr_stick_scaling=xinsr_stick_scaling)
|
||||
canvas, remove_pad = resize_image_with_pad(canvas, detect_resolution, upscale_method)
|
||||
detected_map = HWC3(remove_pad(canvas))
|
||||
|
||||
if output_type == "pil":
|
||||
detected_map = Image.fromarray(detected_map)
|
||||
|
||||
if image_and_json:
|
||||
return (detected_map, encode_poses_as_dict(poses, input_image.shape[0], input_image.shape[1]))
|
||||
|
||||
return detected_map
|
||||
|
||||
global_cached_animalpose = AnimalPoseImage()
|
||||
class AnimalposeDetector:
|
||||
"""
|
||||
A class for detecting animal poses in images using the RTMPose AP10k model.
|
||||
|
||||
Attributes:
|
||||
model_dir (str): Path to the directory where the pose models are stored.
|
||||
"""
|
||||
def __init__(self, animal_pose_estimation):
|
||||
self.animal_pose_estimation = animal_pose_estimation
|
||||
|
||||
@classmethod
|
||||
def from_pretrained(cls, pretrained_model_or_path, pretrained_det_model_or_path=None, det_filename="yolox_l.onnx", pose_filename="dw-ll_ucoco_384.onnx", torchscript_device="cuda"):
|
||||
global global_cached_animalpose
|
||||
det_model_path = custom_hf_download(pretrained_det_model_or_path, det_filename)
|
||||
pose_model_path = custom_hf_download(pretrained_model_or_path, pose_filename)
|
||||
|
||||
print(f"\nAnimalPose: Using {det_filename} for bbox detection and {pose_filename} for pose estimation")
|
||||
if global_cached_animalpose.det is None or global_cached_animalpose.det_filename != det_filename:
|
||||
t = AnimalPoseImage(det_model_path, None, torchscript_device=torchscript_device)
|
||||
t.pose = global_cached_animalpose.pose
|
||||
t.pose_filename = global_cached_animalpose.pose
|
||||
global_cached_animalpose = t
|
||||
|
||||
if global_cached_animalpose.pose is None or global_cached_animalpose.pose_filename != pose_filename:
|
||||
t = AnimalPoseImage(None, pose_model_path, torchscript_device=torchscript_device)
|
||||
t.det = global_cached_animalpose.det
|
||||
t.det_filename = global_cached_animalpose.det_filename
|
||||
global_cached_animalpose = t
|
||||
return cls(global_cached_animalpose)
|
||||
|
||||
def __call__(self, input_image, detect_resolution=512, output_type="pil", image_and_json=False, upscale_method="INTER_CUBIC", **kwargs):
|
||||
input_image, output_type = common_input_validate(input_image, output_type, **kwargs)
|
||||
input_image, remove_pad = resize_image_with_pad(input_image, detect_resolution, upscale_method)
|
||||
result = self.animal_pose_estimation(input_image)
|
||||
if result is None:
|
||||
detected_map = np.zeros_like(input_image)
|
||||
openpose_dict = {
|
||||
'version': 'ap10k',
|
||||
'animals': [],
|
||||
'canvas_height': input_image.shape[0],
|
||||
'canvas_width': input_image.shape[1]
|
||||
}
|
||||
else:
|
||||
detected_map, openpose_dict = result
|
||||
detected_map = remove_pad(detected_map)
|
||||
if output_type == "pil":
|
||||
detected_map = Image.fromarray(detected_map)
|
||||
|
||||
if image_and_json:
|
||||
return (detected_map, openpose_dict)
|
||||
|
||||
return detected_map
|
||||
@@ -0,0 +1,466 @@
|
||||
import math
|
||||
import numpy as np
|
||||
import matplotlib
|
||||
import cv2
|
||||
import os
|
||||
from typing import List, Tuple, Union, Optional
|
||||
|
||||
from .body import BodyResult, Keypoint
|
||||
|
||||
eps = 0.01
|
||||
|
||||
|
||||
def smart_resize(x, s):
|
||||
Ht, Wt = s
|
||||
if x.ndim == 2:
|
||||
Ho, Wo = x.shape
|
||||
Co = 1
|
||||
else:
|
||||
Ho, Wo, Co = x.shape
|
||||
if Co == 3 or Co == 1:
|
||||
k = float(Ht + Wt) / float(Ho + Wo)
|
||||
return cv2.resize(x, (int(Wt), int(Ht)), interpolation=cv2.INTER_AREA if k < 1 else cv2.INTER_LANCZOS4)
|
||||
else:
|
||||
return np.stack([smart_resize(x[:, :, i], s) for i in range(Co)], axis=2)
|
||||
|
||||
|
||||
def smart_resize_k(x, fx, fy):
|
||||
if x.ndim == 2:
|
||||
Ho, Wo = x.shape
|
||||
Co = 1
|
||||
else:
|
||||
Ho, Wo, Co = x.shape
|
||||
Ht, Wt = Ho * fy, Wo * fx
|
||||
if Co == 3 or Co == 1:
|
||||
k = float(Ht + Wt) / float(Ho + Wo)
|
||||
return cv2.resize(x, (int(Wt), int(Ht)), interpolation=cv2.INTER_AREA if k < 1 else cv2.INTER_LANCZOS4)
|
||||
else:
|
||||
return np.stack([smart_resize_k(x[:, :, i], fx, fy) for i in range(Co)], axis=2)
|
||||
|
||||
|
||||
def padRightDownCorner(img, stride, padValue):
|
||||
h = img.shape[0]
|
||||
w = img.shape[1]
|
||||
|
||||
pad = 4 * [None]
|
||||
pad[0] = 0 # up
|
||||
pad[1] = 0 # left
|
||||
pad[2] = 0 if (h % stride == 0) else stride - (h % stride) # down
|
||||
pad[3] = 0 if (w % stride == 0) else stride - (w % stride) # right
|
||||
|
||||
img_padded = img
|
||||
pad_up = np.tile(img_padded[0:1, :, :]*0 + padValue, (pad[0], 1, 1))
|
||||
img_padded = np.concatenate((pad_up, img_padded), axis=0)
|
||||
pad_left = np.tile(img_padded[:, 0:1, :]*0 + padValue, (1, pad[1], 1))
|
||||
img_padded = np.concatenate((pad_left, img_padded), axis=1)
|
||||
pad_down = np.tile(img_padded[-2:-1, :, :]*0 + padValue, (pad[2], 1, 1))
|
||||
img_padded = np.concatenate((img_padded, pad_down), axis=0)
|
||||
pad_right = np.tile(img_padded[:, -2:-1, :]*0 + padValue, (1, pad[3], 1))
|
||||
img_padded = np.concatenate((img_padded, pad_right), axis=1)
|
||||
|
||||
return img_padded, pad
|
||||
|
||||
|
||||
def transfer(model, model_weights):
|
||||
transfered_model_weights = {}
|
||||
for weights_name in model.state_dict().keys():
|
||||
transfered_model_weights[weights_name] = model_weights['.'.join(weights_name.split('.')[1:])]
|
||||
return transfered_model_weights
|
||||
|
||||
|
||||
def is_normalized(keypoints: List[Optional[Keypoint]]) -> bool:
|
||||
point_normalized = [
|
||||
0 <= abs(k.x) <= 1 and 0 <= abs(k.y) <= 1
|
||||
for k in keypoints
|
||||
if k is not None
|
||||
]
|
||||
if not point_normalized:
|
||||
return False
|
||||
return all(point_normalized)
|
||||
|
||||
|
||||
def draw_bodypose(canvas: np.ndarray, keypoints: List[Keypoint], xinsr_stick_scaling: bool = False) -> np.ndarray:
|
||||
"""
|
||||
Draw keypoints and limbs representing body pose on a given canvas.
|
||||
|
||||
Args:
|
||||
canvas (np.ndarray): A 3D numpy array representing the canvas (image) on which to draw the body pose.
|
||||
keypoints (List[Keypoint]): A list of Keypoint objects representing the body keypoints to be drawn.
|
||||
xinsr_stick_scaling (bool): Whether or not scaling stick width for xinsr ControlNet
|
||||
|
||||
Returns:
|
||||
np.ndarray: A 3D numpy array representing the modified canvas with the drawn body pose.
|
||||
|
||||
Note:
|
||||
The function expects the x and y coordinates of the keypoints to be normalized between 0 and 1.
|
||||
"""
|
||||
if not is_normalized(keypoints):
|
||||
H, W = 1.0, 1.0
|
||||
else:
|
||||
H, W, _ = canvas.shape
|
||||
|
||||
CH, CW, _ = canvas.shape
|
||||
stickwidth = 4
|
||||
|
||||
# Ref: https://huggingface.co/xinsir/controlnet-openpose-sdxl-1.0
|
||||
max_side = max(CW, CH)
|
||||
if xinsr_stick_scaling:
|
||||
stick_scale = 1 if max_side < 500 else min(2 + (max_side // 1000), 7)
|
||||
else:
|
||||
stick_scale = 1
|
||||
|
||||
limbSeq = [
|
||||
[2, 3], [2, 6], [3, 4], [4, 5],
|
||||
[6, 7], [7, 8], [2, 9], [9, 10],
|
||||
[10, 11], [2, 12], [12, 13], [13, 14],
|
||||
[2, 1], [1, 15], [15, 17], [1, 16],
|
||||
[16, 18],
|
||||
]
|
||||
|
||||
colors = [[255, 0, 0], [255, 85, 0], [255, 170, 0], [255, 255, 0], [170, 255, 0], [85, 255, 0], [0, 255, 0], \
|
||||
[0, 255, 85], [0, 255, 170], [0, 255, 255], [0, 170, 255], [0, 85, 255], [0, 0, 255], [85, 0, 255], \
|
||||
[170, 0, 255], [255, 0, 255], [255, 0, 170], [255, 0, 85]]
|
||||
|
||||
for (k1_index, k2_index), color in zip(limbSeq, colors):
|
||||
keypoint1 = keypoints[k1_index - 1]
|
||||
keypoint2 = keypoints[k2_index - 1]
|
||||
|
||||
if keypoint1 is None or keypoint2 is None:
|
||||
continue
|
||||
|
||||
Y = np.array([keypoint1.x, keypoint2.x]) * float(W)
|
||||
X = np.array([keypoint1.y, keypoint2.y]) * float(H)
|
||||
mX = np.mean(X)
|
||||
mY = np.mean(Y)
|
||||
length = ((X[0] - X[1]) ** 2 + (Y[0] - Y[1]) ** 2) ** 0.5
|
||||
angle = math.degrees(math.atan2(X[0] - X[1], Y[0] - Y[1]))
|
||||
polygon = cv2.ellipse2Poly((int(mY), int(mX)), (int(length / 2), stickwidth*stick_scale), int(angle), 0, 360, 1)
|
||||
cv2.fillConvexPoly(canvas, polygon, [int(float(c) * 0.6) for c in color])
|
||||
|
||||
for keypoint, color in zip(keypoints, colors):
|
||||
if keypoint is None:
|
||||
continue
|
||||
|
||||
x, y = keypoint.x, keypoint.y
|
||||
x = int(x * W)
|
||||
y = int(y * H)
|
||||
cv2.circle(canvas, (int(x), int(y)), 4, color, thickness=-1)
|
||||
|
||||
return canvas
|
||||
|
||||
|
||||
def draw_handpose(canvas: np.ndarray, keypoints: Union[List[Keypoint], None]) -> np.ndarray:
|
||||
"""
|
||||
Draw keypoints and connections representing hand pose on a given canvas.
|
||||
|
||||
Args:
|
||||
canvas (np.ndarray): A 3D numpy array representing the canvas (image) on which to draw the hand pose.
|
||||
keypoints (List[Keypoint]| None): A list of Keypoint objects representing the hand keypoints to be drawn
|
||||
or None if no keypoints are present.
|
||||
|
||||
Returns:
|
||||
np.ndarray: A 3D numpy array representing the modified canvas with the drawn hand pose.
|
||||
|
||||
Note:
|
||||
The function expects the x and y coordinates of the keypoints to be normalized between 0 and 1.
|
||||
"""
|
||||
if not keypoints:
|
||||
return canvas
|
||||
|
||||
if not is_normalized(keypoints):
|
||||
H, W = 1.0, 1.0
|
||||
else:
|
||||
H, W, _ = canvas.shape
|
||||
|
||||
edges = [[0, 1], [1, 2], [2, 3], [3, 4], [0, 5], [5, 6], [6, 7], [7, 8], [0, 9], [9, 10], \
|
||||
[10, 11], [11, 12], [0, 13], [13, 14], [14, 15], [15, 16], [0, 17], [17, 18], [18, 19], [19, 20]]
|
||||
|
||||
for ie, (e1, e2) in enumerate(edges):
|
||||
k1 = keypoints[e1]
|
||||
k2 = keypoints[e2]
|
||||
if k1 is None or k2 is None:
|
||||
continue
|
||||
|
||||
x1 = int(k1.x * W)
|
||||
y1 = int(k1.y * H)
|
||||
x2 = int(k2.x * W)
|
||||
y2 = int(k2.y * H)
|
||||
if x1 > eps and y1 > eps and x2 > eps and y2 > eps:
|
||||
cv2.line(canvas, (x1, y1), (x2, y2), matplotlib.colors.hsv_to_rgb([ie / float(len(edges)), 1.0, 1.0]) * 255, thickness=2)
|
||||
|
||||
for keypoint in keypoints:
|
||||
if keypoint is None:
|
||||
continue
|
||||
|
||||
x, y = keypoint.x, keypoint.y
|
||||
x = int(x * W)
|
||||
y = int(y * H)
|
||||
if x > eps and y > eps:
|
||||
cv2.circle(canvas, (x, y), 4, (0, 0, 255), thickness=-1)
|
||||
return canvas
|
||||
|
||||
|
||||
def draw_facepose(canvas: np.ndarray, keypoints: Union[List[Keypoint], None]) -> np.ndarray:
|
||||
"""
|
||||
Draw keypoints representing face pose on a given canvas.
|
||||
|
||||
Args:
|
||||
canvas (np.ndarray): A 3D numpy array representing the canvas (image) on which to draw the face pose.
|
||||
keypoints (List[Keypoint]| None): A list of Keypoint objects representing the face keypoints to be drawn
|
||||
or None if no keypoints are present.
|
||||
|
||||
Returns:
|
||||
np.ndarray: A 3D numpy array representing the modified canvas with the drawn face pose.
|
||||
|
||||
Note:
|
||||
The function expects the x and y coordinates of the keypoints to be normalized between 0 and 1.
|
||||
"""
|
||||
if not keypoints:
|
||||
return canvas
|
||||
|
||||
if not is_normalized(keypoints):
|
||||
H, W = 1.0, 1.0
|
||||
else:
|
||||
H, W, _ = canvas.shape
|
||||
|
||||
for keypoint in keypoints:
|
||||
if keypoint is None:
|
||||
continue
|
||||
|
||||
x, y = keypoint.x, keypoint.y
|
||||
x = int(x * W)
|
||||
y = int(y * H)
|
||||
if x > eps and y > eps:
|
||||
cv2.circle(canvas, (x, y), 3, (255, 255, 255), thickness=-1)
|
||||
return canvas
|
||||
|
||||
|
||||
# detect hand according to body pose keypoints
|
||||
# please refer to https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/src/openpose/hand/handDetector.cpp
|
||||
def handDetect(body: BodyResult, oriImg) -> List[Tuple[int, int, int, bool]]:
|
||||
"""
|
||||
Detect hands in the input body pose keypoints and calculate the bounding box for each hand.
|
||||
|
||||
Args:
|
||||
body (BodyResult): A BodyResult object containing the detected body pose keypoints.
|
||||
oriImg (numpy.ndarray): A 3D numpy array representing the original input image.
|
||||
|
||||
Returns:
|
||||
List[Tuple[int, int, int, bool]]: A list of tuples, each containing the coordinates (x, y) of the top-left
|
||||
corner of the bounding box, the width (height) of the bounding box, and
|
||||
a boolean flag indicating whether the hand is a left hand (True) or a
|
||||
right hand (False).
|
||||
|
||||
Notes:
|
||||
- The width and height of the bounding boxes are equal since the network requires squared input.
|
||||
- The minimum bounding box size is 20 pixels.
|
||||
"""
|
||||
ratioWristElbow = 0.33
|
||||
detect_result = []
|
||||
image_height, image_width = oriImg.shape[0:2]
|
||||
|
||||
keypoints = body.keypoints
|
||||
# right hand: wrist 4, elbow 3, shoulder 2
|
||||
# left hand: wrist 7, elbow 6, shoulder 5
|
||||
left_shoulder = keypoints[5]
|
||||
left_elbow = keypoints[6]
|
||||
left_wrist = keypoints[7]
|
||||
right_shoulder = keypoints[2]
|
||||
right_elbow = keypoints[3]
|
||||
right_wrist = keypoints[4]
|
||||
|
||||
# if any of three not detected
|
||||
has_left = all(keypoint is not None for keypoint in (left_shoulder, left_elbow, left_wrist))
|
||||
has_right = all(keypoint is not None for keypoint in (right_shoulder, right_elbow, right_wrist))
|
||||
if not (has_left or has_right):
|
||||
return []
|
||||
|
||||
hands = []
|
||||
#left hand
|
||||
if has_left:
|
||||
hands.append([
|
||||
left_shoulder.x, left_shoulder.y,
|
||||
left_elbow.x, left_elbow.y,
|
||||
left_wrist.x, left_wrist.y,
|
||||
True
|
||||
])
|
||||
# right hand
|
||||
if has_right:
|
||||
hands.append([
|
||||
right_shoulder.x, right_shoulder.y,
|
||||
right_elbow.x, right_elbow.y,
|
||||
right_wrist.x, right_wrist.y,
|
||||
False
|
||||
])
|
||||
|
||||
for x1, y1, x2, y2, x3, y3, is_left in hands:
|
||||
# pos_hand = pos_wrist + ratio * (pos_wrist - pos_elbox) = (1 + ratio) * pos_wrist - ratio * pos_elbox
|
||||
# handRectangle.x = posePtr[wrist*3] + ratioWristElbow * (posePtr[wrist*3] - posePtr[elbow*3]);
|
||||
# handRectangle.y = posePtr[wrist*3+1] + ratioWristElbow * (posePtr[wrist*3+1] - posePtr[elbow*3+1]);
|
||||
# const auto distanceWristElbow = getDistance(poseKeypoints, person, wrist, elbow);
|
||||
# const auto distanceElbowShoulder = getDistance(poseKeypoints, person, elbow, shoulder);
|
||||
# handRectangle.width = 1.5f * fastMax(distanceWristElbow, 0.9f * distanceElbowShoulder);
|
||||
x = x3 + ratioWristElbow * (x3 - x2)
|
||||
y = y3 + ratioWristElbow * (y3 - y2)
|
||||
distanceWristElbow = math.sqrt((x3 - x2) ** 2 + (y3 - y2) ** 2)
|
||||
distanceElbowShoulder = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
|
||||
width = 1.5 * max(distanceWristElbow, 0.9 * distanceElbowShoulder)
|
||||
# x-y refers to the center --> offset to topLeft point
|
||||
# handRectangle.x -= handRectangle.width / 2.f;
|
||||
# handRectangle.y -= handRectangle.height / 2.f;
|
||||
x -= width / 2
|
||||
y -= width / 2 # width = height
|
||||
# overflow the image
|
||||
if x < 0: x = 0
|
||||
if y < 0: y = 0
|
||||
width1 = width
|
||||
width2 = width
|
||||
if x + width > image_width: width1 = image_width - x
|
||||
if y + width > image_height: width2 = image_height - y
|
||||
width = min(width1, width2)
|
||||
# the max hand box value is 20 pixels
|
||||
if width >= 20:
|
||||
detect_result.append((int(x), int(y), int(width), is_left))
|
||||
|
||||
'''
|
||||
return value: [[x, y, w, True if left hand else False]].
|
||||
width=height since the network require squared input.
|
||||
x, y is the coordinate of top left
|
||||
'''
|
||||
return detect_result
|
||||
|
||||
|
||||
# Written by Lvmin
|
||||
def faceDetect(body: BodyResult, oriImg) -> Union[Tuple[int, int, int], None]:
|
||||
"""
|
||||
Detect the face in the input body pose keypoints and calculate the bounding box for the face.
|
||||
|
||||
Args:
|
||||
body (BodyResult): A BodyResult object containing the detected body pose keypoints.
|
||||
oriImg (numpy.ndarray): A 3D numpy array representing the original input image.
|
||||
|
||||
Returns:
|
||||
Tuple[int, int, int] | None: A tuple containing the coordinates (x, y) of the top-left corner of the
|
||||
bounding box and the width (height) of the bounding box, or None if the
|
||||
face is not detected or the bounding box width is less than 20 pixels.
|
||||
|
||||
Notes:
|
||||
- The width and height of the bounding box are equal.
|
||||
- The minimum bounding box size is 20 pixels.
|
||||
"""
|
||||
# left right eye ear 14 15 16 17
|
||||
image_height, image_width = oriImg.shape[0:2]
|
||||
|
||||
keypoints = body.keypoints
|
||||
head = keypoints[0]
|
||||
left_eye = keypoints[14]
|
||||
right_eye = keypoints[15]
|
||||
left_ear = keypoints[16]
|
||||
right_ear = keypoints[17]
|
||||
|
||||
if head is None or all(keypoint is None for keypoint in (left_eye, right_eye, left_ear, right_ear)):
|
||||
return None
|
||||
|
||||
width = 0.0
|
||||
x0, y0 = head.x, head.y
|
||||
|
||||
if left_eye is not None:
|
||||
x1, y1 = left_eye.x, left_eye.y
|
||||
d = max(abs(x0 - x1), abs(y0 - y1))
|
||||
width = max(width, d * 3.0)
|
||||
|
||||
if right_eye is not None:
|
||||
x1, y1 = right_eye.x, right_eye.y
|
||||
d = max(abs(x0 - x1), abs(y0 - y1))
|
||||
width = max(width, d * 3.0)
|
||||
|
||||
if left_ear is not None:
|
||||
x1, y1 = left_ear.x, left_ear.y
|
||||
d = max(abs(x0 - x1), abs(y0 - y1))
|
||||
width = max(width, d * 1.5)
|
||||
|
||||
if right_ear is not None:
|
||||
x1, y1 = right_ear.x, right_ear.y
|
||||
d = max(abs(x0 - x1), abs(y0 - y1))
|
||||
width = max(width, d * 1.5)
|
||||
|
||||
x, y = x0, y0
|
||||
|
||||
x -= width
|
||||
y -= width
|
||||
|
||||
if x < 0:
|
||||
x = 0
|
||||
|
||||
if y < 0:
|
||||
y = 0
|
||||
|
||||
width1 = width * 2
|
||||
width2 = width * 2
|
||||
|
||||
if x + width > image_width:
|
||||
width1 = image_width - x
|
||||
|
||||
if y + width > image_height:
|
||||
width2 = image_height - y
|
||||
|
||||
width = min(width1, width2)
|
||||
|
||||
if width >= 20:
|
||||
return int(x), int(y), int(width)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
# get max index of 2d array
|
||||
def npmax(array):
|
||||
arrayindex = array.argmax(1)
|
||||
arrayvalue = array.max(1)
|
||||
i = arrayvalue.argmax()
|
||||
j = arrayindex[i]
|
||||
return i, j
|
||||
|
||||
def guess_onnx_input_shape_dtype(filename):
|
||||
dtype = np.float32
|
||||
if "fp16" in filename:
|
||||
dtype = np.float16
|
||||
elif "int8" in filename:
|
||||
dtype = np.uint8
|
||||
input_size = (640, 640) if "yolo" in filename else (192, 256)
|
||||
if "384" in filename:
|
||||
input_size = (288, 384)
|
||||
elif "256" in filename:
|
||||
input_size = (256, 256)
|
||||
return input_size, dtype
|
||||
|
||||
if os.getenv('AUX_ORT_PROVIDERS'):
|
||||
ONNX_PROVIDERS = os.getenv('AUX_ORT_PROVIDERS').split(',')
|
||||
else:
|
||||
ONNX_PROVIDERS = ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "MIGraphXExecutionProvider", "CPUExecutionProvider"]
|
||||
def get_ort_providers() -> List[str]:
|
||||
providers = []
|
||||
try:
|
||||
import onnxruntime as ort
|
||||
for provider in ONNX_PROVIDERS:
|
||||
if provider in ort.get_available_providers():
|
||||
providers.append(provider)
|
||||
return providers
|
||||
except:
|
||||
return []
|
||||
|
||||
def is_model_torchscript(model) -> bool:
|
||||
return bool(type(model).__name__ == "RecursiveScriptModule")
|
||||
|
||||
def get_model_type(Nodesname, filename) -> str:
|
||||
ort_providers = list(filter(lambda x : x != "CPUExecutionProvider", get_ort_providers()))
|
||||
if filename is None:
|
||||
return None
|
||||
elif ("onnx" in filename) and ort_providers:
|
||||
print(f"{Nodesname}: Caching ONNXRuntime session {filename}...")
|
||||
return "ort"
|
||||
elif ("onnx" in filename):
|
||||
print(f"{Nodesname}: Caching OpenCV DNN module {filename} on cv2.DNN...")
|
||||
return "cv2"
|
||||
else:
|
||||
print(f"{Nodesname}: Caching TorchScript module {filename} on ...")
|
||||
return "torchscript"
|
||||
@@ -0,0 +1,181 @@
|
||||
# Copyright (c) OpenMMLab. All rights reserved.
|
||||
import cv2
|
||||
import numpy as np
|
||||
|
||||
from .dw_onnx.cv_ox_det import inference_detector as inference_onnx_yolox
|
||||
from .dw_onnx.cv_ox_yolo_nas import inference_detector as inference_onnx_yolo_nas
|
||||
from .dw_onnx.cv_ox_pose import inference_pose as inference_onnx_pose
|
||||
|
||||
from .dw_torchscript.jit_det import inference_detector as inference_jit_yolox
|
||||
from .dw_torchscript.jit_pose import inference_pose as inference_jit_pose
|
||||
|
||||
from typing import List, Optional
|
||||
from .types import PoseResult, BodyResult, Keypoint
|
||||
from timeit import default_timer
|
||||
import os
|
||||
from .util import guess_onnx_input_shape_dtype, get_model_type, get_ort_providers, is_model_torchscript
|
||||
import torch
|
||||
|
||||
class Wholebody:
|
||||
def __init__(self, det_model_path: Optional[str] = None, pose_model_path: Optional[str] = None, torchscript_device="cuda"):
|
||||
self.det_filename = det_model_path and os.path.basename(det_model_path)
|
||||
self.pose_filename = pose_model_path and os.path.basename(pose_model_path)
|
||||
self.det, self.pose = None, None
|
||||
# return type: None ort cv2 torchscript
|
||||
self.det_model_type = get_model_type("DWPose",self.det_filename)
|
||||
self.pose_model_type = get_model_type("DWPose",self.pose_filename)
|
||||
# Always loads to CPU to avoid building OpenCV.
|
||||
cv2_device = 'cpu'
|
||||
cv2_backend = cv2.dnn.DNN_BACKEND_OPENCV if cv2_device == 'cpu' else cv2.dnn.DNN_BACKEND_CUDA
|
||||
# You need to manually build OpenCV through cmake to work with your GPU.
|
||||
cv2_providers = cv2.dnn.DNN_TARGET_CPU if cv2_device == 'cpu' else cv2.dnn.DNN_TARGET_CUDA
|
||||
ort_providers = get_ort_providers()
|
||||
|
||||
if self.det_model_type is None:
|
||||
pass
|
||||
elif self.det_model_type == "ort":
|
||||
try:
|
||||
import onnxruntime as ort
|
||||
self.det = ort.InferenceSession(det_model_path, providers=ort_providers)
|
||||
except:
|
||||
print(f"Failed to load onnxruntime with {self.det.get_providers()}.\nPlease change EP_list in the config.yaml and restart ComfyUI")
|
||||
self.det = ort.InferenceSession(det_model_path, providers=["CPUExecutionProvider"])
|
||||
elif self.det_model_type == "cv2":
|
||||
try:
|
||||
self.det = cv2.dnn.readNetFromONNX(det_model_path)
|
||||
self.det.setPreferableBackend(cv2_backend)
|
||||
self.det.setPreferableTarget(cv2_providers)
|
||||
except:
|
||||
print("TopK operators may not work on your OpenCV, try use onnxruntime with CPUExecutionProvider")
|
||||
try:
|
||||
import onnxruntime as ort
|
||||
self.det = ort.InferenceSession(det_model_path, providers=["CPUExecutionProvider"])
|
||||
except:
|
||||
print(f"Failed to load {det_model_path}, you can use other models instead")
|
||||
else:
|
||||
self.det = torch.jit.load(det_model_path)
|
||||
self.det.to(torchscript_device)
|
||||
|
||||
if self.pose_model_type is None:
|
||||
pass
|
||||
elif self.pose_model_type == "ort":
|
||||
try:
|
||||
import onnxruntime as ort
|
||||
self.pose = ort.InferenceSession(pose_model_path, providers=ort_providers)
|
||||
except:
|
||||
print(f"Failed to load onnxruntime with {self.pose.get_providers()}.\nPlease change EP_list in the config.yaml and restart ComfyUI")
|
||||
self.pose = ort.InferenceSession(pose_model_path, providers=["CPUExecutionProvider"])
|
||||
elif self.pose_model_type == "cv2":
|
||||
self.pose = cv2.dnn.readNetFromONNX(pose_model_path)
|
||||
self.pose.setPreferableBackend(cv2_backend)
|
||||
self.pose.setPreferableTarget(cv2_providers)
|
||||
else:
|
||||
self.pose = torch.jit.load(pose_model_path)
|
||||
self.pose.to(torchscript_device)
|
||||
|
||||
if self.pose_filename is not None:
|
||||
self.pose_input_size, _ = guess_onnx_input_shape_dtype(self.pose_filename)
|
||||
|
||||
def __call__(self, oriImg) -> Optional[np.ndarray]:
|
||||
#Sacrifice accurate time measurement for compatibility
|
||||
|
||||
det_result = None
|
||||
|
||||
if self.det is None:
|
||||
print("DWPose: No detector specified, using full image for pose estimation.") # pragma: no cover
|
||||
det_result = []
|
||||
else:
|
||||
det_start = default_timer()
|
||||
if is_model_torchscript(self.det):
|
||||
det_result = inference_jit_yolox(self.det, oriImg, detect_classes=[0])
|
||||
else:
|
||||
if "yolox" in self.det_filename:
|
||||
det_result = inference_onnx_yolox(self.det, oriImg, detect_classes=[0], dtype=np.float32)
|
||||
else:
|
||||
#FP16 and INT8 YOLO NAS accept uint8 input
|
||||
det_result = inference_onnx_yolo_nas(self.det, oriImg, detect_classes=[0], dtype=np.uint8)
|
||||
print(f"DWPose: Bbox {((default_timer() - det_start) * 1000):.2f}ms")
|
||||
if (det_result is None) or (det_result.shape[0] == 0):
|
||||
return None
|
||||
|
||||
pose_start = default_timer()
|
||||
if is_model_torchscript(self.pose):
|
||||
keypoints, scores = inference_jit_pose(self.pose, det_result, oriImg, self.pose_input_size)
|
||||
else:
|
||||
_, pose_onnx_dtype = guess_onnx_input_shape_dtype(self.pose_filename)
|
||||
keypoints, scores = inference_onnx_pose(self.pose, det_result, oriImg, self.pose_input_size, dtype=pose_onnx_dtype)
|
||||
|
||||
num_subjects_log = 'full image'
|
||||
if hasattr(det_result, 'shape') and det_result.shape[0] > 0:
|
||||
num_subjects_log = f"{det_result.shape[0]} people"
|
||||
elif isinstance(det_result, list) and len(det_result) > 0 and isinstance(det_result[0], (list, np.ndarray)):
|
||||
num_subjects_log = f"{len(det_result)} people"
|
||||
|
||||
print(f"DWPose: Pose {((default_timer() - pose_start) * 1000):.2f}ms on {num_subjects_log}\n")
|
||||
|
||||
keypoints_info = np.concatenate(
|
||||
(keypoints, scores[..., None]), axis=-1)
|
||||
# compute neck joint
|
||||
neck = np.mean(keypoints_info[:, [5, 6]], axis=1)
|
||||
# neck score when visualizing pred
|
||||
neck[:, 2:4] = np.logical_and(
|
||||
keypoints_info[:, 5, 2:4] > 0.3,
|
||||
keypoints_info[:, 6, 2:4] > 0.3).astype(int)
|
||||
new_keypoints_info = np.insert(
|
||||
keypoints_info, 17, neck, axis=1)
|
||||
mmpose_idx = [
|
||||
17, 6, 8, 10, 7, 9, 12, 14, 16, 13, 15, 2, 1, 4, 3
|
||||
]
|
||||
openpose_idx = [
|
||||
1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17
|
||||
]
|
||||
new_keypoints_info[:, openpose_idx] = \
|
||||
new_keypoints_info[:, mmpose_idx]
|
||||
keypoints_info = new_keypoints_info
|
||||
|
||||
return keypoints_info
|
||||
|
||||
@staticmethod
|
||||
def format_result(keypoints_info: Optional[np.ndarray]) -> List[PoseResult]:
|
||||
def format_keypoint_part(
|
||||
part: np.ndarray,
|
||||
) -> Optional[List[Optional[Keypoint]]]:
|
||||
keypoints = [
|
||||
Keypoint(x, y, score, i) if score >= 0.3 else None
|
||||
for i, (x, y, score) in enumerate(part)
|
||||
]
|
||||
return (
|
||||
None if all(keypoint is None for keypoint in keypoints) else keypoints
|
||||
)
|
||||
|
||||
def total_score(keypoints: Optional[List[Optional[Keypoint]]]) -> float:
|
||||
return (
|
||||
sum(keypoint.score for keypoint in keypoints if keypoint is not None)
|
||||
if keypoints is not None
|
||||
else 0.0
|
||||
)
|
||||
|
||||
pose_results = []
|
||||
if keypoints_info is None:
|
||||
return pose_results
|
||||
|
||||
for instance in keypoints_info:
|
||||
body_keypoints = format_keypoint_part(instance[:18]) or ([None] * 18)
|
||||
left_hand = format_keypoint_part(instance[92:113])
|
||||
right_hand = format_keypoint_part(instance[113:134])
|
||||
face = format_keypoint_part(instance[24:92])
|
||||
|
||||
# Openpose face consists of 70 points in total, while DWPose only
|
||||
# provides 68 points. Padding the last 2 points.
|
||||
if face is not None:
|
||||
# left eye
|
||||
face.append(body_keypoints[14])
|
||||
# right eye
|
||||
face.append(body_keypoints[15])
|
||||
|
||||
body = BodyResult(
|
||||
body_keypoints, total_score(body_keypoints), len(body_keypoints)
|
||||
)
|
||||
pose_results.append(PoseResult(body, left_hand, right_hand, face))
|
||||
|
||||
return pose_results
|
||||
@@ -0,0 +1,350 @@
|
||||
import os
|
||||
import random
|
||||
import tempfile
|
||||
import warnings
|
||||
from contextlib import suppress
|
||||
from pathlib import Path
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
import torch
|
||||
from huggingface_hub import constants, hf_hub_download
|
||||
from torch.utils.model_zoo import load_url
|
||||
from ast import literal_eval
|
||||
|
||||
|
||||
HF_MODEL_NAME = "lllyasviel/Annotators"
|
||||
DWPOSE_MODEL_NAME = "yzd-v/DWPose"
|
||||
BDS_MODEL_NAME = "bdsqlsz/qinglong_controlnet-lllite"
|
||||
DENSEPOSE_MODEL_NAME = "LayerNorm/DensePose-TorchScript-with-hint-image"
|
||||
MESH_GRAPHORMER_MODEL_NAME = "hr16/ControlNet-HandRefiner-pruned"
|
||||
SAM_MODEL_NAME = "dhkim2810/MobileSAM"
|
||||
UNIMATCH_MODEL_NAME = "hr16/Unimatch"
|
||||
DEPTH_ANYTHING_MODEL_NAME = "LiheYoung/Depth-Anything" #HF Space
|
||||
DIFFUSION_EDGE_MODEL_NAME = "hr16/Diffusion-Edge"
|
||||
METRIC3D_MODEL_NAME = "JUGGHM/Metric3D"
|
||||
|
||||
DEPTH_ANYTHING_V2_MODEL_NAME_DICT = {
|
||||
"depth_anything_v2_vits.pth": "depth-anything/Depth-Anything-V2-Small",
|
||||
"depth_anything_v2_vitb.pth": "depth-anything/Depth-Anything-V2-Base",
|
||||
"depth_anything_v2_vitl.pth": "depth-anything/Depth-Anything-V2-Large",
|
||||
"depth_anything_v2_vitg.pth": "depth-anything/Depth-Anything-V2-Giant",
|
||||
"depth_anything_v2_metric_vkitti_vitl.pth": "depth-anything/Depth-Anything-V2-Metric-VKITTI-Large",
|
||||
"depth_anything_v2_metric_hypersim_vitl.pth": "depth-anything/Depth-Anything-V2-Metric-Hypersim-Large"
|
||||
}
|
||||
|
||||
temp_dir = tempfile.gettempdir()
|
||||
annotator_ckpts_path = os.path.join(Path(__file__).parents[2], 'ckpts')
|
||||
USE_SYMLINKS = False
|
||||
|
||||
try:
|
||||
annotator_ckpts_path = os.environ['AUX_ANNOTATOR_CKPTS_PATH']
|
||||
except:
|
||||
warnings.warn("Custom pressesor model path not set successfully.")
|
||||
pass
|
||||
|
||||
try:
|
||||
USE_SYMLINKS = literal_eval(os.environ['AUX_USE_SYMLINKS'])
|
||||
except:
|
||||
warnings.warn("USE_SYMLINKS not set successfully. Using default value: False to download models.")
|
||||
pass
|
||||
|
||||
try:
|
||||
temp_dir = os.environ['AUX_TEMP_DIR']
|
||||
if len(temp_dir) >= 60:
|
||||
warnings.warn(f"custom temp dir is too long. Using default")
|
||||
temp_dir = tempfile.gettempdir()
|
||||
except:
|
||||
warnings.warn(f"custom temp dir not set successfully")
|
||||
pass
|
||||
|
||||
here = Path(__file__).parent.resolve()
|
||||
|
||||
def HWC3(x):
|
||||
assert x.dtype == np.uint8
|
||||
if x.ndim == 2:
|
||||
x = x[:, :, None]
|
||||
assert x.ndim == 3
|
||||
H, W, C = x.shape
|
||||
assert C == 1 or C == 3 or C == 4
|
||||
if C == 3:
|
||||
return x
|
||||
if C == 1:
|
||||
return np.concatenate([x, x, x], axis=2)
|
||||
if C == 4:
|
||||
color = x[:, :, 0:3].astype(np.float32)
|
||||
alpha = x[:, :, 3:4].astype(np.float32) / 255.0
|
||||
y = color * alpha + 255.0 * (1.0 - alpha)
|
||||
y = y.clip(0, 255).astype(np.uint8)
|
||||
return y
|
||||
|
||||
|
||||
def make_noise_disk(H, W, C, F, rng=None):
|
||||
if rng:
|
||||
noise = rng.uniform(low=0, high=1, size=((H // F) + 2, (W // F) + 2, C))
|
||||
else:
|
||||
noise = np.random.uniform(low=0, high=1, size=((H // F) + 2, (W // F) + 2, C))
|
||||
noise = cv2.resize(noise, (W + 2 * F, H + 2 * F), interpolation=cv2.INTER_CUBIC)
|
||||
noise = noise[F: F + H, F: F + W]
|
||||
noise -= np.min(noise)
|
||||
noise /= np.max(noise)
|
||||
if C == 1:
|
||||
noise = noise[:, :, None]
|
||||
return noise
|
||||
|
||||
|
||||
def nms(x, t, s):
|
||||
x = cv2.GaussianBlur(x.astype(np.float32), (0, 0), s)
|
||||
|
||||
f1 = np.array([[0, 0, 0], [1, 1, 1], [0, 0, 0]], dtype=np.uint8)
|
||||
f2 = np.array([[0, 1, 0], [0, 1, 0], [0, 1, 0]], dtype=np.uint8)
|
||||
f3 = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]], dtype=np.uint8)
|
||||
f4 = np.array([[0, 0, 1], [0, 1, 0], [1, 0, 0]], dtype=np.uint8)
|
||||
|
||||
y = np.zeros_like(x)
|
||||
|
||||
for f in [f1, f2, f3, f4]:
|
||||
np.putmask(y, cv2.dilate(x, kernel=f) == x, x)
|
||||
|
||||
z = np.zeros_like(y, dtype=np.uint8)
|
||||
z[y > t] = 255
|
||||
return z
|
||||
|
||||
def min_max_norm(x):
|
||||
x -= np.min(x)
|
||||
x /= np.maximum(np.max(x), 1e-5)
|
||||
return x
|
||||
|
||||
|
||||
def safe_step(x, step=2):
|
||||
y = x.astype(np.float32) * float(step + 1)
|
||||
y = y.astype(np.int32).astype(np.float32) / float(step)
|
||||
return y
|
||||
|
||||
|
||||
def img2mask(img, H, W, low=10, high=90):
|
||||
assert img.ndim == 3 or img.ndim == 2
|
||||
assert img.dtype == np.uint8
|
||||
|
||||
if img.ndim == 3:
|
||||
y = img[:, :, random.randrange(0, img.shape[2])]
|
||||
else:
|
||||
y = img
|
||||
|
||||
y = cv2.resize(y, (W, H), interpolation=cv2.INTER_CUBIC)
|
||||
|
||||
if random.uniform(0, 1) < 0.5:
|
||||
y = 255 - y
|
||||
|
||||
return y < np.percentile(y, random.randrange(low, high))
|
||||
|
||||
def safer_memory(x):
|
||||
# Fix many MAC/AMD problems
|
||||
return np.ascontiguousarray(x.copy()).copy()
|
||||
|
||||
UPSCALE_METHODS = ["INTER_NEAREST", "INTER_LINEAR", "INTER_AREA", "INTER_CUBIC", "INTER_LANCZOS4"]
|
||||
def get_upscale_method(method_str):
|
||||
assert method_str in UPSCALE_METHODS, f"Method {method_str} not found in {UPSCALE_METHODS}"
|
||||
return getattr(cv2, method_str)
|
||||
|
||||
def pad64(x):
|
||||
return int(np.ceil(float(x) / 64.0) * 64 - x)
|
||||
|
||||
#https://github.com/Mikubill/sd-webui-controlnet/blob/main/scripts/processor.py#L17
|
||||
#Added upscale_method, mode params
|
||||
def resize_image_with_pad(input_image, resolution, upscale_method = "", skip_hwc3=False, mode='edge'):
|
||||
if skip_hwc3:
|
||||
img = input_image
|
||||
else:
|
||||
img = HWC3(input_image)
|
||||
H_raw, W_raw, _ = img.shape
|
||||
if resolution == 0:
|
||||
return img, lambda x: x
|
||||
k = float(resolution) / float(min(H_raw, W_raw))
|
||||
H_target = int(np.round(float(H_raw) * k))
|
||||
W_target = int(np.round(float(W_raw) * k))
|
||||
img = cv2.resize(img, (W_target, H_target), interpolation=get_upscale_method(upscale_method) if k > 1 else cv2.INTER_AREA)
|
||||
H_pad, W_pad = pad64(H_target), pad64(W_target)
|
||||
img_padded = np.pad(img, [[0, H_pad], [0, W_pad], [0, 0]], mode=mode)
|
||||
|
||||
def remove_pad(x):
|
||||
return safer_memory(x[:H_target, :W_target, ...])
|
||||
|
||||
return safer_memory(img_padded), remove_pad
|
||||
|
||||
def common_input_validate(input_image, output_type, **kwargs):
|
||||
if "img" in kwargs:
|
||||
warnings.warn("img is deprecated, please use `input_image=...` instead.", DeprecationWarning)
|
||||
input_image = kwargs.pop("img")
|
||||
|
||||
if "return_pil" in kwargs:
|
||||
warnings.warn("return_pil is deprecated. Use output_type instead.", DeprecationWarning)
|
||||
output_type = "pil" if kwargs["return_pil"] else "np"
|
||||
|
||||
if type(output_type) is bool:
|
||||
warnings.warn("Passing `True` or `False` to `output_type` is deprecated and will raise an error in future versions")
|
||||
if output_type:
|
||||
output_type = "pil"
|
||||
|
||||
if input_image is None:
|
||||
raise ValueError("input_image must be defined.")
|
||||
|
||||
if not isinstance(input_image, np.ndarray):
|
||||
input_image = np.array(input_image, dtype=np.uint8)
|
||||
output_type = output_type or "pil"
|
||||
else:
|
||||
output_type = output_type or "np"
|
||||
|
||||
return (input_image, output_type)
|
||||
|
||||
def torch_gc():
|
||||
if torch.cuda.is_available():
|
||||
torch.cuda.empty_cache()
|
||||
torch.cuda.ipc_collect()
|
||||
|
||||
|
||||
def ade_palette():
|
||||
"""ADE20K palette that maps each class to RGB values."""
|
||||
return [[120, 120, 120], [180, 120, 120], [6, 230, 230], [80, 50, 50],
|
||||
[4, 200, 3], [120, 120, 80], [140, 140, 140], [204, 5, 255],
|
||||
[230, 230, 230], [4, 250, 7], [224, 5, 255], [235, 255, 7],
|
||||
[150, 5, 61], [120, 120, 70], [8, 255, 51], [255, 6, 82],
|
||||
[143, 255, 140], [204, 255, 4], [255, 51, 7], [204, 70, 3],
|
||||
[0, 102, 200], [61, 230, 250], [255, 6, 51], [11, 102, 255],
|
||||
[255, 7, 71], [255, 9, 224], [9, 7, 230], [220, 220, 220],
|
||||
[255, 9, 92], [112, 9, 255], [8, 255, 214], [7, 255, 224],
|
||||
[255, 184, 6], [10, 255, 71], [255, 41, 10], [7, 255, 255],
|
||||
[224, 255, 8], [102, 8, 255], [255, 61, 6], [255, 194, 7],
|
||||
[255, 122, 8], [0, 255, 20], [255, 8, 41], [255, 5, 153],
|
||||
[6, 51, 255], [235, 12, 255], [160, 150, 20], [0, 163, 255],
|
||||
[140, 140, 140], [250, 10, 15], [20, 255, 0], [31, 255, 0],
|
||||
[255, 31, 0], [255, 224, 0], [153, 255, 0], [0, 0, 255],
|
||||
[255, 71, 0], [0, 235, 255], [0, 173, 255], [31, 0, 255],
|
||||
[11, 200, 200], [255, 82, 0], [0, 255, 245], [0, 61, 255],
|
||||
[0, 255, 112], [0, 255, 133], [255, 0, 0], [255, 163, 0],
|
||||
[255, 102, 0], [194, 255, 0], [0, 143, 255], [51, 255, 0],
|
||||
[0, 82, 255], [0, 255, 41], [0, 255, 173], [10, 0, 255],
|
||||
[173, 255, 0], [0, 255, 153], [255, 92, 0], [255, 0, 255],
|
||||
[255, 0, 245], [255, 0, 102], [255, 173, 0], [255, 0, 20],
|
||||
[255, 184, 184], [0, 31, 255], [0, 255, 61], [0, 71, 255],
|
||||
[255, 0, 204], [0, 255, 194], [0, 255, 82], [0, 10, 255],
|
||||
[0, 112, 255], [51, 0, 255], [0, 194, 255], [0, 122, 255],
|
||||
[0, 255, 163], [255, 153, 0], [0, 255, 10], [255, 112, 0],
|
||||
[143, 255, 0], [82, 0, 255], [163, 255, 0], [255, 235, 0],
|
||||
[8, 184, 170], [133, 0, 255], [0, 255, 92], [184, 0, 255],
|
||||
[255, 0, 31], [0, 184, 255], [0, 214, 255], [255, 0, 112],
|
||||
[92, 255, 0], [0, 224, 255], [112, 224, 255], [70, 184, 160],
|
||||
[163, 0, 255], [153, 0, 255], [71, 255, 0], [255, 0, 163],
|
||||
[255, 204, 0], [255, 0, 143], [0, 255, 235], [133, 255, 0],
|
||||
[255, 0, 235], [245, 0, 255], [255, 0, 122], [255, 245, 0],
|
||||
[10, 190, 212], [214, 255, 0], [0, 204, 255], [20, 0, 255],
|
||||
[255, 255, 0], [0, 153, 255], [0, 41, 255], [0, 255, 204],
|
||||
[41, 0, 255], [41, 255, 0], [173, 0, 255], [0, 245, 255],
|
||||
[71, 0, 255], [122, 0, 255], [0, 255, 184], [0, 92, 255],
|
||||
[184, 255, 0], [0, 133, 255], [255, 214, 0], [25, 194, 194],
|
||||
[102, 255, 0], [92, 0, 255]]
|
||||
|
||||
#https://stackoverflow.com/a/44873382
|
||||
#Assume that the minimum version of Python ppl use is 3.9
|
||||
def sha256sum(file_path):
|
||||
import hashlib
|
||||
h = hashlib.sha256()
|
||||
b = bytearray(128*1024)
|
||||
mv = memoryview(b)
|
||||
with open(file_path, 'rb', buffering=0) as f:
|
||||
while n := f.readinto(mv):
|
||||
h.update(mv[:n])
|
||||
return h.hexdigest()
|
||||
|
||||
def check_hash_from_torch_hub(file_path, filename):
|
||||
basename, _ = filename.split('.')
|
||||
_, ref_hash = basename.split('-')
|
||||
curr_hash = sha256sum(file_path)
|
||||
return curr_hash[:len(ref_hash)] == ref_hash
|
||||
|
||||
def custom_torch_download(filename, ckpts_dir=annotator_ckpts_path):
|
||||
"""Download PyTorch models using PyTorch 2.7's built-in download mechanism."""
|
||||
model_url = "https://download.pytorch.org/models/" + filename
|
||||
|
||||
# Use PyTorch's built-in model downloading with custom cache directory
|
||||
local_dir = os.path.join(ckpts_dir, "torch")
|
||||
if not os.path.exists(local_dir):
|
||||
os.makedirs(local_dir, exist_ok=True)
|
||||
|
||||
model_path = os.path.join(local_dir, filename)
|
||||
|
||||
if not os.path.exists(model_path):
|
||||
print(f"Downloading {filename} from pytorch.org...")
|
||||
try:
|
||||
# Use PyTorch 2.7's load_url which handles caching, progress, and hash checking
|
||||
state_dict = load_url(model_url, model_dir=local_dir, file_name=filename, progress=True, check_hash=True)
|
||||
# The file is already saved by load_url, we just need the path
|
||||
except Exception as e:
|
||||
warnings.warn(f"Download failed with error: {e}")
|
||||
raise
|
||||
|
||||
print(f"model_path is {model_path}")
|
||||
return model_path
|
||||
|
||||
def custom_hf_download(pretrained_model_or_path, filename, cache_dir=temp_dir, ckpts_dir=annotator_ckpts_path, subfolder='', use_symlinks=USE_SYMLINKS, repo_type="model"):
|
||||
|
||||
local_dir = os.path.join(ckpts_dir, pretrained_model_or_path)
|
||||
model_path = Path(local_dir).joinpath(*subfolder.split('/'), filename).__str__()
|
||||
|
||||
if len(str(model_path)) >= 255:
|
||||
warnings.warn(f"Path {model_path} is too long, \n please change annotator_ckpts_path in config.yaml")
|
||||
|
||||
if not os.path.exists(model_path):
|
||||
print(f"Failed to find {model_path}.\n Downloading from huggingface.co")
|
||||
print(f"cacher folder is {cache_dir}, you can change it by custom_tmp_path in config.yaml")
|
||||
if use_symlinks:
|
||||
cache_dir_d = constants.HF_HUB_CACHE # use huggingface newer env variables `HF_HUB_CACHE`
|
||||
if cache_dir_d is None:
|
||||
import platform
|
||||
if platform.system() == "Windows":
|
||||
cache_dir_d = Path(os.getenv("USERPROFILE")).joinpath(".cache", "huggingface", "hub").__str__()
|
||||
else:
|
||||
cache_dir_d = os.path.join(os.getenv("HOME"), ".cache", "huggingface", "hub")
|
||||
try:
|
||||
# test_link
|
||||
Path(cache_dir_d).mkdir(parents=True, exist_ok=True)
|
||||
Path(ckpts_dir).mkdir(parents=True, exist_ok=True)
|
||||
(Path(cache_dir_d) / f"linktest_{filename}.txt").touch()
|
||||
# symlink instead of link avoid `invalid cross-device link` error.
|
||||
os.symlink(os.path.join(cache_dir_d, f"linktest_{filename}.txt"), os.path.join(ckpts_dir, f"linktest_{filename}.txt"))
|
||||
print("Using symlinks to download models. \n",\
|
||||
"Make sure you have enough space on your cache folder. \n",\
|
||||
"And do not purge the cache folder after downloading.\n",\
|
||||
"Otherwise, you will have to re-download the models every time you run the script.\n",\
|
||||
"You can use USE_SYMLINKS: False in config.yaml to avoid this behavior.")
|
||||
except:
|
||||
print("Maybe not able to create symlink. Disable using symlinks.")
|
||||
use_symlinks = False
|
||||
cache_dir_d = Path(cache_dir).joinpath("ckpts", pretrained_model_or_path).__str__()
|
||||
finally: # always remove test link files
|
||||
with suppress(FileNotFoundError):
|
||||
os.remove(os.path.join(ckpts_dir, f"linktest_{filename}.txt"))
|
||||
os.remove(os.path.join(cache_dir_d, f"linktest_{filename}.txt"))
|
||||
else:
|
||||
cache_dir_d = os.path.join(cache_dir, "ckpts", pretrained_model_or_path)
|
||||
|
||||
model_path = hf_hub_download(repo_id=pretrained_model_or_path,
|
||||
cache_dir=cache_dir_d,
|
||||
local_dir=local_dir,
|
||||
subfolder=subfolder,
|
||||
filename=filename,
|
||||
local_dir_use_symlinks=use_symlinks,
|
||||
resume_download=True,
|
||||
etag_timeout=100,
|
||||
repo_type=repo_type
|
||||
)
|
||||
if not use_symlinks:
|
||||
try:
|
||||
import shutil
|
||||
shutil.rmtree(os.path.join(cache_dir, "ckpts"))
|
||||
except Exception as e :
|
||||
print(e)
|
||||
|
||||
print(f"model_path is {model_path}")
|
||||
|
||||
return model_path
|
||||
@@ -0,0 +1,250 @@
|
||||
import torch
|
||||
import numpy as np
|
||||
import os
|
||||
import cv2
|
||||
import yaml
|
||||
from pathlib import Path
|
||||
from enum import Enum
|
||||
from .log import log
|
||||
import subprocess
|
||||
import threading
|
||||
import comfy
|
||||
import tempfile
|
||||
|
||||
here = Path(__file__).parent.resolve()
|
||||
|
||||
config_path = Path(here, "config.yaml")
|
||||
|
||||
if os.path.exists(config_path):
|
||||
config = yaml.load(open(config_path, "r"), Loader=yaml.FullLoader)
|
||||
|
||||
annotator_ckpts_path = str(Path(here, config["annotator_ckpts_path"]))
|
||||
TEMP_DIR = config["custom_temp_path"]
|
||||
USE_SYMLINKS = config["USE_SYMLINKS"]
|
||||
ORT_PROVIDERS = config["EP_list"]
|
||||
|
||||
if USE_SYMLINKS is None or type(USE_SYMLINKS) != bool:
|
||||
log.error("USE_SYMLINKS must be a boolean. Using False by default.")
|
||||
USE_SYMLINKS = False
|
||||
|
||||
if TEMP_DIR is None:
|
||||
TEMP_DIR = tempfile.gettempdir()
|
||||
elif not os.path.isdir(TEMP_DIR):
|
||||
try:
|
||||
os.makedirs(TEMP_DIR)
|
||||
except:
|
||||
log.error("Failed to create custom temp directory. Using default.")
|
||||
TEMP_DIR = tempfile.gettempdir()
|
||||
|
||||
if not os.path.isdir(annotator_ckpts_path):
|
||||
try:
|
||||
os.makedirs(annotator_ckpts_path)
|
||||
except:
|
||||
log.error("Failed to create config ckpts directory. Using default.")
|
||||
annotator_ckpts_path = str(Path(here, "./ckpts"))
|
||||
else:
|
||||
annotator_ckpts_path = str(Path(here, "./ckpts"))
|
||||
TEMP_DIR = tempfile.gettempdir()
|
||||
USE_SYMLINKS = False
|
||||
ORT_PROVIDERS = ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "MIGraphXExecutionProvider", "CPUExecutionProvider", "CoreMLExecutionProvider"]
|
||||
|
||||
os.environ['AUX_ANNOTATOR_CKPTS_PATH'] = os.getenv('AUX_ANNOTATOR_CKPTS_PATH', annotator_ckpts_path)
|
||||
os.environ['AUX_TEMP_DIR'] = os.getenv('AUX_TEMP_DIR', str(TEMP_DIR))
|
||||
os.environ['AUX_USE_SYMLINKS'] = os.getenv('AUX_USE_SYMLINKS', str(USE_SYMLINKS))
|
||||
os.environ['AUX_ORT_PROVIDERS'] = os.getenv('AUX_ORT_PROVIDERS', str(",".join(ORT_PROVIDERS)))
|
||||
|
||||
log.info(f"Using ckpts path: {annotator_ckpts_path}")
|
||||
log.info(f"Using symlinks: {USE_SYMLINKS}")
|
||||
log.info(f"Using ort providers: {ORT_PROVIDERS}")
|
||||
|
||||
# Sync with theoritical limit from Comfy base
|
||||
# https://github.com/comfyanonymous/ComfyUI/blob/eecd69b53a896343775bcb02a4f8349e7442ffd1/nodes.py#L45
|
||||
MAX_RESOLUTION=16384
|
||||
|
||||
def common_annotator_call(model, tensor_image, input_batch=False, show_pbar=True, **kwargs):
|
||||
if "detect_resolution" in kwargs:
|
||||
del kwargs["detect_resolution"] #Prevent weird case?
|
||||
|
||||
if "resolution" in kwargs:
|
||||
detect_resolution = kwargs["resolution"] if type(kwargs["resolution"]) == int and kwargs["resolution"] >= 64 else 512
|
||||
del kwargs["resolution"]
|
||||
else:
|
||||
detect_resolution = 512
|
||||
|
||||
if input_batch:
|
||||
np_images = np.asarray(tensor_image * 255., dtype=np.uint8)
|
||||
np_results = model(np_images, output_type="np", detect_resolution=detect_resolution, **kwargs)
|
||||
return torch.from_numpy(np_results.astype(np.float32) / 255.0)
|
||||
|
||||
batch_size = tensor_image.shape[0]
|
||||
if show_pbar:
|
||||
pbar = comfy.utils.ProgressBar(batch_size)
|
||||
out_tensor = None
|
||||
for i, image in enumerate(tensor_image):
|
||||
np_image = np.asarray(image.cpu() * 255., dtype=np.uint8)
|
||||
np_result = model(np_image, output_type="np", detect_resolution=detect_resolution, **kwargs)
|
||||
out = torch.from_numpy(np_result.astype(np.float32) / 255.0)
|
||||
if out_tensor is None:
|
||||
out_tensor = torch.zeros(batch_size, *out.shape, dtype=torch.float32)
|
||||
out_tensor[i] = out
|
||||
if show_pbar:
|
||||
pbar.update(1)
|
||||
return out_tensor
|
||||
|
||||
def define_preprocessor_inputs(**arguments):
|
||||
return dict(
|
||||
required=dict(image=INPUT.IMAGE()),
|
||||
optional=arguments
|
||||
)
|
||||
|
||||
class INPUT(Enum):
|
||||
def IMAGE():
|
||||
return ("IMAGE",)
|
||||
def LATENT():
|
||||
return ("LATENT",)
|
||||
def MASK():
|
||||
return ("MASK",)
|
||||
def SEED(default=0):
|
||||
return ("INT", dict(default=default, min=0, max=0xffffffffffffffff))
|
||||
def RESOLUTION(default=512, min=64, max=MAX_RESOLUTION, step=64):
|
||||
return ("INT", dict(default=default, min=min, max=max, step=step))
|
||||
def INT(default=0, min=0, max=MAX_RESOLUTION, step=1):
|
||||
return ("INT", dict(default=default, min=min, max=max, step=step))
|
||||
def FLOAT(default=0, min=0, max=1, step=0.01):
|
||||
return ("FLOAT", dict(default=default, min=min, max=max, step=step))
|
||||
def STRING(default='', multiline=False):
|
||||
return ("STRING", dict(default=default, multiline=multiline))
|
||||
def COMBO(values, default=None):
|
||||
return (values, dict(default=values[0] if default is None else default))
|
||||
def BOOLEAN(default=True):
|
||||
return ("BOOLEAN", dict(default=default))
|
||||
|
||||
|
||||
|
||||
class ResizeMode(Enum):
|
||||
"""
|
||||
Resize modes for ControlNet input images.
|
||||
"""
|
||||
|
||||
RESIZE = "Just Resize"
|
||||
INNER_FIT = "Crop and Resize"
|
||||
OUTER_FIT = "Resize and Fill"
|
||||
|
||||
def int_value(self):
|
||||
if self == ResizeMode.RESIZE:
|
||||
return 0
|
||||
elif self == ResizeMode.INNER_FIT:
|
||||
return 1
|
||||
elif self == ResizeMode.OUTER_FIT:
|
||||
return 2
|
||||
assert False, "NOTREACHED"
|
||||
|
||||
#https://github.com/Mikubill/sd-webui-controlnet/blob/e67e017731aad05796b9615dc6eadce911298ea1/internal_controlnet/external_code.py#L89
|
||||
#Replaced logger with internal log
|
||||
def pixel_perfect_resolution(
|
||||
image: np.ndarray,
|
||||
target_H: int,
|
||||
target_W: int,
|
||||
resize_mode: ResizeMode,
|
||||
) -> int:
|
||||
"""
|
||||
Calculate the estimated resolution for resizing an image while preserving aspect ratio.
|
||||
|
||||
The function first calculates scaling factors for height and width of the image based on the target
|
||||
height and width. Then, based on the chosen resize mode, it either takes the smaller or the larger
|
||||
scaling factor to estimate the new resolution.
|
||||
|
||||
If the resize mode is OUTER_FIT, the function uses the smaller scaling factor, ensuring the whole image
|
||||
fits within the target dimensions, potentially leaving some empty space.
|
||||
|
||||
If the resize mode is not OUTER_FIT, the function uses the larger scaling factor, ensuring the target
|
||||
dimensions are fully filled, potentially cropping the image.
|
||||
|
||||
After calculating the estimated resolution, the function prints some debugging information.
|
||||
|
||||
Args:
|
||||
image (np.ndarray): A 3D numpy array representing an image. The dimensions represent [height, width, channels].
|
||||
target_H (int): The target height for the image.
|
||||
target_W (int): The target width for the image.
|
||||
resize_mode (ResizeMode): The mode for resizing.
|
||||
|
||||
Returns:
|
||||
int: The estimated resolution after resizing.
|
||||
"""
|
||||
raw_H, raw_W, _ = image.shape
|
||||
|
||||
k0 = float(target_H) / float(raw_H)
|
||||
k1 = float(target_W) / float(raw_W)
|
||||
|
||||
if resize_mode == ResizeMode.OUTER_FIT:
|
||||
estimation = min(k0, k1) * float(min(raw_H, raw_W))
|
||||
else:
|
||||
estimation = max(k0, k1) * float(min(raw_H, raw_W))
|
||||
|
||||
log.debug(f"Pixel Perfect Computation:")
|
||||
log.debug(f"resize_mode = {resize_mode}")
|
||||
log.debug(f"raw_H = {raw_H}")
|
||||
log.debug(f"raw_W = {raw_W}")
|
||||
log.debug(f"target_H = {target_H}")
|
||||
log.debug(f"target_W = {target_W}")
|
||||
log.debug(f"estimation = {estimation}")
|
||||
|
||||
return int(np.round(estimation))
|
||||
|
||||
#https://github.com/Mikubill/sd-webui-controlnet/blob/e67e017731aad05796b9615dc6eadce911298ea1/scripts/controlnet.py#L404
|
||||
def safe_numpy(x):
|
||||
# A very safe method to make sure that Apple/Mac works
|
||||
y = x
|
||||
|
||||
# below is very boring but do not change these. If you change these Apple or Mac may fail.
|
||||
y = y.copy()
|
||||
y = np.ascontiguousarray(y)
|
||||
y = y.copy()
|
||||
return y
|
||||
|
||||
#https://github.com/Mikubill/sd-webui-controlnet/blob/e67e017731aad05796b9615dc6eadce911298ea1/scripts/utils.py#L140
|
||||
def get_unique_axis0(data):
|
||||
arr = np.asanyarray(data)
|
||||
idxs = np.lexsort(arr.T)
|
||||
arr = arr[idxs]
|
||||
unique_idxs = np.empty(len(arr), dtype=np.bool_)
|
||||
unique_idxs[:1] = True
|
||||
unique_idxs[1:] = np.any(arr[:-1, :] != arr[1:, :], axis=-1)
|
||||
return arr[unique_idxs]
|
||||
|
||||
#Ref: https://github.com/ltdrdata/ComfyUI-Manager/blob/284e90dc8296a2e1e4f14b4b2d10fba2f52f0e53/__init__.py#L14
|
||||
def handle_stream(stream, prefix):
|
||||
for line in stream:
|
||||
print(prefix, line, end="")
|
||||
|
||||
|
||||
def run_script(cmd, cwd='.'):
|
||||
process = subprocess.Popen(cmd, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, bufsize=1)
|
||||
|
||||
stdout_thread = threading.Thread(target=handle_stream, args=(process.stdout, ""))
|
||||
stderr_thread = threading.Thread(target=handle_stream, args=(process.stderr, "[!]"))
|
||||
|
||||
stdout_thread.start()
|
||||
stderr_thread.start()
|
||||
|
||||
stdout_thread.join()
|
||||
stderr_thread.join()
|
||||
|
||||
return process.wait()
|
||||
|
||||
def nms(x, t, s):
|
||||
x = cv2.GaussianBlur(x.astype(np.float32), (0, 0), s)
|
||||
|
||||
f1 = np.array([[0, 0, 0], [1, 1, 1], [0, 0, 0]], dtype=np.uint8)
|
||||
f2 = np.array([[0, 1, 0], [0, 1, 0], [0, 1, 0]], dtype=np.uint8)
|
||||
f3 = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]], dtype=np.uint8)
|
||||
f4 = np.array([[0, 0, 1], [0, 1, 0], [1, 0, 0]], dtype=np.uint8)
|
||||
|
||||
y = np.zeros_like(x)
|
||||
|
||||
for f in [f1, f2, f3, f4]:
|
||||
np.putmask(y, cv2.dilate(x, kernel=f) == x, x)
|
||||
|
||||
z = np.zeros_like(y, dtype=np.uint8)
|
||||
z[y > t] = 255
|
||||
return z
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
52bb58d307242a34103998ef1da8007e47501d5b refs/tags/v1.36.12
|
||||
@@ -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,84 @@
|
||||
import { LGraphCanvas, LiteGraph } from '@/lib/litegraph/src/litegraph'
|
||||
import { LGraphNode } from '@/lib/litegraph/src/litegraph'
|
||||
|
||||
import { app } from '../../scripts/app'
|
||||
import { ComfyWidgets } from '../../scripts/widgets'
|
||||
|
||||
// Node that add notes to your project
|
||||
|
||||
app.registerExtension({
|
||||
name: 'Comfy.NoteNode',
|
||||
registerCustomNodes() {
|
||||
class NoteNode extends LGraphNode {
|
||||
static override category: string
|
||||
static collapsable: boolean
|
||||
static title_mode: number
|
||||
|
||||
groupcolor = LGraphCanvas.node_colors.yellow.groupcolor
|
||||
override isVirtualNode: boolean
|
||||
|
||||
constructor(title: string) {
|
||||
super(title)
|
||||
|
||||
this.color = LGraphCanvas.node_colors.yellow.color
|
||||
this.bgcolor = LGraphCanvas.node_colors.yellow.bgcolor
|
||||
|
||||
if (!this.properties) {
|
||||
this.properties = { text: '' }
|
||||
}
|
||||
ComfyWidgets.STRING(
|
||||
this,
|
||||
'text',
|
||||
['STRING', { default: this.properties.text, multiline: true }],
|
||||
app
|
||||
)
|
||||
|
||||
this.serialize_widgets = true
|
||||
this.isVirtualNode = true
|
||||
}
|
||||
}
|
||||
|
||||
// Load default visibility
|
||||
|
||||
LiteGraph.registerNodeType(
|
||||
'Note',
|
||||
Object.assign(NoteNode, {
|
||||
title_mode: LiteGraph.NORMAL_TITLE,
|
||||
title: 'Note',
|
||||
collapsable: true
|
||||
})
|
||||
)
|
||||
|
||||
NoteNode.category = 'utils'
|
||||
|
||||
/** Markdown variant of NoteNode */
|
||||
class MarkdownNoteNode extends LGraphNode {
|
||||
static override title = 'Markdown Note'
|
||||
|
||||
groupcolor = LGraphCanvas.node_colors.yellow.groupcolor
|
||||
|
||||
constructor(title: string) {
|
||||
super(title)
|
||||
|
||||
this.color = LGraphCanvas.node_colors.yellow.color
|
||||
this.bgcolor = LGraphCanvas.node_colors.yellow.bgcolor
|
||||
|
||||
if (!this.properties) {
|
||||
this.properties = { text: '' }
|
||||
}
|
||||
ComfyWidgets.MARKDOWN(
|
||||
this,
|
||||
'text',
|
||||
['STRING', { default: this.properties.text }],
|
||||
app
|
||||
)
|
||||
|
||||
this.serialize_widgets = true
|
||||
this.isVirtualNode = true
|
||||
}
|
||||
}
|
||||
|
||||
LiteGraph.registerNodeType('MarkdownNote', MarkdownNoteNode)
|
||||
MarkdownNoteNode.category = 'utils'
|
||||
}
|
||||
})
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,150 @@
|
||||
import type {
|
||||
ExecutableLGraphNode,
|
||||
ExecutionId,
|
||||
LGraph
|
||||
} from '@/lib/litegraph/src/litegraph'
|
||||
import {
|
||||
ExecutableNodeDTO,
|
||||
LGraphEventMode
|
||||
} from '@/lib/litegraph/src/litegraph'
|
||||
import type {
|
||||
ComfyApiWorkflow,
|
||||
ComfyWorkflowJSON
|
||||
} from '@/platform/workflow/validation/schemas/workflowSchema'
|
||||
|
||||
import { ExecutableGroupNodeDTO, isGroupNode } from './executableGroupNodeDto'
|
||||
import { compressWidgetInputSlots } from './litegraphUtil'
|
||||
|
||||
/**
|
||||
* Converts the current graph workflow for sending to the API.
|
||||
* @note Node widgets are updated before serialization to prepare queueing.
|
||||
*
|
||||
* @param graph The graph to convert.
|
||||
* @param options The options for the conversion.
|
||||
* - `sortNodes`: Whether to sort the nodes by execution order.
|
||||
* @returns The workflow and node links
|
||||
*/
|
||||
export const graphToPrompt = async (
|
||||
graph: LGraph,
|
||||
options: { sortNodes?: boolean } = {}
|
||||
): Promise<{ workflow: ComfyWorkflowJSON; output: ComfyApiWorkflow }> => {
|
||||
const { sortNodes = false } = options
|
||||
|
||||
for (const node of graph.computeExecutionOrder(false)) {
|
||||
const innerNodes = node.getInnerNodes
|
||||
? node.getInnerNodes(new Map())
|
||||
: [node]
|
||||
for (const innerNode of innerNodes) {
|
||||
if (innerNode.isVirtualNode) {
|
||||
innerNode.applyToGraph?.()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const workflow = graph.serialize({ sortNodes })
|
||||
|
||||
// Remove localized_name from the workflow
|
||||
for (const node of workflow.nodes) {
|
||||
for (const slot of node.inputs ?? []) {
|
||||
delete slot.localized_name
|
||||
}
|
||||
for (const slot of node.outputs ?? []) {
|
||||
delete slot.localized_name
|
||||
}
|
||||
}
|
||||
|
||||
compressWidgetInputSlots(workflow)
|
||||
workflow.extra ??= {}
|
||||
workflow.extra.frontendVersion = __COMFYUI_FRONTEND_VERSION__
|
||||
|
||||
const nodeDtoMap = new Map<ExecutionId, ExecutableLGraphNode>()
|
||||
for (const node of graph.computeExecutionOrder(false)) {
|
||||
const dto: ExecutableLGraphNode = isGroupNode(node)
|
||||
? new ExecutableGroupNodeDTO(node, [], nodeDtoMap)
|
||||
: new ExecutableNodeDTO(node, [], nodeDtoMap)
|
||||
|
||||
for (const innerNode of dto.getInnerNodes()) {
|
||||
nodeDtoMap.set(innerNode.id, innerNode)
|
||||
}
|
||||
|
||||
nodeDtoMap.set(dto.id, dto)
|
||||
}
|
||||
|
||||
const output: ComfyApiWorkflow = {}
|
||||
// Process nodes in order of execution
|
||||
for (const node of nodeDtoMap.values()) {
|
||||
// Don't serialize muted nodes
|
||||
if (
|
||||
node.isVirtualNode ||
|
||||
node.mode === LGraphEventMode.NEVER ||
|
||||
node.mode === LGraphEventMode.BYPASS
|
||||
) {
|
||||
continue
|
||||
}
|
||||
|
||||
const inputs: ComfyApiWorkflow[string]['inputs'] = {}
|
||||
const { widgets } = node
|
||||
|
||||
// Store all widget values
|
||||
if (widgets) {
|
||||
for (const [i, widget] of widgets.entries()) {
|
||||
if (!widget.name || widget.options?.serialize === false) continue
|
||||
|
||||
const widgetValue = widget.serializeValue
|
||||
? await widget.serializeValue(node, i)
|
||||
: widget.value
|
||||
// By default, Array values are reserved to represent node connections.
|
||||
// We need to wrap the array as an object to avoid the misinterpretation
|
||||
// of the array as a node connection.
|
||||
// The backend automatically unwraps the object to an array during
|
||||
// execution.
|
||||
inputs[widget.name] = Array.isArray(widgetValue)
|
||||
? {
|
||||
__value__: widgetValue
|
||||
}
|
||||
: widgetValue
|
||||
}
|
||||
}
|
||||
|
||||
// Store all node links
|
||||
for (const [i, input] of node.inputs.entries()) {
|
||||
const resolvedInput = node.resolveInput(i)
|
||||
if (!resolvedInput) continue
|
||||
|
||||
// Resolved to an actual widget value rather than a node connection
|
||||
if (resolvedInput.widgetInfo) {
|
||||
const { value } = resolvedInput.widgetInfo
|
||||
inputs[input.name] = Array.isArray(value) ? { __value__: value } : value
|
||||
continue
|
||||
}
|
||||
|
||||
inputs[input.name] = [
|
||||
String(resolvedInput.origin_id),
|
||||
// @ts-expect-error link.origin_slot is already number.
|
||||
parseInt(resolvedInput.origin_slot)
|
||||
]
|
||||
}
|
||||
|
||||
output[String(node.id)] = {
|
||||
inputs,
|
||||
// TODO(huchenlei): Filter out all nodes that cannot be mapped to a
|
||||
// comfyClass.
|
||||
class_type: node.comfyClass!,
|
||||
// Ignored by the backend.
|
||||
_meta: {
|
||||
title: node.title
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Remove inputs connected to removed nodes
|
||||
for (const { inputs } of Object.values(output)) {
|
||||
for (const [i, input] of Object.entries(inputs)) {
|
||||
if (Array.isArray(input) && input.length === 2 && !output[input[0]]) {
|
||||
delete inputs[i]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return { workflow: workflow as ComfyWorkflowJSON, output }
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
[
|
||||
{
|
||||
"repo": "Fannovel16/comfyui_controlnet_aux",
|
||||
"id": "dw",
|
||||
"revision": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"installed": false
|
||||
},
|
||||
{
|
||||
"repo": "Comfy-Org/ComfyUI_frontend",
|
||||
"id": "frontend",
|
||||
"revision": "v1.36.12",
|
||||
"commit": "52bb58d307242a34103998ef1da8007e47501d5b",
|
||||
"installed": false
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"version": "1.7.9",
|
||||
"package_sha256": "ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"git_commit_binding": "unknown",
|
||||
"installed": false
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,181 @@
|
||||
{
|
||||
"sources": [
|
||||
{
|
||||
"id": "dw",
|
||||
"file": "LICENSE.txt",
|
||||
"local_file": "dw__LICENSE.txt",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/LICENSE.txt",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
|
||||
},
|
||||
{
|
||||
"id": "dw",
|
||||
"file": "__init__.py",
|
||||
"local_file": "dw____init__.py",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/__init__.py",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "9a5786ef9569223acd235676c08297aff78b2de1e46ab69c96665222b8c2a4b4"
|
||||
},
|
||||
{
|
||||
"id": "dw",
|
||||
"file": "node_wrappers/dwpose.py",
|
||||
"local_file": "dw__node_wrappers__dwpose.py",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/node_wrappers/dwpose.py",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "0d357a3960a01faeeb1cd921c99166a2fa4d2efd3736a73624565f3e1849465f"
|
||||
},
|
||||
{
|
||||
"id": "dw",
|
||||
"file": "utils.py",
|
||||
"local_file": "dw__utils.py",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/utils.py",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "6883c2f1cd912c3d53419dfaa460f904056033db920a36c39a276284bfc994a5"
|
||||
},
|
||||
{
|
||||
"id": "dw",
|
||||
"file": "src/custom_controlnet_aux/dwpose/__init__.py",
|
||||
"local_file": "dw__src__custom_controlnet_aux__dwpose____init__.py",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/__init__.py",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "11733916809df84a53cfe98c3a2a448ab953f085b89280860cfffa053201cae3"
|
||||
},
|
||||
{
|
||||
"id": "dw",
|
||||
"file": "src/custom_controlnet_aux/dwpose/wholebody.py",
|
||||
"local_file": "dw__src__custom_controlnet_aux__dwpose__wholebody.py",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/wholebody.py",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "89c871f4aed3440c2bafcf4987e79ffeed15fb28031951c36b7614374fd9df0f"
|
||||
},
|
||||
{
|
||||
"id": "dw",
|
||||
"file": "src/custom_controlnet_aux/dwpose/util.py",
|
||||
"local_file": "dw__src__custom_controlnet_aux__dwpose__util.py",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/dwpose/util.py",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "e6050a00f0cd2173e37f1da41a7f9ad3ea5cd57d73388bcd0e91cf0e393d5d3c"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"file": "LICENSE",
|
||||
"local_file": "frontend__LICENSE",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/LICENSE",
|
||||
"commit": "52bb58d307242a34103998ef1da8007e47501d5b",
|
||||
"sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986"
|
||||
},
|
||||
{
|
||||
"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/52bb58d307242a34103998ef1da8007e47501d5b/src/lib/litegraph/src/LGraphNode.ts",
|
||||
"commit": "52bb58d307242a34103998ef1da8007e47501d5b",
|
||||
"sha256": "ce4078003ea69ec804d8f4c5e6ca021a952c05c299a3dab6c20f7e4123b8619f"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"file": "src/utils/executionUtil.ts",
|
||||
"local_file": "frontend__src__utils__executionUtil.ts",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/src/utils/executionUtil.ts",
|
||||
"commit": "52bb58d307242a34103998ef1da8007e47501d5b",
|
||||
"sha256": "4e51bc54e35cb7ac9bb7cba418a74ccdd5974f640b9b088aa4ae7668f746ab36"
|
||||
},
|
||||
{
|
||||
"id": "frontend",
|
||||
"file": "src/extensions/core/noteNode.ts",
|
||||
"local_file": "frontend__src__extensions__core__noteNode.ts",
|
||||
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/52bb58d307242a34103998ef1da8007e47501d5b/src/extensions/core/noteNode.ts",
|
||||
"commit": "52bb58d307242a34103998ef1da8007e47501d5b",
|
||||
"sha256": "1014f719e3d67d9c5183a5e8631d4c2d6581dfe67083f32eb23774ec3074bef2"
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"file": "LICENSE",
|
||||
"local_file": "vhs__LICENSE",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
|
||||
"git_commit_binding": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"file": "__init__.py",
|
||||
"local_file": "vhs____init__.py",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "d3e74626bfdd628d0e96b190b2c07e25fa1e5ee9f1f402c7c650446f86b0838f",
|
||||
"git_commit_binding": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"file": "pyproject.toml",
|
||||
"local_file": "vhs__pyproject.toml",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "299e28c3c62ec7580003132bef62e58c01fa817eff6db5a51c9f5b9e1737160a",
|
||||
"git_commit_binding": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/nodes.py",
|
||||
"local_file": "vhs__videohelpersuite__nodes.py",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442",
|
||||
"git_commit_binding": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/load_video_nodes.py",
|
||||
"local_file": "vhs__videohelpersuite__load_video_nodes.py",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee",
|
||||
"git_commit_binding": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"file": "videohelpersuite/utils.py",
|
||||
"local_file": "vhs__videohelpersuite__utils.py",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a",
|
||||
"git_commit_binding": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"file": "video_formats/h264-mp4.json",
|
||||
"local_file": "vhs__video_formats__h264-mp4.json",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8",
|
||||
"git_commit_binding": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"file": "web/js/VHS.core.js",
|
||||
"local_file": "vhs__web__js__VHS.core.js",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f",
|
||||
"git_commit_binding": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "vhs",
|
||||
"file": "web/js/videoinfo.js",
|
||||
"local_file": "vhs__web__js__videoinfo.js",
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"sha256": "29db4800fe2b86303619bd1768b97aabdad0fe300db93da7135bdffa43f07970",
|
||||
"git_commit_binding": "unknown"
|
||||
},
|
||||
{
|
||||
"id": "dw",
|
||||
"file": "src/custom_controlnet_aux/util.py",
|
||||
"local_file": "dw__src__custom_controlnet_aux__util.py",
|
||||
"url": "https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/136f125c89aed92ced1b6fbb491e13719b72fcc0/src/custom_controlnet_aux/util.py",
|
||||
"commit": "136f125c89aed92ced1b6fbb491e13719b72fcc0",
|
||||
"sha256": "956ff6eb649148c98e68591824e9d029be527ea8f52eb1841b1b1c9f18f37b34"
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,188 @@
|
||||
{
|
||||
"url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip",
|
||||
"sha256": "ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8",
|
||||
"members": [
|
||||
{
|
||||
"file": ".github/workflows/publish.yml",
|
||||
"sha256": "1faa29b17a3bac2e2d6b6e001bfdfc03d9950d186e4ecf1c26d0a0d5948de73b"
|
||||
},
|
||||
{
|
||||
"file": ".gitignore",
|
||||
"sha256": "9a2d340506c5bfc8a9272424e3d502c0093d7b48a1146459c4b9442a9f4474f7"
|
||||
},
|
||||
{
|
||||
"file": "LICENSE",
|
||||
"sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986"
|
||||
},
|
||||
{
|
||||
"file": "README.md",
|
||||
"sha256": "3bc23811a88c62bf188e584b2f6b75b9d88e5ceeb1a24f66684555ef07bef6bc"
|
||||
},
|
||||
{
|
||||
"file": "__init__.py",
|
||||
"sha256": "d3e74626bfdd628d0e96b190b2c07e25fa1e5ee9f1f402c7c650446f86b0838f"
|
||||
},
|
||||
{
|
||||
"file": "pyproject.toml",
|
||||
"sha256": "299e28c3c62ec7580003132bef62e58c01fa817eff6db5a51c9f5b9e1737160a"
|
||||
},
|
||||
{
|
||||
"file": "requirements.txt",
|
||||
"sha256": "dbf7158d81418ace41097db503440bb70f41b6250d5d0b3ab3b3c86271b7b2a3"
|
||||
},
|
||||
{
|
||||
"file": "testframework/README.md",
|
||||
"sha256": "0591f3ea7557f7893618016d9c10824e2c67ea61b14d20946a081ed204f3e083"
|
||||
},
|
||||
{
|
||||
"file": "testframework/__init__.py",
|
||||
"sha256": "62512d3505004d4d264fd10ab02634b69dc8074a87f87896cce33802d1fc878c"
|
||||
},
|
||||
{
|
||||
"file": "testframework/server.py",
|
||||
"sha256": "bc24382424b1409edf25b637beb4a698ce1476b68189d2cac3a019a4a76e8045"
|
||||
},
|
||||
{
|
||||
"file": "testframework/web/js/testRunner.js",
|
||||
"sha256": "1f8aa0a3411204363ed86f6df27f8620a8630227986cd73bfe7b7d70d8a5514f"
|
||||
},
|
||||
{
|
||||
"file": "tests/README.md",
|
||||
"sha256": "f067ce90b2c1bcd04f19db3cd38b24757040ec0d07945ac493f318f5e45a32af"
|
||||
},
|
||||
{
|
||||
"file": "tests/audio.json",
|
||||
"sha256": "acb0c5d03c19b0d7d930a4fc2e5eed310c0eeac2e53523c877178d14b846f48e"
|
||||
},
|
||||
{
|
||||
"file": "tests/batch4x4.json",
|
||||
"sha256": "c9a9896b34b644c95849a4fc993c837b3cd3aab49fcf1589c89d225e4d931383"
|
||||
},
|
||||
{
|
||||
"file": "tests/converted-format-input.json",
|
||||
"sha256": "0c1e2879da768fcbd9b95b0bee4259e38bd6ec1f7866115d3cc956d48f97b729"
|
||||
},
|
||||
{
|
||||
"file": "tests/converted-input.json",
|
||||
"sha256": "9d1c38b3c6db83a0cac1f728d6a8394e369706c3cf77a4f61dc344398ccb9158"
|
||||
},
|
||||
{
|
||||
"file": "tests/loop.json",
|
||||
"sha256": "32e3b1317dcfa0127a667377f77a9bd0d06f1004668bc7dbeaa6d2a32018a3bd"
|
||||
},
|
||||
{
|
||||
"file": "tests/old-prores.json",
|
||||
"sha256": "0bba95e48d0c649f96ab100cc84f0f27f5644c7d617a57fb6184eb6e2adc30a1"
|
||||
},
|
||||
{
|
||||
"file": "tests/old-vae-conversion.json",
|
||||
"sha256": "58f369cedc6ccff64e08ce675f1599b6d4f0e47eb4c36a8e3c88db85fe137884"
|
||||
},
|
||||
{
|
||||
"file": "tests/simple.json",
|
||||
"sha256": "3f4f0efd1db24db2b47ba81d279c6e0d0bc07ed3ac043095ac0e9475ad9dc4f4"
|
||||
},
|
||||
{
|
||||
"file": "video_formats/16bit-png.json",
|
||||
"sha256": "a6be0eb5d81375b4d5b02b36610aef14e1738aa212ccfb22f8353ca2e2c4ad86"
|
||||
},
|
||||
{
|
||||
"file": "video_formats/8bit-png.json",
|
||||
"sha256": "a7a133243e6c6de1b7016909ee78d61ac1ea26dc0bf064d6fb1a243a731a1c82"
|
||||
},
|
||||
{
|
||||
"file": "video_formats/ProRes.json",
|
||||
"sha256": "781d0128a79edf0474de19c48ab5ebc128f2e022533c68435266150eb82ee2c0"
|
||||
},
|
||||
{
|
||||
"file": "video_formats/av1-webm.json",
|
||||
"sha256": "3d94f848cada030ff738715997fb7503f39f69cdb9850452581c8896b951087e"
|
||||
},
|
||||
{
|
||||
"file": "video_formats/ffmpeg-gif.json",
|
||||
"sha256": "ff56425b7520b106310fa12022ff7fc26becbc202cc822c899e159351033abb7"
|
||||
},
|
||||
{
|
||||
"file": "video_formats/ffv1-mkv.json",
|
||||
"sha256": "6a19aeb65c5789145d60340e98aaa4d8426d61261a35ca87356c28f889f201a2"
|
||||
},
|
||||
{
|
||||
"file": "video_formats/gifski.json",
|
||||
"sha256": "1e939f3df9a1ba029cd20db86da9bf998ba835ff828f7d7428ea990e7ad1439e"
|
||||
},
|
||||
{
|
||||
"file": "video_formats/h264-mp4.json",
|
||||
"sha256": "736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8"
|
||||
},
|
||||
{
|
||||
"file": "video_formats/h265-mp4.json",
|
||||
"sha256": "e2a72bdcfcbf07e73e146716e89e0182ea4bb249530758d586e91ed45da6393c"
|
||||
},
|
||||
{
|
||||
"file": "video_formats/nvenc_av1-mp4.json",
|
||||
"sha256": "dffe86c90af9ca37729b510f824f36791356f5acf5747a323da619d9cb2f2d11"
|
||||
},
|
||||
{
|
||||
"file": "video_formats/nvenc_h264-mp4.json",
|
||||
"sha256": "c93c8a0f2549e20f9f2d746052d633eeaa00187734571a4e327e0672112069dd"
|
||||
},
|
||||
{
|
||||
"file": "video_formats/nvenc_hevc-mp4.json",
|
||||
"sha256": "3a6ad85bc69bd35f7888ee44d3d9e5076138443a7b8dfae6a4267f2236676e31"
|
||||
},
|
||||
{
|
||||
"file": "video_formats/webm.json",
|
||||
"sha256": "04a0c5ac4a14d73baae933e230b37257857214c31492adc2b990f8009892379d"
|
||||
},
|
||||
{
|
||||
"file": "videohelpersuite/batched_nodes.py",
|
||||
"sha256": "c822651e28c775a35da1441e2b1b2d7cd664fcc6649ba9d2c9b87faa8ac00edb"
|
||||
},
|
||||
{
|
||||
"file": "videohelpersuite/documentation.py",
|
||||
"sha256": "0d648daf98831545ee33f50a53ead7f12779d6630b1a001f7d9ea8418b4d90e0"
|
||||
},
|
||||
{
|
||||
"file": "videohelpersuite/image_latent_nodes.py",
|
||||
"sha256": "da2abefefef8d44d1a927417866205149cb85dc6a41cab7f542bd332e96d5390"
|
||||
},
|
||||
{
|
||||
"file": "videohelpersuite/latent_preview.py",
|
||||
"sha256": "3dc18cba8bc44614db45547258c8800b0b61fb566b4af706cf0306ef45b8c5f0"
|
||||
},
|
||||
{
|
||||
"file": "videohelpersuite/load_images_nodes.py",
|
||||
"sha256": "275fa08acf4ee3163c6d403abea5ef7d088b0a6afbd705d9b0d55623818ffdc4"
|
||||
},
|
||||
{
|
||||
"file": "videohelpersuite/load_video_nodes.py",
|
||||
"sha256": "8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee"
|
||||
},
|
||||
{
|
||||
"file": "videohelpersuite/logger.py",
|
||||
"sha256": "2e2e9ed679410a170346c572a867d9a654327388ba6ea6a242215c590772e668"
|
||||
},
|
||||
{
|
||||
"file": "videohelpersuite/nodes.py",
|
||||
"sha256": "6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442"
|
||||
},
|
||||
{
|
||||
"file": "videohelpersuite/server.py",
|
||||
"sha256": "7f6831f3095c09a0c8076b8676c2bdf966cbb3ed2884b58da6e571e989b806fc"
|
||||
},
|
||||
{
|
||||
"file": "videohelpersuite/utils.py",
|
||||
"sha256": "ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a"
|
||||
},
|
||||
{
|
||||
"file": "web/js/VHS.core.js",
|
||||
"sha256": "437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f"
|
||||
},
|
||||
{
|
||||
"file": "web/js/videoinfo.js",
|
||||
"sha256": "29db4800fe2b86303619bd1768b97aabdad0fe300db93da7135bdffa43f07970"
|
||||
}
|
||||
],
|
||||
"git_commit_binding": "unknown",
|
||||
"note": "发布包同字节不等于提交绑定"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"changelog":"","createdAt":"2025-12-17T22:23:57.624918Z","dependencies":["opencv-python","imageio-ffmpeg"],"deprecated":false,"downloadUrl":"https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip","id":"3648b457-5781-42f0-ae74-bf01a98c28cf","node_id":"comfyui-videohelpersuite","status":"NodeVersionStatusActive","supported_accelerators":[],"supported_comfyui_frontend_version":"","supported_comfyui_version":"","supported_os":[],"tags":[],"version":"1.7.9"}
|
||||
@@ -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 @@
|
||||
[project]
|
||||
name = "comfyui-videohelpersuite"
|
||||
description = "Nodes related to video workflows"
|
||||
version = "1.7.9"
|
||||
license = { file = "LICENSE" }
|
||||
dependencies = ["opencv-python", "imageio-ffmpeg"]
|
||||
|
||||
[project.urls]
|
||||
Repository = "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite"
|
||||
|
||||
# Used by Comfy Registry https://comfyregistry.org
|
||||
[tool.comfy]
|
||||
PublisherId = "kosinkadink"
|
||||
DisplayName = "ComfyUI-VideoHelperSuite"
|
||||
Icon = ""
|
||||
@@ -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"],
|
||||
"save_metadata": ["save_metadata", "BOOLEAN", {"default": true}],
|
||||
"trim_to_audio": ["trim_to_audio", "BOOLEAN", {"default": false}],
|
||||
"extension": "mp4"
|
||||
}
|
||||
@@ -0,0 +1,671 @@
|
||||
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)},
|
||||
}
|
||||
"""
|
||||
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
@@ -0,0 +1,101 @@
|
||||
import { app } from '../../../scripts/app.js'
|
||||
|
||||
|
||||
function getVideoMetadata(file) {
|
||||
return new Promise((r) => {
|
||||
const reader = new FileReader();
|
||||
reader.onload = (event) => {
|
||||
const videoData = new Uint8Array(event.target.result);
|
||||
const dataView = new DataView(videoData.buffer);
|
||||
|
||||
let decoder = new TextDecoder();
|
||||
// Check for known valid magic strings
|
||||
if (dataView.getUint32(0) == 0x1A45DFA3) {
|
||||
//webm/mkv (both use EBML/Matroska format)
|
||||
//see http://wiki.webmproject.org/webm-metadata/global-metadata
|
||||
//and https://www.matroska.org/technical/elements.html
|
||||
//contrary to specs, tag seems consistently at start
|
||||
//COMMENT + 0x4487 + packed length?
|
||||
//length 0x8d8 becomes 0x48d8
|
||||
//
|
||||
//description for variable length ints https://github.com/ietf-wg-cellar/ebml-specification/blob/master/specification.markdown
|
||||
let offset = 4 + 8; //COMMENT is 7 chars + 1 to realign
|
||||
while(offset < videoData.length-16) {
|
||||
//Check for text tags
|
||||
if (dataView.getUint16(offset) == 0x4487) {
|
||||
//check that name of tag is COMMENT
|
||||
const name = String.fromCharCode(...videoData.slice(offset-7,offset));
|
||||
if (name === "COMMENT") {
|
||||
let vint = dataView.getUint32(offset+2);
|
||||
let n_octets = Math.clz32(vint)+1;
|
||||
if (n_octets < 4) {//250MB sanity cutoff
|
||||
let length = (vint >> (8*(4-n_octets))) & ~(1 << (7*n_octets));
|
||||
const content = decoder.decode(videoData.slice(offset+2+n_octets, offset+2+n_octets+length));
|
||||
let json = JSON.parse(content);
|
||||
r(json);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
offset+=1;
|
||||
}
|
||||
} else if (dataView.getUint32(4) == 0x66747970 && dataView.getUint32(8) == 0x69736F6D) {
|
||||
//mp4
|
||||
//see https://developer.apple.com/documentation/quicktime-file-format
|
||||
//Seems to make no guarantee for alignment
|
||||
let offset = videoData.length-4;
|
||||
while (offset > 16) {//rough safe guess
|
||||
if (dataView.getUint32(offset) == 0x64617461) {//any data tag
|
||||
if (dataView.getUint32(offset - 8) == 0xa9636d74) {//cmt data tag
|
||||
let type = dataView.getUint32(offset+4); //seemingly 1
|
||||
let locale = dataView.getUint32(offset+8); //seemingly 0
|
||||
let size = dataView.getUint32(offset-4) - 4*4;
|
||||
const content = decoder.decode(videoData.slice(offset+12, offset+12+size));
|
||||
const json = JSON.parse(content);
|
||||
r(json);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
offset-=1;
|
||||
}
|
||||
} else {
|
||||
console.error("Unknown magic: " + dataView.getUint32(0))
|
||||
}
|
||||
r();
|
||||
return;
|
||||
};
|
||||
|
||||
reader.readAsArrayBuffer(file);
|
||||
});
|
||||
}
|
||||
function isVideoFile(file) {
|
||||
if (file?.name?.endsWith(".webm")) {
|
||||
return true;
|
||||
}
|
||||
if (file?.name?.endsWith(".mp4")) {
|
||||
return true;
|
||||
}
|
||||
if (file?.name?.endsWith(".mkv")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
let originalHandleFile = app.handleFile;
|
||||
app.handleFile = handleFile;
|
||||
let fileInput = document.getElementById("comfy-file-input")
|
||||
//hijack comfy-file-input to allow webm/mp4/mkv
|
||||
fileInput.accept += ",video/webm,video/mp4,video/x-matroska";
|
||||
|
||||
async function handleFile(file) {
|
||||
if (file?.type?.startsWith("video/") || isVideoFile(file)) {
|
||||
const videoInfo = await getVideoMetadata(file);
|
||||
if (videoInfo?.workflow) {
|
||||
await app.loadGraphData(videoInfo.workflow);
|
||||
return
|
||||
}
|
||||
}
|
||||
return await originalHandleFile.apply(this, arguments);
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
// Local GET-only OpenPose 27 positions and sixteen source-bound 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/openpose-document/browser';fs.mkdirSync(out,{recursive:true});
|
||||
const checks=[],requests=[],errors=[],blockedFonts=[],assertionGroups={};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(u.hostname!=='127.0.0.1'||u.pathname==='/api/view'){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=['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===16&&details.reduce((n,d)=>n+d.doc_json.fixed_version.fields.length,0)===421,'16图421保存位置');
|
||||
check(details.reduce((n,d)=>n+(d.doc_json.source_notes?.length||0),0)===15,'16图15源注释');
|
||||
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=d===details[0]?'new_openpose':'old_fifteen';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);
|
||||
await page.screenshot({path:`${out}/${width}-${d.id}-default.png`});
|
||||
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)}`);
|
||||
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(['frame_rate','force_rate','resolution','videopreview','format'].includes(f.field))await page.screenshot({path:`${out}/${width}-${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}无溢出`);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=>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=>{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()===18,'迟到OpenPose响应不覆盖SDPose图摘要/18字段');await page.keyboard.press('Escape');await page.unroute(`**/api/workflows/${details[0].id}`);
|
||||
await page.route(`**/api/workflows/${details[0].id}`,route=>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无写/生成/目标/历史预览请求');
|
||||
fs.writeFileSync(`${out}/browser-results.json`,JSON.stringify({assertion_count:checks.length,assertionGroups,checks,requests,errors,blockedFonts,viewports:[1440,390]},null,2));
|
||||
} finally {await browser.close();}
|
||||
@@ -0,0 +1,78 @@
|
||||
"""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/openpose-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 = ["openpose"]
|
||||
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()
|
||||
print("All owned browser services stopped.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user