diff --git a/calliope-backend/src/calliope/comfyui/fixed_document.py b/calliope-backend/src/calliope/comfyui/fixed_document.py index 02e10de1..7aa2bac7 100644 --- a/calliope-backend/src/calliope/comfyui/fixed_document.py +++ b/calliope-backend/src/calliope/comfyui/fixed_document.py @@ -15,6 +15,10 @@ DEFINITION_SHA256 = "c4c7f04fde29dc7485a341207397fcf6191e3fcbe89ecc2d238f4a4f5bc # Explicit path allowlist; a recomputed caller-supplied digest cannot extend trust. DEFINITIONS = { + ( + "example_ComfyUI_workflows/0-基础处理:图像合并-音频" + "分离-视频截取合并-图像视频放大/双图像或视频合并显示.json" + ): "b6aaa6f5f66ceda4ea394b31901c4f5c776de829190577a9d26f50aaa9210c36", ( "example_ComfyUI_workflows/0-基础处理:图像合并-音频" "分离-视频截取合并-图像视频放大/视频倒放.json" diff --git a/calliope-backend/src/calliope/comfyui/source_reviews.json b/calliope-backend/src/calliope/comfyui/source_reviews.json index ca22a19d..ef9db01f 100644 --- a/calliope-backend/src/calliope/comfyui/source_reviews.json +++ b/calliope-backend/src/calliope/comfyui/source_reviews.json @@ -14223,6 +14223,1538 @@ "全部单位、范围、调整效果待可信节点定义;本图未实跑", "不更改原图矛盾;原有说明与此前审校完整保留" ] + }, + "fixed_version_document": { + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_sha1": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_sha256": "61a0b1a2aa17a7d8c4f09f4f57e276eaf37227f69b5fc5789193005e593548c9", + "canonical_sha256": "0a5fad1a4d9b69b6633cbd5e3b2aa253a4df5d26234e885e156c63a3d0f6e1c9", + "notice": "声明版本固定源码仅作参考;图片支路mode4、跨素材音画同步未知、历史缓存非产物,未实跑、转换保持关闭。", + "user_overview": "这张图把两路视频画面上下合并;图片支路四节点均为mode4,不能当作已完成双图合成。活动路径为视频6和8→拼接9→合成10:素材6跳过53、上限62,素材8跳过55、上限64,起点和上限不同。播放帧率由素材6的信息覆盖保存8,音频来自素材8,不能保证跨素材同步。三个预览对象仅为历史缓存;未实跑、目标环境未知、转换保持关闭。", + "versions": [ + "VHS声明1.7.9,使用官方registry准确发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;完整45成员已复算,Git绑定未知,不套1.7.7。", + "ImageConcatMulti4/9按KJ精确提交50a0837f9aea602b184bbf6dbabf66ed2c7a1d22注册/schema/实现/JS/许可。", + "LoadImage1/2和PreviewImage5按官方core v0.12.3→cb459573c8fa025bbf9ecf312f6af376d659f567固定注册/schema/实现/许可。", + "无frontendVersion;目标安装/UE身份和次序/动态控件恢复未知,固定源码不是运行或目标安装证明。" + ], + "counts": { + "saved_fields": 42, + "scalar_saved_positions": 39, + "history_objects": 3, + "source_nodes": 9, + "physical_edges": 9, + "source_notes": 0, + "linked_saved_fields": 1, + "frontend_only": 8, + "final_scalars": 0, + "final_prompt_constructed": false + }, + "fields": [ + { + "field": "image", + "label": "图片文件引用", + "type": "COMBO", + "schema_default": "动态input目录枚举,无固定默认", + "unit": "文件引用", + "limits": "普通图片文件,image_upload=true", + "effect": "原文件引用纯文本;core实现按EXIF转置、转RGB,同尺寸多帧可组成批次,返回IMAGE/MASK但MASK未接。节点1/2均mode4,不能把两图视为已成功合成。", + "evidence": [ + 18, + 20 + ], + "role": "scalar", + "node_id": "1", + "definition_node_id": "1", + "class_type": "LoadImage", + "scope": "root", + "pointer": "/nodes/0/widgets_values/0", + "value": "小云雀_1770719334800_0_m.jpg", + "json_type": "str", + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "saved_position_1", + "label": "图片上传选择占位", + "type": "未确认前端状态", + "schema_default": "服务端只声明image;此槽无服务端默认", + "unit": "状态字符串", + "limits": "原值image;前端版本缺失", + "effect": "保存image不是第二张图片,也不证明上传完成;该位置前端身份/恢复次序未核,不借其他前端版本具名。", + "evidence": [ + 18 + ], + "role": "frontend_state_unknown", + "node_id": "1", + "definition_node_id": "1", + "class_type": "LoadImage", + "scope": "root", + "pointer": "/nodes/0/widgets_values/1", + "value": "image", + "json_type": "str", + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "image", + "label": "图片文件引用", + "type": "COMBO", + "schema_default": "动态input目录枚举,无固定默认", + "unit": "文件引用", + "limits": "普通图片文件,image_upload=true", + "effect": "原文件引用纯文本;core实现按EXIF转置、转RGB,同尺寸多帧可组成批次,返回IMAGE/MASK但MASK未接。节点1/2均mode4,不能把两图视为已成功合成。", + "evidence": [ + 18, + 20 + ], + "role": "scalar", + "node_id": "2", + "definition_node_id": "2", + "class_type": "LoadImage", + "scope": "root", + "pointer": "/nodes/1/widgets_values/0", + "value": "ComfyUI_00038.png", + "json_type": "str", + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "saved_position_1", + "label": "图片上传选择占位", + "type": "未确认前端状态", + "schema_default": "服务端只声明image;此槽无服务端默认", + "unit": "状态字符串", + "limits": "原值image;前端版本缺失", + "effect": "保存image不是第二张图片,也不证明上传完成;该位置前端身份/恢复次序未核,不借其他前端版本具名。", + "evidence": [ + 18 + ], + "role": "frontend_state_unknown", + "node_id": "2", + "definition_node_id": "2", + "class_type": "LoadImage", + "scope": "root", + "pointer": "/nodes/1/widgets_values/1", + "value": "image", + "json_type": "str", + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "inputcount", + "label": "拼接输入数量", + "type": "INT", + "schema_default": "2", + "unit": "图像输入", + "limits": "2~1000,step1", + "effect": "保存2,按image_1与image_2次序逐次拼接;缺少后续输入参考实现使用第一图形状零张量,不证明本图缺失。", + "evidence": [ + 14, + 15, + 17 + ], + "role": "scalar", + "node_id": "4", + "definition_node_id": "4", + "class_type": "ImageConcatMulti", + "scope": "root", + "pointer": "/nodes/3/widgets_values/0", + "value": 2, + "json_type": "int", + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "direction", + "label": "拼接方向", + "type": "COMBO", + "schema_default": "right", + "unit": "方向", + "limits": "right/down/left/up", + "effect": "保存down,把第二幅画面放在第一幅下方;节点9第一输入来自6,第二来自8。是空间上下拼接,不是时间顺接。", + "evidence": [ + 14, + 15, + 17 + ], + "role": "scalar", + "node_id": "4", + "definition_node_id": "4", + "class_type": "ImageConcatMulti", + "scope": "root", + "pointer": "/nodes/3/widgets_values/1", + "value": "down", + "json_type": "str", + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "match_image_size", + "label": "匹配图像尺寸", + "type": "BOOLEAN", + "schema_default": "false", + "unit": "布尔", + "limits": "true/false", + "effect": "保存true;down匹配第一输入宽度,第二输入高度按其原比例int计算,用lanczos/disabled缩放。批次数不同时,较短批次重复末帧补到较长;这不是时间或音频同步。通道不同时以值1补齐缺少通道。", + "evidence": [ + 14, + 15, + 17 + ], + "role": "scalar", + "node_id": "4", + "definition_node_id": "4", + "class_type": "ImageConcatMulti", + "scope": "root", + "pointer": "/nodes/3/widgets_values/2", + "value": true, + "json_type": "bool", + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "saved_position_3", + "label": "额外null保存槽(按钮候选)", + "type": "未确认前端状态", + "schema_default": "本提交JS创建Update inputs按钮,服务端无此参数", + "unit": "无可确认单位", + "limits": "原值null;无frontendVersion,不等同缺键或空对象", + "effect": "准确KJ JS会创建值null的Update inputs按钮并按inputcount增删IMAGE输入;缺本图前端版本/UE恢复证据,不能确定第4保存槽最终身份或恢复效果,不作为执行参数。", + "evidence": [ + 16, + 14 + ], + "role": "frontend_state_unknown", + "node_id": "4", + "definition_node_id": "4", + "class_type": "ImageConcatMulti", + "scope": "root", + "pointer": "/nodes/3/widgets_values/3", + "value": null, + "json_type": "NoneType", + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "frame_rate", + "label": "合成播放帧率(已连线覆盖)", + "type": "FLOAT/INT(floatOrInt)", + "schema_default": "8", + "unit": "帧/秒", + "limits": "min1,step1;schema未声明max", + "effect": "保存8不是最终执行值:6槽3→11.video_info,11槽0→10.frame_rate覆盖8。VideoInfoLoaded输出素材6的loaded_fps;实际FPS未知,缓存30.000001657458657不是输出保证。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "linked_saved", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/frame_rate", + "value": 8, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "loop_count", + "label": "视频额外循环", + "type": "INT", + "schema_default": "0", + "unit": "循环", + "limits": "0~100,step1", + "effect": "保存0不追加视频loop滤镜,不把GIF循环0规则套视频。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/loop_count", + "value": 0, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "filename_prefix", + "label": "输出文件名前缀", + "type": "STRING", + "schema_default": "AnimateDiff", + "unit": "路径前缀", + "limits": "无schema长度范围;权限与目标目录未知", + "effect": "保存AnimateDiff参与路径和计数命名;不是已有产物。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/filename_prefix", + "value": "AnimateDiff", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "format", + "label": "合成输出格式", + "type": "COMBO", + "schema_default": "首项image/gif;动态视频格式无唯一目标默认", + "unit": "格式名", + "limits": "image/gif、image/webp和动态FFmpeg模板", + "effect": "保存video/h264-mp4走FFmpeg/libx264模板;编码器与目标动态选项未知。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/format", + "value": "video/h264-mp4", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "pix_fmt", + "label": "视频像素格式", + "type": "COMBO", + "schema_default": "首项yuv420p", + "unit": "像素格式", + "limits": "yuv420p / yuv420p10le", + "effect": "保存yuv420p;视频分支还可能按dim_alignment默认2补边,实际尺寸未知。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/pix_fmt", + "value": "yuv420p", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "crf", + "label": "H264质量参数", + "type": "INT", + "schema_default": "19", + "unit": "CRF", + "limits": "模板0~100,step1;编码器可接受范围另待核", + "effect": "保存19交给libx264的-crf;一般减小会提高质量并可能增大体积,实际效果未测。模板100不保证编码器接受100。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/crf", + "value": 19, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "save_metadata", + "label": "视频元数据开关", + "type": "BOOLEAN", + "schema_default": "true", + "unit": "布尔", + "limits": "true/false;视频元数据分支", + "effect": "保存true在视频元数据条件分支写入信息;独立首帧workflow PNG由VHS_MetadataImage默认true控制。两者不是同一开关。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/save_metadata", + "value": true, + "json_type": "bool", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "trim_to_audio", + "label": "按音频条件裁切", + "type": "BOOLEAN", + "schema_default": "false", + "unit": "布尔", + "limits": "仅有效音频波形存在时进入混流", + "effect": "源false不是关闭音频。准确模板实现把布尔false转成字符串False,混流添加apad=whole_dur(输出帧数/合成帧率+1)并带-shortest;仍不保证跨素材同步或实际完整时长。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/trim_to_audio", + "value": false, + "json_type": "bool", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "pingpong", + "label": "追加往返帧", + "type": "BOOLEAN", + "schema_default": "false", + "unit": "布尔", + "limits": "true/false;meta_batch限制见实现", + "effect": "保存false不追加往返帧;不代表素材原先没有倒序。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/pingpong", + "value": false, + "json_type": "bool", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "save_output", + "label": "保存目录选择", + "type": "BOOLEAN", + "schema_default": "true", + "unit": "布尔", + "limits": "true为output;false为temp;均可能写文件", + "effect": "保存true选择正式输出目录;运行可能写首帧PNG、无声视频和-audio混流文件。VHS_KeepIntermediate=false才按条件移除中间文件;本轮GET不执行文件生成。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/save_output", + "value": true, + "json_type": "bool", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "videopreview", + "label": "历史预览完整对象", + "type": "前端历史状态", + "schema_default": "无服务端默认", + "unit": "完整对象", + "limits": "hidden/paused/params原样保存;嵌套不重复计数", + "effect": "只代表历史缓存;filename/type/E盘fullpath/workflow PNG/缓存FPS都不是当前产物或可达证明。纯文本显示,不请求api/view或媒体。", + "evidence": [ + 10, + 8 + ], + "role": "frontend_history", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/videopreview", + "value": { + "hidden": false, + "paused": false, + "params": { + "filename": "AnimateDiff_00011-audio.mp4", + "subfolder": "", + "type": "output", + "format": "video/h264-mp4", + "frame_rate": 30.000001657458657, + "workflow": "AnimateDiff_00011.png", + "fullpath": "E:\\ComfyUI-Data\\output\\AnimateDiff_00011-audio.mp4" + } + }, + "json_type": "dict", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "video", + "label": "视频文件引用", + "type": "COMBO", + "schema_default": "动态input目录枚举,无固定默认", + "unit": "文件引用", + "limits": "只枚举普通文件webm/mp4/mkv/gif/mov", + "effect": "保存引用,不证明素材存在、音轨存在或实际已上传。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/video", + "value": "2月10日.mp4", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "force_rate", + "label": "加载采样帧率", + "type": "FLOAT/INT(floatOrInt)", + "schema_default": "0", + "unit": "帧/秒", + "limits": "0~60,step1;0禁用强制重采样", + "effect": "两加载器保存0表示按源帧时间采样,不代表实际FPS为0,也不保证两素材同帧率。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/force_rate", + "value": 0, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "custom_width", + "label": "自定义加载宽度", + "type": "INT", + "schema_default": "0", + "unit": "像素", + "limits": "0~8192;0不指定", + "effect": "宽高均0从媒体尺寸出发,仍受AnimateDiff的dim8对齐;不是保证原尺寸。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/custom_width", + "value": 0, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "custom_height", + "label": "自定义加载高度", + "type": "INT", + "schema_default": "0", + "unit": "像素", + "limits": "0~8192;0不指定", + "effect": "单边指定时按比例计算另一边;两边0仍受格式对齐,不读取真实尺寸。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/custom_height", + "value": 0, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "frame_load_cap", + "label": "加载帧数上限", + "type": "INT", + "schema_default": "0", + "unit": "采样帧", + "limits": "0~2**53-1,step1;0不设此上限", + "effect": "素材6保存62、素材8保存64,分别限制加载数量;不是保证实际帧数、同长或对齐。仍受素材、内存和格式条件限制。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/frame_load_cap", + "value": 64, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "skip_first_frames", + "label": "跳过起始采样帧", + "type": "INT", + "schema_default": "0", + "unit": "采样帧", + "limits": "0~2**53-1,step1", + "effect": "素材6保存53、素材8保存55;采样后计数,各自起点不同,不是跨素材时间同步。音频参考起点为本加载器skip乘target_frame_time。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/skip_first_frames", + "value": 55, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "select_every_nth", + "label": "间隔抽取采样帧", + "type": "INT", + "schema_default": "1", + "unit": "间隔", + "limits": "1~2**53-1,step1", + "effect": "保存1不再间隔删帧;增大值改变loaded_fps和音频时长参数,不能自动对齐另一素材。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/select_every_nth", + "value": 1, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "format", + "label": "加载格式约束", + "type": "COMBO", + "schema_default": "AnimateDiff", + "unit": "格式名", + "limits": "内置格式与核心动态扩展,目标选项未知", + "effect": "保存AnimateDiff有内置target_rate8和dim8;Python尺寸约束不等于强制把保存force0重写8。未知前端回调/恢复顺序不作保证。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/format", + "value": "AnimateDiff", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "videopreview", + "label": "历史预览完整对象", + "type": "前端历史状态", + "schema_default": "无服务端默认", + "unit": "完整对象", + "limits": "hidden/paused/params原样保存;嵌套不重复计数", + "effect": "只代表历史缓存;filename/type/E盘fullpath/workflow PNG/缓存FPS都不是当前产物或可达证明。纯文本显示,不请求api/view或媒体。", + "evidence": [ + 10, + 8 + ], + "role": "frontend_history", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/videopreview", + "value": { + "hidden": false, + "paused": false, + "params": { + "filename": "2月10日.mp4", + "type": "input", + "format": "video/mp4", + "force_rate": 0, + "custom_width": 0, + "custom_height": 0, + "frame_load_cap": 64, + "skip_first_frames": 55, + "select_every_nth": 1 + } + }, + "json_type": "dict", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "video", + "label": "视频文件引用", + "type": "COMBO", + "schema_default": "动态input目录枚举,无固定默认", + "unit": "文件引用", + "limits": "只枚举普通文件webm/mp4/mkv/gif/mov", + "effect": "保存引用,不证明素材存在、音轨存在或实际已上传。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/video", + "value": "小云雀_1770719334800_0_m.mp4", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "force_rate", + "label": "加载采样帧率", + "type": "FLOAT/INT(floatOrInt)", + "schema_default": "0", + "unit": "帧/秒", + "limits": "0~60,step1;0禁用强制重采样", + "effect": "两加载器保存0表示按源帧时间采样,不代表实际FPS为0,也不保证两素材同帧率。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/force_rate", + "value": 0, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "custom_width", + "label": "自定义加载宽度", + "type": "INT", + "schema_default": "0", + "unit": "像素", + "limits": "0~8192;0不指定", + "effect": "宽高均0从媒体尺寸出发,仍受AnimateDiff的dim8对齐;不是保证原尺寸。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/custom_width", + "value": 0, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "custom_height", + "label": "自定义加载高度", + "type": "INT", + "schema_default": "0", + "unit": "像素", + "limits": "0~8192;0不指定", + "effect": "单边指定时按比例计算另一边;两边0仍受格式对齐,不读取真实尺寸。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/custom_height", + "value": 0, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "frame_load_cap", + "label": "加载帧数上限", + "type": "INT", + "schema_default": "0", + "unit": "采样帧", + "limits": "0~2**53-1,step1;0不设此上限", + "effect": "素材6保存62、素材8保存64,分别限制加载数量;不是保证实际帧数、同长或对齐。仍受素材、内存和格式条件限制。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/frame_load_cap", + "value": 62, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "skip_first_frames", + "label": "跳过起始采样帧", + "type": "INT", + "schema_default": "0", + "unit": "采样帧", + "limits": "0~2**53-1,step1", + "effect": "素材6保存53、素材8保存55;采样后计数,各自起点不同,不是跨素材时间同步。音频参考起点为本加载器skip乘target_frame_time。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/skip_first_frames", + "value": 53, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "select_every_nth", + "label": "间隔抽取采样帧", + "type": "INT", + "schema_default": "1", + "unit": "间隔", + "limits": "1~2**53-1,step1", + "effect": "保存1不再间隔删帧;增大值改变loaded_fps和音频时长参数,不能自动对齐另一素材。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/select_every_nth", + "value": 1, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "format", + "label": "加载格式约束", + "type": "COMBO", + "schema_default": "AnimateDiff", + "unit": "格式名", + "limits": "内置格式与核心动态扩展,目标选项未知", + "effect": "保存AnimateDiff有内置target_rate8和dim8;Python尺寸约束不等于强制把保存force0重写8。未知前端回调/恢复顺序不作保证。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/format", + "value": "AnimateDiff", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "choose video to upload", + "label": "上传选择保存状态", + "type": "前端选择状态", + "schema_default": "无服务端默认", + "unit": "状态字符串", + "limits": "不是服务端video参数", + "effect": "节点6保存image仅是选择控件状态,不证明上传成功,不替换video文件引用。", + "evidence": [ + 9, + 8 + ], + "role": "frontend_state", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/choose video to upload", + "value": "image", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "videopreview", + "label": "历史预览完整对象", + "type": "前端历史状态", + "schema_default": "无服务端默认", + "unit": "完整对象", + "limits": "hidden/paused/params原样保存;嵌套不重复计数", + "effect": "只代表历史缓存;filename/type/E盘fullpath/workflow PNG/缓存FPS都不是当前产物或可达证明。纯文本显示,不请求api/view或媒体。", + "evidence": [ + 10, + 8 + ], + "role": "frontend_history", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/videopreview", + "value": { + "hidden": false, + "paused": false, + "params": { + "filename": "小云雀_1770719334800_0_m.mp4", + "type": "input", + "format": "video/mp4", + "force_rate": 0, + "custom_width": 0, + "custom_height": 0, + "frame_load_cap": 62, + "skip_first_frames": 53, + "select_every_nth": 1 + } + }, + "json_type": "dict", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "inputcount", + "label": "拼接输入数量", + "type": "INT", + "schema_default": "2", + "unit": "图像输入", + "limits": "2~1000,step1", + "effect": "保存2,按image_1与image_2次序逐次拼接;缺少后续输入参考实现使用第一图形状零张量,不证明本图缺失。", + "evidence": [ + 14, + 15, + 17 + ], + "role": "scalar", + "node_id": "9", + "definition_node_id": "9", + "class_type": "ImageConcatMulti", + "scope": "root", + "pointer": "/nodes/8/widgets_values/0", + "value": 2, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "direction", + "label": "拼接方向", + "type": "COMBO", + "schema_default": "right", + "unit": "方向", + "limits": "right/down/left/up", + "effect": "保存down,把第二幅画面放在第一幅下方;节点9第一输入来自6,第二来自8。是空间上下拼接,不是时间顺接。", + "evidence": [ + 14, + 15, + 17 + ], + "role": "scalar", + "node_id": "9", + "definition_node_id": "9", + "class_type": "ImageConcatMulti", + "scope": "root", + "pointer": "/nodes/8/widgets_values/1", + "value": "down", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "match_image_size", + "label": "匹配图像尺寸", + "type": "BOOLEAN", + "schema_default": "false", + "unit": "布尔", + "limits": "true/false", + "effect": "保存true;down匹配第一输入宽度,第二输入高度按其原比例int计算,用lanczos/disabled缩放。批次数不同时,较短批次重复末帧补到较长;这不是时间或音频同步。通道不同时以值1补齐缺少通道。", + "evidence": [ + 14, + 15, + 17 + ], + "role": "scalar", + "node_id": "9", + "definition_node_id": "9", + "class_type": "ImageConcatMulti", + "scope": "root", + "pointer": "/nodes/8/widgets_values/2", + "value": true, + "json_type": "bool", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "saved_position_3", + "label": "额外null保存槽(按钮候选)", + "type": "未确认前端状态", + "schema_default": "本提交JS创建Update inputs按钮,服务端无此参数", + "unit": "无可确认单位", + "limits": "原值null;无frontendVersion,不等同缺键或空对象", + "effect": "准确KJ JS会创建值null的Update inputs按钮并按inputcount增删IMAGE输入;缺本图前端版本/UE恢复证据,不能确定第4保存槽最终身份或恢复效果,不作为执行参数。", + "evidence": [ + 16, + 14 + ], + "role": "frontend_state_unknown", + "node_id": "9", + "definition_node_id": "9", + "class_type": "ImageConcatMulti", + "scope": "root", + "pointer": "/nodes/8/widgets_values/3", + "value": null, + "json_type": "NoneType", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + } + ], + "sources": [ + { + "id": "vhs", + "file": "videohelpersuite/load_video_nodes.py", + "local_file": "../concat-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, + 168 + ], + "claim": "加载格式、尺寸对齐、采样、跳过和上限" + }, + { + "id": "vhs", + "file": "videohelpersuite/load_video_nodes.py", + "local_file": "../concat-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返回" + }, + { + "id": "vhs", + "file": "videohelpersuite/load_video_nodes.py", + "local_file": "../concat-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, + 477 + ], + "claim": "上传加载schema、输出槽和文件引用验证" + }, + { + "id": "vhs", + "file": "videohelpersuite/nodes.py", + "local_file": "../concat-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": [ + 48, + 165 + ], + "claim": "模板参数str展开、布尔False转字符串False、元数据临时文件条件" + }, + { + "id": "vhs", + "file": "videohelpersuite/nodes.py", + "local_file": "../concat-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, + 420 + ], + "claim": "合成schema、目录和独立首帧PNG条件" + }, + { + "id": "vhs", + "file": "videohelpersuite/nodes.py", + "local_file": "../concat-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": [ + 420, + 625 + ], + "claim": "视频编码、补边、循环、音频波形混流和中间文件条件" + }, + { + "id": "vhs", + "file": "videohelpersuite/nodes.py", + "local_file": "../concat-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, + 971 + ], + "claim": "VideoInfoLoaded按loaded键输出五槽,槽0为loaded_fps" + }, + { + "id": "vhs", + "file": "video_formats/h264-mp4.json", + "local_file": "../concat-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格式、像素格式、CRF和音频裁切模板" + }, + { + "id": "vhs", + "file": "web/js/VHS.core.js", + "local_file": "../concat-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": [ + 41, + 168 + ], + "claim": "VHS包内保存恢复代码;不证明未知前端或UE恢复次序" + }, + { + "id": "vhs", + "file": "web/js/VHS.core.js", + "local_file": "../concat-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": [ + 648, + 824 + ], + "claim": "格式回调和上传选择控件" + }, + { + "id": "vhs", + "file": "web/js/VHS.core.js", + "local_file": "../concat-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": [ + 915, + 970 + ], + "claim": "预览控件保存历史状态" + }, + { + "id": "vhs", + "file": "web/js/VHS.core.js", + "local_file": "../concat-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": [ + 1222, + 1282 + ], + "claim": "格式改变时额外控件重建" + }, + { + "id": "vhs", + "file": "videohelpersuite/utils.py", + "local_file": "../concat-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": [ + 20, + 56 + ], + "claim": "BIGMAX、DIMMAX、floatOrInt" + }, + { + "id": "vhs", + "file": "videohelpersuite/nodes.py", + "local_file": "../concat-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": [ + 1023, + 1050 + ], + "claim": "VHS加载、合成和视频信息注册" + }, + { + "id": "kj", + "file": "nodes/image_nodes.py", + "local_file": "../concat-reference/kj__nodes__image_nodes.py", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb", + "lines": [ + 2512, + 2561 + ], + "claim": "ImageConcatMulti自身schema与循环拼接实现" + }, + { + "id": "kj", + "file": "nodes/image_nodes.py", + "local_file": "../concat-reference/kj__nodes__image_nodes.py", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb", + "lines": [ + 329, + 425 + ], + "claim": "批次末帧补齐、宽高匹配、通道补齐与方向拼接" + }, + { + "id": "kj", + "file": "web/js/jsnodes.js", + "local_file": "../concat-reference/kj__web__js__jsnodes.js", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/web/js/jsnodes.js", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "0de818b79c5adf96f0d3a62d11cadfb8e4b8f56ed47ef0b2434935b3ee95af23", + "lines": [ + 36, + 66 + ], + "claim": "本提交创建Update inputs按钮,null槽身份仍缺前端恢复证明" + }, + { + "id": "kj", + "file": "__init__.py", + "local_file": "../concat-reference/kj____init__.py", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/__init__.py", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "0bc84dab300c15d8421161a97a7e03ddf041b40f9b17377b2450a6075a544cc2", + "lines": [ + 1, + 180 + ], + "claim": "KJ注册与类引用" + }, + { + "id": "core", + "file": "nodes.py", + "local_file": "../concat-reference/core__nodes.py", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "sha256": "427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38", + "lines": [ + 1698, + 1775 + ], + "claim": "LoadImage schema、EXIF、批次、RGB和MASK输出" + }, + { + "id": "core", + "file": "nodes.py", + "local_file": "../concat-reference/core__nodes.py", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "sha256": "427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38", + "lines": [ + 1625, + 1697 + ], + "claim": "PreviewImage继承保存实现,临时PNG/UI结果,无返回类型" + }, + { + "id": "core", + "file": "nodes.py", + "local_file": "../concat-reference/core__nodes.py", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "sha256": "427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38", + "lines": [ + 2035, + 2055 + ], + "claim": "core LoadImage与PreviewImage固定注册" + }, + { + "id": "vhs", + "file": "LICENSE", + "local_file": "../concat-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, + 674 + ], + "claim": "准确版本许可原文" + }, + { + "id": "kj", + "file": "LICENSE", + "local_file": "../concat-reference/kj__LICENSE", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/LICENSE", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986", + "lines": [ + 1, + 674 + ], + "claim": "准确版本许可原文" + }, + { + "id": "core", + "file": "LICENSE", + "local_file": "../concat-reference/core__LICENSE", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/LICENSE", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986", + "lines": [ + 1, + 674 + ], + "claim": "准确版本许可原文" + } + ], + "comments": [], + "flow": [ + "这张图把两路视频画面上下合并;图片支路四节点均为mode4,不能当作已完成双图合成。活动路径为视频6和8→拼接9→合成10:素材6跳过53、上限62,素材8跳过55、上限64,起点和上限不同。播放帧率由素材6的信息覆盖保存8,音频来自素材8,不能保证跨素材同步。三个预览对象仅为历史缓存;未实跑、目标环境未知、转换保持关闭。", + "图片物理支路1+2→4→5四节点均mode4;两LoadImage引用与上传占位分列,mask未接。Preview5原[]零位置;Info11原{}零位置,不能混同缺键/null。", + "两个Concat4/9均保存[2,down,true,null]。准确KJ下排拼接匹配第一幅宽,按第二幅比例计算高度;批次不等时短批次末帧重复到长批次,不能称自动时间对齐。null槽仅为按钮候选,前端身份未知。", + "视频6与8的force_rate均0,按各自源帧时间采样,实际帧率未知。各自skip/cap不同,不推断原片同长、同时起始、同帧率或输出帧数。", + "帧率覆盖链:6槽3→11.video_info;11槽0 loaded_fps→10.frame_rate,覆盖保存8。11其余四输出未接;缓存30.000001657458657不是实际FPS或产物保证。", + "音频链:8槽2→10.audio,来自第二素材;帧率来自第一素材6。VHS按本加载器skip×target_frame_time为音频起点、cap×抽帧后frame_time为时长参数,不是跨素材共同配音或同步证明。", + "合成保存h264-mp4/yuv420p/crf19,loop0不加视频循环,pingpong=false不追加往返,save_metadata=true。save_output=true选择output而非temp;实际运行可能写独立首帧PNG、无声视频和混流文件,中间文件按VHS_KeepIntermediate条件处理。", + "trim_to_audio=false不等于关闭音频;有效waveform存在才混流。准确模板将布尔false转字符串False,加入apad=whole_dur(输出帧数/合成帧率+1)并带-shortest;不自动跨素材同步,实际音轨/时长未知。", + "6/8加载与10合成的meta_batch/vae均未接;10的VHS_FILENAMES未接,不新增独立出口。PreviewImage按core继承实现为临时PNG/UI结果且RETURN_TYPES为空;源mode4不证明当前执行过。", + "三videopreview对象含完整hidden/paused/params/旧filename/type/fullpath/缓存FPS;只纯文本回读,不访问E盘、api/view、媒体或文件。没有模型节点,不编模型依赖。目标安装、素材、输出目录权限、ffmpeg/libx264、动态选项和真实效果未知。", + "源无frontendVersion,不借近版证明恢复或旁路;VHS包内恢复回调与KJ按钮代码分别作参考。所有UE空映射不证明无改写,身份/钩子次序未知,不扩展调查。", + "源物理边:[1, 1, 0, 4, 0, \"IMAGE\"]", + "源物理边:[2, 2, 0, 4, 1, \"IMAGE\"]", + "源物理边:[3, 4, 0, 5, 0, \"IMAGE\"]", + "源物理边:[4, 9, 0, 10, 0, \"IMAGE\"]", + "源物理边:[7, 6, 3, 11, 0, \"VHS_VIDEOINFO\"]", + "源物理边:[8, 11, 0, 10, 4, \"FLOAT\"]", + "源物理边:[10, 6, 0, 9, 0, \"IMAGE\"]", + "源物理边:[11, 8, 0, 9, 1, \"IMAGE\"]", + "源物理边:[14, 8, 2, 10, 1, \"AUDIO\"]", + "节点1 LoadImage mode=4;保存位置=2;原properties={\"cnr_id\": \"comfy-core\", \"ver\": \"0.12.3\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"LoadImage\"}", + "节点2 LoadImage mode=4;保存位置=2;原properties={\"cnr_id\": \"comfy-core\", \"ver\": \"0.12.3\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"LoadImage\"}", + "节点5 PreviewImage mode=4;保存位置=0;原properties={\"cnr_id\": \"comfy-core\", \"ver\": \"0.12.3\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"PreviewImage\"}", + "节点4 ImageConcatMulti mode=4;保存位置=4;原properties={\"cnr_id\": \"comfyui-kjnodes\", \"ver\": \"50a0837f9aea602b184bbf6dbabf66ed2c7a1d22\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}}", + "节点11 VHS_VideoInfoLoaded mode=0;保存位置=0;原properties={\"cnr_id\": \"comfyui-videohelpersuite\", \"ver\": \"1.7.9\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"VHS_VideoInfoLoaded\"}", + "节点10 VHS_VideoCombine mode=0;保存位置=11;原properties={\"cnr_id\": \"comfyui-videohelpersuite\", \"ver\": \"1.7.9\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"VHS_VideoCombine\"}", + "节点8 VHS_LoadVideo mode=0;保存位置=9;原properties={\"cnr_id\": \"comfyui-videohelpersuite\", \"ver\": \"1.7.9\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"VHS_LoadVideo\"}", + "节点6 VHS_LoadVideo mode=0;保存位置=10;原properties={\"cnr_id\": \"comfyui-videohelpersuite\", \"ver\": \"1.7.9\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"VHS_LoadVideo\"}", + "节点9 ImageConcatMulti mode=0;保存位置=4;原properties={\"cnr_id\": \"comfyui-kjnodes\", \"ver\": \"50a0837f9aea602b184bbf6dbabf66ed2c7a1d22\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}}" + ], + "flow_evidence": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23 + ], + "zero_saved_nodes": [ + { + "node_id": "5", + "class_type": "PreviewImage", + "evidence": [ + 19, + 20 + ], + "effect": "原widgets_values=[];mode4,继承SaveImage临时PNG/UI输出,无返回类型,未实跑。" + }, + { + "node_id": "11", + "class_type": "VHS_VideoInfoLoaded", + "effect": "原widgets_values={};视频信息槽0 loaded_fps覆盖合成10保存8,其余四槽未接。" + } + ], + "steps": [ + "这张图把两路视频画面上下合并;图片支路四节点均为mode4,不能当作已完成双图合成。活动路径为视频6和8→拼接9→合成10:素材6跳过53、上限62,素材8跳过55、上限64,起点和上限不同。播放帧率由素材6的信息覆盖保存8,音频来自素材8,不能保证跨素材同步。三个预览对象仅为历史缓存;未实跑、目标环境未知、转换保持关闭。", + "素材要求:两路可读取视频和可选两张图片;此处只显示引用,不读取、上传或验证素材。没有模型节点,不编模型依赖。", + "操作1:先核本图准确插件/core版本与素材,保持停用;图片支路mode4,不自行当作已启用或完成。", + "操作2:分别核两视频起点53/55与帧上限62/64,确认上下画面顺序6在上8在下、尺寸与批次末帧补齐条件。", + "操作3:核6→11→10帧率覆盖与8→10音频来源;不要用保存8或缓存30.000001657458657判断真实输出。", + "常见问题:画面末尾停住可能来自较短批次重复末帧;声音不齐须先核各素材起点和帧率,不能称自动同步。文件名前缀和旧预览不证明已生成;save_metadata与首帧PNG开关独立。", + "目标安装、素材存在性、目录权限、编码器/动态选项和真实效果待后续获准验证;本轮未执行插件、未构造prompt,未定稿、未实跑。" + ] } }, "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/图像4种添加水印节点.json": { diff --git a/calliope-backend/tests/test_background_fixed_document.py b/calliope-backend/tests/test_background_fixed_document.py index 729244fd..508b7c31 100644 --- a/calliope-backend/tests/test_background_fixed_document.py +++ b/calliope-backend/tests/test_background_fixed_document.py @@ -207,10 +207,11 @@ def test_ten_documents_only_gain_overview_and_new_block_is_independent(): "/视频倒放.json", "视频转gif动图图片.json", "加载图片合成视频.json", + "双图像或视频合并显示.json", ) ) ] - assert len(additions) == 9 + assert len(additions) == 10 for p in additions: now[p].pop("fixed_version_document") historical = [p for p in DEFINITIONS if p not in additions] diff --git a/calliope-backend/tests/test_concat_fixed_document.py b/calliope-backend/tests/test_concat_fixed_document.py new file mode 100644 index 00000000..d7d7cd57 --- /dev/null +++ b/calliope-backend/tests/test_concat_fixed_document.py @@ -0,0 +1,201 @@ +"""One editorial addition: identity refusal, exact positions and media conditions.""" + +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/concat-document-evidence" +PATHS = [next(p for p in DEFINITIONS if p.endswith(n + ".json")) for n in ["双图像或视频合并显示"]] +SOURCES = [json.loads((REPO / p).read_bytes()) for p in PATHS] +REVIEWS = [review_for(p, hashlib.sha1((REPO / p).read_bytes()).hexdigest()) for p in PATHS] +FIELDS = [(i, f) for i, r in enumerate(REVIEWS) for f in r["fixed_version_document"]["fields"]] + + +def pointer(obj, path): + for part in path.strip("/").split("/"): + obj = obj[int(part)] if isinstance(obj, list) else obj[part] + return obj + + +def doc(i, source=None, review=None): + return build_document( + PATHS[i], + SOURCES[i] if source is None else source, + None, + None, + [], + REVIEWS[i] if review is None else review, + ) + + +@pytest.mark.parametrize("i,field", FIELDS) +def test_exact_positions_and_fixed_text_citations(i, field): + value = pointer(SOURCES[i], field["pointer"]) + assert ( + canonical(value) == canonical(field["value"]) and type(value).__name__ == field["json_type"] + ) + for k in [ + "label", + "type", + "schema_default", + "unit", + "limits", + "effect", + "execution_note", + "role", + ]: + assert field[k] + for k in field["evidence"]: + e = REVIEWS[i]["fixed_version_document"]["sources"][k] + raw = (OUT / e["local_file"]).read_bytes() + assert hashlib.sha256(raw).hexdigest() == e["sha256"] + assert 1 <= e["lines"][0] <= e["lines"][1] <= len(raw.decode().splitlines()) + assert (len(e["commit"]) == 40 and e["commit"] in e["url"]) or e.get( + "git_commit_binding" + ) == "unknown" + + +@pytest.mark.parametrize("i,field", FIELDS) +@pytest.mark.parametrize("variant", ["saved", "type", "text"]) +def test_every_position_refuses_even_recomputed_caller_digest(i, field, variant): + s, r = copy.deepcopy(SOURCES[i]), copy.deepcopy(REVIEWS[i]) + b = r["fixed_version_document"] + f = next(f for f in b["fields"] if f["pointer"] == field["pointer"]) + if variant == "text": + f["schema_default"] = "forged" + else: + parent, _, key = field["pointer"].rpartition("/") + target = pointer(s, parent) + target[int(key) if isinstance(target, list) else key] = ( + "forged" if variant == "type" else ("changed-null" if field["value"] is None else None) + ) + f["value"] = pointer(s, field["pointer"]) + f["json_type"] = type(f["value"]).__name__ + b["canonical_sha256"] = hashlib.sha256(canonical(s)).hexdigest() + r["caller_digest"] = hashlib.sha256(canonical(b)).hexdigest() + assert not doc(i, s, r)["fixed_version"]["matched"] + + +@pytest.mark.parametrize("i", [0]) +@pytest.mark.parametrize( + "kind", + [ + "edge", + "mode", + "version", + "history", + "missing", + "null", + "list", + "object", + "swap", + "source_sha", + "citation", + "ue", + "empty_node", + "reference", + "preview_missing", + "preview_null", + "preview_object", + ], +) +def test_graph_history_shape_and_binding_refuse(i, kind): + s, r = copy.deepcopy(SOURCES[i]), copy.deepcopy(REVIEWS[i]) + b = r["fixed_version_document"] + if kind == "edge": + s["links"][0][1] = 999 + elif kind == "mode": + s["nodes"][0]["mode"] = 2 + elif kind == "version": + s["nodes"][0]["properties"]["ver"] = "forged" + elif kind == "history": + next(n for n in s["nodes"] if n["id"] == 10)["widgets_values"]["videopreview"]["params"][ + "filename" + ] = "forged" + elif kind in ["missing", "null", "list", "object"]: + values = next(n for n in s["nodes"] if n["id"] == 10)["widgets_values"] + if kind == "missing": + del values["videopreview"] + else: + values["videopreview"] = {"null": None, "list": [], "object": {}}[kind] + elif kind == "swap": + r = copy.deepcopy( + review_for( + next(p for p in DEFINITIONS if p.endswith("视频倒放.json")), + hashlib.sha1( + ( + REPO / next(p for p in DEFINITIONS if p.endswith("视频倒放.json")) + ).read_bytes() + ).hexdigest(), + ) + ) + elif kind == "source_sha": + r["source_sha"] = "0" * 40 + elif kind == "ue": + s["extra"]["ue_links"] = [1] + elif kind == "empty_node": + next(n for n in s["nodes"] if n["id"] == 11)["widgets_values"] = [] + elif kind.startswith("preview_"): + n = next(n for n in s["nodes"] if n["id"] == 5) + if kind == "preview_missing": + del n["widgets_values"] + else: + n["widgets_values"] = None if kind == "preview_null" else {} + elif kind == "reference": + s["nodes"][0]["widgets_values"][0] = "forged.png" + else: + b["sources"][0]["sha256"] = "0" * 64 + b["canonical_sha256"] = hashlib.sha256(canonical(s)).hexdigest() + r["caller_digest"] = hashlib.sha256(canonical(b)).hexdigest() + assert not doc(i, s, r)["fixed_version"]["matched"] + + +def test_actual_paths_counts_old_objects_and_media_conditions(): + resource = "calliope-backend/src/calliope/comfyui/source_reviews.json" + old = json.loads(subprocess.check_output(["git", "show", "d1ba226:" + resource], cwd=REPO)) + now = json.loads((REPO / resource).read_bytes()) + b = now[PATHS[0]].pop("fixed_version_document") + d = doc(0) + assert now == old and len(DEFINITIONS) == 21 + assert d["fixed_version"]["matched"] and len(b["fields"]) == 42 + assert b["comments"] == [] and b["counts"]["history_objects"] == 3 + assert b["counts"]["scalar_saved_positions"] == 39 + assert b["counts"]["linked_saved_fields"] == 1 + assert d["status"] == dict(imported=True, doc_done=False, exec_verified=False) + assert d["dependencies"]["check_state"] == "unchecked" + assert review_for(PATHS[0], "0" * 40) is None + blocks = [r["fixed_version_document"] for r in old.values() if "fixed_version_document" in r] + assert len(blocks) == 20 and sum(len(b["fields"]) for b in blocks) == 576 + # One ASR note is kept in flow rather than comments; actual source_notes are checked in GET. + assert sum(len(b.get("comments", [])) for b in blocks) == 14 + for step in b["steps"]: + assert step in d["steps"] + g = SOURCES[0] + nodes = {n["id"]: n for n in g["nodes"]} + assert len(nodes) == 9 and len(g["links"]) == 9 + for e in g["links"]: + assert e[0] in nodes[e[1]]["outputs"][e[2]]["links"] + assert nodes[e[1]]["outputs"][e[2]]["type"] == e[5] + assert nodes[e[3]]["inputs"][e[4]]["link"] == e[0] + assert nodes[e[3]]["inputs"][e[4]]["type"] == e[5] + assert nodes[5]["widgets_values"] == [] and nodes[11]["widgets_values"] == {} + assert set(n["id"] for n in g["nodes"] if n["mode"] == 4) == {1, 2, 4, 5} + assert [8, 11, 0, 10, 4, "FLOAT"] in g["links"] and [14, 8, 2, 10, 1, "AUDIO"] in g["links"] + assert "mode4" in b["user_overview"] and "音频来自素材8" in b["user_overview"] + assert not b["counts"]["final_prompt_constructed"] + for n in (4, 9): + f = next( + f for f in b["fields"] if f["node_id"] == str(n) and f["field"] == "saved_position_3" + ) + assert f["value"] is None and f["role"] == "frontend_state_unknown" + rate = next(f for f in b["fields"] if f["field"] == "frame_rate") + assert rate["value"] == 8 and "覆盖8" in rate["effect"] + assert "-shortest" in next(f["effect"] for f in b["fields"] if f["field"] == "trim_to_audio") diff --git a/calliope-backend/tests/test_controlnet_fixed_document.py b/calliope-backend/tests/test_controlnet_fixed_document.py index 9d4585af..b6d4070a 100644 --- a/calliope-backend/tests/test_controlnet_fixed_document.py +++ b/calliope-backend/tests/test_controlnet_fixed_document.py @@ -203,7 +203,7 @@ def test_graph_specific_semantics_and_companion(): def test_other_documents_and_block_swaps(): - assert len(DEFINITIONS) == 20 + assert len(DEFINITIONS) == 21 for path in DEFINITIONS: if path == PATH: continue diff --git a/calliope-backend/tests/test_gemma_fixed_document.py b/calliope-backend/tests/test_gemma_fixed_document.py index b259819e..30042516 100644 --- a/calliope-backend/tests/test_gemma_fixed_document.py +++ b/calliope-backend/tests/test_gemma_fixed_document.py @@ -154,7 +154,11 @@ def test_real_document_and_frozen_old_thirteen_blocks(): old = json.loads(subprocess.check_output(["git", "show", "9dac1b4:" + resource], cwd=REPO)) now = json.loads((REPO / resource).read_bytes()) for added in [ - p for p in now if p.endswith(("视频转gif动图图片.json", "加载图片合成视频.json")) + p + for p in now + if p.endswith( + ("视频转gif动图图片.json", "加载图片合成视频.json", "双图像或视频合并显示.json") + ) ]: now[added].pop("fixed_version_document") reverse = next(p for p in now if p.endswith("/视频倒放.json")) @@ -166,7 +170,7 @@ def test_real_document_and_frozen_old_thirteen_blocks(): # 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) == 20 + assert len(now) == 156 and len(DEFINITIONS) == 21 assert len([r for r in old.values() if "fixed_version_document" in r]) == 13 assert ( sum( diff --git a/calliope-backend/tests/test_gif_images_fixed_document.py b/calliope-backend/tests/test_gif_images_fixed_document.py index b327c985..6e7dbbcb 100644 --- a/calliope-backend/tests/test_gif_images_fixed_document.py +++ b/calliope-backend/tests/test_gif_images_fixed_document.py @@ -149,7 +149,9 @@ def test_actual_paths_counts_old_objects_and_media_conditions(): assert e[0] in nodes[e[1]]["outputs"][e[2]]["links"] assert nodes[e[3]]["inputs"][e[4]]["link"] == e[0] and e[5] == "IMAGE" assert all(step in d["steps"] for step in b["steps"]) - assert now == old and len(DEFINITIONS) == 20 + added = next(p for p in now if p.endswith("双图像或视频合并显示.json")) + now[added].pop("fixed_version_document") + assert now == old and len(DEFINITIONS) == 21 blocks = [r["fixed_version_document"] for r in old.values() if "fixed_version_document" in r] assert len(blocks) == 18 and sum(len(b["fields"]) for b in blocks) == 516 gif = doc(0)["fixed_version"] diff --git a/calliope-backend/tests/test_grid_fixed_document.py b/calliope-backend/tests/test_grid_fixed_document.py index eaeb509a..4349ad49 100644 --- a/calliope-backend/tests/test_grid_fixed_document.py +++ b/calliope-backend/tests/test_grid_fixed_document.py @@ -172,7 +172,11 @@ def test_only_two_reviews_change_and_all_old_blocks_preserved(): old = json.loads(subprocess.check_output(["git", "show", "27e6d56:" + resource], cwd=REPO)) now = json.loads((REPO / resource).read_bytes()) for added in [ - p for p in now if p.endswith(("视频转gif动图图片.json", "加载图片合成视频.json")) + p + for p in now + if p.endswith( + ("视频转gif动图图片.json", "加载图片合成视频.json", "双图像或视频合并显示.json") + ) ]: now[added].pop("fixed_version_document") reverse = next(p for p in now if p.endswith("/视频倒放.json")) @@ -187,7 +191,7 @@ def test_only_two_reviews_change_and_all_old_blocks_preserved(): # 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) == 20 + assert len(DEFINITIONS) == 21 assert ( sum( len(r["fixed_version_document"]["fields"]) diff --git a/calliope-backend/tests/test_nlf_fixed_document.py b/calliope-backend/tests/test_nlf_fixed_document.py index 3aca79c0..0068729a 100644 --- a/calliope-backend/tests/test_nlf_fixed_document.py +++ b/calliope-backend/tests/test_nlf_fixed_document.py @@ -261,13 +261,17 @@ def test_exact_topology_counts_modes_unknowns_and_old_objects(): old = json.loads(subprocess.check_output(["git", "show", "7e76510:" + resource], cwd=REPO)) now = json.loads((REPO / resource).read_bytes()) for added in [ - p for p in now if p.endswith(("视频转gif动图图片.json", "加载图片合成视频.json")) + p + for p in now + if p.endswith( + ("视频转gif动图图片.json", "加载图片合成视频.json", "双图像或视频合并显示.json") + ) ]: now[added].pop("fixed_version_document") reverse = next(p for p in now if p.endswith("/视频倒放.json")) now[reverse].pop("fixed_version_document") assert now[PATH].pop("fixed_version_document") == BLOCK - assert now == old and len(DEFINITIONS) == 20 + assert now == old and len(DEFINITIONS) == 21 old_blocks = [ r["fixed_version_document"] for r in old.values() if "fixed_version_document" in r ] @@ -278,7 +282,9 @@ def test_exact_topology_counts_modes_unknowns_and_old_objects(): assert d["status"] == dict(imported=True, doc_done=False, exec_verified=False) assert d["dependencies"]["check_state"] == "unchecked" for p in DEFINITIONS: - if p.endswith(("视频转gif动图图片.json", "加载图片合成视频.json")): + if p.endswith( + ("视频转gif动图图片.json", "加载图片合成视频.json", "双图像或视频合并显示.json") + ): continue if p == PATH or p.endswith("/视频倒放.json"): continue diff --git a/calliope-backend/tests/test_openpose_fixed_document.py b/calliope-backend/tests/test_openpose_fixed_document.py index dbbceb31..c3400a87 100644 --- a/calliope-backend/tests/test_openpose_fixed_document.py +++ b/calliope-backend/tests/test_openpose_fixed_document.py @@ -203,7 +203,11 @@ def test_exact_document_topology_and_preservation(): previous = json.loads(subprocess.check_output(["git", "show", "fec5cca:" + resource], cwd=REPO)) current = json.loads((REPO / resource).read_bytes()) for added in [ - p for p in current if p.endswith(("视频转gif动图图片.json", "加载图片合成视频.json")) + p + for p in current + if p.endswith( + ("视频转gif动图图片.json", "加载图片合成视频.json", "双图像或视频合并显示.json") + ) ]: current[added].pop("fixed_version_document") reverse = next(p for p in current if p.endswith("/视频倒放.json")) @@ -211,7 +215,7 @@ def test_exact_document_topology_and_preservation(): nlf = next(p for p in current if p.endswith("NLF_视频人物动作骨架获取.json")) current[nlf].pop("fixed_version_document") assert current[PATH].pop("fixed_version_document") == BLOCK - assert current == previous and len(DEFINITIONS) == 20 + assert current == previous and len(DEFINITIONS) == 21 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 @@ -219,7 +223,9 @@ def test_exact_document_topology_and_preservation(): assert d["dependencies"]["check_state"] == "unchecked" assert not doc(path="untrusted.json").get("fixed_version") for p in DEFINITIONS: - if p.endswith(("视频转gif动图图片.json", "加载图片合成视频.json")): + if p.endswith( + ("视频转gif动图图片.json", "加载图片合成视频.json", "双图像或视频合并显示.json") + ): continue if p in [PATH, nlf, reverse]: continue diff --git a/calliope-backend/tests/test_reverse_fixed_document.py b/calliope-backend/tests/test_reverse_fixed_document.py index 2b9b1f29..479cd2c0 100644 --- a/calliope-backend/tests/test_reverse_fixed_document.py +++ b/calliope-backend/tests/test_reverse_fixed_document.py @@ -214,11 +214,15 @@ def test_exact_graph_and_original_seventeen_unchanged(): old = json.loads(subprocess.check_output(["git", "show", "ab18cd3:" + resource], cwd=REPO)) now = json.loads((REPO / resource).read_bytes()) for added in [ - p for p in now if p.endswith(("视频转gif动图图片.json", "加载图片合成视频.json")) + p + for p in now + if p.endswith( + ("视频转gif动图图片.json", "加载图片合成视频.json", "双图像或视频合并显示.json") + ) ]: now[added].pop("fixed_version_document") assert now[PATH].pop("fixed_version_document") == BLOCK - assert now == old and len(DEFINITIONS) == 20 + assert now == old and len(DEFINITIONS) == 21 blocks = [r["fixed_version_document"] for r in old.values() if "fixed_version_document" in r] assert len(blocks) == 17 and sum(len(b["fields"]) for b in blocks) == 495 assert ( @@ -227,7 +231,9 @@ def test_exact_graph_and_original_seventeen_unchanged(): assert d["status"] == dict(imported=True, doc_done=False, exec_verified=False) assert d["dependencies"]["check_state"] == "unchecked" for p in DEFINITIONS: - if p.endswith(("视频转gif动图图片.json", "加载图片合成视频.json")): + if p.endswith( + ("视频转gif动图图片.json", "加载图片合成视频.json", "双图像或视频合并显示.json") + ): continue if p == PATH: continue diff --git a/calliope-backend/tests/test_sdpose_fixed_document.py b/calliope-backend/tests/test_sdpose_fixed_document.py index 62712e0e..88d3510a 100644 --- a/calliope-backend/tests/test_sdpose_fixed_document.py +++ b/calliope-backend/tests/test_sdpose_fixed_document.py @@ -153,12 +153,23 @@ def test_real_document_and_frozen_old_fourteen_blocks(): other = next( p for p in DEFINITIONS - if p != PATH and not p.endswith(("NLF_视频人物动作骨架获取.json", "/视频倒放.json")) + if p != PATH + and not p.endswith( + ("NLF_视频人物动作骨架获取.json", "/视频倒放.json", "双图像或视频合并显示.json") + ) ) resource = "calliope-backend/src/calliope/comfyui/source_reviews.json" now = json.loads((REPO / resource).read_bytes()) for added in [ - p for p in now if p.endswith(("视频转gif动图图片.json", "加载图片合成视频.json")) + p + for p in now + if p.endswith( + ( + "视频转gif动图图片.json", + "加载图片合成视频.json", + "双图像或视频合并显示.json", + ) + ) ]: now[added].pop("fixed_version_document") reverse = next(p for p in now if p.endswith("/视频倒放.json")) @@ -170,7 +181,7 @@ def test_real_document_and_frozen_old_fourteen_blocks(): 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) == 20 + assert len(now) == 156 and len(DEFINITIONS) == 21 old_blocks = [ r["fixed_version_document"] for r in old.values() if "fixed_version_document" in r ] diff --git a/docs/hel-892/concat-document-evidence/.gitignore b/docs/hel-892/concat-document-evidence/.gitignore new file mode 100644 index 00000000..47a70286 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/.gitignore @@ -0,0 +1,2 @@ +*.png +__pycache__/ diff --git a/docs/hel-892/concat-document-evidence/actual-双图像或视频合并显示.json b/docs/hel-892/concat-document-evidence/actual-双图像或视频合并显示.json new file mode 100644 index 00000000..a93c3f89 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/actual-双图像或视频合并显示.json @@ -0,0 +1,4334 @@ +{ + "companion_sha": "74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b", + "dependencies": { + "check_state": "unchecked", + "checked_at": null, + "missing": [], + "model_locations": "待目标机提供", + "models": [], + "node_packs": [], + "node_types": [ + "ImageConcatMulti", + "LoadImage", + "PreviewImage", + "VHS_LoadVideo", + "VHS_VideoCombine", + "VHS_VideoInfoLoaded" + ], + "source": null + }, + "draft": true, + "errors": [ + { + "fix": "按具体节点补材料或提供原 ComfyUI API 导出。", + "symptom": "LoadImage 包含静音/旁路状态,需 API 导出核对" + }, + { + "fix": "按具体节点补材料或提供原 ComfyUI API 导出。", + "symptom": "LoadImage 包含静音/旁路状态,需 API 导出核对" + }, + { + "fix": "按具体节点补材料或提供原 ComfyUI API 导出。", + "symptom": "PreviewImage 包含静音/旁路状态,需 API 导出核对" + }, + { + "fix": "按具体节点补材料或提供原 ComfyUI API 导出。", + "symptom": "ImageConcatMulti 包含静音/旁路状态,需 API 导出核对" + }, + { + "fix": "按具体节点补材料或提供原 ComfyUI API 导出。", + "symptom": "待提供目标机节点定义:VHS_VideoInfoLoaded" + }, + { + "fix": "按具体节点补材料或提供原 ComfyUI API 导出。", + "symptom": "待提供目标机节点定义:VHS_VideoCombine" + }, + { + "fix": "按具体节点补材料或提供原 ComfyUI API 导出。", + "symptom": "待提供目标机节点定义:VHS_LoadVideo" + }, + { + "fix": "按具体节点补材料或提供原 ComfyUI API 导出。", + "symptom": "待提供目标机节点定义:VHS_LoadVideo" + }, + { + "fix": "按具体节点补材料或提供原 ComfyUI API 导出。", + "symptom": "待提供目标机节点定义:ImageConcatMulti" + }, + { + "fix": "按具体节点补材料或提供原 ComfyUI API 导出。", + "symptom": "未得到可执行节点" + } + ], + "fixed_version": { + "canonical_sha256": "0a5fad1a4d9b69b6633cbd5e3b2aa253a4df5d26234e885e156c63a3d0f6e1c9", + "comments": [], + "counts": { + "final_prompt_constructed": false, + "final_scalars": 0, + "frontend_only": 8, + "history_objects": 3, + "linked_saved_fields": 1, + "physical_edges": 9, + "saved_fields": 42, + "scalar_saved_positions": 39, + "source_nodes": 9, + "source_notes": 0 + }, + "fields": [ + { + "class_type": "LoadImage", + "definition_node_id": "1", + "effect": "原文件引用纯文本;core实现按EXIF转置、转RGB,同尺寸多帧可组成批次,返回IMAGE/MASK但MASK未接。节点1/2均mode4,不能把两图视为已成功合成。", + "evidence": [ + 18, + 20 + ], + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "image", + "json_type": "str", + "label": "图片文件引用", + "limits": "普通图片文件,image_upload=true", + "node_id": "1", + "pointer": "/nodes/0/widgets_values/0", + "role": "scalar", + "schema_default": "动态input目录枚举,无固定默认", + "scope": "root", + "type": "COMBO", + "unit": "文件引用", + "value": "小云雀_1770719334800_0_m.jpg" + }, + { + "class_type": "LoadImage", + "definition_node_id": "1", + "effect": "保存image不是第二张图片,也不证明上传完成;该位置前端身份/恢复次序未核,不借其他前端版本具名。", + "evidence": [ + 18 + ], + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "saved_position_1", + "json_type": "str", + "label": "图片上传选择占位", + "limits": "原值image;前端版本缺失", + "node_id": "1", + "pointer": "/nodes/0/widgets_values/1", + "role": "frontend_state_unknown", + "schema_default": "服务端只声明image;此槽无服务端默认", + "scope": "root", + "type": "未确认前端状态", + "unit": "状态字符串", + "value": "image" + }, + { + "class_type": "LoadImage", + "definition_node_id": "2", + "effect": "原文件引用纯文本;core实现按EXIF转置、转RGB,同尺寸多帧可组成批次,返回IMAGE/MASK但MASK未接。节点1/2均mode4,不能把两图视为已成功合成。", + "evidence": [ + 18, + 20 + ], + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "image", + "json_type": "str", + "label": "图片文件引用", + "limits": "普通图片文件,image_upload=true", + "node_id": "2", + "pointer": "/nodes/1/widgets_values/0", + "role": "scalar", + "schema_default": "动态input目录枚举,无固定默认", + "scope": "root", + "type": "COMBO", + "unit": "文件引用", + "value": "ComfyUI_00038.png" + }, + { + "class_type": "LoadImage", + "definition_node_id": "2", + "effect": "保存image不是第二张图片,也不证明上传完成;该位置前端身份/恢复次序未核,不借其他前端版本具名。", + "evidence": [ + 18 + ], + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "saved_position_1", + "json_type": "str", + "label": "图片上传选择占位", + "limits": "原值image;前端版本缺失", + "node_id": "2", + "pointer": "/nodes/1/widgets_values/1", + "role": "frontend_state_unknown", + "schema_default": "服务端只声明image;此槽无服务端默认", + "scope": "root", + "type": "未确认前端状态", + "unit": "状态字符串", + "value": "image" + }, + { + "class_type": "ImageConcatMulti", + "definition_node_id": "4", + "effect": "保存2,按image_1与image_2次序逐次拼接;缺少后续输入参考实现使用第一图形状零张量,不证明本图缺失。", + "evidence": [ + 14, + 15, + 17 + ], + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "inputcount", + "json_type": "int", + "label": "拼接输入数量", + "limits": "2~1000,step1", + "node_id": "4", + "pointer": "/nodes/3/widgets_values/0", + "role": "scalar", + "schema_default": "2", + "scope": "root", + "type": "INT", + "unit": "图像输入", + "value": 2 + }, + { + "class_type": "ImageConcatMulti", + "definition_node_id": "4", + "effect": "保存down,把第二幅画面放在第一幅下方;节点9第一输入来自6,第二来自8。是空间上下拼接,不是时间顺接。", + "evidence": [ + 14, + 15, + 17 + ], + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "direction", + "json_type": "str", + "label": "拼接方向", + "limits": "right/down/left/up", + "node_id": "4", + "pointer": "/nodes/3/widgets_values/1", + "role": "scalar", + "schema_default": "right", + "scope": "root", + "type": "COMBO", + "unit": "方向", + "value": "down" + }, + { + "class_type": "ImageConcatMulti", + "definition_node_id": "4", + "effect": "保存true;down匹配第一输入宽度,第二输入高度按其原比例int计算,用lanczos/disabled缩放。批次数不同时,较短批次重复末帧补到较长;这不是时间或音频同步。通道不同时补全1通道。", + "evidence": [ + 14, + 15, + 17 + ], + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "match_image_size", + "json_type": "bool", + "label": "匹配图像尺寸", + "limits": "true/false", + "node_id": "4", + "pointer": "/nodes/3/widgets_values/2", + "role": "scalar", + "schema_default": "false", + "scope": "root", + "type": "BOOLEAN", + "unit": "布尔", + "value": true + }, + { + "class_type": "ImageConcatMulti", + "definition_node_id": "4", + "effect": "准确KJ JS会创建值null的Update inputs按钮并按inputcount增删IMAGE输入;缺本图前端版本/UE恢复证据,不能确定第4保存槽最终身份或恢复效果,不作为执行参数。", + "evidence": [ + 16, + 14 + ], + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "saved_position_3", + "json_type": "NoneType", + "label": "额外null保存槽(按钮候选)", + "limits": "原值null;无frontendVersion,不等同缺键或空对象", + "node_id": "4", + "pointer": "/nodes/3/widgets_values/3", + "role": "frontend_state_unknown", + "schema_default": "本提交JS创建Update inputs按钮,服务端无此参数", + "scope": "root", + "type": "未确认前端状态", + "unit": "无可确认单位", + "value": null + }, + { + "class_type": "VHS_VideoCombine", + "definition_node_id": "10", + "effect": "保存8不是最终执行值:6槽3→11.video_info,11槽0→10.frame_rate覆盖8。VideoInfoLoaded输出素材6的loaded_fps;实际FPS未知,缓存30.000001657458657不是输出保证。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "frame_rate", + "json_type": "int", + "label": "合成播放帧率(已连线覆盖)", + "limits": "min1,step1;schema未声明max", + "node_id": "10", + "pointer": "/nodes/5/widgets_values/frame_rate", + "role": "scalar", + "schema_default": "8", + "scope": "root", + "type": "FLOAT/INT(floatOrInt)", + "unit": "帧/秒", + "value": 8 + }, + { + "class_type": "VHS_VideoCombine", + "definition_node_id": "10", + "effect": "保存0不追加视频loop滤镜,不把GIF循环0规则套视频。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "loop_count", + "json_type": "int", + "label": "视频额外循环", + "limits": "0~100,step1", + "node_id": "10", + "pointer": "/nodes/5/widgets_values/loop_count", + "role": "scalar", + "schema_default": "0", + "scope": "root", + "type": "INT", + "unit": "循环", + "value": 0 + }, + { + "class_type": "VHS_VideoCombine", + "definition_node_id": "10", + "effect": "保存AnimateDiff参与路径和计数命名;不是已有产物。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "filename_prefix", + "json_type": "str", + "label": "输出文件名前缀", + "limits": "无schema长度范围;权限与目标目录未知", + "node_id": "10", + "pointer": "/nodes/5/widgets_values/filename_prefix", + "role": "scalar", + "schema_default": "AnimateDiff", + "scope": "root", + "type": "STRING", + "unit": "路径前缀", + "value": "AnimateDiff" + }, + { + "class_type": "VHS_VideoCombine", + "definition_node_id": "10", + "effect": "保存video/h264-mp4走FFmpeg/libx264模板;编码器与目标动态选项未知。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "format", + "json_type": "str", + "label": "合成输出格式", + "limits": "image/gif、image/webp和动态FFmpeg模板", + "node_id": "10", + "pointer": "/nodes/5/widgets_values/format", + "role": "scalar", + "schema_default": "首项image/gif;动态视频格式无唯一目标默认", + "scope": "root", + "type": "COMBO", + "unit": "格式名", + "value": "video/h264-mp4" + }, + { + "class_type": "VHS_VideoCombine", + "definition_node_id": "10", + "effect": "保存yuv420p;视频分支还可能按dim_alignment默认2补边,实际尺寸未知。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "pix_fmt", + "json_type": "str", + "label": "视频像素格式", + "limits": "yuv420p / yuv420p10le", + "node_id": "10", + "pointer": "/nodes/5/widgets_values/pix_fmt", + "role": "scalar", + "schema_default": "首项yuv420p", + "scope": "root", + "type": "COMBO", + "unit": "像素格式", + "value": "yuv420p" + }, + { + "class_type": "VHS_VideoCombine", + "definition_node_id": "10", + "effect": "保存19交给libx264的-crf;一般减小会提高质量并可能增大体积,实际效果未测。模板100不保证编码器接受100。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "crf", + "json_type": "int", + "label": "H264质量参数", + "limits": "模板0~100,step1;编码器可接受范围另待核", + "node_id": "10", + "pointer": "/nodes/5/widgets_values/crf", + "role": "scalar", + "schema_default": "19", + "scope": "root", + "type": "INT", + "unit": "CRF", + "value": 19 + }, + { + "class_type": "VHS_VideoCombine", + "definition_node_id": "10", + "effect": "保存true在视频元数据条件分支写入信息;独立首帧workflow PNG由VHS_MetadataImage默认true控制。两者不是同一开关。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "save_metadata", + "json_type": "bool", + "label": "视频元数据开关", + "limits": "true/false;视频元数据分支", + "node_id": "10", + "pointer": "/nodes/5/widgets_values/save_metadata", + "role": "scalar", + "schema_default": "true", + "scope": "root", + "type": "BOOLEAN", + "unit": "布尔", + "value": true + }, + { + "class_type": "VHS_VideoCombine", + "definition_node_id": "10", + "effect": "源false不是关闭音频。准确模板实现把布尔false转成字符串False,混流添加apad=whole_dur(输出帧数/合成帧率+1)并带-shortest;仍不保证跨素材同步或实际完整时长。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "trim_to_audio", + "json_type": "bool", + "label": "按音频条件裁切", + "limits": "仅有效音频波形存在时进入混流", + "node_id": "10", + "pointer": "/nodes/5/widgets_values/trim_to_audio", + "role": "scalar", + "schema_default": "false", + "scope": "root", + "type": "BOOLEAN", + "unit": "布尔", + "value": false + }, + { + "class_type": "VHS_VideoCombine", + "definition_node_id": "10", + "effect": "保存false不追加往返帧;不代表素材原先没有倒序。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "pingpong", + "json_type": "bool", + "label": "追加往返帧", + "limits": "true/false;meta_batch限制见实现", + "node_id": "10", + "pointer": "/nodes/5/widgets_values/pingpong", + "role": "scalar", + "schema_default": "false", + "scope": "root", + "type": "BOOLEAN", + "unit": "布尔", + "value": false + }, + { + "class_type": "VHS_VideoCombine", + "definition_node_id": "10", + "effect": "保存true选择正式输出目录;运行可能写首帧PNG、无声视频和-audio混流文件。VHS_KeepIntermediate=false才按条件移除中间文件;本轮GET不执行文件生成。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "save_output", + "json_type": "bool", + "label": "保存目录选择", + "limits": "true为output;false为temp;均可能写文件", + "node_id": "10", + "pointer": "/nodes/5/widgets_values/save_output", + "role": "scalar", + "schema_default": "true", + "scope": "root", + "type": "BOOLEAN", + "unit": "布尔", + "value": true + }, + { + "class_type": "VHS_VideoCombine", + "definition_node_id": "10", + "effect": "只代表历史缓存;filename/type/E盘fullpath/workflow PNG/缓存FPS都不是当前产物或可达证明。纯文本显示,不请求api/view或媒体。", + "evidence": [ + 10, + 8 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "videopreview", + "json_type": "dict", + "label": "历史预览完整对象", + "limits": "hidden/paused/params原样保存;嵌套不重复计数", + "node_id": "10", + "pointer": "/nodes/5/widgets_values/videopreview", + "role": "frontend_history", + "schema_default": "无服务端默认", + "scope": "root", + "type": "前端历史状态", + "unit": "完整对象", + "value": { + "hidden": false, + "params": { + "filename": "AnimateDiff_00011-audio.mp4", + "format": "video/h264-mp4", + "frame_rate": 30.000001657458657, + "fullpath": "E:\\ComfyUI-Data\\output\\AnimateDiff_00011-audio.mp4", + "subfolder": "", + "type": "output", + "workflow": "AnimateDiff_00011.png" + }, + "paused": false + } + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "8", + "effect": "保存引用,不证明素材存在、音轨存在或实际已上传。", + "evidence": [ + 0, + 1, + 2, + 12, + 9 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "video", + "json_type": "str", + "label": "视频文件引用", + "limits": "只枚举普通文件webm/mp4/mkv/gif/mov", + "node_id": "8", + "pointer": "/nodes/6/widgets_values/video", + "role": "scalar", + "schema_default": "动态input目录枚举,无固定默认", + "scope": "root", + "type": "COMBO", + "unit": "文件引用", + "value": "2月10日.mp4" + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "8", + "effect": "两加载器保存0表示按源帧时间采样,不代表实际FPS为0,也不保证两素材同帧率。", + "evidence": [ + 0, + 1, + 2, + 12, + 9 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "force_rate", + "json_type": "int", + "label": "加载采样帧率", + "limits": "0~60,step1;0禁用强制重采样", + "node_id": "8", + "pointer": "/nodes/6/widgets_values/force_rate", + "role": "scalar", + "schema_default": "0", + "scope": "root", + "type": "FLOAT/INT(floatOrInt)", + "unit": "帧/秒", + "value": 0 + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "8", + "effect": "宽高均0从媒体尺寸出发,仍受AnimateDiff的dim8对齐;不是保证原尺寸。", + "evidence": [ + 0, + 1, + 2, + 12, + 9 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "custom_width", + "json_type": "int", + "label": "自定义加载宽度", + "limits": "0~8192;0不指定", + "node_id": "8", + "pointer": "/nodes/6/widgets_values/custom_width", + "role": "scalar", + "schema_default": "0", + "scope": "root", + "type": "INT", + "unit": "像素", + "value": 0 + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "8", + "effect": "单边指定时按比例计算另一边;两边0仍受格式对齐,不读取真实尺寸。", + "evidence": [ + 0, + 1, + 2, + 12, + 9 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "custom_height", + "json_type": "int", + "label": "自定义加载高度", + "limits": "0~8192;0不指定", + "node_id": "8", + "pointer": "/nodes/6/widgets_values/custom_height", + "role": "scalar", + "schema_default": "0", + "scope": "root", + "type": "INT", + "unit": "像素", + "value": 0 + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "8", + "effect": "素材6保存62、素材8保存64,分别限制加载数量;不是保证实际帧数、同长或对齐。仍受素材、内存和格式条件限制。", + "evidence": [ + 0, + 1, + 2, + 12, + 9 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "frame_load_cap", + "json_type": "int", + "label": "加载帧数上限", + "limits": "0~2**53-1,step1;0不设此上限", + "node_id": "8", + "pointer": "/nodes/6/widgets_values/frame_load_cap", + "role": "scalar", + "schema_default": "0", + "scope": "root", + "type": "INT", + "unit": "采样帧", + "value": 64 + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "8", + "effect": "素材6保存53、素材8保存55;采样后计数,各自起点不同,不是跨素材时间同步。音频参考起点为本加载器skip乘target_frame_time。", + "evidence": [ + 0, + 1, + 2, + 12, + 9 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "skip_first_frames", + "json_type": "int", + "label": "跳过起始采样帧", + "limits": "0~2**53-1,step1", + "node_id": "8", + "pointer": "/nodes/6/widgets_values/skip_first_frames", + "role": "scalar", + "schema_default": "0", + "scope": "root", + "type": "INT", + "unit": "采样帧", + "value": 55 + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "8", + "effect": "保存1不再间隔删帧;增大值改变loaded_fps和音频时长参数,不能自动对齐另一素材。", + "evidence": [ + 0, + 1, + 2, + 12, + 9 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "select_every_nth", + "json_type": "int", + "label": "间隔抽取采样帧", + "limits": "1~2**53-1,step1", + "node_id": "8", + "pointer": "/nodes/6/widgets_values/select_every_nth", + "role": "scalar", + "schema_default": "1", + "scope": "root", + "type": "INT", + "unit": "间隔", + "value": 1 + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "8", + "effect": "保存AnimateDiff有内置target_rate8和dim8;Python尺寸约束不等于强制把保存force0重写8。未知前端回调/恢复顺序不作保证。", + "evidence": [ + 0, + 1, + 2, + 12, + 9 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "format", + "json_type": "str", + "label": "加载格式约束", + "limits": "内置格式与核心动态扩展,目标选项未知", + "node_id": "8", + "pointer": "/nodes/6/widgets_values/format", + "role": "scalar", + "schema_default": "AnimateDiff", + "scope": "root", + "type": "COMBO", + "unit": "格式名", + "value": "AnimateDiff" + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "8", + "effect": "只代表历史缓存;filename/type/E盘fullpath/workflow PNG/缓存FPS都不是当前产物或可达证明。纯文本显示,不请求api/view或媒体。", + "evidence": [ + 10, + 8 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "videopreview", + "json_type": "dict", + "label": "历史预览完整对象", + "limits": "hidden/paused/params原样保存;嵌套不重复计数", + "node_id": "8", + "pointer": "/nodes/6/widgets_values/videopreview", + "role": "frontend_history", + "schema_default": "无服务端默认", + "scope": "root", + "type": "前端历史状态", + "unit": "完整对象", + "value": { + "hidden": false, + "params": { + "custom_height": 0, + "custom_width": 0, + "filename": "2月10日.mp4", + "force_rate": 0, + "format": "video/mp4", + "frame_load_cap": 64, + "select_every_nth": 1, + "skip_first_frames": 55, + "type": "input" + }, + "paused": false + } + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "6", + "effect": "保存引用,不证明素材存在、音轨存在或实际已上传。", + "evidence": [ + 0, + 1, + 2, + 12, + 9 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "video", + "json_type": "str", + "label": "视频文件引用", + "limits": "只枚举普通文件webm/mp4/mkv/gif/mov", + "node_id": "6", + "pointer": "/nodes/7/widgets_values/video", + "role": "scalar", + "schema_default": "动态input目录枚举,无固定默认", + "scope": "root", + "type": "COMBO", + "unit": "文件引用", + "value": "小云雀_1770719334800_0_m.mp4" + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "6", + "effect": "两加载器保存0表示按源帧时间采样,不代表实际FPS为0,也不保证两素材同帧率。", + "evidence": [ + 0, + 1, + 2, + 12, + 9 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "force_rate", + "json_type": "int", + "label": "加载采样帧率", + "limits": "0~60,step1;0禁用强制重采样", + "node_id": "6", + "pointer": "/nodes/7/widgets_values/force_rate", + "role": "scalar", + "schema_default": "0", + "scope": "root", + "type": "FLOAT/INT(floatOrInt)", + "unit": "帧/秒", + "value": 0 + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "6", + "effect": "宽高均0从媒体尺寸出发,仍受AnimateDiff的dim8对齐;不是保证原尺寸。", + "evidence": [ + 0, + 1, + 2, + 12, + 9 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "custom_width", + "json_type": "int", + "label": "自定义加载宽度", + "limits": "0~8192;0不指定", + "node_id": "6", + "pointer": "/nodes/7/widgets_values/custom_width", + "role": "scalar", + "schema_default": "0", + "scope": "root", + "type": "INT", + "unit": "像素", + "value": 0 + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "6", + "effect": "单边指定时按比例计算另一边;两边0仍受格式对齐,不读取真实尺寸。", + "evidence": [ + 0, + 1, + 2, + 12, + 9 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "custom_height", + "json_type": "int", + "label": "自定义加载高度", + "limits": "0~8192;0不指定", + "node_id": "6", + "pointer": "/nodes/7/widgets_values/custom_height", + "role": "scalar", + "schema_default": "0", + "scope": "root", + "type": "INT", + "unit": "像素", + "value": 0 + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "6", + "effect": "素材6保存62、素材8保存64,分别限制加载数量;不是保证实际帧数、同长或对齐。仍受素材、内存和格式条件限制。", + "evidence": [ + 0, + 1, + 2, + 12, + 9 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "frame_load_cap", + "json_type": "int", + "label": "加载帧数上限", + "limits": "0~2**53-1,step1;0不设此上限", + "node_id": "6", + "pointer": "/nodes/7/widgets_values/frame_load_cap", + "role": "scalar", + "schema_default": "0", + "scope": "root", + "type": "INT", + "unit": "采样帧", + "value": 62 + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "6", + "effect": "素材6保存53、素材8保存55;采样后计数,各自起点不同,不是跨素材时间同步。音频参考起点为本加载器skip乘target_frame_time。", + "evidence": [ + 0, + 1, + 2, + 12, + 9 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "skip_first_frames", + "json_type": "int", + "label": "跳过起始采样帧", + "limits": "0~2**53-1,step1", + "node_id": "6", + "pointer": "/nodes/7/widgets_values/skip_first_frames", + "role": "scalar", + "schema_default": "0", + "scope": "root", + "type": "INT", + "unit": "采样帧", + "value": 53 + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "6", + "effect": "保存1不再间隔删帧;增大值改变loaded_fps和音频时长参数,不能自动对齐另一素材。", + "evidence": [ + 0, + 1, + 2, + 12, + 9 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "select_every_nth", + "json_type": "int", + "label": "间隔抽取采样帧", + "limits": "1~2**53-1,step1", + "node_id": "6", + "pointer": "/nodes/7/widgets_values/select_every_nth", + "role": "scalar", + "schema_default": "1", + "scope": "root", + "type": "INT", + "unit": "间隔", + "value": 1 + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "6", + "effect": "保存AnimateDiff有内置target_rate8和dim8;Python尺寸约束不等于强制把保存force0重写8。未知前端回调/恢复顺序不作保证。", + "evidence": [ + 0, + 1, + 2, + 12, + 9 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "format", + "json_type": "str", + "label": "加载格式约束", + "limits": "内置格式与核心动态扩展,目标选项未知", + "node_id": "6", + "pointer": "/nodes/7/widgets_values/format", + "role": "scalar", + "schema_default": "AnimateDiff", + "scope": "root", + "type": "COMBO", + "unit": "格式名", + "value": "AnimateDiff" + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "6", + "effect": "节点6保存image仅是选择控件状态,不证明上传成功,不替换video文件引用。", + "evidence": [ + 9, + 8 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "choose video to upload", + "json_type": "str", + "label": "上传选择保存状态", + "limits": "不是服务端video参数", + "node_id": "6", + "pointer": "/nodes/7/widgets_values/choose video to upload", + "role": "frontend_state", + "schema_default": "无服务端默认", + "scope": "root", + "type": "前端选择状态", + "unit": "状态字符串", + "value": "image" + }, + { + "class_type": "VHS_LoadVideo", + "definition_node_id": "6", + "effect": "只代表历史缓存;filename/type/E盘fullpath/workflow PNG/缓存FPS都不是当前产物或可达证明。纯文本显示,不请求api/view或媒体。", + "evidence": [ + 10, + 8 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "videopreview", + "json_type": "dict", + "label": "历史预览完整对象", + "limits": "hidden/paused/params原样保存;嵌套不重复计数", + "node_id": "6", + "pointer": "/nodes/7/widgets_values/videopreview", + "role": "frontend_history", + "schema_default": "无服务端默认", + "scope": "root", + "type": "前端历史状态", + "unit": "完整对象", + "value": { + "hidden": false, + "params": { + "custom_height": 0, + "custom_width": 0, + "filename": "小云雀_1770719334800_0_m.mp4", + "force_rate": 0, + "format": "video/mp4", + "frame_load_cap": 62, + "select_every_nth": 1, + "skip_first_frames": 53, + "type": "input" + }, + "paused": false + } + }, + { + "class_type": "ImageConcatMulti", + "definition_node_id": "9", + "effect": "保存2,按image_1与image_2次序逐次拼接;缺少后续输入参考实现使用第一图形状零张量,不证明本图缺失。", + "evidence": [ + 14, + 15, + 17 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "inputcount", + "json_type": "int", + "label": "拼接输入数量", + "limits": "2~1000,step1", + "node_id": "9", + "pointer": "/nodes/8/widgets_values/0", + "role": "scalar", + "schema_default": "2", + "scope": "root", + "type": "INT", + "unit": "图像输入", + "value": 2 + }, + { + "class_type": "ImageConcatMulti", + "definition_node_id": "9", + "effect": "保存down,把第二幅画面放在第一幅下方;节点9第一输入来自6,第二来自8。是空间上下拼接,不是时间顺接。", + "evidence": [ + 14, + 15, + 17 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "direction", + "json_type": "str", + "label": "拼接方向", + "limits": "right/down/left/up", + "node_id": "9", + "pointer": "/nodes/8/widgets_values/1", + "role": "scalar", + "schema_default": "right", + "scope": "root", + "type": "COMBO", + "unit": "方向", + "value": "down" + }, + { + "class_type": "ImageConcatMulti", + "definition_node_id": "9", + "effect": "保存true;down匹配第一输入宽度,第二输入高度按其原比例int计算,用lanczos/disabled缩放。批次数不同时,较短批次重复末帧补到较长;这不是时间或音频同步。通道不同时补全1通道。", + "evidence": [ + 14, + 15, + 17 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "match_image_size", + "json_type": "bool", + "label": "匹配图像尺寸", + "limits": "true/false", + "node_id": "9", + "pointer": "/nodes/8/widgets_values/2", + "role": "scalar", + "schema_default": "false", + "scope": "root", + "type": "BOOLEAN", + "unit": "布尔", + "value": true + }, + { + "class_type": "ImageConcatMulti", + "definition_node_id": "9", + "effect": "准确KJ JS会创建值null的Update inputs按钮并按inputcount增删IMAGE输入;缺本图前端版本/UE恢复证据,不能确定第4保存槽最终身份或恢复效果,不作为执行参数。", + "evidence": [ + 16, + 14 + ], + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + "field": "saved_position_3", + "json_type": "NoneType", + "label": "额外null保存槽(按钮候选)", + "limits": "原值null;无frontendVersion,不等同缺键或空对象", + "node_id": "9", + "pointer": "/nodes/8/widgets_values/3", + "role": "frontend_state_unknown", + "schema_default": "本提交JS创建Update inputs按钮,服务端无此参数", + "scope": "root", + "type": "未确认前端状态", + "unit": "无可确认单位", + "value": null + } + ], + "flow": [ + "这张图把两路视频画面上下合并;图片支路四节点均为mode4,不能当作已完成双图合成。活动路径为视频6和8→拼接9→合成10:素材6跳过53、上限62,素材8跳过55、上限64,起点和上限不同。播放帧率由素材6的信息覆盖保存8,音频来自素材8,不能保证跨素材同步。三个预览对象仅为历史缓存;未实跑、目标环境未知、转换保持关闭。", + "图片物理支路1+2→4→5四节点均mode4;两LoadImage引用与上传占位分列,mask未接。Preview5原[]零位置;Info11原{}零位置,不能混同缺键/null。", + "两个Concat4/9均保存[2,down,true,null]。准确KJ下排拼接匹配第一幅宽,按第二幅比例计算高度;批次不等时短批次末帧重复到长批次,不能称自动时间对齐。null槽仅为按钮候选,前端身份未知。", + "视频6与8的force_rate均0,按各自源帧时间采样,实际帧率未知。各自skip/cap不同,不推断原片同长、同时起始、同帧率或输出帧数。", + "帧率覆盖链:6槽3→11.video_info;11槽0 loaded_fps→10.frame_rate,覆盖保存8。11其余四输出未接;缓存30.000001657458657不是实际FPS或产物保证。", + "音频链:8槽2→10.audio,来自第二素材;帧率来自第一素材6。VHS按本加载器skip×target_frame_time为音频起点、cap×抽帧后frame_time为时长参数,不是跨素材共同配音或同步证明。", + "合成保存h264-mp4/yuv420p/crf19,loop0不加视频循环,pingpong=false不追加往返,save_metadata=true。save_output=true选择output而非temp;实际运行可能写独立首帧PNG、无声视频和混流文件,中间文件按VHS_KeepIntermediate条件处理。", + "trim_to_audio=false不等于关闭音频;有效waveform存在才混流。准确模板将布尔false转字符串False,加入apad=whole_dur(输出帧数/合成帧率+1)并带-shortest;不自动跨素材同步,实际音轨/时长未知。", + "6/8加载与10合成的meta_batch/vae均未接;10的VHS_FILENAMES未接,不新增独立出口。PreviewImage按core继承实现为临时PNG/UI结果且RETURN_TYPES为空;源mode4不证明当前执行过。", + "三videopreview对象含完整hidden/paused/params/旧filename/type/fullpath/缓存FPS;只纯文本回读,不访问E盘、api/view、媒体或文件。没有模型节点,不编模型依赖。目标安装、素材、输出目录权限、ffmpeg/libx264、动态选项和真实效果未知。", + "源无frontendVersion,不借近版证明恢复或旁路;VHS包内恢复回调与KJ按钮代码分别作参考。所有UE空映射不证明无改写,身份/钩子次序未知,不扩展调查。", + "源物理边:[1, 1, 0, 4, 0, \"IMAGE\"]", + "源物理边:[2, 2, 0, 4, 1, \"IMAGE\"]", + "源物理边:[3, 4, 0, 5, 0, \"IMAGE\"]", + "源物理边:[4, 9, 0, 10, 0, \"IMAGE\"]", + "源物理边:[7, 6, 3, 11, 0, \"VHS_VIDEOINFO\"]", + "源物理边:[8, 11, 0, 10, 4, \"FLOAT\"]", + "源物理边:[10, 6, 0, 9, 0, \"IMAGE\"]", + "源物理边:[11, 8, 0, 9, 1, \"IMAGE\"]", + "源物理边:[14, 8, 2, 10, 1, \"AUDIO\"]", + "节点1 LoadImage mode=4;保存位置=2;原properties={\"cnr_id\": \"comfy-core\", \"ver\": \"0.12.3\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"LoadImage\"}", + "节点2 LoadImage mode=4;保存位置=2;原properties={\"cnr_id\": \"comfy-core\", \"ver\": \"0.12.3\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"LoadImage\"}", + "节点5 PreviewImage mode=4;保存位置=0;原properties={\"cnr_id\": \"comfy-core\", \"ver\": \"0.12.3\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"PreviewImage\"}", + "节点4 ImageConcatMulti mode=4;保存位置=4;原properties={\"cnr_id\": \"comfyui-kjnodes\", \"ver\": \"50a0837f9aea602b184bbf6dbabf66ed2c7a1d22\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}}", + "节点11 VHS_VideoInfoLoaded mode=0;保存位置=0;原properties={\"cnr_id\": \"comfyui-videohelpersuite\", \"ver\": \"1.7.9\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"VHS_VideoInfoLoaded\"}", + "节点10 VHS_VideoCombine mode=0;保存位置=11;原properties={\"cnr_id\": \"comfyui-videohelpersuite\", \"ver\": \"1.7.9\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"VHS_VideoCombine\"}", + "节点8 VHS_LoadVideo mode=0;保存位置=9;原properties={\"cnr_id\": \"comfyui-videohelpersuite\", \"ver\": \"1.7.9\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"VHS_LoadVideo\"}", + "节点6 VHS_LoadVideo mode=0;保存位置=10;原properties={\"cnr_id\": \"comfyui-videohelpersuite\", \"ver\": \"1.7.9\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"VHS_LoadVideo\"}", + "节点9 ImageConcatMulti mode=0;保存位置=4;原properties={\"cnr_id\": \"comfyui-kjnodes\", \"ver\": \"50a0837f9aea602b184bbf6dbabf66ed2c7a1d22\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}}" + ], + "flow_evidence": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23 + ], + "matched": true, + "notice": "声明版本固定源码仅作参考;图片支路mode4、跨素材音画同步未知、历史缓存非产物,未实跑、转换保持关闭。", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_sha1": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_sha256": "61a0b1a2aa17a7d8c4f09f4f57e276eaf37227f69b5fc5789193005e593548c9", + "sources": [ + { + "claim": "加载格式、尺寸对齐、采样、跳过和上限", + "commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8", + "file": "videohelpersuite/load_video_nodes.py", + "git_commit_binding": "unknown", + "id": "vhs", + "lines": [ + 22, + 168 + ], + "local_file": "../concat-reference/vhs__videohelpersuite__load_video_nodes.py", + "sha256": "8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee", + "url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip" + }, + { + "claim": "内存条件、音频起点和时长参数、loaded_fps返回", + "commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8", + "file": "videohelpersuite/load_video_nodes.py", + "git_commit_binding": "unknown", + "id": "vhs", + "lines": [ + 293, + 420 + ], + "local_file": "../concat-reference/vhs__videohelpersuite__load_video_nodes.py", + "sha256": "8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee", + "url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip" + }, + { + "claim": "上传加载schema、输出槽和文件引用验证", + "commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8", + "file": "videohelpersuite/load_video_nodes.py", + "git_commit_binding": "unknown", + "id": "vhs", + "lines": [ + 423, + 477 + ], + "local_file": "../concat-reference/vhs__videohelpersuite__load_video_nodes.py", + "sha256": "8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee", + "url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip" + }, + { + "claim": "模板参数str展开、布尔False转字符串False、元数据临时文件条件", + "commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8", + "file": "videohelpersuite/nodes.py", + "git_commit_binding": "unknown", + "id": "vhs", + "lines": [ + 48, + 165 + ], + "local_file": "../concat-reference/vhs__videohelpersuite__nodes.py", + "sha256": "6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442", + "url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip" + }, + { + "claim": "合成schema、目录和独立首帧PNG条件", + "commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8", + "file": "videohelpersuite/nodes.py", + "git_commit_binding": "unknown", + "id": "vhs", + "lines": [ + 235, + 420 + ], + "local_file": "../concat-reference/vhs__videohelpersuite__nodes.py", + "sha256": "6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442", + "url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip" + }, + { + "claim": "视频编码、补边、循环、音频波形混流和中间文件条件", + "commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8", + "file": "videohelpersuite/nodes.py", + "git_commit_binding": "unknown", + "id": "vhs", + "lines": [ + 420, + 625 + ], + "local_file": "../concat-reference/vhs__videohelpersuite__nodes.py", + "sha256": "6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442", + "url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip" + }, + { + "claim": "VideoInfoLoaded按loaded键输出五槽,槽0为loaded_fps", + "commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8", + "file": "videohelpersuite/nodes.py", + "git_commit_binding": "unknown", + "id": "vhs", + "lines": [ + 941, + 971 + ], + "local_file": "../concat-reference/vhs__videohelpersuite__nodes.py", + "sha256": "6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442", + "url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip" + }, + { + "claim": "H264格式、像素格式、CRF和音频裁切模板", + "commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8", + "file": "video_formats/h264-mp4.json", + "git_commit_binding": "unknown", + "id": "vhs", + "lines": [ + 1, + 15 + ], + "local_file": "../concat-reference/vhs__video_formats__h264-mp4.json", + "sha256": "736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8", + "url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip" + }, + { + "claim": "VHS包内保存恢复代码;不证明未知前端或UE恢复次序", + "commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8", + "file": "web/js/VHS.core.js", + "git_commit_binding": "unknown", + "id": "vhs", + "lines": [ + 41, + 168 + ], + "local_file": "../concat-reference/vhs__web__js__VHS.core.js", + "sha256": "437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f", + "url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip" + }, + { + "claim": "格式回调和上传选择控件", + "commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8", + "file": "web/js/VHS.core.js", + "git_commit_binding": "unknown", + "id": "vhs", + "lines": [ + 648, + 824 + ], + "local_file": "../concat-reference/vhs__web__js__VHS.core.js", + "sha256": "437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f", + "url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip" + }, + { + "claim": "预览控件保存历史状态", + "commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8", + "file": "web/js/VHS.core.js", + "git_commit_binding": "unknown", + "id": "vhs", + "lines": [ + 915, + 970 + ], + "local_file": "../concat-reference/vhs__web__js__VHS.core.js", + "sha256": "437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f", + "url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip" + }, + { + "claim": "格式改变时额外控件重建", + "commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8", + "file": "web/js/VHS.core.js", + "git_commit_binding": "unknown", + "id": "vhs", + "lines": [ + 1222, + 1282 + ], + "local_file": "../concat-reference/vhs__web__js__VHS.core.js", + "sha256": "437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f", + "url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip" + }, + { + "claim": "BIGMAX、DIMMAX、floatOrInt", + "commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8", + "file": "videohelpersuite/utils.py", + "git_commit_binding": "unknown", + "id": "vhs", + "lines": [ + 20, + 56 + ], + "local_file": "../concat-reference/vhs__videohelpersuite__utils.py", + "sha256": "ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a", + "url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip" + }, + { + "claim": "VHS加载、合成和视频信息注册", + "commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8", + "file": "videohelpersuite/nodes.py", + "git_commit_binding": "unknown", + "id": "vhs", + "lines": [ + 1023, + 1050 + ], + "local_file": "../concat-reference/vhs__videohelpersuite__nodes.py", + "sha256": "6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442", + "url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip" + }, + { + "claim": "ImageConcatMulti自身schema与循环拼接实现", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "file": "nodes/image_nodes.py", + "id": "kj", + "lines": [ + 2512, + 2561 + ], + "local_file": "../concat-reference/kj__nodes__image_nodes.py", + "sha256": "a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py" + }, + { + "claim": "批次末帧补齐、宽高匹配、通道补齐与方向拼接", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "file": "nodes/image_nodes.py", + "id": "kj", + "lines": [ + 329, + 425 + ], + "local_file": "../concat-reference/kj__nodes__image_nodes.py", + "sha256": "a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py" + }, + { + "claim": "本提交创建Update inputs按钮,null槽身份仍缺前端恢复证明", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "file": "web/js/jsnodes.js", + "id": "kj", + "lines": [ + 36, + 66 + ], + "local_file": "../concat-reference/kj__web__js__jsnodes.js", + "sha256": "0de818b79c5adf96f0d3a62d11cadfb8e4b8f56ed47ef0b2434935b3ee95af23", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/web/js/jsnodes.js" + }, + { + "claim": "KJ注册与类引用", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "file": "__init__.py", + "id": "kj", + "lines": [ + 1, + 180 + ], + "local_file": "../concat-reference/kj____init__.py", + "sha256": "0bc84dab300c15d8421161a97a7e03ddf041b40f9b17377b2450a6075a544cc2", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/__init__.py" + }, + { + "claim": "LoadImage schema、EXIF、批次、RGB和MASK输出", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "file": "nodes.py", + "id": "core", + "lines": [ + 1698, + 1775 + ], + "local_file": "../concat-reference/core__nodes.py", + "sha256": "427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py" + }, + { + "claim": "PreviewImage继承保存实现,临时PNG/UI结果,无返回类型", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "file": "nodes.py", + "id": "core", + "lines": [ + 1625, + 1697 + ], + "local_file": "../concat-reference/core__nodes.py", + "sha256": "427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py" + }, + { + "claim": "core LoadImage与PreviewImage固定注册", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "file": "nodes.py", + "id": "core", + "lines": [ + 2035, + 2055 + ], + "local_file": "../concat-reference/core__nodes.py", + "sha256": "427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py" + }, + { + "claim": "准确版本许可原文", + "commit": "发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8", + "file": "LICENSE", + "git_commit_binding": "unknown", + "id": "vhs", + "lines": [ + 1, + 674 + ], + "local_file": "../concat-reference/vhs__LICENSE", + "sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986", + "url": "https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip" + }, + { + "claim": "准确版本许可原文", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "file": "LICENSE", + "id": "kj", + "lines": [ + 1, + 674 + ], + "local_file": "../concat-reference/kj__LICENSE", + "sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/LICENSE" + }, + { + "claim": "准确版本许可原文", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "file": "LICENSE", + "id": "core", + "lines": [ + 1, + 674 + ], + "local_file": "../concat-reference/core__LICENSE", + "sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/LICENSE" + } + ], + "steps": [ + "这张图把两路视频画面上下合并;图片支路四节点均为mode4,不能当作已完成双图合成。活动路径为视频6和8→拼接9→合成10:素材6跳过53、上限62,素材8跳过55、上限64,起点和上限不同。播放帧率由素材6的信息覆盖保存8,音频来自素材8,不能保证跨素材同步。三个预览对象仅为历史缓存;未实跑、目标环境未知、转换保持关闭。", + "素材要求:两路可读取视频和可选两张图片;此处只显示引用,不读取、上传或验证素材。没有模型节点,不编模型依赖。", + "操作1:先核本图准确插件/core版本与素材,保持停用;图片支路mode4,不自行当作已启用或完成。", + "操作2:分别核两视频起点53/55与帧上限62/64,确认上下画面顺序6在上8在下、尺寸与批次末帧补齐条件。", + "操作3:核6→11→10帧率覆盖与8→10音频来源;不要用保存8或缓存30.000001657458657判断真实输出。", + "常见问题:画面末尾停住可能来自较短批次重复末帧;声音不齐须先核各素材起点和帧率,不能称自动同步。文件名前缀和旧预览不证明已生成;save_metadata与首帧PNG开关独立。", + "目标安装、素材存在性、目录权限、编码器/动态选项和真实效果待后续获准验证;本轮未执行插件、未构造prompt,未定稿、未实跑。" + ], + "user_overview": "这张图把两路视频画面上下合并;图片支路四节点均为mode4,不能当作已完成双图合成。活动路径为视频6和8→拼接9→合成10:素材6跳过53、上限62,素材8跳过55、上限64,起点和上限不同。播放帧率由素材6的信息覆盖保存8,音频来自素材8,不能保证跨素材同步。三个预览对象仅为历史缓存;未实跑、目标环境未知、转换保持关闭。", + "versions": [ + "VHS声明1.7.9,使用官方registry准确发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;完整45成员已复算,Git绑定未知,不套1.7.7。", + "ImageConcatMulti4/9按KJ精确提交50a0837f9aea602b184bbf6dbabf66ed2c7a1d22注册/schema/实现/JS/许可。", + "LoadImage1/2和PreviewImage5按官方core v0.12.3→cb459573c8fa025bbf9ecf312f6af376d659f567固定注册/schema/实现/许可。", + "无frontendVersion;目标安装/UE身份和次序/动态控件恢复未知,固定源码不是运行或目标安装证明。" + ], + "zero_saved_nodes": [ + { + "class_type": "PreviewImage", + "effect": "原widgets_values=[];mode4,继承SaveImage临时PNG/UI输出,无返回类型,未实跑。", + "node_id": "5" + }, + { + "class_type": "VHS_VideoInfoLoaded", + "effect": "原widgets_values={};视频信息槽0 loaded_fps覆盖合成10保存8,其余四槽未接。", + "node_id": "11" + } + ] + }, + "io": { + "inputs": [], + "outputs": [] + }, + "materials": [], + "params": [ + { + "advanced": false, + "default": 8, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "frame_rate", + "max": null, + "min": null, + "name": "frame_rate", + "node_id": "10", + "options": null, + "range_source": "unverified", + "type": "int", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": 0, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "loop_count", + "max": null, + "min": null, + "name": "loop_count", + "node_id": "10", + "options": null, + "range_source": "unverified", + "type": "int", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": "AnimateDiff", + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "filename_prefix", + "max": null, + "min": null, + "name": "filename_prefix", + "node_id": "10", + "options": null, + "range_source": "unverified", + "type": "str", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": "video/h264-mp4", + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "format", + "max": null, + "min": null, + "name": "format", + "node_id": "10", + "options": null, + "range_source": "unverified", + "type": "str", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": "yuv420p", + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "pix_fmt", + "max": null, + "min": null, + "name": "pix_fmt", + "node_id": "10", + "options": null, + "range_source": "unverified", + "type": "str", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": 19, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "crf", + "max": null, + "min": null, + "name": "crf", + "node_id": "10", + "options": null, + "range_source": "unverified", + "type": "int", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": true, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "save_metadata", + "max": null, + "min": null, + "name": "save_metadata", + "node_id": "10", + "options": null, + "range_source": "unverified", + "type": "bool", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": false, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "trim_to_audio", + "max": null, + "min": null, + "name": "trim_to_audio", + "node_id": "10", + "options": null, + "range_source": "unverified", + "type": "bool", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": false, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "pingpong", + "max": null, + "min": null, + "name": "pingpong", + "node_id": "10", + "options": null, + "range_source": "unverified", + "type": "bool", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": true, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "save_output", + "max": null, + "min": null, + "name": "save_output", + "node_id": "10", + "options": null, + "range_source": "unverified", + "type": "bool", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": "2月10日.mp4", + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "video", + "max": null, + "min": null, + "name": "video", + "node_id": "8", + "options": null, + "range_source": "unverified", + "type": "str", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": 0, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "force_rate", + "max": null, + "min": null, + "name": "force_rate", + "node_id": "8", + "options": null, + "range_source": "unverified", + "type": "int", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": 0, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "custom_width", + "max": null, + "min": null, + "name": "custom_width", + "node_id": "8", + "options": null, + "range_source": "unverified", + "type": "int", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": 0, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "custom_height", + "max": null, + "min": null, + "name": "custom_height", + "node_id": "8", + "options": null, + "range_source": "unverified", + "type": "int", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": 64, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "frame_load_cap", + "max": null, + "min": null, + "name": "frame_load_cap", + "node_id": "8", + "options": null, + "range_source": "unverified", + "type": "int", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": 55, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "skip_first_frames", + "max": null, + "min": null, + "name": "skip_first_frames", + "node_id": "8", + "options": null, + "range_source": "unverified", + "type": "int", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": 1, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "select_every_nth", + "max": null, + "min": null, + "name": "select_every_nth", + "node_id": "8", + "options": null, + "range_source": "unverified", + "type": "int", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": "AnimateDiff", + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "format", + "max": null, + "min": null, + "name": "format", + "node_id": "8", + "options": null, + "range_source": "unverified", + "type": "str", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": "小云雀_1770719334800_0_m.mp4", + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "video", + "max": null, + "min": null, + "name": "video", + "node_id": "6", + "options": null, + "range_source": "unverified", + "type": "str", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": 0, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "force_rate", + "max": null, + "min": null, + "name": "force_rate", + "node_id": "6", + "options": null, + "range_source": "unverified", + "type": "int", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": 0, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "custom_width", + "max": null, + "min": null, + "name": "custom_width", + "node_id": "6", + "options": null, + "range_source": "unverified", + "type": "int", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": 0, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "custom_height", + "max": null, + "min": null, + "name": "custom_height", + "node_id": "6", + "options": null, + "range_source": "unverified", + "type": "int", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": 62, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "frame_load_cap", + "max": null, + "min": null, + "name": "frame_load_cap", + "node_id": "6", + "options": null, + "range_source": "unverified", + "type": "int", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": 53, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "skip_first_frames", + "max": null, + "min": null, + "name": "skip_first_frames", + "node_id": "6", + "options": null, + "range_source": "unverified", + "type": "int", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": 1, + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "select_every_nth", + "max": null, + "min": null, + "name": "select_every_nth", + "node_id": "6", + "options": null, + "range_source": "unverified", + "type": "int", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": "AnimateDiff", + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "format", + "max": null, + "min": null, + "name": "format", + "node_id": "6", + "options": null, + "range_source": "unverified", + "type": "str", + "unit": null, + "value_origin": "ui_named_widget" + }, + { + "advanced": false, + "default": "image", + "default_source": "source_file", + "effect": "待节点定义及人工核对", + "field": "choose video to upload", + "max": null, + "min": null, + "name": "choose video to upload", + "node_id": "6", + "options": null, + "range_source": "unverified", + "type": "str", + "unit": null, + "value_origin": "ui_named_widget" + } + ], + "purpose": "双路图像或视频拼接预览;源图图像分支 mode=4,视频分支由两路 VHS_LoadVideo 进入 ImageConcatMulti。", + "snapshot_sha": "74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b", + "source_links": [ + { + "link": [ + 1, + 1, + 0, + 4, + 0, + "IMAGE" + ], + "scope": "" + }, + { + "link": [ + 2, + 2, + 0, + 4, + 1, + "IMAGE" + ], + "scope": "" + }, + { + "link": [ + 3, + 4, + 0, + 5, + 0, + "IMAGE" + ], + "scope": "" + }, + { + "link": [ + 4, + 9, + 0, + 10, + 0, + "IMAGE" + ], + "scope": "" + }, + { + "link": [ + 7, + 6, + 3, + 11, + 0, + "VHS_VIDEOINFO" + ], + "scope": "" + }, + { + "link": [ + 8, + 11, + 0, + 10, + 4, + "FLOAT" + ], + "scope": "" + }, + { + "link": [ + 10, + 6, + 0, + 9, + 0, + "IMAGE" + ], + "scope": "" + }, + { + "link": [ + 11, + 8, + 0, + 9, + 1, + "IMAGE" + ], + "scope": "" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "scope": "" + } + ], + "source_nodes": [ + { + "class_type": "LoadImage", + "inputs": [ + { + "link": null, + "localized_name": "图像", + "name": "image", + "type": "COMBO", + "widget": { + "name": "image" + } + }, + { + "link": null, + "localized_name": "选择文件上传", + "name": "upload", + "type": "IMAGEUPLOAD", + "widget": { + "name": "upload" + } + } + ], + "mode": 4, + "node_id": "1", + "source_values": [ + "小云雀_1770719334800_0_m.jpg", + "image" + ], + "title": null + }, + { + "class_type": "LoadImage", + "inputs": [ + { + "link": null, + "localized_name": "图像", + "name": "image", + "type": "COMBO", + "widget": { + "name": "image" + } + }, + { + "link": null, + "localized_name": "选择文件上传", + "name": "upload", + "type": "IMAGEUPLOAD", + "widget": { + "name": "upload" + } + } + ], + "mode": 4, + "node_id": "2", + "source_values": [ + "ComfyUI_00038.png", + "image" + ], + "title": null + }, + { + "class_type": "PreviewImage", + "inputs": [ + { + "link": 3, + "localized_name": "图像", + "name": "images", + "type": "IMAGE" + } + ], + "mode": 4, + "node_id": "5", + "source_values": [], + "title": null + }, + { + "class_type": "ImageConcatMulti", + "inputs": [ + { + "label": "图像_1", + "link": 1, + "localized_name": "图像_1", + "name": "image_1", + "type": "IMAGE" + }, + { + "label": "图像_2", + "link": 2, + "localized_name": "图像_2", + "name": "image_2", + "shape": 7, + "type": "IMAGE" + }, + { + "label": "输入数量", + "link": null, + "localized_name": "输入数量", + "name": "inputcount", + "type": "INT", + "widget": { + "name": "inputcount" + } + }, + { + "label": "方向", + "link": null, + "localized_name": "方向", + "name": "direction", + "type": "COMBO", + "widget": { + "name": "direction" + } + }, + { + "label": "匹配尺寸", + "link": null, + "localized_name": "匹配尺寸", + "name": "match_image_size", + "type": "BOOLEAN", + "widget": { + "name": "match_image_size" + } + } + ], + "mode": 4, + "node_id": "4", + "source_values": [ + 2, + "down", + true, + null + ], + "title": null + }, + { + "class_type": "VHS_VideoInfoLoaded", + "inputs": [ + { + "label": "视频信息", + "link": 7, + "localized_name": "视频信息", + "name": "video_info", + "type": "VHS_VIDEOINFO" + } + ], + "mode": 0, + "node_id": "11", + "source_values": {}, + "title": null + }, + { + "class_type": "VHS_VideoCombine", + "inputs": [ + { + "label": "图像", + "link": 4, + "localized_name": "图像", + "name": "images", + "type": "IMAGE" + }, + { + "label": "音频", + "link": 14, + "localized_name": "音频", + "name": "audio", + "shape": 7, + "type": "AUDIO" + }, + { + "label": "批次管理", + "link": null, + "localized_name": "批次管理", + "name": "meta_batch", + "shape": 7, + "type": "VHS_BatchManager" + }, + { + "link": null, + "localized_name": "vae", + "name": "vae", + "shape": 7, + "type": "VAE" + }, + { + "label": "帧率", + "link": 8, + "localized_name": "帧率", + "name": "frame_rate", + "type": "FLOAT", + "widget": { + "name": "frame_rate" + } + }, + { + "label": "循环次数", + "link": null, + "localized_name": "循环次数", + "name": "loop_count", + "type": "INT", + "widget": { + "name": "loop_count" + } + }, + { + "label": "文件名前缀", + "link": null, + "localized_name": "文件名前缀", + "name": "filename_prefix", + "type": "STRING", + "widget": { + "name": "filename_prefix" + } + }, + { + "label": "格式", + "link": null, + "localized_name": "格式", + "name": "format", + "type": "COMBO", + "widget": { + "name": "format" + } + }, + { + "label": "Ping-Pong", + "link": null, + "localized_name": "Ping-Pong", + "name": "pingpong", + "type": "BOOLEAN", + "widget": { + "name": "pingpong" + } + }, + { + "label": "保存到输出文件夹", + "link": null, + "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" + } + }, + { + "label": "保存元数据", + "link": null, + "localized_name": "保存元数据", + "name": "save_metadata", + "type": "BOOLEAN", + "widget": { + "name": "save_metadata" + } + }, + { + "label": "修剪音频", + "link": null, + "localized_name": "修剪音频", + "name": "trim_to_audio", + "type": "BOOLEAN", + "widget": { + "name": "trim_to_audio" + } + } + ], + "mode": 0, + "node_id": "10", + "source_values": { + "crf": 19, + "filename_prefix": "AnimateDiff", + "format": "video/h264-mp4", + "frame_rate": 8, + "loop_count": 0, + "pingpong": false, + "pix_fmt": "yuv420p", + "save_metadata": true, + "save_output": true, + "trim_to_audio": false, + "videopreview": { + "hidden": false, + "params": { + "filename": "AnimateDiff_00011-audio.mp4", + "format": "video/h264-mp4", + "frame_rate": 30.000001657458657, + "fullpath": "E:\\ComfyUI-Data\\output\\AnimateDiff_00011-audio.mp4", + "subfolder": "", + "type": "output", + "workflow": "AnimateDiff_00011.png" + }, + "paused": false + } + }, + "title": null + }, + { + "class_type": "VHS_LoadVideo", + "inputs": [ + { + "label": "批次管理", + "link": null, + "localized_name": "批次管理", + "name": "meta_batch", + "shape": 7, + "type": "VHS_BatchManager" + }, + { + "link": null, + "localized_name": "vae", + "name": "vae", + "shape": 7, + "type": "VAE" + }, + { + "label": "视频", + "link": null, + "localized_name": "视频", + "name": "video", + "type": "COMBO", + "widget": { + "name": "video" + } + }, + { + "label": "强制帧率", + "link": null, + "localized_name": "强制帧率", + "name": "force_rate", + "type": "FLOAT", + "widget": { + "name": "force_rate" + } + }, + { + "label": "自定义宽度", + "link": null, + "localized_name": "自定义宽度", + "name": "custom_width", + "type": "INT", + "widget": { + "name": "custom_width" + } + }, + { + "label": "自定义高度", + "link": null, + "localized_name": "自定义高度", + "name": "custom_height", + "type": "INT", + "widget": { + "name": "custom_height" + } + }, + { + "label": "帧数读取上限", + "link": null, + "localized_name": "帧数读取上限", + "name": "frame_load_cap", + "type": "INT", + "widget": { + "name": "frame_load_cap" + } + }, + { + "label": "跳过前X帧", + "link": null, + "localized_name": "跳过前X帧", + "name": "skip_first_frames", + "type": "INT", + "widget": { + "name": "skip_first_frames" + } + }, + { + "label": "间隔", + "link": null, + "localized_name": "间隔", + "name": "select_every_nth", + "type": "INT", + "widget": { + "name": "select_every_nth" + } + }, + { + "label": "格式", + "link": null, + "localized_name": "格式", + "name": "format", + "shape": 7, + "type": "COMBO", + "widget": { + "name": "format" + } + } + ], + "mode": 0, + "node_id": "8", + "source_values": { + "custom_height": 0, + "custom_width": 0, + "force_rate": 0, + "format": "AnimateDiff", + "frame_load_cap": 64, + "select_every_nth": 1, + "skip_first_frames": 55, + "video": "2月10日.mp4", + "videopreview": { + "hidden": false, + "params": { + "custom_height": 0, + "custom_width": 0, + "filename": "2月10日.mp4", + "force_rate": 0, + "format": "video/mp4", + "frame_load_cap": 64, + "select_every_nth": 1, + "skip_first_frames": 55, + "type": "input" + }, + "paused": false + } + }, + "title": null + }, + { + "class_type": "VHS_LoadVideo", + "inputs": [ + { + "label": "批次管理", + "link": null, + "localized_name": "批次管理", + "name": "meta_batch", + "shape": 7, + "type": "VHS_BatchManager" + }, + { + "link": null, + "localized_name": "vae", + "name": "vae", + "shape": 7, + "type": "VAE" + }, + { + "label": "视频", + "link": null, + "localized_name": "视频", + "name": "video", + "type": "COMBO", + "widget": { + "name": "video" + } + }, + { + "label": "强制帧率", + "link": null, + "localized_name": "强制帧率", + "name": "force_rate", + "type": "FLOAT", + "widget": { + "name": "force_rate" + } + }, + { + "label": "自定义宽度", + "link": null, + "localized_name": "自定义宽度", + "name": "custom_width", + "type": "INT", + "widget": { + "name": "custom_width" + } + }, + { + "label": "自定义高度", + "link": null, + "localized_name": "自定义高度", + "name": "custom_height", + "type": "INT", + "widget": { + "name": "custom_height" + } + }, + { + "label": "帧数读取上限", + "link": null, + "localized_name": "帧数读取上限", + "name": "frame_load_cap", + "type": "INT", + "widget": { + "name": "frame_load_cap" + } + }, + { + "label": "跳过前X帧", + "link": null, + "localized_name": "跳过前X帧", + "name": "skip_first_frames", + "type": "INT", + "widget": { + "name": "skip_first_frames" + } + }, + { + "label": "间隔", + "link": null, + "localized_name": "间隔", + "name": "select_every_nth", + "type": "INT", + "widget": { + "name": "select_every_nth" + } + }, + { + "label": "格式", + "link": null, + "localized_name": "格式", + "name": "format", + "shape": 7, + "type": "COMBO", + "widget": { + "name": "format" + } + } + ], + "mode": 0, + "node_id": "6", + "source_values": { + "choose video to upload": "image", + "custom_height": 0, + "custom_width": 0, + "force_rate": 0, + "format": "AnimateDiff", + "frame_load_cap": 62, + "select_every_nth": 1, + "skip_first_frames": 53, + "video": "小云雀_1770719334800_0_m.mp4", + "videopreview": { + "hidden": false, + "params": { + "custom_height": 0, + "custom_width": 0, + "filename": "小云雀_1770719334800_0_m.mp4", + "force_rate": 0, + "format": "video/mp4", + "frame_load_cap": 62, + "select_every_nth": 1, + "skip_first_frames": 53, + "type": "input" + }, + "paused": false + } + }, + "title": null + }, + { + "class_type": "ImageConcatMulti", + "inputs": [ + { + "label": "图像_1", + "link": 10, + "localized_name": "图像_1", + "name": "image_1", + "type": "IMAGE" + }, + { + "label": "图像_2", + "link": 11, + "localized_name": "图像_2", + "name": "image_2", + "shape": 7, + "type": "IMAGE" + }, + { + "label": "输入数量", + "link": null, + "localized_name": "输入数量", + "name": "inputcount", + "type": "INT", + "widget": { + "name": "inputcount" + } + }, + { + "label": "方向", + "link": null, + "localized_name": "方向", + "name": "direction", + "type": "COMBO", + "widget": { + "name": "direction" + } + }, + { + "label": "匹配尺寸", + "link": null, + "localized_name": "匹配尺寸", + "name": "match_image_size", + "type": "BOOLEAN", + "widget": { + "name": "match_image_size" + } + } + ], + "mode": 0, + "node_id": "9", + "source_values": [ + 2, + "down", + true, + null + ], + "title": null + } + ], + "source_notes": [], + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_review": { + "complete": false, + "evidence": { + "link_count": 9, + "model_references": [], + "named_value_count": 27, + "node_count": 9, + "note_node_ids": [], + "unnamed_widget_node_ids": [ + "1", + "2", + "4", + "9" + ] + }, + "fourth_review": { + "batch": "HEL-892-fourth", + "classification_counts": { + "frontend_state": 1, + "runtime_parameter": 24 + }, + "fields": [ + [ + "10", + "frame_rate" + ], + [ + "10", + "loop_count" + ], + [ + "10", + "filename_prefix" + ], + [ + "10", + "format" + ], + [ + "10", + "pix_fmt" + ], + [ + "10", + "crf" + ], + [ + "10", + "save_metadata" + ], + [ + "10", + "trim_to_audio" + ], + [ + "10", + "pingpong" + ], + [ + "10", + "save_output" + ], + [ + "8", + "video" + ], + [ + "8", + "force_rate" + ], + [ + "8", + "custom_width" + ], + [ + "8", + "custom_height" + ], + [ + "8", + "frame_load_cap" + ], + [ + "8", + "select_every_nth" + ], + [ + "8", + "format" + ], + [ + "6", + "video" + ], + [ + "6", + "force_rate" + ], + [ + "6", + "custom_width" + ], + [ + "6", + "custom_height" + ], + [ + "6", + "frame_load_cap" + ], + [ + "6", + "select_every_nth" + ], + [ + "6", + "format" + ], + [ + "6", + "choose video to upload" + ] + ], + "operation_check": "本图新增25项具名字段局部审校;逐项按source_review.reviewed_named_fields的具体连线和operation_check核对;前端状态、仅现值和语义未知项不可当作已确认运行语义。", + "unknowns": [ + "全部单位、范围、调整效果待可信节点定义;本图未实跑", + "不更改原图矛盾;原有说明与此前审校完整保留" + ] + }, + "instruction": "两路视频 skip_first_frames 分别为 55 和 53、frame_load_cap 为 64 和 62;先核对截取区间,不能假定两段等长。", + "purpose": "双路图像或视频拼接预览;源图图像分支 mode=4,视频分支由两路 VHS_LoadVideo 进入 ImageConcatMulti。", + "reviewed_named_fields": [ + { + "field": "skip_first_frames", + "label": "第一路跳过帧数", + "node_id": "8", + "scope": "仅核对字段、现值及连线位置;单位/合法范围/调整效果未确认", + "source_value": 55 + }, + { + "field": "skip_first_frames", + "label": "第二路跳过帧数", + "node_id": "6", + "scope": "仅核对字段、现值及连线位置;单位/合法范围/调整效果未确认", + "source_value": 53 + }, + { + "category": "runtime_parameter", + "class_type": "VHS_VideoCombine", + "connections": { + "incoming": [ + { + "link": [ + 4, + 9, + 0, + 10, + 0, + "IMAGE" + ], + "pointer": "/links/3" + }, + { + "link": [ + 8, + 11, + 0, + 10, + 4, + "FLOAT" + ], + "pointer": "/links/5" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "pointer": "/links/8" + } + ], + "outgoing": [] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "frame_rate", + "input_socket": { + "label": "帧率", + "link": 8, + "localized_name": "帧率", + "name": "frame_rate", + "type": "FLOAT", + "widget": { + "name": "frame_rate" + } + }, + "label": "合成节点帧率设置;核对是否另有输入连线覆盖该控件", + "mode": 0, + "node_id": "10", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。同名输入槽另接link=8;保存控件值不代表实际输入值,优先级待真实导出核对。源未列本节点下游连线;是否输出节点及是否被提交仍须原前端导出核对。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/5/widgets_values/frame_rate", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": 8 + }, + { + "category": "runtime_parameter", + "class_type": "VHS_VideoCombine", + "connections": { + "incoming": [ + { + "link": [ + 4, + 9, + 0, + 10, + 0, + "IMAGE" + ], + "pointer": "/links/3" + }, + { + "link": [ + 8, + 11, + 0, + 10, + 4, + "FLOAT" + ], + "pointer": "/links/5" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "pointer": "/links/8" + } + ], + "outgoing": [] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "loop_count", + "input_socket": { + "label": "循环次数", + "link": null, + "localized_name": "循环次数", + "name": "loop_count", + "type": "INT", + "widget": { + "name": "loop_count" + } + }, + "label": "合成阶段的循环次数控件;零值约定和格式适用性待定义", + "mode": 0, + "node_id": "10", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。源未列本节点下游连线;是否输出节点及是否被提交仍须原前端导出核对。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/5/widgets_values/loop_count", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": 0 + }, + { + "category": "runtime_parameter", + "class_type": "VHS_VideoCombine", + "connections": { + "incoming": [ + { + "link": [ + 4, + 9, + 0, + 10, + 0, + "IMAGE" + ], + "pointer": "/links/3" + }, + { + "link": [ + 8, + 11, + 0, + 10, + 4, + "FLOAT" + ], + "pointer": "/links/5" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "pointer": "/links/8" + } + ], + "outgoing": [] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "filename_prefix", + "input_socket": { + "label": "文件名前缀", + "link": null, + "localized_name": "文件名前缀", + "name": "filename_prefix", + "type": "STRING", + "widget": { + "name": "filename_prefix" + } + }, + "label": "输出命名前缀;核对输出分支和目录用途,实际落盘位置待环境核对", + "mode": 0, + "node_id": "10", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。源未列本节点下游连线;是否输出节点及是否被提交仍须原前端导出核对。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/5/widgets_values/filename_prefix", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": "AnimateDiff" + }, + { + "category": "runtime_parameter", + "class_type": "VHS_VideoCombine", + "connections": { + "incoming": [ + { + "link": [ + 4, + 9, + 0, + 10, + 0, + "IMAGE" + ], + "pointer": "/links/3" + }, + { + "link": [ + 8, + 11, + 0, + 10, + 4, + "FLOAT" + ], + "pointer": "/links/5" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "pointer": "/links/8" + } + ], + "outgoing": [] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "format", + "input_socket": { + "label": "格式", + "link": null, + "localized_name": "格式", + "name": "format", + "type": "COMBO", + "widget": { + "name": "format" + } + }, + "label": "视频合成的编码格式选择;与pix_fmt及音轨连线配套核对", + "mode": 0, + "node_id": "10", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。源未列本节点下游连线;是否输出节点及是否被提交仍须原前端导出核对。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/5/widgets_values/format", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": "video/h264-mp4" + }, + { + "category": "runtime_parameter", + "class_type": "VHS_VideoCombine", + "connections": { + "incoming": [ + { + "link": [ + 4, + 9, + 0, + 10, + 0, + "IMAGE" + ], + "pointer": "/links/3" + }, + { + "link": [ + 8, + 11, + 0, + 10, + 4, + "FLOAT" + ], + "pointer": "/links/5" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "pointer": "/links/8" + } + ], + "outgoing": [] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "pix_fmt", + "input_socket": { + "link": null, + "name": "pix_fmt", + "type": [ + "yuv420p", + "yuv420p10le" + ], + "widget": { + "name": "pix_fmt" + } + }, + "label": "视频合成的像素格式选择;与编码格式配套核对", + "mode": 0, + "node_id": "10", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。源未列本节点下游连线;是否输出节点及是否被提交仍须原前端导出核对。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/5/widgets_values/pix_fmt", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": "yuv420p" + }, + { + "category": "runtime_parameter", + "class_type": "VHS_VideoCombine", + "connections": { + "incoming": [ + { + "link": [ + 4, + 9, + 0, + 10, + 0, + "IMAGE" + ], + "pointer": "/links/3" + }, + { + "link": [ + 8, + 11, + 0, + 10, + 4, + "FLOAT" + ], + "pointer": "/links/5" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "pointer": "/links/8" + } + ], + "outgoing": [] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "crf", + "input_socket": { + "link": null, + "name": "crf", + "type": "INT", + "widget": { + "name": "crf" + } + }, + "label": "视频合成编码设置;仅确认处于合成步骤,不给出质量范围或调整效果", + "mode": 0, + "node_id": "10", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。源未列本节点下游连线;是否输出节点及是否被提交仍须原前端导出核对。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/5/widgets_values/crf", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": 19 + }, + { + "category": "runtime_parameter", + "class_type": "VHS_VideoCombine", + "connections": { + "incoming": [ + { + "link": [ + 4, + 9, + 0, + 10, + 0, + "IMAGE" + ], + "pointer": "/links/3" + }, + { + "link": [ + 8, + 11, + 0, + 10, + 4, + "FLOAT" + ], + "pointer": "/links/5" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "pointer": "/links/8" + } + ], + "outgoing": [] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "save_metadata", + "input_socket": { + "label": "保存元数据", + "link": null, + "localized_name": "保存元数据", + "name": "save_metadata", + "type": "BOOLEAN", + "widget": { + "name": "save_metadata" + } + }, + "label": "视频合成的保存元数据开关;具体保存内容待插件定义", + "mode": 0, + "node_id": "10", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。源未列本节点下游连线;是否输出节点及是否被提交仍须原前端导出核对。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/5/widgets_values/save_metadata", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": true + }, + { + "category": "runtime_parameter", + "class_type": "VHS_VideoCombine", + "connections": { + "incoming": [ + { + "link": [ + 4, + 9, + 0, + 10, + 0, + "IMAGE" + ], + "pointer": "/links/3" + }, + { + "link": [ + 8, + 11, + 0, + 10, + 4, + "FLOAT" + ], + "pointer": "/links/5" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "pointer": "/links/8" + } + ], + "outgoing": [] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "trim_to_audio", + "input_socket": { + "label": "修剪音频", + "link": null, + "localized_name": "修剪音频", + "name": "trim_to_audio", + "type": "BOOLEAN", + "widget": { + "name": "trim_to_audio" + } + }, + "label": "视频合成的音频裁剪开关;先核对本节点是否接入音轨", + "mode": 0, + "node_id": "10", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。源未列本节点下游连线;是否输出节点及是否被提交仍须原前端导出核对。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/5/widgets_values/trim_to_audio", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": false + }, + { + "category": "runtime_parameter", + "class_type": "VHS_VideoCombine", + "connections": { + "incoming": [ + { + "link": [ + 4, + 9, + 0, + 10, + 0, + "IMAGE" + ], + "pointer": "/links/3" + }, + { + "link": [ + 8, + 11, + 0, + 10, + 4, + "FLOAT" + ], + "pointer": "/links/5" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "pointer": "/links/8" + } + ], + "outgoing": [] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "pingpong", + "input_socket": { + "label": "Ping-Pong", + "link": null, + "localized_name": "Ping-Pong", + "name": "pingpong", + "type": "BOOLEAN", + "widget": { + "name": "pingpong" + } + }, + "label": "视频合成的Ping-Pong控件;具体帧序列规则待插件定义", + "mode": 0, + "node_id": "10", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。源未列本节点下游连线;是否输出节点及是否被提交仍须原前端导出核对。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/5/widgets_values/pingpong", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": false + }, + { + "category": "runtime_parameter", + "class_type": "VHS_VideoCombine", + "connections": { + "incoming": [ + { + "link": [ + 4, + 9, + 0, + 10, + 0, + "IMAGE" + ], + "pointer": "/links/3" + }, + { + "link": [ + 8, + 11, + 0, + 10, + 4, + "FLOAT" + ], + "pointer": "/links/5" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "pointer": "/links/8" + } + ], + "outgoing": [] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "save_output", + "input_socket": { + "label": "保存到输出文件夹", + "link": null, + "localized_name": "保存到输出文件夹", + "name": "save_output", + "type": "BOOLEAN", + "widget": { + "name": "save_output" + } + }, + "label": "视频合成的保存输出开关;源开关不等于当前已经生成或保存", + "mode": 0, + "node_id": "10", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。源未列本节点下游连线;是否输出节点及是否被提交仍须原前端导出核对。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/5/widgets_values/save_output", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": true + }, + { + "category": "runtime_parameter", + "class_type": "VHS_LoadVideo", + "connections": { + "incoming": [], + "outgoing": [ + { + "link": [ + 11, + 8, + 0, + 9, + 1, + "IMAGE" + ], + "pointer": "/links/7" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "pointer": "/links/8" + } + ] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "video", + "input_socket": { + "label": "视频", + "link": null, + "localized_name": "视频", + "name": "video", + "type": "COMBO", + "widget": { + "name": "video" + } + }, + "label": "加载节点的视频素材选择;核对现值文件是否为本分支所需素材", + "mode": 0, + "node_id": "8", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/6/widgets_values/video", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": "2月10日.mp4" + }, + { + "category": "runtime_parameter", + "class_type": "VHS_LoadVideo", + "connections": { + "incoming": [], + "outgoing": [ + { + "link": [ + 11, + 8, + 0, + 9, + 1, + "IMAGE" + ], + "pointer": "/links/7" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "pointer": "/links/8" + } + ] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "force_rate", + "input_socket": { + "label": "强制帧率", + "link": null, + "localized_name": "强制帧率", + "name": "force_rate", + "type": "FLOAT", + "widget": { + "name": "force_rate" + } + }, + "label": "视频读取阶段的强制帧率控件;零值含义不能从源图确认", + "mode": 0, + "node_id": "8", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/6/widgets_values/force_rate", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": 0 + }, + { + "category": "runtime_parameter", + "class_type": "VHS_LoadVideo", + "connections": { + "incoming": [], + "outgoing": [ + { + "link": [ + 11, + 8, + 0, + 9, + 1, + "IMAGE" + ], + "pointer": "/links/7" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "pointer": "/links/8" + } + ] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "custom_width", + "input_socket": { + "label": "自定义宽度", + "link": null, + "localized_name": "自定义宽度", + "name": "custom_width", + "type": "INT", + "widget": { + "name": "custom_width" + } + }, + "label": "素材加载阶段的自定义宽度控件;零值含义待节点定义", + "mode": 0, + "node_id": "8", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/6/widgets_values/custom_width", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": 0 + }, + { + "category": "runtime_parameter", + "class_type": "VHS_LoadVideo", + "connections": { + "incoming": [], + "outgoing": [ + { + "link": [ + 11, + 8, + 0, + 9, + 1, + "IMAGE" + ], + "pointer": "/links/7" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "pointer": "/links/8" + } + ] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "custom_height", + "input_socket": { + "label": "自定义高度", + "link": null, + "localized_name": "自定义高度", + "name": "custom_height", + "type": "INT", + "widget": { + "name": "custom_height" + } + }, + "label": "素材加载阶段的自定义高度控件;零值含义待节点定义", + "mode": 0, + "node_id": "8", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/6/widgets_values/custom_height", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": 0 + }, + { + "category": "runtime_parameter", + "class_type": "VHS_LoadVideo", + "connections": { + "incoming": [], + "outgoing": [ + { + "link": [ + 11, + 8, + 0, + 9, + 1, + "IMAGE" + ], + "pointer": "/links/7" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "pointer": "/links/8" + } + ] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "frame_load_cap", + "input_socket": { + "label": "帧数读取上限", + "link": null, + "localized_name": "帧数读取上限", + "name": "frame_load_cap", + "type": "INT", + "widget": { + "name": "frame_load_cap" + } + }, + "label": "视频读取上限控件;核对截取分支,不能把零直接解释为无限", + "mode": 0, + "node_id": "8", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/6/widgets_values/frame_load_cap", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": 64 + }, + { + "category": "runtime_parameter", + "class_type": "VHS_LoadVideo", + "connections": { + "incoming": [], + "outgoing": [ + { + "link": [ + 11, + 8, + 0, + 9, + 1, + "IMAGE" + ], + "pointer": "/links/7" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "pointer": "/links/8" + } + ] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "select_every_nth", + "input_socket": { + "label": "间隔", + "link": null, + "localized_name": "间隔", + "name": "select_every_nth", + "type": "INT", + "widget": { + "name": "select_every_nth" + } + }, + "label": "素材读取的间隔选择控件;实际抽帧规则待定义", + "mode": 0, + "node_id": "8", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/6/widgets_values/select_every_nth", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": 1 + }, + { + "category": "runtime_parameter", + "class_type": "VHS_LoadVideo", + "connections": { + "incoming": [], + "outgoing": [ + { + "link": [ + 11, + 8, + 0, + 9, + 1, + "IMAGE" + ], + "pointer": "/links/7" + }, + { + "link": [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ], + "pointer": "/links/8" + } + ] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "format", + "input_socket": { + "label": "格式", + "link": null, + "localized_name": "格式", + "name": "format", + "shape": 7, + "type": "COMBO", + "widget": { + "name": "format" + } + }, + "label": "素材加载的格式选择;AnimateDiff/LTXV是此加载字段现值,不能当作最终输出封装格式", + "mode": 0, + "node_id": "8", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/6/widgets_values/format", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": "AnimateDiff" + }, + { + "category": "runtime_parameter", + "class_type": "VHS_LoadVideo", + "connections": { + "incoming": [], + "outgoing": [ + { + "link": [ + 7, + 6, + 3, + 11, + 0, + "VHS_VIDEOINFO" + ], + "pointer": "/links/4" + }, + { + "link": [ + 10, + 6, + 0, + 9, + 0, + "IMAGE" + ], + "pointer": "/links/6" + } + ] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "video", + "input_socket": { + "label": "视频", + "link": null, + "localized_name": "视频", + "name": "video", + "type": "COMBO", + "widget": { + "name": "video" + } + }, + "label": "加载节点的视频素材选择;核对现值文件是否为本分支所需素材", + "mode": 0, + "node_id": "6", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/7/widgets_values/video", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": "小云雀_1770719334800_0_m.mp4" + }, + { + "category": "runtime_parameter", + "class_type": "VHS_LoadVideo", + "connections": { + "incoming": [], + "outgoing": [ + { + "link": [ + 7, + 6, + 3, + 11, + 0, + "VHS_VIDEOINFO" + ], + "pointer": "/links/4" + }, + { + "link": [ + 10, + 6, + 0, + 9, + 0, + "IMAGE" + ], + "pointer": "/links/6" + } + ] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "force_rate", + "input_socket": { + "label": "强制帧率", + "link": null, + "localized_name": "强制帧率", + "name": "force_rate", + "type": "FLOAT", + "widget": { + "name": "force_rate" + } + }, + "label": "视频读取阶段的强制帧率控件;零值含义不能从源图确认", + "mode": 0, + "node_id": "6", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/7/widgets_values/force_rate", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": 0 + }, + { + "category": "runtime_parameter", + "class_type": "VHS_LoadVideo", + "connections": { + "incoming": [], + "outgoing": [ + { + "link": [ + 7, + 6, + 3, + 11, + 0, + "VHS_VIDEOINFO" + ], + "pointer": "/links/4" + }, + { + "link": [ + 10, + 6, + 0, + 9, + 0, + "IMAGE" + ], + "pointer": "/links/6" + } + ] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "custom_width", + "input_socket": { + "label": "自定义宽度", + "link": null, + "localized_name": "自定义宽度", + "name": "custom_width", + "type": "INT", + "widget": { + "name": "custom_width" + } + }, + "label": "素材加载阶段的自定义宽度控件;零值含义待节点定义", + "mode": 0, + "node_id": "6", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/7/widgets_values/custom_width", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": 0 + }, + { + "category": "runtime_parameter", + "class_type": "VHS_LoadVideo", + "connections": { + "incoming": [], + "outgoing": [ + { + "link": [ + 7, + 6, + 3, + 11, + 0, + "VHS_VIDEOINFO" + ], + "pointer": "/links/4" + }, + { + "link": [ + 10, + 6, + 0, + 9, + 0, + "IMAGE" + ], + "pointer": "/links/6" + } + ] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "custom_height", + "input_socket": { + "label": "自定义高度", + "link": null, + "localized_name": "自定义高度", + "name": "custom_height", + "type": "INT", + "widget": { + "name": "custom_height" + } + }, + "label": "素材加载阶段的自定义高度控件;零值含义待节点定义", + "mode": 0, + "node_id": "6", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/7/widgets_values/custom_height", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": 0 + }, + { + "category": "runtime_parameter", + "class_type": "VHS_LoadVideo", + "connections": { + "incoming": [], + "outgoing": [ + { + "link": [ + 7, + 6, + 3, + 11, + 0, + "VHS_VIDEOINFO" + ], + "pointer": "/links/4" + }, + { + "link": [ + 10, + 6, + 0, + 9, + 0, + "IMAGE" + ], + "pointer": "/links/6" + } + ] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "frame_load_cap", + "input_socket": { + "label": "帧数读取上限", + "link": null, + "localized_name": "帧数读取上限", + "name": "frame_load_cap", + "type": "INT", + "widget": { + "name": "frame_load_cap" + } + }, + "label": "视频读取上限控件;核对截取分支,不能把零直接解释为无限", + "mode": 0, + "node_id": "6", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/7/widgets_values/frame_load_cap", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": 62 + }, + { + "category": "runtime_parameter", + "class_type": "VHS_LoadVideo", + "connections": { + "incoming": [], + "outgoing": [ + { + "link": [ + 7, + 6, + 3, + 11, + 0, + "VHS_VIDEOINFO" + ], + "pointer": "/links/4" + }, + { + "link": [ + 10, + 6, + 0, + 9, + 0, + "IMAGE" + ], + "pointer": "/links/6" + } + ] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "select_every_nth", + "input_socket": { + "label": "间隔", + "link": null, + "localized_name": "间隔", + "name": "select_every_nth", + "type": "INT", + "widget": { + "name": "select_every_nth" + } + }, + "label": "素材读取的间隔选择控件;实际抽帧规则待定义", + "mode": 0, + "node_id": "6", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/7/widgets_values/select_every_nth", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": 1 + }, + { + "category": "runtime_parameter", + "class_type": "VHS_LoadVideo", + "connections": { + "incoming": [], + "outgoing": [ + { + "link": [ + 7, + 6, + 3, + 11, + 0, + "VHS_VIDEOINFO" + ], + "pointer": "/links/4" + }, + { + "link": [ + 10, + 6, + 0, + 9, + 0, + "IMAGE" + ], + "pointer": "/links/6" + } + ] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "format", + "input_socket": { + "label": "格式", + "link": null, + "localized_name": "格式", + "name": "format", + "shape": 7, + "type": "COMBO", + "widget": { + "name": "format" + } + }, + "label": "素材加载的格式选择;AnimateDiff/LTXV是此加载字段现值,不能当作最终输出封装格式", + "mode": 0, + "node_id": "6", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/7/widgets_values/format", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": "AnimateDiff" + }, + { + "category": "frontend_state", + "class_type": "VHS_LoadVideo", + "connections": { + "incoming": [], + "outgoing": [ + { + "link": [ + 7, + 6, + 3, + 11, + 0, + "VHS_VIDEOINFO" + ], + "pointer": "/links/4" + }, + { + "link": [ + 10, + 6, + 0, + 9, + 0, + "IMAGE" + ], + "pointer": "/links/6" + } + ] + }, + "evidence_kind": "curated_source_use_with_mechanical_values_and_connections", + "field": "choose video to upload", + "input_socket": null, + "label": "前端上传/编辑控件状态;不确认为运行参数,不能原样冒充服务端输入", + "mode": 0, + "node_id": "6", + "operation_check": "核对上述节点/槽位的素材、模型或提示词对应关系;缺连线不推断其为有效主路径。", + "scope": "源用途局部审校;单位/合法范围/调整效果均未确认", + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_pointer": "/nodes/7/widgets_values/choose video to upload", + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_title": null, + "source_value": "image" + } + ], + "scope": [ + "结构及用途局部审校" + ], + "source_sha": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "unconfirmed": [ + "逐参数语义、单位、范围和调整效果未定稿", + "UI 位置控件未具名,含子图和旁路的实际执行路径待黄金导出", + "模型/节点包位置、素材可用性及实际输出未在目标环境核对" + ] + }, + "source_review_sha": "f3eaffa75fbcfc56ef727e81d2f18aa35f69338263a85c7e6b5b332011ee7187", + "status": { + "doc_done": false, + "exec_verified": false, + "imported": true + }, + "steps": [ + "两路视频 skip_first_frames 分别为 55 和 53、frame_load_cap 为 64 和 62;先核对截取区间,不能假定两段等长。", + "本图新增25项具名字段局部审校;逐项按source_review.reviewed_named_fields的具体连线和operation_check核对;前端状态、仅现值和语义未知项不可当作已确认运行语义。", + "这张图把两路视频画面上下合并;图片支路四节点均为mode4,不能当作已完成双图合成。活动路径为视频6和8→拼接9→合成10:素材6跳过53、上限62,素材8跳过55、上限64,起点和上限不同。播放帧率由素材6的信息覆盖保存8,音频来自素材8,不能保证跨素材同步。三个预览对象仅为历史缓存;未实跑、目标环境未知、转换保持关闭。", + "素材要求:两路可读取视频和可选两张图片;此处只显示引用,不读取、上传或验证素材。没有模型节点,不编模型依赖。", + "操作1:先核本图准确插件/core版本与素材,保持停用;图片支路mode4,不自行当作已启用或完成。", + "操作2:分别核两视频起点53/55与帧上限62/64,确认上下画面顺序6在上8在下、尺寸与批次末帧补齐条件。", + "操作3:核6→11→10帧率覆盖与8→10音频来源;不要用保存8或缓存30.000001657458657判断真实输出。", + "常见问题:画面末尾停住可能来自较短批次重复末帧;声音不齐须先核各素材起点和帧率,不能称自动同步。文件名前缀和旧预览不证明已生成;save_metadata与首帧PNG开关独立。", + "目标安装、素材存在性、目录权限、编码器/动态选项和真实效果待后续获准验证;本轮未执行插件、未构造prompt,未定稿、未实跑。" + ], + "title": "双图像或视频合并显示" +} diff --git a/docs/hel-892/concat-document-evidence/audit-summary.json b/docs/hel-892/concat-document-evidence/audit-summary.json new file mode 100644 index 00000000..dfd588aa --- /dev/null +++ b/docs/hel-892/concat-document-evidence/audit-summary.json @@ -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": "人工结论与机械原值清单分开;源语义局部审校非完整说明定稿" +} diff --git a/docs/hel-892/concat-document-evidence/boundaries.json b/docs/hel-892/concat-document-evidence/boundaries.json new file mode 100644 index 00000000..56ccd429 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/boundaries.json @@ -0,0 +1,728 @@ +{ + "base": "d1ba22677740d8775bc2bc99ae767d5994338ebf", + "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_twenty_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" +} diff --git a/docs/hel-892/concat-document-evidence/browser-initial.txt b/docs/hel-892/concat-document-evidence/browser-initial.txt new file mode 100644 index 00000000..d303d104 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/browser-initial.txt @@ -0,0 +1,1117 @@ +PASS 21图618保存位置 +PASS 21图15源注释 +PASS 1440 双图像或视频合并显示默认中文用途 +PASS 1440 双图像或视频合并显示源审校默认折叠 +PASS 1440 双图像或视频合并显示技术范围默认折叠 +PASS 1440 双图像或视频合并显示默认无执行计数/实现标识 +PASS 1440 双图像或视频合并显示默认依据限制可见 +PASS 1440 双图像或视频合并显示 说明未定稿 +PASS 1440 双图像或视频合并显示 未验证实跑 +PASS 1440 双图像或视频合并显示 未检查 +PASS 1440 双图像或视频合并显示停用/时间戳空 +PASS 1440 双图像或视频合并显示参数全保留 +PASS 1440 双图像或视频合并显示默认无溢出 +PASS 1440 双图像或视频合并显示原用途/源路径展开保留 +PASS 1440 双图像或视频合并显示展开流程 0 +PASS 1440 双图像或视频合并显示展开流程 1 +PASS 1440 双图像或视频合并显示展开流程 2 +PASS 1440 双图像或视频合并显示展开流程 3 +PASS 1440 双图像或视频合并显示展开流程 4 +PASS 1440 双图像或视频合并显示展开流程 5 +PASS 1440 双图像或视频合并显示展开流程 6 +PASS 1440 双图像或视频合并显示展开流程 7 +PASS 1440 双图像或视频合并显示展开流程 8 +PASS 1440 双图像或视频合并显示展开流程 9 +PASS 1440 双图像或视频合并显示展开流程 10 +PASS 1440 双图像或视频合并显示展开流程 11 +PASS 1440 双图像或视频合并显示展开流程 12 +PASS 1440 双图像或视频合并显示展开流程 13 +PASS 1440 双图像或视频合并显示展开流程 14 +PASS 1440 双图像或视频合并显示展开流程 15 +PASS 1440 双图像或视频合并显示展开流程 16 +PASS 1440 双图像或视频合并显示展开流程 17 +PASS 1440 双图像或视频合并显示展开流程 18 +PASS 1440 双图像或视频合并显示展开流程 19 +PASS 1440 双图像或视频合并显示展开流程 20 +PASS 1440 双图像或视频合并显示展开流程 21 +PASS 1440 双图像或视频合并显示展开流程 22 +PASS 1440 双图像或视频合并显示展开流程 23 +PASS 1440 双图像或视频合并显示展开流程 24 +PASS 1440 双图像或视频合并显示展开流程 25 +PASS 1440 双图像或视频合并显示展开流程 26 +PASS 1440 双图像或视频合并显示展开流程 27 +PASS 1440 双图像或视频合并显示展开流程 28 +PASS 1440 双图像或视频合并显示原件摘要可展开 +PASS 1440 双图像或视频合并显示版本 0 +PASS 1440 双图像或视频合并显示版本 1 +PASS 1440 双图像或视频合并显示版本 2 +PASS 1440 双图像或视频合并显示版本 3 +PASS 1440 1.image键盘展开 +PASS 1440 1.image用途/单位/范围/来源条件 +PASS 1440 1.image精确保留现值 +PASS 1440 1.image指针默认折叠 +PASS 1440 1.image精确源码/类型/指针 +PASS 1440 1.image展开无溢出 +PASS 1440 1.saved_position_1键盘展开 +PASS 1440 1.saved_position_1用途/单位/范围/来源条件 +PASS 1440 1.saved_position_1精确保留现值 +PASS 1440 1.saved_position_1指针默认折叠 +PASS 1440 1.saved_position_1精确源码/类型/指针 +PASS 1440 1.saved_position_1展开无溢出 +PASS 1440 2.image键盘展开 +PASS 1440 2.image用途/单位/范围/来源条件 +PASS 1440 2.image精确保留现值 +PASS 1440 2.image指针默认折叠 +PASS 1440 2.image精确源码/类型/指针 +PASS 1440 2.image展开无溢出 +PASS 1440 2.saved_position_1键盘展开 +PASS 1440 2.saved_position_1用途/单位/范围/来源条件 +PASS 1440 2.saved_position_1精确保留现值 +PASS 1440 2.saved_position_1指针默认折叠 +PASS 1440 2.saved_position_1精确源码/类型/指针 +PASS 1440 2.saved_position_1展开无溢出 +PASS 1440 4.inputcount键盘展开 +PASS 1440 4.inputcount用途/单位/范围/来源条件 +PASS 1440 4.inputcount精确保留现值 +PASS 1440 4.inputcount指针默认折叠 +PASS 1440 4.inputcount精确源码/类型/指针 +PASS 1440 4.inputcount展开无溢出 +PASS 1440 4.direction键盘展开 +PASS 1440 4.direction用途/单位/范围/来源条件 +PASS 1440 4.direction精确保留现值 +PASS 1440 4.direction指针默认折叠 +PASS 1440 4.direction精确源码/类型/指针 +PASS 1440 4.direction展开无溢出 +PASS 1440 4.match_image_size键盘展开 +PASS 1440 4.match_image_size用途/单位/范围/来源条件 +PASS 1440 4.match_image_size精确保留现值 +PASS 1440 4.match_image_size指针默认折叠 +PASS 1440 4.match_image_size精确源码/类型/指针 +PASS 1440 4.match_image_size展开无溢出 +PASS 1440 4.saved_position_3键盘展开 +PASS 1440 4.saved_position_3用途/单位/范围/来源条件 +PASS 1440 4.saved_position_3精确保留现值 +PASS 1440 4.saved_position_3指针默认折叠 +PASS 1440 4.saved_position_3精确源码/类型/指针 +PASS 1440 4.saved_position_3展开无溢出 +PASS 1440 10.frame_rate键盘展开 +PASS 1440 10.frame_rate用途/单位/范围/来源条件 +PASS 1440 10.frame_rate精确保留现值 +PASS 1440 10.frame_rate指针默认折叠 +PASS 1440 10.frame_rate精确源码/类型/指针 +PASS 1440 10.frame_rate展开无溢出 +PASS 1440 10.loop_count键盘展开 +PASS 1440 10.loop_count用途/单位/范围/来源条件 +PASS 1440 10.loop_count精确保留现值 +PASS 1440 10.loop_count指针默认折叠 +PASS 1440 10.loop_count精确源码/类型/指针 +PASS 1440 10.loop_count展开无溢出 +PASS 1440 10.filename_prefix键盘展开 +PASS 1440 10.filename_prefix用途/单位/范围/来源条件 +PASS 1440 10.filename_prefix精确保留现值 +PASS 1440 10.filename_prefix指针默认折叠 +PASS 1440 10.filename_prefix精确源码/类型/指针 +PASS 1440 10.filename_prefix展开无溢出 +PASS 1440 10.format键盘展开 +PASS 1440 10.format用途/单位/范围/来源条件 +PASS 1440 10.format精确保留现值 +PASS 1440 10.format指针默认折叠 +PASS 1440 10.format精确源码/类型/指针 +PASS 1440 10.format展开无溢出 +PASS 1440 10.pix_fmt键盘展开 +PASS 1440 10.pix_fmt用途/单位/范围/来源条件 +PASS 1440 10.pix_fmt精确保留现值 +PASS 1440 10.pix_fmt指针默认折叠 +PASS 1440 10.pix_fmt精确源码/类型/指针 +PASS 1440 10.pix_fmt展开无溢出 +PASS 1440 10.crf键盘展开 +PASS 1440 10.crf用途/单位/范围/来源条件 +PASS 1440 10.crf精确保留现值 +PASS 1440 10.crf指针默认折叠 +PASS 1440 10.crf精确源码/类型/指针 +PASS 1440 10.crf展开无溢出 +PASS 1440 10.save_metadata键盘展开 +PASS 1440 10.save_metadata用途/单位/范围/来源条件 +PASS 1440 10.save_metadata精确保留现值 +PASS 1440 10.save_metadata指针默认折叠 +PASS 1440 10.save_metadata精确源码/类型/指针 +PASS 1440 10.save_metadata展开无溢出 +PASS 1440 10.trim_to_audio键盘展开 +PASS 1440 10.trim_to_audio用途/单位/范围/来源条件 +PASS 1440 10.trim_to_audio精确保留现值 +PASS 1440 10.trim_to_audio指针默认折叠 +PASS 1440 10.trim_to_audio精确源码/类型/指针 +PASS 1440 10.trim_to_audio展开无溢出 +PASS 1440 10.pingpong键盘展开 +PASS 1440 10.pingpong用途/单位/范围/来源条件 +PASS 1440 10.pingpong精确保留现值 +PASS 1440 10.pingpong指针默认折叠 +PASS 1440 10.pingpong精确源码/类型/指针 +PASS 1440 10.pingpong展开无溢出 +PASS 1440 10.save_output键盘展开 +PASS 1440 10.save_output用途/单位/范围/来源条件 +PASS 1440 10.save_output精确保留现值 +PASS 1440 10.save_output指针默认折叠 +PASS 1440 10.save_output精确源码/类型/指针 +PASS 1440 10.save_output展开无溢出 +PASS 1440 10.videopreview键盘展开 +PASS 1440 10.videopreview用途/单位/范围/来源条件 +PASS 1440 10.videopreview精确保留现值 +PASS 1440 10.videopreview指针默认折叠 +PASS 1440 10.videopreview精确源码/类型/指针 +PASS 1440 10.videopreview展开无溢出 +PASS 1440 8.video键盘展开 +PASS 1440 8.video用途/单位/范围/来源条件 +PASS 1440 8.video精确保留现值 +PASS 1440 8.video指针默认折叠 +PASS 1440 8.video精确源码/类型/指针 +PASS 1440 8.video展开无溢出 +PASS 1440 8.force_rate键盘展开 +PASS 1440 8.force_rate用途/单位/范围/来源条件 +PASS 1440 8.force_rate精确保留现值 +PASS 1440 8.force_rate指针默认折叠 +PASS 1440 8.force_rate精确源码/类型/指针 +PASS 1440 8.force_rate展开无溢出 +PASS 1440 8.custom_width键盘展开 +PASS 1440 8.custom_width用途/单位/范围/来源条件 +PASS 1440 8.custom_width精确保留现值 +PASS 1440 8.custom_width指针默认折叠 +PASS 1440 8.custom_width精确源码/类型/指针 +PASS 1440 8.custom_width展开无溢出 +PASS 1440 8.custom_height键盘展开 +PASS 1440 8.custom_height用途/单位/范围/来源条件 +PASS 1440 8.custom_height精确保留现值 +PASS 1440 8.custom_height指针默认折叠 +PASS 1440 8.custom_height精确源码/类型/指针 +PASS 1440 8.custom_height展开无溢出 +PASS 1440 8.frame_load_cap键盘展开 +PASS 1440 8.frame_load_cap用途/单位/范围/来源条件 +PASS 1440 8.frame_load_cap精确保留现值 +PASS 1440 8.frame_load_cap指针默认折叠 +PASS 1440 8.frame_load_cap精确源码/类型/指针 +PASS 1440 8.frame_load_cap展开无溢出 +PASS 1440 8.skip_first_frames键盘展开 +PASS 1440 8.skip_first_frames用途/单位/范围/来源条件 +PASS 1440 8.skip_first_frames精确保留现值 +PASS 1440 8.skip_first_frames指针默认折叠 +PASS 1440 8.skip_first_frames精确源码/类型/指针 +PASS 1440 8.skip_first_frames展开无溢出 +PASS 1440 8.select_every_nth键盘展开 +PASS 1440 8.select_every_nth用途/单位/范围/来源条件 +PASS 1440 8.select_every_nth精确保留现值 +PASS 1440 8.select_every_nth指针默认折叠 +PASS 1440 8.select_every_nth精确源码/类型/指针 +PASS 1440 8.select_every_nth展开无溢出 +PASS 1440 8.format键盘展开 +PASS 1440 8.format用途/单位/范围/来源条件 +PASS 1440 8.format精确保留现值 +PASS 1440 8.format指针默认折叠 +PASS 1440 8.format精确源码/类型/指针 +PASS 1440 8.format展开无溢出 +PASS 1440 8.videopreview键盘展开 +PASS 1440 8.videopreview用途/单位/范围/来源条件 +PASS 1440 8.videopreview精确保留现值 +PASS 1440 8.videopreview指针默认折叠 +PASS 1440 8.videopreview精确源码/类型/指针 +PASS 1440 8.videopreview展开无溢出 +PASS 1440 6.video键盘展开 +PASS 1440 6.video用途/单位/范围/来源条件 +PASS 1440 6.video精确保留现值 +PASS 1440 6.video指针默认折叠 +PASS 1440 6.video精确源码/类型/指针 +PASS 1440 6.video展开无溢出 +PASS 1440 6.force_rate键盘展开 +PASS 1440 6.force_rate用途/单位/范围/来源条件 +PASS 1440 6.force_rate精确保留现值 +PASS 1440 6.force_rate指针默认折叠 +PASS 1440 6.force_rate精确源码/类型/指针 +PASS 1440 6.force_rate展开无溢出 +PASS 1440 6.custom_width键盘展开 +PASS 1440 6.custom_width用途/单位/范围/来源条件 +PASS 1440 6.custom_width精确保留现值 +PASS 1440 6.custom_width指针默认折叠 +PASS 1440 6.custom_width精确源码/类型/指针 +PASS 1440 6.custom_width展开无溢出 +PASS 1440 6.custom_height键盘展开 +PASS 1440 6.custom_height用途/单位/范围/来源条件 +PASS 1440 6.custom_height精确保留现值 +PASS 1440 6.custom_height指针默认折叠 +PASS 1440 6.custom_height精确源码/类型/指针 +PASS 1440 6.custom_height展开无溢出 +PASS 1440 6.frame_load_cap键盘展开 +PASS 1440 6.frame_load_cap用途/单位/范围/来源条件 +PASS 1440 6.frame_load_cap精确保留现值 +PASS 1440 6.frame_load_cap指针默认折叠 +PASS 1440 6.frame_load_cap精确源码/类型/指针 +PASS 1440 6.frame_load_cap展开无溢出 +PASS 1440 6.skip_first_frames键盘展开 +PASS 1440 6.skip_first_frames用途/单位/范围/来源条件 +PASS 1440 6.skip_first_frames精确保留现值 +PASS 1440 6.skip_first_frames指针默认折叠 +PASS 1440 6.skip_first_frames精确源码/类型/指针 +PASS 1440 6.skip_first_frames展开无溢出 +PASS 1440 6.select_every_nth键盘展开 +PASS 1440 6.select_every_nth用途/单位/范围/来源条件 +PASS 1440 6.select_every_nth精确保留现值 +PASS 1440 6.select_every_nth指针默认折叠 +PASS 1440 6.select_every_nth精确源码/类型/指针 +PASS 1440 6.select_every_nth展开无溢出 +PASS 1440 6.format键盘展开 +PASS 1440 6.format用途/单位/范围/来源条件 +PASS 1440 6.format精确保留现值 +PASS 1440 6.format指针默认折叠 +PASS 1440 6.format精确源码/类型/指针 +PASS 1440 6.format展开无溢出 +PASS 1440 6.choose video to upload键盘展开 +PASS 1440 6.choose video to upload用途/单位/范围/来源条件 +PASS 1440 6.choose video to upload精确保留现值 +PASS 1440 6.choose video to upload指针默认折叠 +PASS 1440 6.choose video to upload精确源码/类型/指针 +PASS 1440 6.choose video to upload展开无溢出 +PASS 1440 6.videopreview键盘展开 +PASS 1440 6.videopreview用途/单位/范围/来源条件 +PASS 1440 6.videopreview精确保留现值 +PASS 1440 6.videopreview指针默认折叠 +PASS 1440 6.videopreview精确源码/类型/指针 +PASS 1440 6.videopreview展开无溢出 +PASS 1440 9.inputcount键盘展开 +PASS 1440 9.inputcount用途/单位/范围/来源条件 +PASS 1440 9.inputcount精确保留现值 +PASS 1440 9.inputcount指针默认折叠 +PASS 1440 9.inputcount精确源码/类型/指针 +PASS 1440 9.inputcount展开无溢出 +PASS 1440 9.direction键盘展开 +PASS 1440 9.direction用途/单位/范围/来源条件 +PASS 1440 9.direction精确保留现值 +PASS 1440 9.direction指针默认折叠 +PASS 1440 9.direction精确源码/类型/指针 +PASS 1440 9.direction展开无溢出 +PASS 1440 9.match_image_size键盘展开 +PASS 1440 9.match_image_size用途/单位/范围/来源条件 +PASS 1440 9.match_image_size精确保留现值 +PASS 1440 9.match_image_size指针默认折叠 +PASS 1440 9.match_image_size精确源码/类型/指针 +PASS 1440 9.match_image_size展开无溢出 +PASS 1440 9.saved_position_3键盘展开 +PASS 1440 9.saved_position_3用途/单位/范围/来源条件 +PASS 1440 9.saved_position_3精确保留现值 +PASS 1440 9.saved_position_3指针默认折叠 +PASS 1440 9.saved_position_3精确源码/类型/指针 +PASS 1440 9.saved_position_3展开无溢出 +PASS 1440Tab焦点保留 +PASS 1440ShiftTab焦点保留 +PASS 1440 双图像或视频合并显示关闭归还焦点 +PASS 1440 视频转gif动图图片默认中文用途 +PASS 1440 视频转gif动图图片源审校默认折叠 +PASS 1440 视频转gif动图图片技术范围默认折叠 +PASS 1440 视频转gif动图图片默认无执行计数/实现标识 +PASS 1440 视频转gif动图图片默认依据限制可见 +PASS 1440 视频转gif动图图片 说明未定稿 +PASS 1440 视频转gif动图图片 未验证实跑 +PASS 1440 视频转gif动图图片 未检查 +PASS 1440 视频转gif动图图片停用/时间戳空 +PASS 1440 视频转gif动图图片参数全保留 +PASS 1440 视频转gif动图图片默认无溢出 +PASS 1440 视频转gif动图图片旧图归还焦点 +PASS 1440 加载图片合成视频默认中文用途 +PASS 1440 加载图片合成视频源审校默认折叠 +PASS 1440 加载图片合成视频技术范围默认折叠 +PASS 1440 加载图片合成视频默认无执行计数/实现标识 +PASS 1440 加载图片合成视频默认依据限制可见 +PASS 1440 加载图片合成视频 说明未定稿 +PASS 1440 加载图片合成视频 未验证实跑 +PASS 1440 加载图片合成视频 未检查 +PASS 1440 加载图片合成视频停用/时间戳空 +PASS 1440 加载图片合成视频参数全保留 +PASS 1440 加载图片合成视频默认无溢出 +PASS 1440 加载图片合成视频旧图归还焦点 +PASS 1440 视频倒放默认中文用途 +PASS 1440 视频倒放源审校默认折叠 +PASS 1440 视频倒放技术范围默认折叠 +PASS 1440 视频倒放默认无执行计数/实现标识 +PASS 1440 视频倒放默认依据限制可见 +PASS 1440 视频倒放 说明未定稿 +PASS 1440 视频倒放 未验证实跑 +PASS 1440 视频倒放 未检查 +PASS 1440 视频倒放停用/时间戳空 +PASS 1440 视频倒放参数全保留 +PASS 1440 视频倒放默认无溢出 +PASS 1440 视频倒放旧图归还焦点 +PASS 1440 NLF_视频人物动作骨架获取默认中文用途 +PASS 1440 NLF_视频人物动作骨架获取源审校默认折叠 +PASS 1440 NLF_视频人物动作骨架获取技术范围默认折叠 +PASS 1440 NLF_视频人物动作骨架获取默认无执行计数/实现标识 +PASS 1440 NLF_视频人物动作骨架获取默认依据限制可见 +PASS 1440 NLF_视频人物动作骨架获取 说明未定稿 +PASS 1440 NLF_视频人物动作骨架获取 未验证实跑 +PASS 1440 NLF_视频人物动作骨架获取 未检查 +PASS 1440 NLF_视频人物动作骨架获取停用/时间戳空 +PASS 1440 NLF_视频人物动作骨架获取参数全保留 +PASS 1440 NLF_视频人物动作骨架获取默认无溢出 +PASS 1440 NLF_视频人物动作骨架获取旧图归还焦点 +PASS 1440 openpose-video-姿态检测默认中文用途 +PASS 1440 openpose-video-姿态检测源审校默认折叠 +PASS 1440 openpose-video-姿态检测技术范围默认折叠 +PASS 1440 openpose-video-姿态检测默认无执行计数/实现标识 +PASS 1440 openpose-video-姿态检测默认依据限制可见 +PASS 1440 openpose-video-姿态检测 说明未定稿 +PASS 1440 openpose-video-姿态检测 未验证实跑 +PASS 1440 openpose-video-姿态检测 未检查 +PASS 1440 openpose-video-姿态检测停用/时间戳空 +PASS 1440 openpose-video-姿态检测参数全保留 +PASS 1440 openpose-video-姿态检测默认无溢出 +PASS 1440 openpose-video-姿态检测旧图归还焦点 +PASS 1440 sdpose_视频人物姿势骨架提取默认中文用途 +PASS 1440 sdpose_视频人物姿势骨架提取源审校默认折叠 +PASS 1440 sdpose_视频人物姿势骨架提取技术范围默认折叠 +PASS 1440 sdpose_视频人物姿势骨架提取默认无执行计数/实现标识 +PASS 1440 sdpose_视频人物姿势骨架提取默认依据限制可见 +PASS 1440 sdpose_视频人物姿势骨架提取 说明未定稿 +PASS 1440 sdpose_视频人物姿势骨架提取 未验证实跑 +PASS 1440 sdpose_视频人物姿势骨架提取 未检查 +PASS 1440 sdpose_视频人物姿势骨架提取停用/时间戳空 +PASS 1440 sdpose_视频人物姿势骨架提取参数全保留 +PASS 1440 sdpose_视频人物姿势骨架提取默认无溢出 +PASS 1440 sdpose_视频人物姿势骨架提取旧图归还焦点 +PASS 1440 gemma4_提示词反推(图像视频音频)默认中文用途 +PASS 1440 gemma4_提示词反推(图像视频音频)源审校默认折叠 +PASS 1440 gemma4_提示词反推(图像视频音频)技术范围默认折叠 +PASS 1440 gemma4_提示词反推(图像视频音频)默认无执行计数/实现标识 +PASS 1440 gemma4_提示词反推(图像视频音频)默认依据限制可见 +PASS 1440 gemma4_提示词反推(图像视频音频) 说明未定稿 +PASS 1440 gemma4_提示词反推(图像视频音频) 未验证实跑 +PASS 1440 gemma4_提示词反推(图像视频音频) 未检查 +PASS 1440 gemma4_提示词反推(图像视频音频)停用/时间戳空 +PASS 1440 gemma4_提示词反推(图像视频音频)参数全保留 +PASS 1440 gemma4_提示词反推(图像视频音频)默认无溢出 +PASS 1440 gemma4_提示词反推(图像视频音频)旧图归还焦点 +PASS 1440 图像合并成四宫格默认中文用途 +PASS 1440 图像合并成四宫格源审校默认折叠 +PASS 1440 图像合并成四宫格技术范围默认折叠 +PASS 1440 图像合并成四宫格默认无执行计数/实现标识 +PASS 1440 图像合并成四宫格默认依据限制可见 +PASS 1440 图像合并成四宫格 说明未定稿 +PASS 1440 图像合并成四宫格 未验证实跑 +PASS 1440 图像合并成四宫格 未检查 +PASS 1440 图像合并成四宫格停用/时间戳空 +PASS 1440 图像合并成四宫格参数全保留 +PASS 1440 图像合并成四宫格默认无溢出 +PASS 1440 图像合并成四宫格旧图归还焦点 +PASS 1440 图像分割-多宫格分割默认中文用途 +PASS 1440 图像分割-多宫格分割源审校默认折叠 +PASS 1440 图像分割-多宫格分割技术范围默认折叠 +PASS 1440 图像分割-多宫格分割默认无执行计数/实现标识 +PASS 1440 图像分割-多宫格分割默认依据限制可见 +PASS 1440 图像分割-多宫格分割 说明未定稿 +PASS 1440 图像分割-多宫格分割 未验证实跑 +PASS 1440 图像分割-多宫格分割 未检查 +PASS 1440 图像分割-多宫格分割停用/时间戳空 +PASS 1440 图像分割-多宫格分割参数全保留 +PASS 1440 图像分割-多宫格分割默认无溢出 +PASS 1440 图像分割-多宫格分割旧图归还焦点 +PASS 1440 Qwen_image2.1_图像编辑_背景移除默认中文用途 +PASS 1440 Qwen_image2.1_图像编辑_背景移除源审校默认折叠 +PASS 1440 Qwen_image2.1_图像编辑_背景移除技术范围默认折叠 +PASS 1440 Qwen_image2.1_图像编辑_背景移除默认无执行计数/实现标识 +PASS 1440 Qwen_image2.1_图像编辑_背景移除默认依据限制可见 +PASS 1440 Qwen_image2.1_图像编辑_背景移除 说明未定稿 +PASS 1440 Qwen_image2.1_图像编辑_背景移除 未验证实跑 +PASS 1440 Qwen_image2.1_图像编辑_背景移除 未检查 +PASS 1440 Qwen_image2.1_图像编辑_背景移除停用/时间戳空 +PASS 1440 Qwen_image2.1_图像编辑_背景移除参数全保留 +PASS 1440 Qwen_image2.1_图像编辑_背景移除默认无溢出 +PASS 1440 Qwen_image2.1_图像编辑_背景移除旧图归还焦点 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强默认中文用途 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强源审校默认折叠 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强技术范围默认折叠 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强默认无执行计数/实现标识 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强默认依据限制可见 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强 说明未定稿 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强 未验证实跑 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强 未检查 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强停用/时间戳空 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强参数全保留 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强默认无溢出 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强旧图归还焦点 +PASS 1440 Qwen_image2.1_文生图_提示词增强默认中文用途 +PASS 1440 Qwen_image2.1_文生图_提示词增强源审校默认折叠 +PASS 1440 Qwen_image2.1_文生图_提示词增强技术范围默认折叠 +PASS 1440 Qwen_image2.1_文生图_提示词增强默认无执行计数/实现标识 +PASS 1440 Qwen_image2.1_文生图_提示词增强默认依据限制可见 +PASS 1440 Qwen_image2.1_文生图_提示词增强 说明未定稿 +PASS 1440 Qwen_image2.1_文生图_提示词增强 未验证实跑 +PASS 1440 Qwen_image2.1_文生图_提示词增强 未检查 +PASS 1440 Qwen_image2.1_文生图_提示词增强停用/时间戳空 +PASS 1440 Qwen_image2.1_文生图_提示词增强参数全保留 +PASS 1440 Qwen_image2.1_文生图_提示词增强默认无溢出 +PASS 1440 Qwen_image2.1_文生图_提示词增强旧图归还焦点 +PASS 1440 ControlNet_aux_常用样例默认中文用途 +PASS 1440 ControlNet_aux_常用样例源审校默认折叠 +PASS 1440 ControlNet_aux_常用样例技术范围默认折叠 +PASS 1440 ControlNet_aux_常用样例默认无执行计数/实现标识 +PASS 1440 ControlNet_aux_常用样例默认依据限制可见 +PASS 1440 ControlNet_aux_常用样例 说明未定稿 +PASS 1440 ControlNet_aux_常用样例 未验证实跑 +PASS 1440 ControlNet_aux_常用样例 未检查 +PASS 1440 ControlNet_aux_常用样例停用/时间戳空 +PASS 1440 ControlNet_aux_常用样例参数全保留 +PASS 1440 ControlNet_aux_常用样例默认无溢出 +PASS 1440 ControlNet_aux_常用样例旧图归还焦点 +PASS 1440 Qwen3-ASR-语音转文字默认中文用途 +PASS 1440 Qwen3-ASR-语音转文字源审校默认折叠 +PASS 1440 Qwen3-ASR-语音转文字技术范围默认折叠 +PASS 1440 Qwen3-ASR-语音转文字默认无执行计数/实现标识 +PASS 1440 Qwen3-ASR-语音转文字默认依据限制可见 +PASS 1440 Qwen3-ASR-语音转文字 说明未定稿 +PASS 1440 Qwen3-ASR-语音转文字 未验证实跑 +PASS 1440 Qwen3-ASR-语音转文字 未检查 +PASS 1440 Qwen3-ASR-语音转文字停用/时间戳空 +PASS 1440 Qwen3-ASR-语音转文字参数全保留 +PASS 1440 Qwen3-ASR-语音转文字默认无溢出 +PASS 1440 Qwen3-ASR-语音转文字旧图归还焦点 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕默认中文用途 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕源审校默认折叠 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕技术范围默认折叠 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕默认无执行计数/实现标识 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕默认依据限制可见 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕 说明未定稿 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕 未验证实跑 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕 未检查 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕停用/时间戳空 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕参数全保留 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕默认无溢出 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕旧图归还焦点 +PASS 1440 Minimax-H3提示词增强默认中文用途 +PASS 1440 Minimax-H3提示词增强源审校默认折叠 +PASS 1440 Minimax-H3提示词增强技术范围默认折叠 +PASS 1440 Minimax-H3提示词增强默认无执行计数/实现标识 +PASS 1440 Minimax-H3提示词增强默认依据限制可见 +PASS 1440 Minimax-H3提示词增强 说明未定稿 +PASS 1440 Minimax-H3提示词增强 未验证实跑 +PASS 1440 Minimax-H3提示词增强 未检查 +PASS 1440 Minimax-H3提示词增强停用/时间戳空 +PASS 1440 Minimax-H3提示词增强参数全保留 +PASS 1440 Minimax-H3提示词增强默认无溢出 +PASS 1440 Minimax-H3提示词增强旧图归还焦点 +PASS 1440 音频转MP3格式默认中文用途 +PASS 1440 音频转MP3格式源审校默认折叠 +PASS 1440 音频转MP3格式技术范围默认折叠 +PASS 1440 音频转MP3格式默认无执行计数/实现标识 +PASS 1440 音频转MP3格式默认依据限制可见 +PASS 1440 音频转MP3格式 说明未定稿 +PASS 1440 音频转MP3格式 未验证实跑 +PASS 1440 音频转MP3格式 未检查 +PASS 1440 音频转MP3格式停用/时间戳空 +PASS 1440 音频转MP3格式参数全保留 +PASS 1440 音频转MP3格式默认无溢出 +PASS 1440 音频转MP3格式旧图归还焦点 +PASS 1440 音频人声分离默认中文用途 +PASS 1440 音频人声分离源审校默认折叠 +PASS 1440 音频人声分离技术范围默认折叠 +PASS 1440 音频人声分离默认无执行计数/实现标识 +PASS 1440 音频人声分离默认依据限制可见 +PASS 1440 音频人声分离 说明未定稿 +PASS 1440 音频人声分离 未验证实跑 +PASS 1440 音频人声分离 未检查 +PASS 1440 音频人声分离停用/时间戳空 +PASS 1440 音频人声分离参数全保留 +PASS 1440 音频人声分离默认无溢出 +PASS 1440 音频人声分离旧图归还焦点 +PASS 1440 视频-音频分离默认中文用途 +PASS 1440 视频-音频分离源审校默认折叠 +PASS 1440 视频-音频分离技术范围默认折叠 +PASS 1440 视频-音频分离默认无执行计数/实现标识 +PASS 1440 视频-音频分离默认依据限制可见 +PASS 1440 视频-音频分离 说明未定稿 +PASS 1440 视频-音频分离 未验证实跑 +PASS 1440 视频-音频分离 未检查 +PASS 1440 视频-音频分离停用/时间戳空 +PASS 1440 视频-音频分离参数全保留 +PASS 1440 视频-音频分离默认无溢出 +PASS 1440 视频-音频分离旧图归还焦点 +PASS 1440 图像嵌入文字描述默认中文用途 +PASS 1440 图像嵌入文字描述源审校默认折叠 +PASS 1440 图像嵌入文字描述技术范围默认折叠 +PASS 1440 图像嵌入文字描述默认无执行计数/实现标识 +PASS 1440 图像嵌入文字描述默认依据限制可见 +PASS 1440 图像嵌入文字描述 说明未定稿 +PASS 1440 图像嵌入文字描述 未验证实跑 +PASS 1440 图像嵌入文字描述 未检查 +PASS 1440 图像嵌入文字描述停用/时间戳空 +PASS 1440 图像嵌入文字描述参数全保留 +PASS 1440 图像嵌入文字描述默认无溢出 +PASS 1440 图像嵌入文字描述旧图归还焦点 +PASS 390 双图像或视频合并显示默认中文用途 +PASS 390 双图像或视频合并显示源审校默认折叠 +PASS 390 双图像或视频合并显示技术范围默认折叠 +PASS 390 双图像或视频合并显示默认无执行计数/实现标识 +PASS 390 双图像或视频合并显示默认依据限制可见 +PASS 390 双图像或视频合并显示 说明未定稿 +PASS 390 双图像或视频合并显示 未验证实跑 +PASS 390 双图像或视频合并显示 未检查 +PASS 390 双图像或视频合并显示停用/时间戳空 +PASS 390 双图像或视频合并显示参数全保留 +PASS 390 双图像或视频合并显示默认无溢出 +PASS 390 双图像或视频合并显示原用途/源路径展开保留 +PASS 390 双图像或视频合并显示展开流程 0 +PASS 390 双图像或视频合并显示展开流程 1 +PASS 390 双图像或视频合并显示展开流程 2 +PASS 390 双图像或视频合并显示展开流程 3 +PASS 390 双图像或视频合并显示展开流程 4 +PASS 390 双图像或视频合并显示展开流程 5 +PASS 390 双图像或视频合并显示展开流程 6 +PASS 390 双图像或视频合并显示展开流程 7 +PASS 390 双图像或视频合并显示展开流程 8 +PASS 390 双图像或视频合并显示展开流程 9 +PASS 390 双图像或视频合并显示展开流程 10 +PASS 390 双图像或视频合并显示展开流程 11 +PASS 390 双图像或视频合并显示展开流程 12 +PASS 390 双图像或视频合并显示展开流程 13 +PASS 390 双图像或视频合并显示展开流程 14 +PASS 390 双图像或视频合并显示展开流程 15 +PASS 390 双图像或视频合并显示展开流程 16 +PASS 390 双图像或视频合并显示展开流程 17 +PASS 390 双图像或视频合并显示展开流程 18 +PASS 390 双图像或视频合并显示展开流程 19 +PASS 390 双图像或视频合并显示展开流程 20 +PASS 390 双图像或视频合并显示展开流程 21 +PASS 390 双图像或视频合并显示展开流程 22 +PASS 390 双图像或视频合并显示展开流程 23 +PASS 390 双图像或视频合并显示展开流程 24 +PASS 390 双图像或视频合并显示展开流程 25 +PASS 390 双图像或视频合并显示展开流程 26 +PASS 390 双图像或视频合并显示展开流程 27 +PASS 390 双图像或视频合并显示展开流程 28 +PASS 390 双图像或视频合并显示原件摘要可展开 +PASS 390 双图像或视频合并显示版本 0 +PASS 390 双图像或视频合并显示版本 1 +PASS 390 双图像或视频合并显示版本 2 +PASS 390 双图像或视频合并显示版本 3 +PASS 390 1.image键盘展开 +PASS 390 1.image用途/单位/范围/来源条件 +PASS 390 1.image精确保留现值 +PASS 390 1.image指针默认折叠 +PASS 390 1.image精确源码/类型/指针 +PASS 390 1.image展开无溢出 +PASS 390 1.saved_position_1键盘展开 +PASS 390 1.saved_position_1用途/单位/范围/来源条件 +PASS 390 1.saved_position_1精确保留现值 +PASS 390 1.saved_position_1指针默认折叠 +PASS 390 1.saved_position_1精确源码/类型/指针 +PASS 390 1.saved_position_1展开无溢出 +PASS 390 2.image键盘展开 +PASS 390 2.image用途/单位/范围/来源条件 +PASS 390 2.image精确保留现值 +PASS 390 2.image指针默认折叠 +PASS 390 2.image精确源码/类型/指针 +PASS 390 2.image展开无溢出 +PASS 390 2.saved_position_1键盘展开 +PASS 390 2.saved_position_1用途/单位/范围/来源条件 +PASS 390 2.saved_position_1精确保留现值 +PASS 390 2.saved_position_1指针默认折叠 +PASS 390 2.saved_position_1精确源码/类型/指针 +PASS 390 2.saved_position_1展开无溢出 +PASS 390 4.inputcount键盘展开 +PASS 390 4.inputcount用途/单位/范围/来源条件 +PASS 390 4.inputcount精确保留现值 +PASS 390 4.inputcount指针默认折叠 +PASS 390 4.inputcount精确源码/类型/指针 +PASS 390 4.inputcount展开无溢出 +PASS 390 4.direction键盘展开 +PASS 390 4.direction用途/单位/范围/来源条件 +PASS 390 4.direction精确保留现值 +PASS 390 4.direction指针默认折叠 +PASS 390 4.direction精确源码/类型/指针 +PASS 390 4.direction展开无溢出 +PASS 390 4.match_image_size键盘展开 +PASS 390 4.match_image_size用途/单位/范围/来源条件 +PASS 390 4.match_image_size精确保留现值 +PASS 390 4.match_image_size指针默认折叠 +PASS 390 4.match_image_size精确源码/类型/指针 +PASS 390 4.match_image_size展开无溢出 +PASS 390 4.saved_position_3键盘展开 +PASS 390 4.saved_position_3用途/单位/范围/来源条件 +PASS 390 4.saved_position_3精确保留现值 +PASS 390 4.saved_position_3指针默认折叠 +PASS 390 4.saved_position_3精确源码/类型/指针 +PASS 390 4.saved_position_3展开无溢出 +PASS 390 10.frame_rate键盘展开 +PASS 390 10.frame_rate用途/单位/范围/来源条件 +PASS 390 10.frame_rate精确保留现值 +PASS 390 10.frame_rate指针默认折叠 +PASS 390 10.frame_rate精确源码/类型/指针 +PASS 390 10.frame_rate展开无溢出 +PASS 390 10.loop_count键盘展开 +PASS 390 10.loop_count用途/单位/范围/来源条件 +PASS 390 10.loop_count精确保留现值 +PASS 390 10.loop_count指针默认折叠 +PASS 390 10.loop_count精确源码/类型/指针 +PASS 390 10.loop_count展开无溢出 +PASS 390 10.filename_prefix键盘展开 +PASS 390 10.filename_prefix用途/单位/范围/来源条件 +PASS 390 10.filename_prefix精确保留现值 +PASS 390 10.filename_prefix指针默认折叠 +PASS 390 10.filename_prefix精确源码/类型/指针 +PASS 390 10.filename_prefix展开无溢出 +PASS 390 10.format键盘展开 +PASS 390 10.format用途/单位/范围/来源条件 +PASS 390 10.format精确保留现值 +PASS 390 10.format指针默认折叠 +PASS 390 10.format精确源码/类型/指针 +PASS 390 10.format展开无溢出 +PASS 390 10.pix_fmt键盘展开 +PASS 390 10.pix_fmt用途/单位/范围/来源条件 +PASS 390 10.pix_fmt精确保留现值 +PASS 390 10.pix_fmt指针默认折叠 +PASS 390 10.pix_fmt精确源码/类型/指针 +PASS 390 10.pix_fmt展开无溢出 +PASS 390 10.crf键盘展开 +PASS 390 10.crf用途/单位/范围/来源条件 +PASS 390 10.crf精确保留现值 +PASS 390 10.crf指针默认折叠 +PASS 390 10.crf精确源码/类型/指针 +PASS 390 10.crf展开无溢出 +PASS 390 10.save_metadata键盘展开 +PASS 390 10.save_metadata用途/单位/范围/来源条件 +PASS 390 10.save_metadata精确保留现值 +PASS 390 10.save_metadata指针默认折叠 +PASS 390 10.save_metadata精确源码/类型/指针 +PASS 390 10.save_metadata展开无溢出 +PASS 390 10.trim_to_audio键盘展开 +PASS 390 10.trim_to_audio用途/单位/范围/来源条件 +PASS 390 10.trim_to_audio精确保留现值 +PASS 390 10.trim_to_audio指针默认折叠 +PASS 390 10.trim_to_audio精确源码/类型/指针 +PASS 390 10.trim_to_audio展开无溢出 +PASS 390 10.pingpong键盘展开 +PASS 390 10.pingpong用途/单位/范围/来源条件 +PASS 390 10.pingpong精确保留现值 +PASS 390 10.pingpong指针默认折叠 +PASS 390 10.pingpong精确源码/类型/指针 +PASS 390 10.pingpong展开无溢出 +PASS 390 10.save_output键盘展开 +PASS 390 10.save_output用途/单位/范围/来源条件 +PASS 390 10.save_output精确保留现值 +PASS 390 10.save_output指针默认折叠 +PASS 390 10.save_output精确源码/类型/指针 +PASS 390 10.save_output展开无溢出 +PASS 390 10.videopreview键盘展开 +PASS 390 10.videopreview用途/单位/范围/来源条件 +PASS 390 10.videopreview精确保留现值 +PASS 390 10.videopreview指针默认折叠 +PASS 390 10.videopreview精确源码/类型/指针 +PASS 390 10.videopreview展开无溢出 +PASS 390 8.video键盘展开 +PASS 390 8.video用途/单位/范围/来源条件 +PASS 390 8.video精确保留现值 +PASS 390 8.video指针默认折叠 +PASS 390 8.video精确源码/类型/指针 +PASS 390 8.video展开无溢出 +PASS 390 8.force_rate键盘展开 +PASS 390 8.force_rate用途/单位/范围/来源条件 +PASS 390 8.force_rate精确保留现值 +PASS 390 8.force_rate指针默认折叠 +PASS 390 8.force_rate精确源码/类型/指针 +PASS 390 8.force_rate展开无溢出 +PASS 390 8.custom_width键盘展开 +PASS 390 8.custom_width用途/单位/范围/来源条件 +PASS 390 8.custom_width精确保留现值 +PASS 390 8.custom_width指针默认折叠 +PASS 390 8.custom_width精确源码/类型/指针 +PASS 390 8.custom_width展开无溢出 +PASS 390 8.custom_height键盘展开 +PASS 390 8.custom_height用途/单位/范围/来源条件 +PASS 390 8.custom_height精确保留现值 +PASS 390 8.custom_height指针默认折叠 +PASS 390 8.custom_height精确源码/类型/指针 +PASS 390 8.custom_height展开无溢出 +PASS 390 8.frame_load_cap键盘展开 +PASS 390 8.frame_load_cap用途/单位/范围/来源条件 +PASS 390 8.frame_load_cap精确保留现值 +PASS 390 8.frame_load_cap指针默认折叠 +PASS 390 8.frame_load_cap精确源码/类型/指针 +PASS 390 8.frame_load_cap展开无溢出 +PASS 390 8.skip_first_frames键盘展开 +PASS 390 8.skip_first_frames用途/单位/范围/来源条件 +PASS 390 8.skip_first_frames精确保留现值 +PASS 390 8.skip_first_frames指针默认折叠 +PASS 390 8.skip_first_frames精确源码/类型/指针 +PASS 390 8.skip_first_frames展开无溢出 +PASS 390 8.select_every_nth键盘展开 +PASS 390 8.select_every_nth用途/单位/范围/来源条件 +PASS 390 8.select_every_nth精确保留现值 +PASS 390 8.select_every_nth指针默认折叠 +PASS 390 8.select_every_nth精确源码/类型/指针 +PASS 390 8.select_every_nth展开无溢出 +PASS 390 8.format键盘展开 +PASS 390 8.format用途/单位/范围/来源条件 +PASS 390 8.format精确保留现值 +PASS 390 8.format指针默认折叠 +PASS 390 8.format精确源码/类型/指针 +PASS 390 8.format展开无溢出 +PASS 390 8.videopreview键盘展开 +PASS 390 8.videopreview用途/单位/范围/来源条件 +PASS 390 8.videopreview精确保留现值 +PASS 390 8.videopreview指针默认折叠 +PASS 390 8.videopreview精确源码/类型/指针 +PASS 390 8.videopreview展开无溢出 +PASS 390 6.video键盘展开 +PASS 390 6.video用途/单位/范围/来源条件 +PASS 390 6.video精确保留现值 +PASS 390 6.video指针默认折叠 +PASS 390 6.video精确源码/类型/指针 +PASS 390 6.video展开无溢出 +PASS 390 6.force_rate键盘展开 +PASS 390 6.force_rate用途/单位/范围/来源条件 +PASS 390 6.force_rate精确保留现值 +PASS 390 6.force_rate指针默认折叠 +PASS 390 6.force_rate精确源码/类型/指针 +PASS 390 6.force_rate展开无溢出 +PASS 390 6.custom_width键盘展开 +PASS 390 6.custom_width用途/单位/范围/来源条件 +PASS 390 6.custom_width精确保留现值 +PASS 390 6.custom_width指针默认折叠 +PASS 390 6.custom_width精确源码/类型/指针 +PASS 390 6.custom_width展开无溢出 +PASS 390 6.custom_height键盘展开 +PASS 390 6.custom_height用途/单位/范围/来源条件 +PASS 390 6.custom_height精确保留现值 +PASS 390 6.custom_height指针默认折叠 +PASS 390 6.custom_height精确源码/类型/指针 +PASS 390 6.custom_height展开无溢出 +PASS 390 6.frame_load_cap键盘展开 +PASS 390 6.frame_load_cap用途/单位/范围/来源条件 +PASS 390 6.frame_load_cap精确保留现值 +PASS 390 6.frame_load_cap指针默认折叠 +PASS 390 6.frame_load_cap精确源码/类型/指针 +PASS 390 6.frame_load_cap展开无溢出 +PASS 390 6.skip_first_frames键盘展开 +PASS 390 6.skip_first_frames用途/单位/范围/来源条件 +PASS 390 6.skip_first_frames精确保留现值 +PASS 390 6.skip_first_frames指针默认折叠 +PASS 390 6.skip_first_frames精确源码/类型/指针 +PASS 390 6.skip_first_frames展开无溢出 +PASS 390 6.select_every_nth键盘展开 +PASS 390 6.select_every_nth用途/单位/范围/来源条件 +PASS 390 6.select_every_nth精确保留现值 +PASS 390 6.select_every_nth指针默认折叠 +PASS 390 6.select_every_nth精确源码/类型/指针 +PASS 390 6.select_every_nth展开无溢出 +PASS 390 6.format键盘展开 +PASS 390 6.format用途/单位/范围/来源条件 +PASS 390 6.format精确保留现值 +PASS 390 6.format指针默认折叠 +PASS 390 6.format精确源码/类型/指针 +PASS 390 6.format展开无溢出 +PASS 390 6.choose video to upload键盘展开 +PASS 390 6.choose video to upload用途/单位/范围/来源条件 +PASS 390 6.choose video to upload精确保留现值 +PASS 390 6.choose video to upload指针默认折叠 +PASS 390 6.choose video to upload精确源码/类型/指针 +PASS 390 6.choose video to upload展开无溢出 +PASS 390 6.videopreview键盘展开 +PASS 390 6.videopreview用途/单位/范围/来源条件 +PASS 390 6.videopreview精确保留现值 +PASS 390 6.videopreview指针默认折叠 +PASS 390 6.videopreview精确源码/类型/指针 +PASS 390 6.videopreview展开无溢出 +PASS 390 9.inputcount键盘展开 +PASS 390 9.inputcount用途/单位/范围/来源条件 +PASS 390 9.inputcount精确保留现值 +PASS 390 9.inputcount指针默认折叠 +PASS 390 9.inputcount精确源码/类型/指针 +PASS 390 9.inputcount展开无溢出 +PASS 390 9.direction键盘展开 +PASS 390 9.direction用途/单位/范围/来源条件 +PASS 390 9.direction精确保留现值 +PASS 390 9.direction指针默认折叠 +PASS 390 9.direction精确源码/类型/指针 +PASS 390 9.direction展开无溢出 +PASS 390 9.match_image_size键盘展开 +PASS 390 9.match_image_size用途/单位/范围/来源条件 +PASS 390 9.match_image_size精确保留现值 +PASS 390 9.match_image_size指针默认折叠 +PASS 390 9.match_image_size精确源码/类型/指针 +PASS 390 9.match_image_size展开无溢出 +PASS 390 9.saved_position_3键盘展开 +PASS 390 9.saved_position_3用途/单位/范围/来源条件 +PASS 390 9.saved_position_3精确保留现值 +PASS 390 9.saved_position_3指针默认折叠 +PASS 390 9.saved_position_3精确源码/类型/指针 +PASS 390 9.saved_position_3展开无溢出 +PASS 390Tab焦点保留 +PASS 390ShiftTab焦点保留 +PASS 390 双图像或视频合并显示关闭归还焦点 +PASS 390 视频转gif动图图片默认中文用途 +PASS 390 视频转gif动图图片源审校默认折叠 +PASS 390 视频转gif动图图片技术范围默认折叠 +PASS 390 视频转gif动图图片默认无执行计数/实现标识 +PASS 390 视频转gif动图图片默认依据限制可见 +PASS 390 视频转gif动图图片 说明未定稿 +PASS 390 视频转gif动图图片 未验证实跑 +PASS 390 视频转gif动图图片 未检查 +PASS 390 视频转gif动图图片停用/时间戳空 +PASS 390 视频转gif动图图片参数全保留 +PASS 390 视频转gif动图图片默认无溢出 +PASS 390 视频转gif动图图片旧图归还焦点 +PASS 390 加载图片合成视频默认中文用途 +PASS 390 加载图片合成视频源审校默认折叠 +PASS 390 加载图片合成视频技术范围默认折叠 +PASS 390 加载图片合成视频默认无执行计数/实现标识 +PASS 390 加载图片合成视频默认依据限制可见 +PASS 390 加载图片合成视频 说明未定稿 +PASS 390 加载图片合成视频 未验证实跑 +PASS 390 加载图片合成视频 未检查 +PASS 390 加载图片合成视频停用/时间戳空 +PASS 390 加载图片合成视频参数全保留 +PASS 390 加载图片合成视频默认无溢出 +PASS 390 加载图片合成视频旧图归还焦点 +PASS 390 视频倒放默认中文用途 +PASS 390 视频倒放源审校默认折叠 +PASS 390 视频倒放技术范围默认折叠 +PASS 390 视频倒放默认无执行计数/实现标识 +PASS 390 视频倒放默认依据限制可见 +PASS 390 视频倒放 说明未定稿 +PASS 390 视频倒放 未验证实跑 +PASS 390 视频倒放 未检查 +PASS 390 视频倒放停用/时间戳空 +PASS 390 视频倒放参数全保留 +PASS 390 视频倒放默认无溢出 +PASS 390 视频倒放旧图归还焦点 +PASS 390 NLF_视频人物动作骨架获取默认中文用途 +PASS 390 NLF_视频人物动作骨架获取源审校默认折叠 +PASS 390 NLF_视频人物动作骨架获取技术范围默认折叠 +PASS 390 NLF_视频人物动作骨架获取默认无执行计数/实现标识 +PASS 390 NLF_视频人物动作骨架获取默认依据限制可见 +PASS 390 NLF_视频人物动作骨架获取 说明未定稿 +PASS 390 NLF_视频人物动作骨架获取 未验证实跑 +PASS 390 NLF_视频人物动作骨架获取 未检查 +PASS 390 NLF_视频人物动作骨架获取停用/时间戳空 +PASS 390 NLF_视频人物动作骨架获取参数全保留 +PASS 390 NLF_视频人物动作骨架获取默认无溢出 +PASS 390 NLF_视频人物动作骨架获取旧图归还焦点 +PASS 390 openpose-video-姿态检测默认中文用途 +PASS 390 openpose-video-姿态检测源审校默认折叠 +PASS 390 openpose-video-姿态检测技术范围默认折叠 +PASS 390 openpose-video-姿态检测默认无执行计数/实现标识 +PASS 390 openpose-video-姿态检测默认依据限制可见 +PASS 390 openpose-video-姿态检测 说明未定稿 +PASS 390 openpose-video-姿态检测 未验证实跑 +PASS 390 openpose-video-姿态检测 未检查 +PASS 390 openpose-video-姿态检测停用/时间戳空 +PASS 390 openpose-video-姿态检测参数全保留 +PASS 390 openpose-video-姿态检测默认无溢出 +PASS 390 openpose-video-姿态检测旧图归还焦点 +PASS 390 sdpose_视频人物姿势骨架提取默认中文用途 +PASS 390 sdpose_视频人物姿势骨架提取源审校默认折叠 +PASS 390 sdpose_视频人物姿势骨架提取技术范围默认折叠 +PASS 390 sdpose_视频人物姿势骨架提取默认无执行计数/实现标识 +PASS 390 sdpose_视频人物姿势骨架提取默认依据限制可见 +PASS 390 sdpose_视频人物姿势骨架提取 说明未定稿 +PASS 390 sdpose_视频人物姿势骨架提取 未验证实跑 +PASS 390 sdpose_视频人物姿势骨架提取 未检查 +PASS 390 sdpose_视频人物姿势骨架提取停用/时间戳空 +PASS 390 sdpose_视频人物姿势骨架提取参数全保留 +PASS 390 sdpose_视频人物姿势骨架提取默认无溢出 +PASS 390 sdpose_视频人物姿势骨架提取旧图归还焦点 +PASS 390 gemma4_提示词反推(图像视频音频)默认中文用途 +PASS 390 gemma4_提示词反推(图像视频音频)源审校默认折叠 +PASS 390 gemma4_提示词反推(图像视频音频)技术范围默认折叠 +PASS 390 gemma4_提示词反推(图像视频音频)默认无执行计数/实现标识 +PASS 390 gemma4_提示词反推(图像视频音频)默认依据限制可见 +PASS 390 gemma4_提示词反推(图像视频音频) 说明未定稿 +PASS 390 gemma4_提示词反推(图像视频音频) 未验证实跑 +PASS 390 gemma4_提示词反推(图像视频音频) 未检查 +PASS 390 gemma4_提示词反推(图像视频音频)停用/时间戳空 +PASS 390 gemma4_提示词反推(图像视频音频)参数全保留 +PASS 390 gemma4_提示词反推(图像视频音频)默认无溢出 +PASS 390 gemma4_提示词反推(图像视频音频)旧图归还焦点 +PASS 390 图像合并成四宫格默认中文用途 +PASS 390 图像合并成四宫格源审校默认折叠 +PASS 390 图像合并成四宫格技术范围默认折叠 +PASS 390 图像合并成四宫格默认无执行计数/实现标识 +PASS 390 图像合并成四宫格默认依据限制可见 +PASS 390 图像合并成四宫格 说明未定稿 +PASS 390 图像合并成四宫格 未验证实跑 +PASS 390 图像合并成四宫格 未检查 +PASS 390 图像合并成四宫格停用/时间戳空 +PASS 390 图像合并成四宫格参数全保留 +PASS 390 图像合并成四宫格默认无溢出 +PASS 390 图像合并成四宫格旧图归还焦点 +PASS 390 图像分割-多宫格分割默认中文用途 +PASS 390 图像分割-多宫格分割源审校默认折叠 +PASS 390 图像分割-多宫格分割技术范围默认折叠 +PASS 390 图像分割-多宫格分割默认无执行计数/实现标识 +PASS 390 图像分割-多宫格分割默认依据限制可见 +PASS 390 图像分割-多宫格分割 说明未定稿 +PASS 390 图像分割-多宫格分割 未验证实跑 +PASS 390 图像分割-多宫格分割 未检查 +PASS 390 图像分割-多宫格分割停用/时间戳空 +PASS 390 图像分割-多宫格分割参数全保留 +PASS 390 图像分割-多宫格分割默认无溢出 +PASS 390 图像分割-多宫格分割旧图归还焦点 +PASS 390 Qwen_image2.1_图像编辑_背景移除默认中文用途 +PASS 390 Qwen_image2.1_图像编辑_背景移除源审校默认折叠 +PASS 390 Qwen_image2.1_图像编辑_背景移除技术范围默认折叠 +PASS 390 Qwen_image2.1_图像编辑_背景移除默认无执行计数/实现标识 +PASS 390 Qwen_image2.1_图像编辑_背景移除默认依据限制可见 +PASS 390 Qwen_image2.1_图像编辑_背景移除 说明未定稿 +PASS 390 Qwen_image2.1_图像编辑_背景移除 未验证实跑 +PASS 390 Qwen_image2.1_图像编辑_背景移除 未检查 +PASS 390 Qwen_image2.1_图像编辑_背景移除停用/时间戳空 +PASS 390 Qwen_image2.1_图像编辑_背景移除参数全保留 +PASS 390 Qwen_image2.1_图像编辑_背景移除默认无溢出 +PASS 390 Qwen_image2.1_图像编辑_背景移除旧图归还焦点 +PASS 390 Qwen_image2.1_图像编辑_提示词增强默认中文用途 +PASS 390 Qwen_image2.1_图像编辑_提示词增强源审校默认折叠 +PASS 390 Qwen_image2.1_图像编辑_提示词增强技术范围默认折叠 +PASS 390 Qwen_image2.1_图像编辑_提示词增强默认无执行计数/实现标识 +PASS 390 Qwen_image2.1_图像编辑_提示词增强默认依据限制可见 +PASS 390 Qwen_image2.1_图像编辑_提示词增强 说明未定稿 +PASS 390 Qwen_image2.1_图像编辑_提示词增强 未验证实跑 +PASS 390 Qwen_image2.1_图像编辑_提示词增强 未检查 +PASS 390 Qwen_image2.1_图像编辑_提示词增强停用/时间戳空 +PASS 390 Qwen_image2.1_图像编辑_提示词增强参数全保留 +PASS 390 Qwen_image2.1_图像编辑_提示词增强默认无溢出 +PASS 390 Qwen_image2.1_图像编辑_提示词增强旧图归还焦点 +PASS 390 Qwen_image2.1_文生图_提示词增强默认中文用途 +PASS 390 Qwen_image2.1_文生图_提示词增强源审校默认折叠 +PASS 390 Qwen_image2.1_文生图_提示词增强技术范围默认折叠 +PASS 390 Qwen_image2.1_文生图_提示词增强默认无执行计数/实现标识 +PASS 390 Qwen_image2.1_文生图_提示词增强默认依据限制可见 +PASS 390 Qwen_image2.1_文生图_提示词增强 说明未定稿 +PASS 390 Qwen_image2.1_文生图_提示词增强 未验证实跑 +PASS 390 Qwen_image2.1_文生图_提示词增强 未检查 +PASS 390 Qwen_image2.1_文生图_提示词增强停用/时间戳空 +PASS 390 Qwen_image2.1_文生图_提示词增强参数全保留 +PASS 390 Qwen_image2.1_文生图_提示词增强默认无溢出 +PASS 390 Qwen_image2.1_文生图_提示词增强旧图归还焦点 +PASS 390 ControlNet_aux_常用样例默认中文用途 +PASS 390 ControlNet_aux_常用样例源审校默认折叠 +PASS 390 ControlNet_aux_常用样例技术范围默认折叠 +PASS 390 ControlNet_aux_常用样例默认无执行计数/实现标识 +PASS 390 ControlNet_aux_常用样例默认依据限制可见 +PASS 390 ControlNet_aux_常用样例 说明未定稿 +PASS 390 ControlNet_aux_常用样例 未验证实跑 +PASS 390 ControlNet_aux_常用样例 未检查 +PASS 390 ControlNet_aux_常用样例停用/时间戳空 +PASS 390 ControlNet_aux_常用样例参数全保留 +PASS 390 ControlNet_aux_常用样例默认无溢出 +PASS 390 ControlNet_aux_常用样例旧图归还焦点 +PASS 390 Qwen3-ASR-语音转文字默认中文用途 +PASS 390 Qwen3-ASR-语音转文字源审校默认折叠 +PASS 390 Qwen3-ASR-语音转文字技术范围默认折叠 +PASS 390 Qwen3-ASR-语音转文字默认无执行计数/实现标识 +PASS 390 Qwen3-ASR-语音转文字默认依据限制可见 +PASS 390 Qwen3-ASR-语音转文字 说明未定稿 +PASS 390 Qwen3-ASR-语音转文字 未验证实跑 +PASS 390 Qwen3-ASR-语音转文字 未检查 +PASS 390 Qwen3-ASR-语音转文字停用/时间戳空 +PASS 390 Qwen3-ASR-语音转文字参数全保留 +PASS 390 Qwen3-ASR-语音转文字默认无溢出 +PASS 390 Qwen3-ASR-语音转文字旧图归还焦点 +PASS 390 Qwen3-ASR-Subtitle语音转字幕默认中文用途 +PASS 390 Qwen3-ASR-Subtitle语音转字幕源审校默认折叠 +PASS 390 Qwen3-ASR-Subtitle语音转字幕技术范围默认折叠 +PASS 390 Qwen3-ASR-Subtitle语音转字幕默认无执行计数/实现标识 +PASS 390 Qwen3-ASR-Subtitle语音转字幕默认依据限制可见 +PASS 390 Qwen3-ASR-Subtitle语音转字幕 说明未定稿 +PASS 390 Qwen3-ASR-Subtitle语音转字幕 未验证实跑 +PASS 390 Qwen3-ASR-Subtitle语音转字幕 未检查 +PASS 390 Qwen3-ASR-Subtitle语音转字幕停用/时间戳空 +PASS 390 Qwen3-ASR-Subtitle语音转字幕参数全保留 +PASS 390 Qwen3-ASR-Subtitle语音转字幕默认无溢出 +PASS 390 Qwen3-ASR-Subtitle语音转字幕旧图归还焦点 +PASS 390 Minimax-H3提示词增强默认中文用途 +PASS 390 Minimax-H3提示词增强源审校默认折叠 +PASS 390 Minimax-H3提示词增强技术范围默认折叠 +PASS 390 Minimax-H3提示词增强默认无执行计数/实现标识 +PASS 390 Minimax-H3提示词增强默认依据限制可见 +PASS 390 Minimax-H3提示词增强 说明未定稿 +PASS 390 Minimax-H3提示词增强 未验证实跑 +PASS 390 Minimax-H3提示词增强 未检查 +PASS 390 Minimax-H3提示词增强停用/时间戳空 +PASS 390 Minimax-H3提示词增强参数全保留 +PASS 390 Minimax-H3提示词增强默认无溢出 +PASS 390 Minimax-H3提示词增强旧图归还焦点 +PASS 390 音频转MP3格式默认中文用途 +PASS 390 音频转MP3格式源审校默认折叠 +PASS 390 音频转MP3格式技术范围默认折叠 +PASS 390 音频转MP3格式默认无执行计数/实现标识 +PASS 390 音频转MP3格式默认依据限制可见 +PASS 390 音频转MP3格式 说明未定稿 +PASS 390 音频转MP3格式 未验证实跑 +PASS 390 音频转MP3格式 未检查 +PASS 390 音频转MP3格式停用/时间戳空 +PASS 390 音频转MP3格式参数全保留 +PASS 390 音频转MP3格式默认无溢出 +PASS 390 音频转MP3格式旧图归还焦点 +PASS 390 音频人声分离默认中文用途 +PASS 390 音频人声分离源审校默认折叠 +PASS 390 音频人声分离技术范围默认折叠 +PASS 390 音频人声分离默认无执行计数/实现标识 +PASS 390 音频人声分离默认依据限制可见 +PASS 390 音频人声分离 说明未定稿 +PASS 390 音频人声分离 未验证实跑 +PASS 390 音频人声分离 未检查 +PASS 390 音频人声分离停用/时间戳空 +PASS 390 音频人声分离参数全保留 +PASS 390 音频人声分离默认无溢出 +PASS 390 音频人声分离旧图归还焦点 +PASS 390 视频-音频分离默认中文用途 +PASS 390 视频-音频分离源审校默认折叠 +PASS 390 视频-音频分离技术范围默认折叠 +PASS 390 视频-音频分离默认无执行计数/实现标识 +PASS 390 视频-音频分离默认依据限制可见 +PASS 390 视频-音频分离 说明未定稿 +PASS 390 视频-音频分离 未验证实跑 +PASS 390 视频-音频分离 未检查 +PASS 390 视频-音频分离停用/时间戳空 +PASS 390 视频-音频分离参数全保留 +PASS 390 视频-音频分离默认无溢出 +PASS 390 视频-音频分离旧图归还焦点 +PASS 390 图像嵌入文字描述默认中文用途 +PASS 390 图像嵌入文字描述源审校默认折叠 +PASS 390 图像嵌入文字描述技术范围默认折叠 +PASS 390 图像嵌入文字描述默认无执行计数/实现标识 +PASS 390 图像嵌入文字描述默认依据限制可见 +PASS 390 图像嵌入文字描述 说明未定稿 +PASS 390 图像嵌入文字描述 未验证实跑 +PASS 390 图像嵌入文字描述 未检查 +PASS 390 图像嵌入文字描述停用/时间戳空 +PASS 390 图像嵌入文字描述参数全保留 +PASS 390 图像嵌入文字描述默认无溢出 +PASS 390 图像嵌入文字描述旧图归还焦点 +PASS 旧/空说明回退 旧工作流回退(隔离测试夹具) +PASS 旧/空说明回退 空说明回退(隔离测试夹具) +PASS 缺摘要自然中文回退 +PASS 回退不暴露undefined +PASS 错绑定提示明确且不展示旧字段 +PASS 回退不暴露undefined +PASS 摘要HTML仅纯文本不创建图像或请求 +PASS 回退不暴露undefined +node:internal/modules/run_main:107 + triggerUncaughtException( + ^ + +AssertionError [ERR_ASSERTION]: 迟到GIF响应不覆盖图片合成摘要/34字段 + at check (file:///home/xiaomo/multica_workspaces/hello-af23464d222e/hel-892-a15f49e17b8f/workdir/aigc-home/e2e/concat-document.mjs:7:40) + at file:///home/xiaomo/multica_workspaces/hello-af23464d222e/hel-892-a15f49e17b8f/workdir/aigc-home/e2e/concat-document.mjs:94:2 { + generatedMessage: false, + code: 'ERR_ASSERTION', + actual: false, + expected: true, + operator: '==', + diff: 'simple' +} + +Node.js v24.16.0 +All owned browser services stopped. +Traceback (most recent call last): + File "/home/xiaomo/multica_workspaces/hello-af23464d222e/hel-892-a15f49e17b8f/workdir/aigc-home/e2e/run-concat-document.py", line 78, in + main() + File "/home/xiaomo/multica_workspaces/hello-af23464d222e/hel-892-a15f49e17b8f/workdir/aigc-home/e2e/run-concat-document.py", line 62, in main + subprocess.run(["node", f"e2e/{name}-document.mjs"], cwd=ROOT, check=True) + File "/home/xiaomo/.local/share/uv/python/cpython-3.11.16-linux-x86_64-gnu/lib/python3.11/subprocess.py", line 571, in run + raise CalledProcessError(retcode, process.args, +subprocess.CalledProcessError: Command '['node', 'e2e/concat-document.mjs']' returned non-zero exit status 1. diff --git a/docs/hel-892/concat-document-evidence/browser.txt b/docs/hel-892/concat-document-evidence/browser.txt new file mode 100644 index 00000000..7cf0af08 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/browser.txt @@ -0,0 +1,1099 @@ +PASS 21图618保存位置 +PASS 21图15源注释 +PASS 1440 双图像或视频合并显示默认中文用途 +PASS 1440 双图像或视频合并显示源审校默认折叠 +PASS 1440 双图像或视频合并显示技术范围默认折叠 +PASS 1440 双图像或视频合并显示默认无执行计数/实现标识 +PASS 1440 双图像或视频合并显示默认依据限制可见 +PASS 1440 双图像或视频合并显示 说明未定稿 +PASS 1440 双图像或视频合并显示 未验证实跑 +PASS 1440 双图像或视频合并显示 未检查 +PASS 1440 双图像或视频合并显示停用/时间戳空 +PASS 1440 双图像或视频合并显示参数全保留 +PASS 1440 双图像或视频合并显示默认无溢出 +PASS 1440 双图像或视频合并显示原用途/源路径展开保留 +PASS 1440 双图像或视频合并显示展开流程 0 +PASS 1440 双图像或视频合并显示展开流程 1 +PASS 1440 双图像或视频合并显示展开流程 2 +PASS 1440 双图像或视频合并显示展开流程 3 +PASS 1440 双图像或视频合并显示展开流程 4 +PASS 1440 双图像或视频合并显示展开流程 5 +PASS 1440 双图像或视频合并显示展开流程 6 +PASS 1440 双图像或视频合并显示展开流程 7 +PASS 1440 双图像或视频合并显示展开流程 8 +PASS 1440 双图像或视频合并显示展开流程 9 +PASS 1440 双图像或视频合并显示展开流程 10 +PASS 1440 双图像或视频合并显示展开流程 11 +PASS 1440 双图像或视频合并显示展开流程 12 +PASS 1440 双图像或视频合并显示展开流程 13 +PASS 1440 双图像或视频合并显示展开流程 14 +PASS 1440 双图像或视频合并显示展开流程 15 +PASS 1440 双图像或视频合并显示展开流程 16 +PASS 1440 双图像或视频合并显示展开流程 17 +PASS 1440 双图像或视频合并显示展开流程 18 +PASS 1440 双图像或视频合并显示展开流程 19 +PASS 1440 双图像或视频合并显示展开流程 20 +PASS 1440 双图像或视频合并显示展开流程 21 +PASS 1440 双图像或视频合并显示展开流程 22 +PASS 1440 双图像或视频合并显示展开流程 23 +PASS 1440 双图像或视频合并显示展开流程 24 +PASS 1440 双图像或视频合并显示展开流程 25 +PASS 1440 双图像或视频合并显示展开流程 26 +PASS 1440 双图像或视频合并显示展开流程 27 +PASS 1440 双图像或视频合并显示展开流程 28 +PASS 1440 双图像或视频合并显示原件摘要可展开 +PASS 1440 双图像或视频合并显示版本 0 +PASS 1440 双图像或视频合并显示版本 1 +PASS 1440 双图像或视频合并显示版本 2 +PASS 1440 双图像或视频合并显示版本 3 +PASS 1440 1.image键盘展开 +PASS 1440 1.image用途/单位/范围/来源条件 +PASS 1440 1.image精确保留现值 +PASS 1440 1.image指针默认折叠 +PASS 1440 1.image精确源码/类型/指针 +PASS 1440 1.image展开无溢出 +PASS 1440 1.saved_position_1键盘展开 +PASS 1440 1.saved_position_1用途/单位/范围/来源条件 +PASS 1440 1.saved_position_1精确保留现值 +PASS 1440 1.saved_position_1指针默认折叠 +PASS 1440 1.saved_position_1精确源码/类型/指针 +PASS 1440 1.saved_position_1展开无溢出 +PASS 1440 2.image键盘展开 +PASS 1440 2.image用途/单位/范围/来源条件 +PASS 1440 2.image精确保留现值 +PASS 1440 2.image指针默认折叠 +PASS 1440 2.image精确源码/类型/指针 +PASS 1440 2.image展开无溢出 +PASS 1440 2.saved_position_1键盘展开 +PASS 1440 2.saved_position_1用途/单位/范围/来源条件 +PASS 1440 2.saved_position_1精确保留现值 +PASS 1440 2.saved_position_1指针默认折叠 +PASS 1440 2.saved_position_1精确源码/类型/指针 +PASS 1440 2.saved_position_1展开无溢出 +PASS 1440 4.inputcount键盘展开 +PASS 1440 4.inputcount用途/单位/范围/来源条件 +PASS 1440 4.inputcount精确保留现值 +PASS 1440 4.inputcount指针默认折叠 +PASS 1440 4.inputcount精确源码/类型/指针 +PASS 1440 4.inputcount展开无溢出 +PASS 1440 4.direction键盘展开 +PASS 1440 4.direction用途/单位/范围/来源条件 +PASS 1440 4.direction精确保留现值 +PASS 1440 4.direction指针默认折叠 +PASS 1440 4.direction精确源码/类型/指针 +PASS 1440 4.direction展开无溢出 +PASS 1440 4.match_image_size键盘展开 +PASS 1440 4.match_image_size用途/单位/范围/来源条件 +PASS 1440 4.match_image_size精确保留现值 +PASS 1440 4.match_image_size指针默认折叠 +PASS 1440 4.match_image_size精确源码/类型/指针 +PASS 1440 4.match_image_size展开无溢出 +PASS 1440 4.saved_position_3键盘展开 +PASS 1440 4.saved_position_3用途/单位/范围/来源条件 +PASS 1440 4.saved_position_3精确保留现值 +PASS 1440 4.saved_position_3指针默认折叠 +PASS 1440 4.saved_position_3精确源码/类型/指针 +PASS 1440 4.saved_position_3展开无溢出 +PASS 1440 10.frame_rate键盘展开 +PASS 1440 10.frame_rate用途/单位/范围/来源条件 +PASS 1440 10.frame_rate精确保留现值 +PASS 1440 10.frame_rate指针默认折叠 +PASS 1440 10.frame_rate精确源码/类型/指针 +PASS 1440 10.frame_rate展开无溢出 +PASS 1440 10.loop_count键盘展开 +PASS 1440 10.loop_count用途/单位/范围/来源条件 +PASS 1440 10.loop_count精确保留现值 +PASS 1440 10.loop_count指针默认折叠 +PASS 1440 10.loop_count精确源码/类型/指针 +PASS 1440 10.loop_count展开无溢出 +PASS 1440 10.filename_prefix键盘展开 +PASS 1440 10.filename_prefix用途/单位/范围/来源条件 +PASS 1440 10.filename_prefix精确保留现值 +PASS 1440 10.filename_prefix指针默认折叠 +PASS 1440 10.filename_prefix精确源码/类型/指针 +PASS 1440 10.filename_prefix展开无溢出 +PASS 1440 10.format键盘展开 +PASS 1440 10.format用途/单位/范围/来源条件 +PASS 1440 10.format精确保留现值 +PASS 1440 10.format指针默认折叠 +PASS 1440 10.format精确源码/类型/指针 +PASS 1440 10.format展开无溢出 +PASS 1440 10.pix_fmt键盘展开 +PASS 1440 10.pix_fmt用途/单位/范围/来源条件 +PASS 1440 10.pix_fmt精确保留现值 +PASS 1440 10.pix_fmt指针默认折叠 +PASS 1440 10.pix_fmt精确源码/类型/指针 +PASS 1440 10.pix_fmt展开无溢出 +PASS 1440 10.crf键盘展开 +PASS 1440 10.crf用途/单位/范围/来源条件 +PASS 1440 10.crf精确保留现值 +PASS 1440 10.crf指针默认折叠 +PASS 1440 10.crf精确源码/类型/指针 +PASS 1440 10.crf展开无溢出 +PASS 1440 10.save_metadata键盘展开 +PASS 1440 10.save_metadata用途/单位/范围/来源条件 +PASS 1440 10.save_metadata精确保留现值 +PASS 1440 10.save_metadata指针默认折叠 +PASS 1440 10.save_metadata精确源码/类型/指针 +PASS 1440 10.save_metadata展开无溢出 +PASS 1440 10.trim_to_audio键盘展开 +PASS 1440 10.trim_to_audio用途/单位/范围/来源条件 +PASS 1440 10.trim_to_audio精确保留现值 +PASS 1440 10.trim_to_audio指针默认折叠 +PASS 1440 10.trim_to_audio精确源码/类型/指针 +PASS 1440 10.trim_to_audio展开无溢出 +PASS 1440 10.pingpong键盘展开 +PASS 1440 10.pingpong用途/单位/范围/来源条件 +PASS 1440 10.pingpong精确保留现值 +PASS 1440 10.pingpong指针默认折叠 +PASS 1440 10.pingpong精确源码/类型/指针 +PASS 1440 10.pingpong展开无溢出 +PASS 1440 10.save_output键盘展开 +PASS 1440 10.save_output用途/单位/范围/来源条件 +PASS 1440 10.save_output精确保留现值 +PASS 1440 10.save_output指针默认折叠 +PASS 1440 10.save_output精确源码/类型/指针 +PASS 1440 10.save_output展开无溢出 +PASS 1440 10.videopreview键盘展开 +PASS 1440 10.videopreview用途/单位/范围/来源条件 +PASS 1440 10.videopreview精确保留现值 +PASS 1440 10.videopreview指针默认折叠 +PASS 1440 10.videopreview精确源码/类型/指针 +PASS 1440 10.videopreview展开无溢出 +PASS 1440 8.video键盘展开 +PASS 1440 8.video用途/单位/范围/来源条件 +PASS 1440 8.video精确保留现值 +PASS 1440 8.video指针默认折叠 +PASS 1440 8.video精确源码/类型/指针 +PASS 1440 8.video展开无溢出 +PASS 1440 8.force_rate键盘展开 +PASS 1440 8.force_rate用途/单位/范围/来源条件 +PASS 1440 8.force_rate精确保留现值 +PASS 1440 8.force_rate指针默认折叠 +PASS 1440 8.force_rate精确源码/类型/指针 +PASS 1440 8.force_rate展开无溢出 +PASS 1440 8.custom_width键盘展开 +PASS 1440 8.custom_width用途/单位/范围/来源条件 +PASS 1440 8.custom_width精确保留现值 +PASS 1440 8.custom_width指针默认折叠 +PASS 1440 8.custom_width精确源码/类型/指针 +PASS 1440 8.custom_width展开无溢出 +PASS 1440 8.custom_height键盘展开 +PASS 1440 8.custom_height用途/单位/范围/来源条件 +PASS 1440 8.custom_height精确保留现值 +PASS 1440 8.custom_height指针默认折叠 +PASS 1440 8.custom_height精确源码/类型/指针 +PASS 1440 8.custom_height展开无溢出 +PASS 1440 8.frame_load_cap键盘展开 +PASS 1440 8.frame_load_cap用途/单位/范围/来源条件 +PASS 1440 8.frame_load_cap精确保留现值 +PASS 1440 8.frame_load_cap指针默认折叠 +PASS 1440 8.frame_load_cap精确源码/类型/指针 +PASS 1440 8.frame_load_cap展开无溢出 +PASS 1440 8.skip_first_frames键盘展开 +PASS 1440 8.skip_first_frames用途/单位/范围/来源条件 +PASS 1440 8.skip_first_frames精确保留现值 +PASS 1440 8.skip_first_frames指针默认折叠 +PASS 1440 8.skip_first_frames精确源码/类型/指针 +PASS 1440 8.skip_first_frames展开无溢出 +PASS 1440 8.select_every_nth键盘展开 +PASS 1440 8.select_every_nth用途/单位/范围/来源条件 +PASS 1440 8.select_every_nth精确保留现值 +PASS 1440 8.select_every_nth指针默认折叠 +PASS 1440 8.select_every_nth精确源码/类型/指针 +PASS 1440 8.select_every_nth展开无溢出 +PASS 1440 8.format键盘展开 +PASS 1440 8.format用途/单位/范围/来源条件 +PASS 1440 8.format精确保留现值 +PASS 1440 8.format指针默认折叠 +PASS 1440 8.format精确源码/类型/指针 +PASS 1440 8.format展开无溢出 +PASS 1440 8.videopreview键盘展开 +PASS 1440 8.videopreview用途/单位/范围/来源条件 +PASS 1440 8.videopreview精确保留现值 +PASS 1440 8.videopreview指针默认折叠 +PASS 1440 8.videopreview精确源码/类型/指针 +PASS 1440 8.videopreview展开无溢出 +PASS 1440 6.video键盘展开 +PASS 1440 6.video用途/单位/范围/来源条件 +PASS 1440 6.video精确保留现值 +PASS 1440 6.video指针默认折叠 +PASS 1440 6.video精确源码/类型/指针 +PASS 1440 6.video展开无溢出 +PASS 1440 6.force_rate键盘展开 +PASS 1440 6.force_rate用途/单位/范围/来源条件 +PASS 1440 6.force_rate精确保留现值 +PASS 1440 6.force_rate指针默认折叠 +PASS 1440 6.force_rate精确源码/类型/指针 +PASS 1440 6.force_rate展开无溢出 +PASS 1440 6.custom_width键盘展开 +PASS 1440 6.custom_width用途/单位/范围/来源条件 +PASS 1440 6.custom_width精确保留现值 +PASS 1440 6.custom_width指针默认折叠 +PASS 1440 6.custom_width精确源码/类型/指针 +PASS 1440 6.custom_width展开无溢出 +PASS 1440 6.custom_height键盘展开 +PASS 1440 6.custom_height用途/单位/范围/来源条件 +PASS 1440 6.custom_height精确保留现值 +PASS 1440 6.custom_height指针默认折叠 +PASS 1440 6.custom_height精确源码/类型/指针 +PASS 1440 6.custom_height展开无溢出 +PASS 1440 6.frame_load_cap键盘展开 +PASS 1440 6.frame_load_cap用途/单位/范围/来源条件 +PASS 1440 6.frame_load_cap精确保留现值 +PASS 1440 6.frame_load_cap指针默认折叠 +PASS 1440 6.frame_load_cap精确源码/类型/指针 +PASS 1440 6.frame_load_cap展开无溢出 +PASS 1440 6.skip_first_frames键盘展开 +PASS 1440 6.skip_first_frames用途/单位/范围/来源条件 +PASS 1440 6.skip_first_frames精确保留现值 +PASS 1440 6.skip_first_frames指针默认折叠 +PASS 1440 6.skip_first_frames精确源码/类型/指针 +PASS 1440 6.skip_first_frames展开无溢出 +PASS 1440 6.select_every_nth键盘展开 +PASS 1440 6.select_every_nth用途/单位/范围/来源条件 +PASS 1440 6.select_every_nth精确保留现值 +PASS 1440 6.select_every_nth指针默认折叠 +PASS 1440 6.select_every_nth精确源码/类型/指针 +PASS 1440 6.select_every_nth展开无溢出 +PASS 1440 6.format键盘展开 +PASS 1440 6.format用途/单位/范围/来源条件 +PASS 1440 6.format精确保留现值 +PASS 1440 6.format指针默认折叠 +PASS 1440 6.format精确源码/类型/指针 +PASS 1440 6.format展开无溢出 +PASS 1440 6.choose video to upload键盘展开 +PASS 1440 6.choose video to upload用途/单位/范围/来源条件 +PASS 1440 6.choose video to upload精确保留现值 +PASS 1440 6.choose video to upload指针默认折叠 +PASS 1440 6.choose video to upload精确源码/类型/指针 +PASS 1440 6.choose video to upload展开无溢出 +PASS 1440 6.videopreview键盘展开 +PASS 1440 6.videopreview用途/单位/范围/来源条件 +PASS 1440 6.videopreview精确保留现值 +PASS 1440 6.videopreview指针默认折叠 +PASS 1440 6.videopreview精确源码/类型/指针 +PASS 1440 6.videopreview展开无溢出 +PASS 1440 9.inputcount键盘展开 +PASS 1440 9.inputcount用途/单位/范围/来源条件 +PASS 1440 9.inputcount精确保留现值 +PASS 1440 9.inputcount指针默认折叠 +PASS 1440 9.inputcount精确源码/类型/指针 +PASS 1440 9.inputcount展开无溢出 +PASS 1440 9.direction键盘展开 +PASS 1440 9.direction用途/单位/范围/来源条件 +PASS 1440 9.direction精确保留现值 +PASS 1440 9.direction指针默认折叠 +PASS 1440 9.direction精确源码/类型/指针 +PASS 1440 9.direction展开无溢出 +PASS 1440 9.match_image_size键盘展开 +PASS 1440 9.match_image_size用途/单位/范围/来源条件 +PASS 1440 9.match_image_size精确保留现值 +PASS 1440 9.match_image_size指针默认折叠 +PASS 1440 9.match_image_size精确源码/类型/指针 +PASS 1440 9.match_image_size展开无溢出 +PASS 1440 9.saved_position_3键盘展开 +PASS 1440 9.saved_position_3用途/单位/范围/来源条件 +PASS 1440 9.saved_position_3精确保留现值 +PASS 1440 9.saved_position_3指针默认折叠 +PASS 1440 9.saved_position_3精确源码/类型/指针 +PASS 1440 9.saved_position_3展开无溢出 +PASS 1440Tab焦点保留 +PASS 1440ShiftTab焦点保留 +PASS 1440 双图像或视频合并显示关闭归还焦点 +PASS 1440 视频转gif动图图片默认中文用途 +PASS 1440 视频转gif动图图片源审校默认折叠 +PASS 1440 视频转gif动图图片技术范围默认折叠 +PASS 1440 视频转gif动图图片默认无执行计数/实现标识 +PASS 1440 视频转gif动图图片默认依据限制可见 +PASS 1440 视频转gif动图图片 说明未定稿 +PASS 1440 视频转gif动图图片 未验证实跑 +PASS 1440 视频转gif动图图片 未检查 +PASS 1440 视频转gif动图图片停用/时间戳空 +PASS 1440 视频转gif动图图片参数全保留 +PASS 1440 视频转gif动图图片默认无溢出 +PASS 1440 视频转gif动图图片旧图归还焦点 +PASS 1440 加载图片合成视频默认中文用途 +PASS 1440 加载图片合成视频源审校默认折叠 +PASS 1440 加载图片合成视频技术范围默认折叠 +PASS 1440 加载图片合成视频默认无执行计数/实现标识 +PASS 1440 加载图片合成视频默认依据限制可见 +PASS 1440 加载图片合成视频 说明未定稿 +PASS 1440 加载图片合成视频 未验证实跑 +PASS 1440 加载图片合成视频 未检查 +PASS 1440 加载图片合成视频停用/时间戳空 +PASS 1440 加载图片合成视频参数全保留 +PASS 1440 加载图片合成视频默认无溢出 +PASS 1440 加载图片合成视频旧图归还焦点 +PASS 1440 视频倒放默认中文用途 +PASS 1440 视频倒放源审校默认折叠 +PASS 1440 视频倒放技术范围默认折叠 +PASS 1440 视频倒放默认无执行计数/实现标识 +PASS 1440 视频倒放默认依据限制可见 +PASS 1440 视频倒放 说明未定稿 +PASS 1440 视频倒放 未验证实跑 +PASS 1440 视频倒放 未检查 +PASS 1440 视频倒放停用/时间戳空 +PASS 1440 视频倒放参数全保留 +PASS 1440 视频倒放默认无溢出 +PASS 1440 视频倒放旧图归还焦点 +PASS 1440 NLF_视频人物动作骨架获取默认中文用途 +PASS 1440 NLF_视频人物动作骨架获取源审校默认折叠 +PASS 1440 NLF_视频人物动作骨架获取技术范围默认折叠 +PASS 1440 NLF_视频人物动作骨架获取默认无执行计数/实现标识 +PASS 1440 NLF_视频人物动作骨架获取默认依据限制可见 +PASS 1440 NLF_视频人物动作骨架获取 说明未定稿 +PASS 1440 NLF_视频人物动作骨架获取 未验证实跑 +PASS 1440 NLF_视频人物动作骨架获取 未检查 +PASS 1440 NLF_视频人物动作骨架获取停用/时间戳空 +PASS 1440 NLF_视频人物动作骨架获取参数全保留 +PASS 1440 NLF_视频人物动作骨架获取默认无溢出 +PASS 1440 NLF_视频人物动作骨架获取旧图归还焦点 +PASS 1440 openpose-video-姿态检测默认中文用途 +PASS 1440 openpose-video-姿态检测源审校默认折叠 +PASS 1440 openpose-video-姿态检测技术范围默认折叠 +PASS 1440 openpose-video-姿态检测默认无执行计数/实现标识 +PASS 1440 openpose-video-姿态检测默认依据限制可见 +PASS 1440 openpose-video-姿态检测 说明未定稿 +PASS 1440 openpose-video-姿态检测 未验证实跑 +PASS 1440 openpose-video-姿态检测 未检查 +PASS 1440 openpose-video-姿态检测停用/时间戳空 +PASS 1440 openpose-video-姿态检测参数全保留 +PASS 1440 openpose-video-姿态检测默认无溢出 +PASS 1440 openpose-video-姿态检测旧图归还焦点 +PASS 1440 sdpose_视频人物姿势骨架提取默认中文用途 +PASS 1440 sdpose_视频人物姿势骨架提取源审校默认折叠 +PASS 1440 sdpose_视频人物姿势骨架提取技术范围默认折叠 +PASS 1440 sdpose_视频人物姿势骨架提取默认无执行计数/实现标识 +PASS 1440 sdpose_视频人物姿势骨架提取默认依据限制可见 +PASS 1440 sdpose_视频人物姿势骨架提取 说明未定稿 +PASS 1440 sdpose_视频人物姿势骨架提取 未验证实跑 +PASS 1440 sdpose_视频人物姿势骨架提取 未检查 +PASS 1440 sdpose_视频人物姿势骨架提取停用/时间戳空 +PASS 1440 sdpose_视频人物姿势骨架提取参数全保留 +PASS 1440 sdpose_视频人物姿势骨架提取默认无溢出 +PASS 1440 sdpose_视频人物姿势骨架提取旧图归还焦点 +PASS 1440 gemma4_提示词反推(图像视频音频)默认中文用途 +PASS 1440 gemma4_提示词反推(图像视频音频)源审校默认折叠 +PASS 1440 gemma4_提示词反推(图像视频音频)技术范围默认折叠 +PASS 1440 gemma4_提示词反推(图像视频音频)默认无执行计数/实现标识 +PASS 1440 gemma4_提示词反推(图像视频音频)默认依据限制可见 +PASS 1440 gemma4_提示词反推(图像视频音频) 说明未定稿 +PASS 1440 gemma4_提示词反推(图像视频音频) 未验证实跑 +PASS 1440 gemma4_提示词反推(图像视频音频) 未检查 +PASS 1440 gemma4_提示词反推(图像视频音频)停用/时间戳空 +PASS 1440 gemma4_提示词反推(图像视频音频)参数全保留 +PASS 1440 gemma4_提示词反推(图像视频音频)默认无溢出 +PASS 1440 gemma4_提示词反推(图像视频音频)旧图归还焦点 +PASS 1440 图像合并成四宫格默认中文用途 +PASS 1440 图像合并成四宫格源审校默认折叠 +PASS 1440 图像合并成四宫格技术范围默认折叠 +PASS 1440 图像合并成四宫格默认无执行计数/实现标识 +PASS 1440 图像合并成四宫格默认依据限制可见 +PASS 1440 图像合并成四宫格 说明未定稿 +PASS 1440 图像合并成四宫格 未验证实跑 +PASS 1440 图像合并成四宫格 未检查 +PASS 1440 图像合并成四宫格停用/时间戳空 +PASS 1440 图像合并成四宫格参数全保留 +PASS 1440 图像合并成四宫格默认无溢出 +PASS 1440 图像合并成四宫格旧图归还焦点 +PASS 1440 图像分割-多宫格分割默认中文用途 +PASS 1440 图像分割-多宫格分割源审校默认折叠 +PASS 1440 图像分割-多宫格分割技术范围默认折叠 +PASS 1440 图像分割-多宫格分割默认无执行计数/实现标识 +PASS 1440 图像分割-多宫格分割默认依据限制可见 +PASS 1440 图像分割-多宫格分割 说明未定稿 +PASS 1440 图像分割-多宫格分割 未验证实跑 +PASS 1440 图像分割-多宫格分割 未检查 +PASS 1440 图像分割-多宫格分割停用/时间戳空 +PASS 1440 图像分割-多宫格分割参数全保留 +PASS 1440 图像分割-多宫格分割默认无溢出 +PASS 1440 图像分割-多宫格分割旧图归还焦点 +PASS 1440 Qwen_image2.1_图像编辑_背景移除默认中文用途 +PASS 1440 Qwen_image2.1_图像编辑_背景移除源审校默认折叠 +PASS 1440 Qwen_image2.1_图像编辑_背景移除技术范围默认折叠 +PASS 1440 Qwen_image2.1_图像编辑_背景移除默认无执行计数/实现标识 +PASS 1440 Qwen_image2.1_图像编辑_背景移除默认依据限制可见 +PASS 1440 Qwen_image2.1_图像编辑_背景移除 说明未定稿 +PASS 1440 Qwen_image2.1_图像编辑_背景移除 未验证实跑 +PASS 1440 Qwen_image2.1_图像编辑_背景移除 未检查 +PASS 1440 Qwen_image2.1_图像编辑_背景移除停用/时间戳空 +PASS 1440 Qwen_image2.1_图像编辑_背景移除参数全保留 +PASS 1440 Qwen_image2.1_图像编辑_背景移除默认无溢出 +PASS 1440 Qwen_image2.1_图像编辑_背景移除旧图归还焦点 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强默认中文用途 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强源审校默认折叠 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强技术范围默认折叠 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强默认无执行计数/实现标识 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强默认依据限制可见 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强 说明未定稿 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强 未验证实跑 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强 未检查 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强停用/时间戳空 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强参数全保留 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强默认无溢出 +PASS 1440 Qwen_image2.1_图像编辑_提示词增强旧图归还焦点 +PASS 1440 Qwen_image2.1_文生图_提示词增强默认中文用途 +PASS 1440 Qwen_image2.1_文生图_提示词增强源审校默认折叠 +PASS 1440 Qwen_image2.1_文生图_提示词增强技术范围默认折叠 +PASS 1440 Qwen_image2.1_文生图_提示词增强默认无执行计数/实现标识 +PASS 1440 Qwen_image2.1_文生图_提示词增强默认依据限制可见 +PASS 1440 Qwen_image2.1_文生图_提示词增强 说明未定稿 +PASS 1440 Qwen_image2.1_文生图_提示词增强 未验证实跑 +PASS 1440 Qwen_image2.1_文生图_提示词增强 未检查 +PASS 1440 Qwen_image2.1_文生图_提示词增强停用/时间戳空 +PASS 1440 Qwen_image2.1_文生图_提示词增强参数全保留 +PASS 1440 Qwen_image2.1_文生图_提示词增强默认无溢出 +PASS 1440 Qwen_image2.1_文生图_提示词增强旧图归还焦点 +PASS 1440 ControlNet_aux_常用样例默认中文用途 +PASS 1440 ControlNet_aux_常用样例源审校默认折叠 +PASS 1440 ControlNet_aux_常用样例技术范围默认折叠 +PASS 1440 ControlNet_aux_常用样例默认无执行计数/实现标识 +PASS 1440 ControlNet_aux_常用样例默认依据限制可见 +PASS 1440 ControlNet_aux_常用样例 说明未定稿 +PASS 1440 ControlNet_aux_常用样例 未验证实跑 +PASS 1440 ControlNet_aux_常用样例 未检查 +PASS 1440 ControlNet_aux_常用样例停用/时间戳空 +PASS 1440 ControlNet_aux_常用样例参数全保留 +PASS 1440 ControlNet_aux_常用样例默认无溢出 +PASS 1440 ControlNet_aux_常用样例旧图归还焦点 +PASS 1440 Qwen3-ASR-语音转文字默认中文用途 +PASS 1440 Qwen3-ASR-语音转文字源审校默认折叠 +PASS 1440 Qwen3-ASR-语音转文字技术范围默认折叠 +PASS 1440 Qwen3-ASR-语音转文字默认无执行计数/实现标识 +PASS 1440 Qwen3-ASR-语音转文字默认依据限制可见 +PASS 1440 Qwen3-ASR-语音转文字 说明未定稿 +PASS 1440 Qwen3-ASR-语音转文字 未验证实跑 +PASS 1440 Qwen3-ASR-语音转文字 未检查 +PASS 1440 Qwen3-ASR-语音转文字停用/时间戳空 +PASS 1440 Qwen3-ASR-语音转文字参数全保留 +PASS 1440 Qwen3-ASR-语音转文字默认无溢出 +PASS 1440 Qwen3-ASR-语音转文字旧图归还焦点 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕默认中文用途 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕源审校默认折叠 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕技术范围默认折叠 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕默认无执行计数/实现标识 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕默认依据限制可见 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕 说明未定稿 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕 未验证实跑 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕 未检查 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕停用/时间戳空 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕参数全保留 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕默认无溢出 +PASS 1440 Qwen3-ASR-Subtitle语音转字幕旧图归还焦点 +PASS 1440 Minimax-H3提示词增强默认中文用途 +PASS 1440 Minimax-H3提示词增强源审校默认折叠 +PASS 1440 Minimax-H3提示词增强技术范围默认折叠 +PASS 1440 Minimax-H3提示词增强默认无执行计数/实现标识 +PASS 1440 Minimax-H3提示词增强默认依据限制可见 +PASS 1440 Minimax-H3提示词增强 说明未定稿 +PASS 1440 Minimax-H3提示词增强 未验证实跑 +PASS 1440 Minimax-H3提示词增强 未检查 +PASS 1440 Minimax-H3提示词增强停用/时间戳空 +PASS 1440 Minimax-H3提示词增强参数全保留 +PASS 1440 Minimax-H3提示词增强默认无溢出 +PASS 1440 Minimax-H3提示词增强旧图归还焦点 +PASS 1440 音频转MP3格式默认中文用途 +PASS 1440 音频转MP3格式源审校默认折叠 +PASS 1440 音频转MP3格式技术范围默认折叠 +PASS 1440 音频转MP3格式默认无执行计数/实现标识 +PASS 1440 音频转MP3格式默认依据限制可见 +PASS 1440 音频转MP3格式 说明未定稿 +PASS 1440 音频转MP3格式 未验证实跑 +PASS 1440 音频转MP3格式 未检查 +PASS 1440 音频转MP3格式停用/时间戳空 +PASS 1440 音频转MP3格式参数全保留 +PASS 1440 音频转MP3格式默认无溢出 +PASS 1440 音频转MP3格式旧图归还焦点 +PASS 1440 音频人声分离默认中文用途 +PASS 1440 音频人声分离源审校默认折叠 +PASS 1440 音频人声分离技术范围默认折叠 +PASS 1440 音频人声分离默认无执行计数/实现标识 +PASS 1440 音频人声分离默认依据限制可见 +PASS 1440 音频人声分离 说明未定稿 +PASS 1440 音频人声分离 未验证实跑 +PASS 1440 音频人声分离 未检查 +PASS 1440 音频人声分离停用/时间戳空 +PASS 1440 音频人声分离参数全保留 +PASS 1440 音频人声分离默认无溢出 +PASS 1440 音频人声分离旧图归还焦点 +PASS 1440 视频-音频分离默认中文用途 +PASS 1440 视频-音频分离源审校默认折叠 +PASS 1440 视频-音频分离技术范围默认折叠 +PASS 1440 视频-音频分离默认无执行计数/实现标识 +PASS 1440 视频-音频分离默认依据限制可见 +PASS 1440 视频-音频分离 说明未定稿 +PASS 1440 视频-音频分离 未验证实跑 +PASS 1440 视频-音频分离 未检查 +PASS 1440 视频-音频分离停用/时间戳空 +PASS 1440 视频-音频分离参数全保留 +PASS 1440 视频-音频分离默认无溢出 +PASS 1440 视频-音频分离旧图归还焦点 +PASS 1440 图像嵌入文字描述默认中文用途 +PASS 1440 图像嵌入文字描述源审校默认折叠 +PASS 1440 图像嵌入文字描述技术范围默认折叠 +PASS 1440 图像嵌入文字描述默认无执行计数/实现标识 +PASS 1440 图像嵌入文字描述默认依据限制可见 +PASS 1440 图像嵌入文字描述 说明未定稿 +PASS 1440 图像嵌入文字描述 未验证实跑 +PASS 1440 图像嵌入文字描述 未检查 +PASS 1440 图像嵌入文字描述停用/时间戳空 +PASS 1440 图像嵌入文字描述参数全保留 +PASS 1440 图像嵌入文字描述默认无溢出 +PASS 1440 图像嵌入文字描述旧图归还焦点 +PASS 390 双图像或视频合并显示默认中文用途 +PASS 390 双图像或视频合并显示源审校默认折叠 +PASS 390 双图像或视频合并显示技术范围默认折叠 +PASS 390 双图像或视频合并显示默认无执行计数/实现标识 +PASS 390 双图像或视频合并显示默认依据限制可见 +PASS 390 双图像或视频合并显示 说明未定稿 +PASS 390 双图像或视频合并显示 未验证实跑 +PASS 390 双图像或视频合并显示 未检查 +PASS 390 双图像或视频合并显示停用/时间戳空 +PASS 390 双图像或视频合并显示参数全保留 +PASS 390 双图像或视频合并显示默认无溢出 +PASS 390 双图像或视频合并显示原用途/源路径展开保留 +PASS 390 双图像或视频合并显示展开流程 0 +PASS 390 双图像或视频合并显示展开流程 1 +PASS 390 双图像或视频合并显示展开流程 2 +PASS 390 双图像或视频合并显示展开流程 3 +PASS 390 双图像或视频合并显示展开流程 4 +PASS 390 双图像或视频合并显示展开流程 5 +PASS 390 双图像或视频合并显示展开流程 6 +PASS 390 双图像或视频合并显示展开流程 7 +PASS 390 双图像或视频合并显示展开流程 8 +PASS 390 双图像或视频合并显示展开流程 9 +PASS 390 双图像或视频合并显示展开流程 10 +PASS 390 双图像或视频合并显示展开流程 11 +PASS 390 双图像或视频合并显示展开流程 12 +PASS 390 双图像或视频合并显示展开流程 13 +PASS 390 双图像或视频合并显示展开流程 14 +PASS 390 双图像或视频合并显示展开流程 15 +PASS 390 双图像或视频合并显示展开流程 16 +PASS 390 双图像或视频合并显示展开流程 17 +PASS 390 双图像或视频合并显示展开流程 18 +PASS 390 双图像或视频合并显示展开流程 19 +PASS 390 双图像或视频合并显示展开流程 20 +PASS 390 双图像或视频合并显示展开流程 21 +PASS 390 双图像或视频合并显示展开流程 22 +PASS 390 双图像或视频合并显示展开流程 23 +PASS 390 双图像或视频合并显示展开流程 24 +PASS 390 双图像或视频合并显示展开流程 25 +PASS 390 双图像或视频合并显示展开流程 26 +PASS 390 双图像或视频合并显示展开流程 27 +PASS 390 双图像或视频合并显示展开流程 28 +PASS 390 双图像或视频合并显示原件摘要可展开 +PASS 390 双图像或视频合并显示版本 0 +PASS 390 双图像或视频合并显示版本 1 +PASS 390 双图像或视频合并显示版本 2 +PASS 390 双图像或视频合并显示版本 3 +PASS 390 1.image键盘展开 +PASS 390 1.image用途/单位/范围/来源条件 +PASS 390 1.image精确保留现值 +PASS 390 1.image指针默认折叠 +PASS 390 1.image精确源码/类型/指针 +PASS 390 1.image展开无溢出 +PASS 390 1.saved_position_1键盘展开 +PASS 390 1.saved_position_1用途/单位/范围/来源条件 +PASS 390 1.saved_position_1精确保留现值 +PASS 390 1.saved_position_1指针默认折叠 +PASS 390 1.saved_position_1精确源码/类型/指针 +PASS 390 1.saved_position_1展开无溢出 +PASS 390 2.image键盘展开 +PASS 390 2.image用途/单位/范围/来源条件 +PASS 390 2.image精确保留现值 +PASS 390 2.image指针默认折叠 +PASS 390 2.image精确源码/类型/指针 +PASS 390 2.image展开无溢出 +PASS 390 2.saved_position_1键盘展开 +PASS 390 2.saved_position_1用途/单位/范围/来源条件 +PASS 390 2.saved_position_1精确保留现值 +PASS 390 2.saved_position_1指针默认折叠 +PASS 390 2.saved_position_1精确源码/类型/指针 +PASS 390 2.saved_position_1展开无溢出 +PASS 390 4.inputcount键盘展开 +PASS 390 4.inputcount用途/单位/范围/来源条件 +PASS 390 4.inputcount精确保留现值 +PASS 390 4.inputcount指针默认折叠 +PASS 390 4.inputcount精确源码/类型/指针 +PASS 390 4.inputcount展开无溢出 +PASS 390 4.direction键盘展开 +PASS 390 4.direction用途/单位/范围/来源条件 +PASS 390 4.direction精确保留现值 +PASS 390 4.direction指针默认折叠 +PASS 390 4.direction精确源码/类型/指针 +PASS 390 4.direction展开无溢出 +PASS 390 4.match_image_size键盘展开 +PASS 390 4.match_image_size用途/单位/范围/来源条件 +PASS 390 4.match_image_size精确保留现值 +PASS 390 4.match_image_size指针默认折叠 +PASS 390 4.match_image_size精确源码/类型/指针 +PASS 390 4.match_image_size展开无溢出 +PASS 390 4.saved_position_3键盘展开 +PASS 390 4.saved_position_3用途/单位/范围/来源条件 +PASS 390 4.saved_position_3精确保留现值 +PASS 390 4.saved_position_3指针默认折叠 +PASS 390 4.saved_position_3精确源码/类型/指针 +PASS 390 4.saved_position_3展开无溢出 +PASS 390 10.frame_rate键盘展开 +PASS 390 10.frame_rate用途/单位/范围/来源条件 +PASS 390 10.frame_rate精确保留现值 +PASS 390 10.frame_rate指针默认折叠 +PASS 390 10.frame_rate精确源码/类型/指针 +PASS 390 10.frame_rate展开无溢出 +PASS 390 10.loop_count键盘展开 +PASS 390 10.loop_count用途/单位/范围/来源条件 +PASS 390 10.loop_count精确保留现值 +PASS 390 10.loop_count指针默认折叠 +PASS 390 10.loop_count精确源码/类型/指针 +PASS 390 10.loop_count展开无溢出 +PASS 390 10.filename_prefix键盘展开 +PASS 390 10.filename_prefix用途/单位/范围/来源条件 +PASS 390 10.filename_prefix精确保留现值 +PASS 390 10.filename_prefix指针默认折叠 +PASS 390 10.filename_prefix精确源码/类型/指针 +PASS 390 10.filename_prefix展开无溢出 +PASS 390 10.format键盘展开 +PASS 390 10.format用途/单位/范围/来源条件 +PASS 390 10.format精确保留现值 +PASS 390 10.format指针默认折叠 +PASS 390 10.format精确源码/类型/指针 +PASS 390 10.format展开无溢出 +PASS 390 10.pix_fmt键盘展开 +PASS 390 10.pix_fmt用途/单位/范围/来源条件 +PASS 390 10.pix_fmt精确保留现值 +PASS 390 10.pix_fmt指针默认折叠 +PASS 390 10.pix_fmt精确源码/类型/指针 +PASS 390 10.pix_fmt展开无溢出 +PASS 390 10.crf键盘展开 +PASS 390 10.crf用途/单位/范围/来源条件 +PASS 390 10.crf精确保留现值 +PASS 390 10.crf指针默认折叠 +PASS 390 10.crf精确源码/类型/指针 +PASS 390 10.crf展开无溢出 +PASS 390 10.save_metadata键盘展开 +PASS 390 10.save_metadata用途/单位/范围/来源条件 +PASS 390 10.save_metadata精确保留现值 +PASS 390 10.save_metadata指针默认折叠 +PASS 390 10.save_metadata精确源码/类型/指针 +PASS 390 10.save_metadata展开无溢出 +PASS 390 10.trim_to_audio键盘展开 +PASS 390 10.trim_to_audio用途/单位/范围/来源条件 +PASS 390 10.trim_to_audio精确保留现值 +PASS 390 10.trim_to_audio指针默认折叠 +PASS 390 10.trim_to_audio精确源码/类型/指针 +PASS 390 10.trim_to_audio展开无溢出 +PASS 390 10.pingpong键盘展开 +PASS 390 10.pingpong用途/单位/范围/来源条件 +PASS 390 10.pingpong精确保留现值 +PASS 390 10.pingpong指针默认折叠 +PASS 390 10.pingpong精确源码/类型/指针 +PASS 390 10.pingpong展开无溢出 +PASS 390 10.save_output键盘展开 +PASS 390 10.save_output用途/单位/范围/来源条件 +PASS 390 10.save_output精确保留现值 +PASS 390 10.save_output指针默认折叠 +PASS 390 10.save_output精确源码/类型/指针 +PASS 390 10.save_output展开无溢出 +PASS 390 10.videopreview键盘展开 +PASS 390 10.videopreview用途/单位/范围/来源条件 +PASS 390 10.videopreview精确保留现值 +PASS 390 10.videopreview指针默认折叠 +PASS 390 10.videopreview精确源码/类型/指针 +PASS 390 10.videopreview展开无溢出 +PASS 390 8.video键盘展开 +PASS 390 8.video用途/单位/范围/来源条件 +PASS 390 8.video精确保留现值 +PASS 390 8.video指针默认折叠 +PASS 390 8.video精确源码/类型/指针 +PASS 390 8.video展开无溢出 +PASS 390 8.force_rate键盘展开 +PASS 390 8.force_rate用途/单位/范围/来源条件 +PASS 390 8.force_rate精确保留现值 +PASS 390 8.force_rate指针默认折叠 +PASS 390 8.force_rate精确源码/类型/指针 +PASS 390 8.force_rate展开无溢出 +PASS 390 8.custom_width键盘展开 +PASS 390 8.custom_width用途/单位/范围/来源条件 +PASS 390 8.custom_width精确保留现值 +PASS 390 8.custom_width指针默认折叠 +PASS 390 8.custom_width精确源码/类型/指针 +PASS 390 8.custom_width展开无溢出 +PASS 390 8.custom_height键盘展开 +PASS 390 8.custom_height用途/单位/范围/来源条件 +PASS 390 8.custom_height精确保留现值 +PASS 390 8.custom_height指针默认折叠 +PASS 390 8.custom_height精确源码/类型/指针 +PASS 390 8.custom_height展开无溢出 +PASS 390 8.frame_load_cap键盘展开 +PASS 390 8.frame_load_cap用途/单位/范围/来源条件 +PASS 390 8.frame_load_cap精确保留现值 +PASS 390 8.frame_load_cap指针默认折叠 +PASS 390 8.frame_load_cap精确源码/类型/指针 +PASS 390 8.frame_load_cap展开无溢出 +PASS 390 8.skip_first_frames键盘展开 +PASS 390 8.skip_first_frames用途/单位/范围/来源条件 +PASS 390 8.skip_first_frames精确保留现值 +PASS 390 8.skip_first_frames指针默认折叠 +PASS 390 8.skip_first_frames精确源码/类型/指针 +PASS 390 8.skip_first_frames展开无溢出 +PASS 390 8.select_every_nth键盘展开 +PASS 390 8.select_every_nth用途/单位/范围/来源条件 +PASS 390 8.select_every_nth精确保留现值 +PASS 390 8.select_every_nth指针默认折叠 +PASS 390 8.select_every_nth精确源码/类型/指针 +PASS 390 8.select_every_nth展开无溢出 +PASS 390 8.format键盘展开 +PASS 390 8.format用途/单位/范围/来源条件 +PASS 390 8.format精确保留现值 +PASS 390 8.format指针默认折叠 +PASS 390 8.format精确源码/类型/指针 +PASS 390 8.format展开无溢出 +PASS 390 8.videopreview键盘展开 +PASS 390 8.videopreview用途/单位/范围/来源条件 +PASS 390 8.videopreview精确保留现值 +PASS 390 8.videopreview指针默认折叠 +PASS 390 8.videopreview精确源码/类型/指针 +PASS 390 8.videopreview展开无溢出 +PASS 390 6.video键盘展开 +PASS 390 6.video用途/单位/范围/来源条件 +PASS 390 6.video精确保留现值 +PASS 390 6.video指针默认折叠 +PASS 390 6.video精确源码/类型/指针 +PASS 390 6.video展开无溢出 +PASS 390 6.force_rate键盘展开 +PASS 390 6.force_rate用途/单位/范围/来源条件 +PASS 390 6.force_rate精确保留现值 +PASS 390 6.force_rate指针默认折叠 +PASS 390 6.force_rate精确源码/类型/指针 +PASS 390 6.force_rate展开无溢出 +PASS 390 6.custom_width键盘展开 +PASS 390 6.custom_width用途/单位/范围/来源条件 +PASS 390 6.custom_width精确保留现值 +PASS 390 6.custom_width指针默认折叠 +PASS 390 6.custom_width精确源码/类型/指针 +PASS 390 6.custom_width展开无溢出 +PASS 390 6.custom_height键盘展开 +PASS 390 6.custom_height用途/单位/范围/来源条件 +PASS 390 6.custom_height精确保留现值 +PASS 390 6.custom_height指针默认折叠 +PASS 390 6.custom_height精确源码/类型/指针 +PASS 390 6.custom_height展开无溢出 +PASS 390 6.frame_load_cap键盘展开 +PASS 390 6.frame_load_cap用途/单位/范围/来源条件 +PASS 390 6.frame_load_cap精确保留现值 +PASS 390 6.frame_load_cap指针默认折叠 +PASS 390 6.frame_load_cap精确源码/类型/指针 +PASS 390 6.frame_load_cap展开无溢出 +PASS 390 6.skip_first_frames键盘展开 +PASS 390 6.skip_first_frames用途/单位/范围/来源条件 +PASS 390 6.skip_first_frames精确保留现值 +PASS 390 6.skip_first_frames指针默认折叠 +PASS 390 6.skip_first_frames精确源码/类型/指针 +PASS 390 6.skip_first_frames展开无溢出 +PASS 390 6.select_every_nth键盘展开 +PASS 390 6.select_every_nth用途/单位/范围/来源条件 +PASS 390 6.select_every_nth精确保留现值 +PASS 390 6.select_every_nth指针默认折叠 +PASS 390 6.select_every_nth精确源码/类型/指针 +PASS 390 6.select_every_nth展开无溢出 +PASS 390 6.format键盘展开 +PASS 390 6.format用途/单位/范围/来源条件 +PASS 390 6.format精确保留现值 +PASS 390 6.format指针默认折叠 +PASS 390 6.format精确源码/类型/指针 +PASS 390 6.format展开无溢出 +PASS 390 6.choose video to upload键盘展开 +PASS 390 6.choose video to upload用途/单位/范围/来源条件 +PASS 390 6.choose video to upload精确保留现值 +PASS 390 6.choose video to upload指针默认折叠 +PASS 390 6.choose video to upload精确源码/类型/指针 +PASS 390 6.choose video to upload展开无溢出 +PASS 390 6.videopreview键盘展开 +PASS 390 6.videopreview用途/单位/范围/来源条件 +PASS 390 6.videopreview精确保留现值 +PASS 390 6.videopreview指针默认折叠 +PASS 390 6.videopreview精确源码/类型/指针 +PASS 390 6.videopreview展开无溢出 +PASS 390 9.inputcount键盘展开 +PASS 390 9.inputcount用途/单位/范围/来源条件 +PASS 390 9.inputcount精确保留现值 +PASS 390 9.inputcount指针默认折叠 +PASS 390 9.inputcount精确源码/类型/指针 +PASS 390 9.inputcount展开无溢出 +PASS 390 9.direction键盘展开 +PASS 390 9.direction用途/单位/范围/来源条件 +PASS 390 9.direction精确保留现值 +PASS 390 9.direction指针默认折叠 +PASS 390 9.direction精确源码/类型/指针 +PASS 390 9.direction展开无溢出 +PASS 390 9.match_image_size键盘展开 +PASS 390 9.match_image_size用途/单位/范围/来源条件 +PASS 390 9.match_image_size精确保留现值 +PASS 390 9.match_image_size指针默认折叠 +PASS 390 9.match_image_size精确源码/类型/指针 +PASS 390 9.match_image_size展开无溢出 +PASS 390 9.saved_position_3键盘展开 +PASS 390 9.saved_position_3用途/单位/范围/来源条件 +PASS 390 9.saved_position_3精确保留现值 +PASS 390 9.saved_position_3指针默认折叠 +PASS 390 9.saved_position_3精确源码/类型/指针 +PASS 390 9.saved_position_3展开无溢出 +PASS 390Tab焦点保留 +PASS 390ShiftTab焦点保留 +PASS 390 双图像或视频合并显示关闭归还焦点 +PASS 390 视频转gif动图图片默认中文用途 +PASS 390 视频转gif动图图片源审校默认折叠 +PASS 390 视频转gif动图图片技术范围默认折叠 +PASS 390 视频转gif动图图片默认无执行计数/实现标识 +PASS 390 视频转gif动图图片默认依据限制可见 +PASS 390 视频转gif动图图片 说明未定稿 +PASS 390 视频转gif动图图片 未验证实跑 +PASS 390 视频转gif动图图片 未检查 +PASS 390 视频转gif动图图片停用/时间戳空 +PASS 390 视频转gif动图图片参数全保留 +PASS 390 视频转gif动图图片默认无溢出 +PASS 390 视频转gif动图图片旧图归还焦点 +PASS 390 加载图片合成视频默认中文用途 +PASS 390 加载图片合成视频源审校默认折叠 +PASS 390 加载图片合成视频技术范围默认折叠 +PASS 390 加载图片合成视频默认无执行计数/实现标识 +PASS 390 加载图片合成视频默认依据限制可见 +PASS 390 加载图片合成视频 说明未定稿 +PASS 390 加载图片合成视频 未验证实跑 +PASS 390 加载图片合成视频 未检查 +PASS 390 加载图片合成视频停用/时间戳空 +PASS 390 加载图片合成视频参数全保留 +PASS 390 加载图片合成视频默认无溢出 +PASS 390 加载图片合成视频旧图归还焦点 +PASS 390 视频倒放默认中文用途 +PASS 390 视频倒放源审校默认折叠 +PASS 390 视频倒放技术范围默认折叠 +PASS 390 视频倒放默认无执行计数/实现标识 +PASS 390 视频倒放默认依据限制可见 +PASS 390 视频倒放 说明未定稿 +PASS 390 视频倒放 未验证实跑 +PASS 390 视频倒放 未检查 +PASS 390 视频倒放停用/时间戳空 +PASS 390 视频倒放参数全保留 +PASS 390 视频倒放默认无溢出 +PASS 390 视频倒放旧图归还焦点 +PASS 390 NLF_视频人物动作骨架获取默认中文用途 +PASS 390 NLF_视频人物动作骨架获取源审校默认折叠 +PASS 390 NLF_视频人物动作骨架获取技术范围默认折叠 +PASS 390 NLF_视频人物动作骨架获取默认无执行计数/实现标识 +PASS 390 NLF_视频人物动作骨架获取默认依据限制可见 +PASS 390 NLF_视频人物动作骨架获取 说明未定稿 +PASS 390 NLF_视频人物动作骨架获取 未验证实跑 +PASS 390 NLF_视频人物动作骨架获取 未检查 +PASS 390 NLF_视频人物动作骨架获取停用/时间戳空 +PASS 390 NLF_视频人物动作骨架获取参数全保留 +PASS 390 NLF_视频人物动作骨架获取默认无溢出 +PASS 390 NLF_视频人物动作骨架获取旧图归还焦点 +PASS 390 openpose-video-姿态检测默认中文用途 +PASS 390 openpose-video-姿态检测源审校默认折叠 +PASS 390 openpose-video-姿态检测技术范围默认折叠 +PASS 390 openpose-video-姿态检测默认无执行计数/实现标识 +PASS 390 openpose-video-姿态检测默认依据限制可见 +PASS 390 openpose-video-姿态检测 说明未定稿 +PASS 390 openpose-video-姿态检测 未验证实跑 +PASS 390 openpose-video-姿态检测 未检查 +PASS 390 openpose-video-姿态检测停用/时间戳空 +PASS 390 openpose-video-姿态检测参数全保留 +PASS 390 openpose-video-姿态检测默认无溢出 +PASS 390 openpose-video-姿态检测旧图归还焦点 +PASS 390 sdpose_视频人物姿势骨架提取默认中文用途 +PASS 390 sdpose_视频人物姿势骨架提取源审校默认折叠 +PASS 390 sdpose_视频人物姿势骨架提取技术范围默认折叠 +PASS 390 sdpose_视频人物姿势骨架提取默认无执行计数/实现标识 +PASS 390 sdpose_视频人物姿势骨架提取默认依据限制可见 +PASS 390 sdpose_视频人物姿势骨架提取 说明未定稿 +PASS 390 sdpose_视频人物姿势骨架提取 未验证实跑 +PASS 390 sdpose_视频人物姿势骨架提取 未检查 +PASS 390 sdpose_视频人物姿势骨架提取停用/时间戳空 +PASS 390 sdpose_视频人物姿势骨架提取参数全保留 +PASS 390 sdpose_视频人物姿势骨架提取默认无溢出 +PASS 390 sdpose_视频人物姿势骨架提取旧图归还焦点 +PASS 390 gemma4_提示词反推(图像视频音频)默认中文用途 +PASS 390 gemma4_提示词反推(图像视频音频)源审校默认折叠 +PASS 390 gemma4_提示词反推(图像视频音频)技术范围默认折叠 +PASS 390 gemma4_提示词反推(图像视频音频)默认无执行计数/实现标识 +PASS 390 gemma4_提示词反推(图像视频音频)默认依据限制可见 +PASS 390 gemma4_提示词反推(图像视频音频) 说明未定稿 +PASS 390 gemma4_提示词反推(图像视频音频) 未验证实跑 +PASS 390 gemma4_提示词反推(图像视频音频) 未检查 +PASS 390 gemma4_提示词反推(图像视频音频)停用/时间戳空 +PASS 390 gemma4_提示词反推(图像视频音频)参数全保留 +PASS 390 gemma4_提示词反推(图像视频音频)默认无溢出 +PASS 390 gemma4_提示词反推(图像视频音频)旧图归还焦点 +PASS 390 图像合并成四宫格默认中文用途 +PASS 390 图像合并成四宫格源审校默认折叠 +PASS 390 图像合并成四宫格技术范围默认折叠 +PASS 390 图像合并成四宫格默认无执行计数/实现标识 +PASS 390 图像合并成四宫格默认依据限制可见 +PASS 390 图像合并成四宫格 说明未定稿 +PASS 390 图像合并成四宫格 未验证实跑 +PASS 390 图像合并成四宫格 未检查 +PASS 390 图像合并成四宫格停用/时间戳空 +PASS 390 图像合并成四宫格参数全保留 +PASS 390 图像合并成四宫格默认无溢出 +PASS 390 图像合并成四宫格旧图归还焦点 +PASS 390 图像分割-多宫格分割默认中文用途 +PASS 390 图像分割-多宫格分割源审校默认折叠 +PASS 390 图像分割-多宫格分割技术范围默认折叠 +PASS 390 图像分割-多宫格分割默认无执行计数/实现标识 +PASS 390 图像分割-多宫格分割默认依据限制可见 +PASS 390 图像分割-多宫格分割 说明未定稿 +PASS 390 图像分割-多宫格分割 未验证实跑 +PASS 390 图像分割-多宫格分割 未检查 +PASS 390 图像分割-多宫格分割停用/时间戳空 +PASS 390 图像分割-多宫格分割参数全保留 +PASS 390 图像分割-多宫格分割默认无溢出 +PASS 390 图像分割-多宫格分割旧图归还焦点 +PASS 390 Qwen_image2.1_图像编辑_背景移除默认中文用途 +PASS 390 Qwen_image2.1_图像编辑_背景移除源审校默认折叠 +PASS 390 Qwen_image2.1_图像编辑_背景移除技术范围默认折叠 +PASS 390 Qwen_image2.1_图像编辑_背景移除默认无执行计数/实现标识 +PASS 390 Qwen_image2.1_图像编辑_背景移除默认依据限制可见 +PASS 390 Qwen_image2.1_图像编辑_背景移除 说明未定稿 +PASS 390 Qwen_image2.1_图像编辑_背景移除 未验证实跑 +PASS 390 Qwen_image2.1_图像编辑_背景移除 未检查 +PASS 390 Qwen_image2.1_图像编辑_背景移除停用/时间戳空 +PASS 390 Qwen_image2.1_图像编辑_背景移除参数全保留 +PASS 390 Qwen_image2.1_图像编辑_背景移除默认无溢出 +PASS 390 Qwen_image2.1_图像编辑_背景移除旧图归还焦点 +PASS 390 Qwen_image2.1_图像编辑_提示词增强默认中文用途 +PASS 390 Qwen_image2.1_图像编辑_提示词增强源审校默认折叠 +PASS 390 Qwen_image2.1_图像编辑_提示词增强技术范围默认折叠 +PASS 390 Qwen_image2.1_图像编辑_提示词增强默认无执行计数/实现标识 +PASS 390 Qwen_image2.1_图像编辑_提示词增强默认依据限制可见 +PASS 390 Qwen_image2.1_图像编辑_提示词增强 说明未定稿 +PASS 390 Qwen_image2.1_图像编辑_提示词增强 未验证实跑 +PASS 390 Qwen_image2.1_图像编辑_提示词增强 未检查 +PASS 390 Qwen_image2.1_图像编辑_提示词增强停用/时间戳空 +PASS 390 Qwen_image2.1_图像编辑_提示词增强参数全保留 +PASS 390 Qwen_image2.1_图像编辑_提示词增强默认无溢出 +PASS 390 Qwen_image2.1_图像编辑_提示词增强旧图归还焦点 +PASS 390 Qwen_image2.1_文生图_提示词增强默认中文用途 +PASS 390 Qwen_image2.1_文生图_提示词增强源审校默认折叠 +PASS 390 Qwen_image2.1_文生图_提示词增强技术范围默认折叠 +PASS 390 Qwen_image2.1_文生图_提示词增强默认无执行计数/实现标识 +PASS 390 Qwen_image2.1_文生图_提示词增强默认依据限制可见 +PASS 390 Qwen_image2.1_文生图_提示词增强 说明未定稿 +PASS 390 Qwen_image2.1_文生图_提示词增强 未验证实跑 +PASS 390 Qwen_image2.1_文生图_提示词增强 未检查 +PASS 390 Qwen_image2.1_文生图_提示词增强停用/时间戳空 +PASS 390 Qwen_image2.1_文生图_提示词增强参数全保留 +PASS 390 Qwen_image2.1_文生图_提示词增强默认无溢出 +PASS 390 Qwen_image2.1_文生图_提示词增强旧图归还焦点 +PASS 390 ControlNet_aux_常用样例默认中文用途 +PASS 390 ControlNet_aux_常用样例源审校默认折叠 +PASS 390 ControlNet_aux_常用样例技术范围默认折叠 +PASS 390 ControlNet_aux_常用样例默认无执行计数/实现标识 +PASS 390 ControlNet_aux_常用样例默认依据限制可见 +PASS 390 ControlNet_aux_常用样例 说明未定稿 +PASS 390 ControlNet_aux_常用样例 未验证实跑 +PASS 390 ControlNet_aux_常用样例 未检查 +PASS 390 ControlNet_aux_常用样例停用/时间戳空 +PASS 390 ControlNet_aux_常用样例参数全保留 +PASS 390 ControlNet_aux_常用样例默认无溢出 +PASS 390 ControlNet_aux_常用样例旧图归还焦点 +PASS 390 Qwen3-ASR-语音转文字默认中文用途 +PASS 390 Qwen3-ASR-语音转文字源审校默认折叠 +PASS 390 Qwen3-ASR-语音转文字技术范围默认折叠 +PASS 390 Qwen3-ASR-语音转文字默认无执行计数/实现标识 +PASS 390 Qwen3-ASR-语音转文字默认依据限制可见 +PASS 390 Qwen3-ASR-语音转文字 说明未定稿 +PASS 390 Qwen3-ASR-语音转文字 未验证实跑 +PASS 390 Qwen3-ASR-语音转文字 未检查 +PASS 390 Qwen3-ASR-语音转文字停用/时间戳空 +PASS 390 Qwen3-ASR-语音转文字参数全保留 +PASS 390 Qwen3-ASR-语音转文字默认无溢出 +PASS 390 Qwen3-ASR-语音转文字旧图归还焦点 +PASS 390 Qwen3-ASR-Subtitle语音转字幕默认中文用途 +PASS 390 Qwen3-ASR-Subtitle语音转字幕源审校默认折叠 +PASS 390 Qwen3-ASR-Subtitle语音转字幕技术范围默认折叠 +PASS 390 Qwen3-ASR-Subtitle语音转字幕默认无执行计数/实现标识 +PASS 390 Qwen3-ASR-Subtitle语音转字幕默认依据限制可见 +PASS 390 Qwen3-ASR-Subtitle语音转字幕 说明未定稿 +PASS 390 Qwen3-ASR-Subtitle语音转字幕 未验证实跑 +PASS 390 Qwen3-ASR-Subtitle语音转字幕 未检查 +PASS 390 Qwen3-ASR-Subtitle语音转字幕停用/时间戳空 +PASS 390 Qwen3-ASR-Subtitle语音转字幕参数全保留 +PASS 390 Qwen3-ASR-Subtitle语音转字幕默认无溢出 +PASS 390 Qwen3-ASR-Subtitle语音转字幕旧图归还焦点 +PASS 390 Minimax-H3提示词增强默认中文用途 +PASS 390 Minimax-H3提示词增强源审校默认折叠 +PASS 390 Minimax-H3提示词增强技术范围默认折叠 +PASS 390 Minimax-H3提示词增强默认无执行计数/实现标识 +PASS 390 Minimax-H3提示词增强默认依据限制可见 +PASS 390 Minimax-H3提示词增强 说明未定稿 +PASS 390 Minimax-H3提示词增强 未验证实跑 +PASS 390 Minimax-H3提示词增强 未检查 +PASS 390 Minimax-H3提示词增强停用/时间戳空 +PASS 390 Minimax-H3提示词增强参数全保留 +PASS 390 Minimax-H3提示词增强默认无溢出 +PASS 390 Minimax-H3提示词增强旧图归还焦点 +PASS 390 音频转MP3格式默认中文用途 +PASS 390 音频转MP3格式源审校默认折叠 +PASS 390 音频转MP3格式技术范围默认折叠 +PASS 390 音频转MP3格式默认无执行计数/实现标识 +PASS 390 音频转MP3格式默认依据限制可见 +PASS 390 音频转MP3格式 说明未定稿 +PASS 390 音频转MP3格式 未验证实跑 +PASS 390 音频转MP3格式 未检查 +PASS 390 音频转MP3格式停用/时间戳空 +PASS 390 音频转MP3格式参数全保留 +PASS 390 音频转MP3格式默认无溢出 +PASS 390 音频转MP3格式旧图归还焦点 +PASS 390 音频人声分离默认中文用途 +PASS 390 音频人声分离源审校默认折叠 +PASS 390 音频人声分离技术范围默认折叠 +PASS 390 音频人声分离默认无执行计数/实现标识 +PASS 390 音频人声分离默认依据限制可见 +PASS 390 音频人声分离 说明未定稿 +PASS 390 音频人声分离 未验证实跑 +PASS 390 音频人声分离 未检查 +PASS 390 音频人声分离停用/时间戳空 +PASS 390 音频人声分离参数全保留 +PASS 390 音频人声分离默认无溢出 +PASS 390 音频人声分离旧图归还焦点 +PASS 390 视频-音频分离默认中文用途 +PASS 390 视频-音频分离源审校默认折叠 +PASS 390 视频-音频分离技术范围默认折叠 +PASS 390 视频-音频分离默认无执行计数/实现标识 +PASS 390 视频-音频分离默认依据限制可见 +PASS 390 视频-音频分离 说明未定稿 +PASS 390 视频-音频分离 未验证实跑 +PASS 390 视频-音频分离 未检查 +PASS 390 视频-音频分离停用/时间戳空 +PASS 390 视频-音频分离参数全保留 +PASS 390 视频-音频分离默认无溢出 +PASS 390 视频-音频分离旧图归还焦点 +PASS 390 图像嵌入文字描述默认中文用途 +PASS 390 图像嵌入文字描述源审校默认折叠 +PASS 390 图像嵌入文字描述技术范围默认折叠 +PASS 390 图像嵌入文字描述默认无执行计数/实现标识 +PASS 390 图像嵌入文字描述默认依据限制可见 +PASS 390 图像嵌入文字描述 说明未定稿 +PASS 390 图像嵌入文字描述 未验证实跑 +PASS 390 图像嵌入文字描述 未检查 +PASS 390 图像嵌入文字描述停用/时间戳空 +PASS 390 图像嵌入文字描述参数全保留 +PASS 390 图像嵌入文字描述默认无溢出 +PASS 390 图像嵌入文字描述旧图归还焦点 +PASS 旧/空说明回退 旧工作流回退(隔离测试夹具) +PASS 旧/空说明回退 空说明回退(隔离测试夹具) +PASS 缺摘要自然中文回退 +PASS 回退不暴露undefined +PASS 错绑定提示明确且不展示旧字段 +PASS 回退不暴露undefined +PASS 摘要HTML仅纯文本不创建图像或请求 +PASS 回退不暴露undefined +PASS 迟到合并图响应不覆盖旧GIF摘要/26字段 +PASS GET失败显示重试 +PASS 读取失败隐藏旧摘要 +PASS 重试恢复摘要 +PASS 无脚本错误或禁止请求 [] +PASS 全程本地GET无写/生成/目标/历史预览请求 +All owned browser services stopped. diff --git a/docs/hel-892/concat-document-evidence/build.txt b/docs/hel-892/concat-document-evidence/build.txt new file mode 100644 index 00000000..ae5fa5cc --- /dev/null +++ b/docs/hel-892/concat-document-evidence/build.txt @@ -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 diff --git a/docs/hel-892/concat-document-evidence/build_definition.py b/docs/hel-892/concat-document-evidence/build_definition.py new file mode 100644 index 00000000..c97b048f --- /dev/null +++ b/docs/hel-892/concat-document-evidence/build_definition.py @@ -0,0 +1,553 @@ +"""One source-bound editorial addition. Never imports upstream code or reads media.""" + +from __future__ import annotations + +import hashlib +import json +from pathlib import Path + +REPO = Path(__file__).resolve().parents[3] +OUT = Path(__file__).resolve().parent +PREFIX = "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/" +PATHS = [PREFIX + "双图像或视频合并显示.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() + graph = json.loads(raw) + refs = [] + entries = json.loads((OUT.parent / "concat-reference/sources.json").read_bytes())["sources"] + + def ref(key, file, first, last, claim): + e = next(e for e in entries if e["id"] == key and e["file"] == file) + data = (OUT.parent / "concat-reference" / e["local_file"]).read_bytes() + assert hashlib.sha256(data).hexdigest() == e["sha256"] + assert 1 <= first <= last <= len(data.decode().splitlines()) + refs.append( + { + **e, + "local_file": "../concat-reference/" + e["local_file"], + "lines": [first, last], + "claim": claim, + } + ) + return len(refs) - 1 + + load = ref( + "vhs", + "videohelpersuite/load_video_nodes.py", + 22, + 168, + "加载格式、尺寸对齐、采样、跳过和上限", + ) + loadrun = ref( + "vhs", + "videohelpersuite/load_video_nodes.py", + 293, + 420, + "内存条件、音频起点和时长参数、loaded_fps返回", + ) + loadschema = ref( + "vhs", + "videohelpersuite/load_video_nodes.py", + 423, + 477, + "上传加载schema、输出槽和文件引用验证", + ) + template = ref( + "vhs", + "videohelpersuite/nodes.py", + 48, + 165, + "模板参数str展开、布尔False转字符串False、元数据临时文件条件", + ) + combine = ref("vhs", "videohelpersuite/nodes.py", 235, 420, "合成schema、目录和独立首帧PNG条件") + video = ref( + "vhs", + "videohelpersuite/nodes.py", + 420, + 625, + "视频编码、补边、循环、音频波形混流和中间文件条件", + ) + info = ref( + "vhs", + "videohelpersuite/nodes.py", + 941, + 971, + "VideoInfoLoaded按loaded键输出五槽,槽0为loaded_fps", + ) + fmt = ref("vhs", "video_formats/h264-mp4.json", 1, 15, "H264格式、像素格式、CRF和音频裁切模板") + restore = ref( + "vhs", "web/js/VHS.core.js", 41, 168, "VHS包内保存恢复代码;不证明未知前端或UE恢复次序" + ) + dyn = ref("vhs", "web/js/VHS.core.js", 648, 824, "格式回调和上传选择控件") + preview = ref("vhs", "web/js/VHS.core.js", 915, 970, "预览控件保存历史状态") + fmtjs = ref("vhs", "web/js/VHS.core.js", 1222, 1282, "格式改变时额外控件重建") + utils = ref("vhs", "videohelpersuite/utils.py", 20, 56, "BIGMAX、DIMMAX、floatOrInt") + vreg = ref("vhs", "videohelpersuite/nodes.py", 1023, 1050, "VHS加载、合成和视频信息注册") + concat = ref( + "kj", "nodes/image_nodes.py", 2512, 2561, "ImageConcatMulti自身schema与循环拼接实现" + ) + join = ref("kj", "nodes/image_nodes.py", 329, 425, "批次末帧补齐、宽高匹配、通道补齐与方向拼接") + kjjs = ref( + "kj", "web/js/jsnodes.js", 36, 66, "本提交创建Update inputs按钮,null槽身份仍缺前端恢复证明" + ) + kjreg = ref("kj", "__init__.py", 1, 180, "KJ注册与类引用") + coreload = ref("core", "nodes.py", 1698, 1775, "LoadImage schema、EXIF、批次、RGB和MASK输出") + corepreview = ref( + "core", "nodes.py", 1625, 1697, "PreviewImage继承保存实现,临时PNG/UI结果,无返回类型" + ) + corereg = ref("core", "nodes.py", 2035, 2055, "core LoadImage与PreviewImage固定注册") + for key in ["vhs", "kj", "core"]: + e = next(e for e in entries if e["id"] == key and e["file"] == "LICENSE") + ref( + key, + "LICENSE", + 1, + len((OUT.parent / "concat-reference" / e["local_file"]).read_text().splitlines()), + "准确版本许可原文", + ) + 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, + ) + + cls = "VHS_LoadVideo" + for args in [ + ( + "video", + "视频文件引用", + "COMBO", + "动态input目录枚举,无固定默认", + "文件引用", + "只枚举普通文件webm/mp4/mkv/gif/mov", + "保存引用,不证明素材存在、音轨存在或实际已上传。", + ), + ( + "force_rate", + "加载采样帧率", + "FLOAT/INT(floatOrInt)", + "0", + "帧/秒", + "0~60,step1;0禁用强制重采样", + "两加载器保存0表示按源帧时间采样,不代表实际FPS为0,也不保证两素材同帧率。", + ), + ( + "custom_width", + "自定义加载宽度", + "INT", + "0", + "像素", + "0~8192;0不指定", + "宽高均0从媒体尺寸出发,仍受AnimateDiff的dim8对齐;不是保证原尺寸。", + ), + ( + "custom_height", + "自定义加载高度", + "INT", + "0", + "像素", + "0~8192;0不指定", + "单边指定时按比例计算另一边;两边0仍受格式对齐,不读取真实尺寸。", + ), + ( + "frame_load_cap", + "加载帧数上限", + "INT", + "0", + "采样帧", + "0~2**53-1,step1;0不设此上限", + "素材6保存62、素材8保存64,分别限制加载数量;不是保证实际帧数、同长或对齐。仍受素材、内存和格式条件限制。", + ), + ( + "skip_first_frames", + "跳过起始采样帧", + "INT", + "0", + "采样帧", + "0~2**53-1,step1", + "素材6保存53、素材8保存55;采样后计数,各自起点不同,不是跨素材时间同步。音频参考起点为本加载器skip乘target_frame_time。", + ), + ( + "select_every_nth", + "间隔抽取采样帧", + "INT", + "1", + "间隔", + "1~2**53-1,step1", + "保存1不再间隔删帧;增大值改变loaded_fps和音频时长参数,不能自动对齐另一素材。", + ), + ( + "format", + "加载格式约束", + "COMBO", + "AnimateDiff", + "格式名", + "内置格式与核心动态扩展,目标选项未知", + "保存AnimateDiff有内置target_rate8和dim8;Python尺寸约束不等于强制把保存force0重写8。未知前端回调/恢复顺序不作保证。", + ), + ]: + spec(cls, *args, [load, loadrun, loadschema, utils, dyn, vreg]) + spec( + cls, + "choose video to upload", + "上传选择保存状态", + "前端选择状态", + "无服务端默认", + "状态字符串", + "不是服务端video参数", + "节点6保存image仅是选择控件状态,不证明上传成功,不替换video文件引用。", + [dyn, restore], + "frontend_state", + ) + cls = "VHS_VideoCombine" + for args in [ + ( + "frame_rate", + "合成播放帧率(已连线覆盖)", + "FLOAT/INT(floatOrInt)", + "8", + "帧/秒", + "min1,step1;schema未声明max", + "保存8不是最终执行值:6槽3→11.video_info,11槽0→10.frame" + "_rate覆盖8。VideoInfoLoaded输出素材6的loaded_fps;实" + "际FPS未知,缓存30.000001657458657不是输出保证。", + ), + ( + "loop_count", + "视频额外循环", + "INT", + "0", + "循环", + "0~100,step1", + "保存0不追加视频loop滤镜,不把GIF循环0规则套视频。", + ), + ( + "filename_prefix", + "输出文件名前缀", + "STRING", + "AnimateDiff", + "路径前缀", + "无schema长度范围;权限与目标目录未知", + "保存AnimateDiff参与路径和计数命名;不是已有产物。", + ), + ( + "format", + "合成输出格式", + "COMBO", + "首项image/gif;动态视频格式无唯一目标默认", + "格式名", + "image/gif、image/webp和动态FFmpeg模板", + "保存video/h264-mp4走FFmpeg/libx264模板;编码器与目标动态选项未知。", + ), + ( + "pix_fmt", + "视频像素格式", + "COMBO", + "首项yuv420p", + "像素格式", + "yuv420p / yuv420p10le", + "保存yuv420p;视频分支还可能按dim_alignment默认2补边,实际尺寸未知。", + ), + ( + "crf", + "H264质量参数", + "INT", + "19", + "CRF", + "模板0~100,step1;编码器可接受范围另待核", + "保存19交给libx264的-crf;一般减小会提高质量并可能增大体积,实际效果未测。模板100不保证编码器接受100。", + ), + ( + "save_metadata", + "视频元数据开关", + "BOOLEAN", + "true", + "布尔", + "true/false;视频元数据分支", + ( + "保存true在视频元数据条件分支写入信息;独立首帧workflow PNG" + # 分段保持原中文文本,不插入换行。 + "由VHS_MetadataImage默认true控制。两者不是同一开关。" + ), + ), + ( + "trim_to_audio", + "按音频条件裁切", + "BOOLEAN", + "false", + "布尔", + "仅有效音频波形存在时进入混流", + "源false不是关闭音频。准确模板实现把布尔false转成字符串False,混流添加" + "apad=whole_dur(输出帧数/合成帧率+1)并带-shortest;仍不保" + "证跨素材同步或实际完整时长。", + ), + ( + "pingpong", + "追加往返帧", + "BOOLEAN", + "false", + "布尔", + "true/false;meta_batch限制见实现", + "保存false不追加往返帧;不代表素材原先没有倒序。", + ), + ( + "save_output", + "保存目录选择", + "BOOLEAN", + "true", + "布尔", + "true为output;false为temp;均可能写文件", + "保存true选择正式输出目录;运行可能写首帧PNG、无声视频和-audio混流文件。" + "VHS_KeepIntermediate=false才按条件移除中间文件;本轮GET" + "不执行文件生成。", + ), + ]: + spec(cls, *args, [combine, video, fmt, fmtjs, restore, template, info, vreg]) + for cls in ["VHS_LoadVideo", "VHS_VideoCombine"]: + spec( + cls, + "videopreview", + "历史预览完整对象", + "前端历史状态", + "无服务端默认", + "完整对象", + "hidden/paused/params原样保存;嵌套不重复计数", + "只代表历史缓存;filename/type/E盘fullpath/workflow " + "PNG/缓存FPS都不是当前产物或可达证明。纯文本显示,不请求api/view或媒体" + "。", + [preview, restore], + "frontend_history", + ) + cls = "ImageConcatMulti" + for args in [ + ( + "inputcount", + "拼接输入数量", + "INT", + "2", + "图像输入", + "2~1000,step1", + "保存2,按image_1与image_2次序逐次拼接;缺少后续输入参考实现使用第一图形状零张量,不证明本图缺失。", + ), + ( + "direction", + "拼接方向", + "COMBO", + "right", + "方向", + "right/down/left/up", + "保存down,把第二幅画面放在第一幅下方;节点9第一输入来自6,第二来自8。是空间上下拼接,不是时间顺接。", + ), + ( + "match_image_size", + "匹配图像尺寸", + "BOOLEAN", + "false", + "布尔", + "true/false", + "保存true;down匹配第一输入宽度,第二输入高度按其原比例int计算,用lanc" + "zos/disabled缩放。批次数不同时,较短批次重复末帧补到较长;这不是时间或音" + "频同步。通道不同时以值1补齐缺少通道。", + ), + ]: + spec(cls, *args, [concat, join, kjreg]) + spec( + cls, + "saved_position_3", + "额外null保存槽(按钮候选)", + "未确认前端状态", + "本提交JS创建Update inputs按钮,服务端无此参数", + "无可确认单位", + "原值null;无frontendVersion,不等同缺键或空对象", + "准确KJ JS会创建值null的Update inputs按钮并按inputcoun" + "t增删IMAGE输入;缺本图前端版本/UE恢复证据,不能确定第4保存槽最终身份或恢复" + "效果,不作为执行参数。", + [kjjs, concat], + "frontend_state_unknown", + ) + spec( + "LoadImage", + "image", + "图片文件引用", + "COMBO", + "动态input目录枚举,无固定默认", + "文件引用", + "普通图片文件,image_upload=true", + "原文件引用纯文本;core实现按EXIF转置、转RGB,同尺寸多帧可组成批次,返回IMAGE/MASK但MASK未接。节点1/2均mode4,不能把两图视为已成功合成。", + [coreload, corereg], + ) + spec( + "LoadImage", + "saved_position_1", + "图片上传选择占位", + "未确认前端状态", + "服务端只声明image;此槽无服务端默认", + "状态字符串", + "原值image;前端版本缺失", + "保存image不是第二张图片,也不证明上传完成;该位置前端身份/恢复次序未核,不借其他前端版本具名。", + [coreload], + "frontend_state_unknown", + ) + fields = [] + for i, n in enumerate(graph["nodes"]): + values = n["widgets_values"] + pairs = values.items() if isinstance(values, dict) else enumerate(values) + for key, value in pairs: + name = ( + key + if isinstance(values, dict) + else ( + ["image", "saved_position_1"][key] + if n["type"] == "LoadImage" + else ["inputcount", "direction", "match_image_size", "saved_position_3"][key] + ) + ) + s = specs[n["type"], name].copy() + if n["id"] == 10 and name == "frame_rate": + s["role"] = "linked_saved" + fields.append( + { + **s, + "node_id": str(n["id"]), + "definition_node_id": str(n["id"]), + "class_type": n["type"], + "scope": "root", + "pointer": f"/nodes/{i}/widgets_values/{key}", + "value": value, + "json_type": type(value).__name__, + "execution_note": f"源mode={n['mode']};" + + ( + "图片支路旁路,物理连线不证明当前生效。" + if n["mode"] == 4 + else "视频支路活动保存态;未执行。" + ) + + ( + "无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。" + # 分段保持原中文文本,不插入换行。 + "位置数组只按本版schema解释,不是最终prompt证明。" + ), + } + ) + assert len(fields) == 42 + overview = ( + "这张图把两路视频画面上下合并;图片支路四节点均为mode4,不能当作已完成双图合成。" + "活动路径为视频6和8→拼接9→合成10:素材6跳过53、上限62,素材8跳过55、上" + "限64,起点和上限不同。播放帧率由素材6的信息覆盖保存8,音频来自素材8,不能保证跨" + "素材同步。三个预览对象仅为历史缓存;未实跑、目标环境未知、转换保持关闭。" + ) + flow = [ + overview, + "图片物理支路1+2→4→5四节点均mode4;两LoadImage引用与上传占位分列" + ",mask未接。Preview5原[]零位置;Info11原{}零位置,不能混同缺键" + "/null。", + "两个Concat4/9均保存[2,down,true,null]。准确KJ下排拼接匹" + "配第一幅宽,按第二幅比例计算高度;批次不等时短批次末帧重复到长批次,不能称自动时间对" + "齐。null槽仅为按钮候选,前端身份未知。", + "视频6与8的force_rate均0,按各自源帧时间采样,实际帧率未知。各自skip/cap不同,不推断原片同长、同时起始、同帧率或输出帧数。", + "帧率覆盖链:6槽3→11.video_info;11槽0 loaded_fps→10" + ".frame_rate,覆盖保存8。11其余四输出未接;缓存30.000001657" + "458657不是实际FPS或产物保证。", + "音频链:8槽2→10.audio,来自第二素材;帧率来自第一素材6。VHS按本加载器" + "skip×target_frame_time为音频起点、cap×抽帧后frame_t" + "ime为时长参数,不是跨素材共同配音或同步证明。", + "合成保存h264-mp4/yuv420p/crf19,loop0不加视频循环,pin" + "gpong=false不追加往返,save_metadata=true。save_o" + "utput=true选择output而非temp;实际运行可能写独立首帧PNG、无声" + "视频和混流文件,中间文件按VHS_KeepIntermediate条件处理。", + "trim_to_audio=false不等于关闭音频;有效waveform存在才混流" + "。准确模板将布尔false转字符串False,加入apad=whole_dur(输出" + "帧数/合成帧率+1)并带-shortest;不自动跨素材同步,实际音轨/时长未知。", + "6/8加载与10合成的meta_batch/vae均未接;10的VHS_FILENA" + "MES未接,不新增独立出口。PreviewImage按core继承实现为临时PNG/" + "UI结果且RETURN_TYPES为空;源mode4不证明当前执行过。", + "三videopreview对象含完整hidden/paused/params/旧fi" + "lename/type/fullpath/缓存FPS;只纯文本回读,不访问E盘、ap" + "i/view、媒体或文件。没有模型节点,不编模型依赖。目标安装、素材、输出目录权限、" + "ffmpeg/libx264、动态选项和真实效果未知。", + "源无frontendVersion,不借近版证明恢复或旁路;VHS包内恢复回调与KJ按钮代码分别作参考。所有UE空映射不证明无改写,身份/钩子次序未知,不扩展调查。", + ] + flow += ["源物理边:" + json.dumps(e, ensure_ascii=False) for e in graph["links"]] + flow += [ + f"节点{n['id']} {n['type']} mode={n['mode']};" + f"保存位置={len(n['widgets_values'])};原properties=" + + json.dumps(n["properties"], ensure_ascii=False) + for n in graph["nodes"] + ] + versions = [ + "VHS声明1.7.9,使用官方registry准确发布包SHA256:ac63991" + "d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d" + "5fe61059f57cdf8;完整45成员已复算,Git绑定未知,不套1.7.7。", + "ImageConcatMulti4/9按KJ精确提交50a0837f9aea602b" + "184bbf6dbabf66ed2c7a1d22注册/schema/实现/JS/许可" + "。", + "LoadImage1/2和PreviewImage5按官方core v0.12.3→" + "cb459573c8fa025bbf9ecf312f6af376d659f567固定" + "注册/schema/实现/许可。", + "无frontendVersion;目标安装/UE身份和次序/动态控件恢复未知,固定源码不是运行或目标安装证明。", + ] + return dict( + source_path=path, + source_sha1=hashlib.sha1(raw).hexdigest(), + source_sha256=hashlib.sha256(raw).hexdigest(), + canonical_sha256=hashlib.sha256(canonical(graph)).hexdigest(), + notice="声明版本固定源码仅作参考;图片支路mode4、跨素材音画同步未知、历史缓存非产物,未实跑、转换保持关闭。", + user_overview=overview, + versions=versions, + counts=dict( + saved_fields=42, + scalar_saved_positions=39, + history_objects=3, + source_nodes=9, + physical_edges=9, + source_notes=0, + linked_saved_fields=1, + frontend_only=8, + final_scalars=0, + final_prompt_constructed=False, + ), + fields=fields, + sources=refs, + comments=[], + flow=flow, + flow_evidence=list(range(len(refs))), + zero_saved_nodes=[ + dict( + node_id="5", + class_type="PreviewImage", + evidence=[corepreview, corereg], + effect="原widgets_values=[];mode4,继承SaveImage临时PNG/UI输出,无返回类型,未实跑。", + ), + dict( + node_id="11", + class_type="VHS_VideoInfoLoaded", + effect="原widgets_values={};视频信息槽0 loaded_fps覆盖合成10保存8,其余四槽未接。", + ), + ], + steps=[ + overview, + "素材要求:两路可读取视频和可选两张图片;此处只显示引用,不读取、上传或验证素材。没有模型节点,不编模型依赖。", + "操作1:先核本图准确插件/core版本与素材,保持停用;图片支路mode4,不自行当作已启用或完成。", + "操作2:分别核两视频起点53/55与帧上限62/64,确认上下画面顺序6在上8在下、尺寸与批次末帧补齐条件。", + "操作3:核6→11→10帧率覆盖与8→10音频来源;不要用保存8或缓存30.000001657458657判断真实输出。", + "常见问题:画面末尾停住可能来自较短批次重复末帧;声音不齐须先核各素材起点和帧率,不能" + "称自动同步。文件名前缀和旧预览不证明已生成;save_metadata与首帧PNG开" + "关独立。", + "目标安装、素材存在性、目录权限、编码器/动态选项和真实效果待后续获准验证;本轮未执行插件、未构造prompt,未定稿、未实跑。", + ], + ) diff --git a/docs/hel-892/concat-document-evidence/definition-0.json b/docs/hel-892/concat-document-evidence/definition-0.json new file mode 100644 index 00000000..573b75bd --- /dev/null +++ b/docs/hel-892/concat-document-evidence/definition-0.json @@ -0,0 +1,1532 @@ +{ + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "source_sha1": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "source_sha256": "61a0b1a2aa17a7d8c4f09f4f57e276eaf37227f69b5fc5789193005e593548c9", + "canonical_sha256": "0a5fad1a4d9b69b6633cbd5e3b2aa253a4df5d26234e885e156c63a3d0f6e1c9", + "notice": "声明版本固定源码仅作参考;图片支路mode4、跨素材音画同步未知、历史缓存非产物,未实跑、转换保持关闭。", + "user_overview": "这张图把两路视频画面上下合并;图片支路四节点均为mode4,不能当作已完成双图合成。活动路径为视频6和8→拼接9→合成10:素材6跳过53、上限62,素材8跳过55、上限64,起点和上限不同。播放帧率由素材6的信息覆盖保存8,音频来自素材8,不能保证跨素材同步。三个预览对象仅为历史缓存;未实跑、目标环境未知、转换保持关闭。", + "versions": [ + "VHS声明1.7.9,使用官方registry准确发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;完整45成员已复算,Git绑定未知,不套1.7.7。", + "ImageConcatMulti4/9按KJ精确提交50a0837f9aea602b184bbf6dbabf66ed2c7a1d22注册/schema/实现/JS/许可。", + "LoadImage1/2和PreviewImage5按官方core v0.12.3→cb459573c8fa025bbf9ecf312f6af376d659f567固定注册/schema/实现/许可。", + "无frontendVersion;目标安装/UE身份和次序/动态控件恢复未知,固定源码不是运行或目标安装证明。" + ], + "counts": { + "saved_fields": 42, + "scalar_saved_positions": 39, + "history_objects": 3, + "source_nodes": 9, + "physical_edges": 9, + "source_notes": 0, + "linked_saved_fields": 1, + "frontend_only": 8, + "final_scalars": 0, + "final_prompt_constructed": false + }, + "fields": [ + { + "field": "image", + "label": "图片文件引用", + "type": "COMBO", + "schema_default": "动态input目录枚举,无固定默认", + "unit": "文件引用", + "limits": "普通图片文件,image_upload=true", + "effect": "原文件引用纯文本;core实现按EXIF转置、转RGB,同尺寸多帧可组成批次,返回IMAGE/MASK但MASK未接。节点1/2均mode4,不能把两图视为已成功合成。", + "evidence": [ + 18, + 20 + ], + "role": "scalar", + "node_id": "1", + "definition_node_id": "1", + "class_type": "LoadImage", + "scope": "root", + "pointer": "/nodes/0/widgets_values/0", + "value": "小云雀_1770719334800_0_m.jpg", + "json_type": "str", + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "saved_position_1", + "label": "图片上传选择占位", + "type": "未确认前端状态", + "schema_default": "服务端只声明image;此槽无服务端默认", + "unit": "状态字符串", + "limits": "原值image;前端版本缺失", + "effect": "保存image不是第二张图片,也不证明上传完成;该位置前端身份/恢复次序未核,不借其他前端版本具名。", + "evidence": [ + 18 + ], + "role": "frontend_state_unknown", + "node_id": "1", + "definition_node_id": "1", + "class_type": "LoadImage", + "scope": "root", + "pointer": "/nodes/0/widgets_values/1", + "value": "image", + "json_type": "str", + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "image", + "label": "图片文件引用", + "type": "COMBO", + "schema_default": "动态input目录枚举,无固定默认", + "unit": "文件引用", + "limits": "普通图片文件,image_upload=true", + "effect": "原文件引用纯文本;core实现按EXIF转置、转RGB,同尺寸多帧可组成批次,返回IMAGE/MASK但MASK未接。节点1/2均mode4,不能把两图视为已成功合成。", + "evidence": [ + 18, + 20 + ], + "role": "scalar", + "node_id": "2", + "definition_node_id": "2", + "class_type": "LoadImage", + "scope": "root", + "pointer": "/nodes/1/widgets_values/0", + "value": "ComfyUI_00038.png", + "json_type": "str", + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "saved_position_1", + "label": "图片上传选择占位", + "type": "未确认前端状态", + "schema_default": "服务端只声明image;此槽无服务端默认", + "unit": "状态字符串", + "limits": "原值image;前端版本缺失", + "effect": "保存image不是第二张图片,也不证明上传完成;该位置前端身份/恢复次序未核,不借其他前端版本具名。", + "evidence": [ + 18 + ], + "role": "frontend_state_unknown", + "node_id": "2", + "definition_node_id": "2", + "class_type": "LoadImage", + "scope": "root", + "pointer": "/nodes/1/widgets_values/1", + "value": "image", + "json_type": "str", + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "inputcount", + "label": "拼接输入数量", + "type": "INT", + "schema_default": "2", + "unit": "图像输入", + "limits": "2~1000,step1", + "effect": "保存2,按image_1与image_2次序逐次拼接;缺少后续输入参考实现使用第一图形状零张量,不证明本图缺失。", + "evidence": [ + 14, + 15, + 17 + ], + "role": "scalar", + "node_id": "4", + "definition_node_id": "4", + "class_type": "ImageConcatMulti", + "scope": "root", + "pointer": "/nodes/3/widgets_values/0", + "value": 2, + "json_type": "int", + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "direction", + "label": "拼接方向", + "type": "COMBO", + "schema_default": "right", + "unit": "方向", + "limits": "right/down/left/up", + "effect": "保存down,把第二幅画面放在第一幅下方;节点9第一输入来自6,第二来自8。是空间上下拼接,不是时间顺接。", + "evidence": [ + 14, + 15, + 17 + ], + "role": "scalar", + "node_id": "4", + "definition_node_id": "4", + "class_type": "ImageConcatMulti", + "scope": "root", + "pointer": "/nodes/3/widgets_values/1", + "value": "down", + "json_type": "str", + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "match_image_size", + "label": "匹配图像尺寸", + "type": "BOOLEAN", + "schema_default": "false", + "unit": "布尔", + "limits": "true/false", + "effect": "保存true;down匹配第一输入宽度,第二输入高度按其原比例int计算,用lanczos/disabled缩放。批次数不同时,较短批次重复末帧补到较长;这不是时间或音频同步。通道不同时以值1补齐缺少通道。", + "evidence": [ + 14, + 15, + 17 + ], + "role": "scalar", + "node_id": "4", + "definition_node_id": "4", + "class_type": "ImageConcatMulti", + "scope": "root", + "pointer": "/nodes/3/widgets_values/2", + "value": true, + "json_type": "bool", + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "saved_position_3", + "label": "额外null保存槽(按钮候选)", + "type": "未确认前端状态", + "schema_default": "本提交JS创建Update inputs按钮,服务端无此参数", + "unit": "无可确认单位", + "limits": "原值null;无frontendVersion,不等同缺键或空对象", + "effect": "准确KJ JS会创建值null的Update inputs按钮并按inputcount增删IMAGE输入;缺本图前端版本/UE恢复证据,不能确定第4保存槽最终身份或恢复效果,不作为执行参数。", + "evidence": [ + 16, + 14 + ], + "role": "frontend_state_unknown", + "node_id": "4", + "definition_node_id": "4", + "class_type": "ImageConcatMulti", + "scope": "root", + "pointer": "/nodes/3/widgets_values/3", + "value": null, + "json_type": "NoneType", + "execution_note": "源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "frame_rate", + "label": "合成播放帧率(已连线覆盖)", + "type": "FLOAT/INT(floatOrInt)", + "schema_default": "8", + "unit": "帧/秒", + "limits": "min1,step1;schema未声明max", + "effect": "保存8不是最终执行值:6槽3→11.video_info,11槽0→10.frame_rate覆盖8。VideoInfoLoaded输出素材6的loaded_fps;实际FPS未知,缓存30.000001657458657不是输出保证。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "linked_saved", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/frame_rate", + "value": 8, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "loop_count", + "label": "视频额外循环", + "type": "INT", + "schema_default": "0", + "unit": "循环", + "limits": "0~100,step1", + "effect": "保存0不追加视频loop滤镜,不把GIF循环0规则套视频。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/loop_count", + "value": 0, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "filename_prefix", + "label": "输出文件名前缀", + "type": "STRING", + "schema_default": "AnimateDiff", + "unit": "路径前缀", + "limits": "无schema长度范围;权限与目标目录未知", + "effect": "保存AnimateDiff参与路径和计数命名;不是已有产物。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/filename_prefix", + "value": "AnimateDiff", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "format", + "label": "合成输出格式", + "type": "COMBO", + "schema_default": "首项image/gif;动态视频格式无唯一目标默认", + "unit": "格式名", + "limits": "image/gif、image/webp和动态FFmpeg模板", + "effect": "保存video/h264-mp4走FFmpeg/libx264模板;编码器与目标动态选项未知。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/format", + "value": "video/h264-mp4", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "pix_fmt", + "label": "视频像素格式", + "type": "COMBO", + "schema_default": "首项yuv420p", + "unit": "像素格式", + "limits": "yuv420p / yuv420p10le", + "effect": "保存yuv420p;视频分支还可能按dim_alignment默认2补边,实际尺寸未知。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/pix_fmt", + "value": "yuv420p", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "crf", + "label": "H264质量参数", + "type": "INT", + "schema_default": "19", + "unit": "CRF", + "limits": "模板0~100,step1;编码器可接受范围另待核", + "effect": "保存19交给libx264的-crf;一般减小会提高质量并可能增大体积,实际效果未测。模板100不保证编码器接受100。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/crf", + "value": 19, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "save_metadata", + "label": "视频元数据开关", + "type": "BOOLEAN", + "schema_default": "true", + "unit": "布尔", + "limits": "true/false;视频元数据分支", + "effect": "保存true在视频元数据条件分支写入信息;独立首帧workflow PNG由VHS_MetadataImage默认true控制。两者不是同一开关。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/save_metadata", + "value": true, + "json_type": "bool", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "trim_to_audio", + "label": "按音频条件裁切", + "type": "BOOLEAN", + "schema_default": "false", + "unit": "布尔", + "limits": "仅有效音频波形存在时进入混流", + "effect": "源false不是关闭音频。准确模板实现把布尔false转成字符串False,混流添加apad=whole_dur(输出帧数/合成帧率+1)并带-shortest;仍不保证跨素材同步或实际完整时长。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/trim_to_audio", + "value": false, + "json_type": "bool", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "pingpong", + "label": "追加往返帧", + "type": "BOOLEAN", + "schema_default": "false", + "unit": "布尔", + "limits": "true/false;meta_batch限制见实现", + "effect": "保存false不追加往返帧;不代表素材原先没有倒序。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/pingpong", + "value": false, + "json_type": "bool", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "save_output", + "label": "保存目录选择", + "type": "BOOLEAN", + "schema_default": "true", + "unit": "布尔", + "limits": "true为output;false为temp;均可能写文件", + "effect": "保存true选择正式输出目录;运行可能写首帧PNG、无声视频和-audio混流文件。VHS_KeepIntermediate=false才按条件移除中间文件;本轮GET不执行文件生成。", + "evidence": [ + 4, + 5, + 7, + 11, + 8, + 3, + 6, + 13 + ], + "role": "scalar", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/save_output", + "value": true, + "json_type": "bool", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "videopreview", + "label": "历史预览完整对象", + "type": "前端历史状态", + "schema_default": "无服务端默认", + "unit": "完整对象", + "limits": "hidden/paused/params原样保存;嵌套不重复计数", + "effect": "只代表历史缓存;filename/type/E盘fullpath/workflow PNG/缓存FPS都不是当前产物或可达证明。纯文本显示,不请求api/view或媒体。", + "evidence": [ + 10, + 8 + ], + "role": "frontend_history", + "node_id": "10", + "definition_node_id": "10", + "class_type": "VHS_VideoCombine", + "scope": "root", + "pointer": "/nodes/5/widgets_values/videopreview", + "value": { + "hidden": false, + "paused": false, + "params": { + "filename": "AnimateDiff_00011-audio.mp4", + "subfolder": "", + "type": "output", + "format": "video/h264-mp4", + "frame_rate": 30.000001657458657, + "workflow": "AnimateDiff_00011.png", + "fullpath": "E:\\ComfyUI-Data\\output\\AnimateDiff_00011-audio.mp4" + } + }, + "json_type": "dict", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "video", + "label": "视频文件引用", + "type": "COMBO", + "schema_default": "动态input目录枚举,无固定默认", + "unit": "文件引用", + "limits": "只枚举普通文件webm/mp4/mkv/gif/mov", + "effect": "保存引用,不证明素材存在、音轨存在或实际已上传。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/video", + "value": "2月10日.mp4", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "force_rate", + "label": "加载采样帧率", + "type": "FLOAT/INT(floatOrInt)", + "schema_default": "0", + "unit": "帧/秒", + "limits": "0~60,step1;0禁用强制重采样", + "effect": "两加载器保存0表示按源帧时间采样,不代表实际FPS为0,也不保证两素材同帧率。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/force_rate", + "value": 0, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "custom_width", + "label": "自定义加载宽度", + "type": "INT", + "schema_default": "0", + "unit": "像素", + "limits": "0~8192;0不指定", + "effect": "宽高均0从媒体尺寸出发,仍受AnimateDiff的dim8对齐;不是保证原尺寸。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/custom_width", + "value": 0, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "custom_height", + "label": "自定义加载高度", + "type": "INT", + "schema_default": "0", + "unit": "像素", + "limits": "0~8192;0不指定", + "effect": "单边指定时按比例计算另一边;两边0仍受格式对齐,不读取真实尺寸。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/custom_height", + "value": 0, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "frame_load_cap", + "label": "加载帧数上限", + "type": "INT", + "schema_default": "0", + "unit": "采样帧", + "limits": "0~2**53-1,step1;0不设此上限", + "effect": "素材6保存62、素材8保存64,分别限制加载数量;不是保证实际帧数、同长或对齐。仍受素材、内存和格式条件限制。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/frame_load_cap", + "value": 64, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "skip_first_frames", + "label": "跳过起始采样帧", + "type": "INT", + "schema_default": "0", + "unit": "采样帧", + "limits": "0~2**53-1,step1", + "effect": "素材6保存53、素材8保存55;采样后计数,各自起点不同,不是跨素材时间同步。音频参考起点为本加载器skip乘target_frame_time。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/skip_first_frames", + "value": 55, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "select_every_nth", + "label": "间隔抽取采样帧", + "type": "INT", + "schema_default": "1", + "unit": "间隔", + "limits": "1~2**53-1,step1", + "effect": "保存1不再间隔删帧;增大值改变loaded_fps和音频时长参数,不能自动对齐另一素材。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/select_every_nth", + "value": 1, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "format", + "label": "加载格式约束", + "type": "COMBO", + "schema_default": "AnimateDiff", + "unit": "格式名", + "limits": "内置格式与核心动态扩展,目标选项未知", + "effect": "保存AnimateDiff有内置target_rate8和dim8;Python尺寸约束不等于强制把保存force0重写8。未知前端回调/恢复顺序不作保证。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/format", + "value": "AnimateDiff", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "videopreview", + "label": "历史预览完整对象", + "type": "前端历史状态", + "schema_default": "无服务端默认", + "unit": "完整对象", + "limits": "hidden/paused/params原样保存;嵌套不重复计数", + "effect": "只代表历史缓存;filename/type/E盘fullpath/workflow PNG/缓存FPS都不是当前产物或可达证明。纯文本显示,不请求api/view或媒体。", + "evidence": [ + 10, + 8 + ], + "role": "frontend_history", + "node_id": "8", + "definition_node_id": "8", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/6/widgets_values/videopreview", + "value": { + "hidden": false, + "paused": false, + "params": { + "filename": "2月10日.mp4", + "type": "input", + "format": "video/mp4", + "force_rate": 0, + "custom_width": 0, + "custom_height": 0, + "frame_load_cap": 64, + "skip_first_frames": 55, + "select_every_nth": 1 + } + }, + "json_type": "dict", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "video", + "label": "视频文件引用", + "type": "COMBO", + "schema_default": "动态input目录枚举,无固定默认", + "unit": "文件引用", + "limits": "只枚举普通文件webm/mp4/mkv/gif/mov", + "effect": "保存引用,不证明素材存在、音轨存在或实际已上传。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/video", + "value": "小云雀_1770719334800_0_m.mp4", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "force_rate", + "label": "加载采样帧率", + "type": "FLOAT/INT(floatOrInt)", + "schema_default": "0", + "unit": "帧/秒", + "limits": "0~60,step1;0禁用强制重采样", + "effect": "两加载器保存0表示按源帧时间采样,不代表实际FPS为0,也不保证两素材同帧率。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/force_rate", + "value": 0, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "custom_width", + "label": "自定义加载宽度", + "type": "INT", + "schema_default": "0", + "unit": "像素", + "limits": "0~8192;0不指定", + "effect": "宽高均0从媒体尺寸出发,仍受AnimateDiff的dim8对齐;不是保证原尺寸。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/custom_width", + "value": 0, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "custom_height", + "label": "自定义加载高度", + "type": "INT", + "schema_default": "0", + "unit": "像素", + "limits": "0~8192;0不指定", + "effect": "单边指定时按比例计算另一边;两边0仍受格式对齐,不读取真实尺寸。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/custom_height", + "value": 0, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "frame_load_cap", + "label": "加载帧数上限", + "type": "INT", + "schema_default": "0", + "unit": "采样帧", + "limits": "0~2**53-1,step1;0不设此上限", + "effect": "素材6保存62、素材8保存64,分别限制加载数量;不是保证实际帧数、同长或对齐。仍受素材、内存和格式条件限制。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/frame_load_cap", + "value": 62, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "skip_first_frames", + "label": "跳过起始采样帧", + "type": "INT", + "schema_default": "0", + "unit": "采样帧", + "limits": "0~2**53-1,step1", + "effect": "素材6保存53、素材8保存55;采样后计数,各自起点不同,不是跨素材时间同步。音频参考起点为本加载器skip乘target_frame_time。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/skip_first_frames", + "value": 53, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "select_every_nth", + "label": "间隔抽取采样帧", + "type": "INT", + "schema_default": "1", + "unit": "间隔", + "limits": "1~2**53-1,step1", + "effect": "保存1不再间隔删帧;增大值改变loaded_fps和音频时长参数,不能自动对齐另一素材。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/select_every_nth", + "value": 1, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "format", + "label": "加载格式约束", + "type": "COMBO", + "schema_default": "AnimateDiff", + "unit": "格式名", + "limits": "内置格式与核心动态扩展,目标选项未知", + "effect": "保存AnimateDiff有内置target_rate8和dim8;Python尺寸约束不等于强制把保存force0重写8。未知前端回调/恢复顺序不作保证。", + "evidence": [ + 0, + 1, + 2, + 12, + 9, + 13 + ], + "role": "scalar", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/format", + "value": "AnimateDiff", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "choose video to upload", + "label": "上传选择保存状态", + "type": "前端选择状态", + "schema_default": "无服务端默认", + "unit": "状态字符串", + "limits": "不是服务端video参数", + "effect": "节点6保存image仅是选择控件状态,不证明上传成功,不替换video文件引用。", + "evidence": [ + 9, + 8 + ], + "role": "frontend_state", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/choose video to upload", + "value": "image", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "videopreview", + "label": "历史预览完整对象", + "type": "前端历史状态", + "schema_default": "无服务端默认", + "unit": "完整对象", + "limits": "hidden/paused/params原样保存;嵌套不重复计数", + "effect": "只代表历史缓存;filename/type/E盘fullpath/workflow PNG/缓存FPS都不是当前产物或可达证明。纯文本显示,不请求api/view或媒体。", + "evidence": [ + 10, + 8 + ], + "role": "frontend_history", + "node_id": "6", + "definition_node_id": "6", + "class_type": "VHS_LoadVideo", + "scope": "root", + "pointer": "/nodes/7/widgets_values/videopreview", + "value": { + "hidden": false, + "paused": false, + "params": { + "filename": "小云雀_1770719334800_0_m.mp4", + "type": "input", + "format": "video/mp4", + "force_rate": 0, + "custom_width": 0, + "custom_height": 0, + "frame_load_cap": 62, + "skip_first_frames": 53, + "select_every_nth": 1 + } + }, + "json_type": "dict", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "inputcount", + "label": "拼接输入数量", + "type": "INT", + "schema_default": "2", + "unit": "图像输入", + "limits": "2~1000,step1", + "effect": "保存2,按image_1与image_2次序逐次拼接;缺少后续输入参考实现使用第一图形状零张量,不证明本图缺失。", + "evidence": [ + 14, + 15, + 17 + ], + "role": "scalar", + "node_id": "9", + "definition_node_id": "9", + "class_type": "ImageConcatMulti", + "scope": "root", + "pointer": "/nodes/8/widgets_values/0", + "value": 2, + "json_type": "int", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "direction", + "label": "拼接方向", + "type": "COMBO", + "schema_default": "right", + "unit": "方向", + "limits": "right/down/left/up", + "effect": "保存down,把第二幅画面放在第一幅下方;节点9第一输入来自6,第二来自8。是空间上下拼接,不是时间顺接。", + "evidence": [ + 14, + 15, + 17 + ], + "role": "scalar", + "node_id": "9", + "definition_node_id": "9", + "class_type": "ImageConcatMulti", + "scope": "root", + "pointer": "/nodes/8/widgets_values/1", + "value": "down", + "json_type": "str", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "match_image_size", + "label": "匹配图像尺寸", + "type": "BOOLEAN", + "schema_default": "false", + "unit": "布尔", + "limits": "true/false", + "effect": "保存true;down匹配第一输入宽度,第二输入高度按其原比例int计算,用lanczos/disabled缩放。批次数不同时,较短批次重复末帧补到较长;这不是时间或音频同步。通道不同时以值1补齐缺少通道。", + "evidence": [ + 14, + 15, + 17 + ], + "role": "scalar", + "node_id": "9", + "definition_node_id": "9", + "class_type": "ImageConcatMulti", + "scope": "root", + "pointer": "/nodes/8/widgets_values/2", + "value": true, + "json_type": "bool", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + }, + { + "field": "saved_position_3", + "label": "额外null保存槽(按钮候选)", + "type": "未确认前端状态", + "schema_default": "本提交JS创建Update inputs按钮,服务端无此参数", + "unit": "无可确认单位", + "limits": "原值null;无frontendVersion,不等同缺键或空对象", + "effect": "准确KJ JS会创建值null的Update inputs按钮并按inputcount增删IMAGE输入;缺本图前端版本/UE恢复证据,不能确定第4保存槽最终身份或恢复效果,不作为执行参数。", + "evidence": [ + 16, + 14 + ], + "role": "frontend_state_unknown", + "node_id": "9", + "definition_node_id": "9", + "class_type": "ImageConcatMulti", + "scope": "root", + "pointer": "/nodes/8/widgets_values/3", + "value": null, + "json_type": "NoneType", + "execution_note": "源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。" + } + ], + "sources": [ + { + "id": "vhs", + "file": "videohelpersuite/load_video_nodes.py", + "local_file": "../concat-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, + 168 + ], + "claim": "加载格式、尺寸对齐、采样、跳过和上限" + }, + { + "id": "vhs", + "file": "videohelpersuite/load_video_nodes.py", + "local_file": "../concat-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返回" + }, + { + "id": "vhs", + "file": "videohelpersuite/load_video_nodes.py", + "local_file": "../concat-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, + 477 + ], + "claim": "上传加载schema、输出槽和文件引用验证" + }, + { + "id": "vhs", + "file": "videohelpersuite/nodes.py", + "local_file": "../concat-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": [ + 48, + 165 + ], + "claim": "模板参数str展开、布尔False转字符串False、元数据临时文件条件" + }, + { + "id": "vhs", + "file": "videohelpersuite/nodes.py", + "local_file": "../concat-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, + 420 + ], + "claim": "合成schema、目录和独立首帧PNG条件" + }, + { + "id": "vhs", + "file": "videohelpersuite/nodes.py", + "local_file": "../concat-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": [ + 420, + 625 + ], + "claim": "视频编码、补边、循环、音频波形混流和中间文件条件" + }, + { + "id": "vhs", + "file": "videohelpersuite/nodes.py", + "local_file": "../concat-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, + 971 + ], + "claim": "VideoInfoLoaded按loaded键输出五槽,槽0为loaded_fps" + }, + { + "id": "vhs", + "file": "video_formats/h264-mp4.json", + "local_file": "../concat-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格式、像素格式、CRF和音频裁切模板" + }, + { + "id": "vhs", + "file": "web/js/VHS.core.js", + "local_file": "../concat-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": [ + 41, + 168 + ], + "claim": "VHS包内保存恢复代码;不证明未知前端或UE恢复次序" + }, + { + "id": "vhs", + "file": "web/js/VHS.core.js", + "local_file": "../concat-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": [ + 648, + 824 + ], + "claim": "格式回调和上传选择控件" + }, + { + "id": "vhs", + "file": "web/js/VHS.core.js", + "local_file": "../concat-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": [ + 915, + 970 + ], + "claim": "预览控件保存历史状态" + }, + { + "id": "vhs", + "file": "web/js/VHS.core.js", + "local_file": "../concat-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": [ + 1222, + 1282 + ], + "claim": "格式改变时额外控件重建" + }, + { + "id": "vhs", + "file": "videohelpersuite/utils.py", + "local_file": "../concat-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": [ + 20, + 56 + ], + "claim": "BIGMAX、DIMMAX、floatOrInt" + }, + { + "id": "vhs", + "file": "videohelpersuite/nodes.py", + "local_file": "../concat-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": [ + 1023, + 1050 + ], + "claim": "VHS加载、合成和视频信息注册" + }, + { + "id": "kj", + "file": "nodes/image_nodes.py", + "local_file": "../concat-reference/kj__nodes__image_nodes.py", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb", + "lines": [ + 2512, + 2561 + ], + "claim": "ImageConcatMulti自身schema与循环拼接实现" + }, + { + "id": "kj", + "file": "nodes/image_nodes.py", + "local_file": "../concat-reference/kj__nodes__image_nodes.py", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb", + "lines": [ + 329, + 425 + ], + "claim": "批次末帧补齐、宽高匹配、通道补齐与方向拼接" + }, + { + "id": "kj", + "file": "web/js/jsnodes.js", + "local_file": "../concat-reference/kj__web__js__jsnodes.js", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/web/js/jsnodes.js", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "0de818b79c5adf96f0d3a62d11cadfb8e4b8f56ed47ef0b2434935b3ee95af23", + "lines": [ + 36, + 66 + ], + "claim": "本提交创建Update inputs按钮,null槽身份仍缺前端恢复证明" + }, + { + "id": "kj", + "file": "__init__.py", + "local_file": "../concat-reference/kj____init__.py", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/__init__.py", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "0bc84dab300c15d8421161a97a7e03ddf041b40f9b17377b2450a6075a544cc2", + "lines": [ + 1, + 180 + ], + "claim": "KJ注册与类引用" + }, + { + "id": "core", + "file": "nodes.py", + "local_file": "../concat-reference/core__nodes.py", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "sha256": "427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38", + "lines": [ + 1698, + 1775 + ], + "claim": "LoadImage schema、EXIF、批次、RGB和MASK输出" + }, + { + "id": "core", + "file": "nodes.py", + "local_file": "../concat-reference/core__nodes.py", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "sha256": "427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38", + "lines": [ + 1625, + 1697 + ], + "claim": "PreviewImage继承保存实现,临时PNG/UI结果,无返回类型" + }, + { + "id": "core", + "file": "nodes.py", + "local_file": "../concat-reference/core__nodes.py", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "sha256": "427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38", + "lines": [ + 2035, + 2055 + ], + "claim": "core LoadImage与PreviewImage固定注册" + }, + { + "id": "vhs", + "file": "LICENSE", + "local_file": "../concat-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, + 674 + ], + "claim": "准确版本许可原文" + }, + { + "id": "kj", + "file": "LICENSE", + "local_file": "../concat-reference/kj__LICENSE", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/LICENSE", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986", + "lines": [ + 1, + 674 + ], + "claim": "准确版本许可原文" + }, + { + "id": "core", + "file": "LICENSE", + "local_file": "../concat-reference/core__LICENSE", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/LICENSE", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986", + "lines": [ + 1, + 674 + ], + "claim": "准确版本许可原文" + } + ], + "comments": [], + "flow": [ + "这张图把两路视频画面上下合并;图片支路四节点均为mode4,不能当作已完成双图合成。活动路径为视频6和8→拼接9→合成10:素材6跳过53、上限62,素材8跳过55、上限64,起点和上限不同。播放帧率由素材6的信息覆盖保存8,音频来自素材8,不能保证跨素材同步。三个预览对象仅为历史缓存;未实跑、目标环境未知、转换保持关闭。", + "图片物理支路1+2→4→5四节点均mode4;两LoadImage引用与上传占位分列,mask未接。Preview5原[]零位置;Info11原{}零位置,不能混同缺键/null。", + "两个Concat4/9均保存[2,down,true,null]。准确KJ下排拼接匹配第一幅宽,按第二幅比例计算高度;批次不等时短批次末帧重复到长批次,不能称自动时间对齐。null槽仅为按钮候选,前端身份未知。", + "视频6与8的force_rate均0,按各自源帧时间采样,实际帧率未知。各自skip/cap不同,不推断原片同长、同时起始、同帧率或输出帧数。", + "帧率覆盖链:6槽3→11.video_info;11槽0 loaded_fps→10.frame_rate,覆盖保存8。11其余四输出未接;缓存30.000001657458657不是实际FPS或产物保证。", + "音频链:8槽2→10.audio,来自第二素材;帧率来自第一素材6。VHS按本加载器skip×target_frame_time为音频起点、cap×抽帧后frame_time为时长参数,不是跨素材共同配音或同步证明。", + "合成保存h264-mp4/yuv420p/crf19,loop0不加视频循环,pingpong=false不追加往返,save_metadata=true。save_output=true选择output而非temp;实际运行可能写独立首帧PNG、无声视频和混流文件,中间文件按VHS_KeepIntermediate条件处理。", + "trim_to_audio=false不等于关闭音频;有效waveform存在才混流。准确模板将布尔false转字符串False,加入apad=whole_dur(输出帧数/合成帧率+1)并带-shortest;不自动跨素材同步,实际音轨/时长未知。", + "6/8加载与10合成的meta_batch/vae均未接;10的VHS_FILENAMES未接,不新增独立出口。PreviewImage按core继承实现为临时PNG/UI结果且RETURN_TYPES为空;源mode4不证明当前执行过。", + "三videopreview对象含完整hidden/paused/params/旧filename/type/fullpath/缓存FPS;只纯文本回读,不访问E盘、api/view、媒体或文件。没有模型节点,不编模型依赖。目标安装、素材、输出目录权限、ffmpeg/libx264、动态选项和真实效果未知。", + "源无frontendVersion,不借近版证明恢复或旁路;VHS包内恢复回调与KJ按钮代码分别作参考。所有UE空映射不证明无改写,身份/钩子次序未知,不扩展调查。", + "源物理边:[1, 1, 0, 4, 0, \"IMAGE\"]", + "源物理边:[2, 2, 0, 4, 1, \"IMAGE\"]", + "源物理边:[3, 4, 0, 5, 0, \"IMAGE\"]", + "源物理边:[4, 9, 0, 10, 0, \"IMAGE\"]", + "源物理边:[7, 6, 3, 11, 0, \"VHS_VIDEOINFO\"]", + "源物理边:[8, 11, 0, 10, 4, \"FLOAT\"]", + "源物理边:[10, 6, 0, 9, 0, \"IMAGE\"]", + "源物理边:[11, 8, 0, 9, 1, \"IMAGE\"]", + "源物理边:[14, 8, 2, 10, 1, \"AUDIO\"]", + "节点1 LoadImage mode=4;保存位置=2;原properties={\"cnr_id\": \"comfy-core\", \"ver\": \"0.12.3\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"LoadImage\"}", + "节点2 LoadImage mode=4;保存位置=2;原properties={\"cnr_id\": \"comfy-core\", \"ver\": \"0.12.3\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"LoadImage\"}", + "节点5 PreviewImage mode=4;保存位置=0;原properties={\"cnr_id\": \"comfy-core\", \"ver\": \"0.12.3\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"PreviewImage\"}", + "节点4 ImageConcatMulti mode=4;保存位置=4;原properties={\"cnr_id\": \"comfyui-kjnodes\", \"ver\": \"50a0837f9aea602b184bbf6dbabf66ed2c7a1d22\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}}", + "节点11 VHS_VideoInfoLoaded mode=0;保存位置=0;原properties={\"cnr_id\": \"comfyui-videohelpersuite\", \"ver\": \"1.7.9\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"VHS_VideoInfoLoaded\"}", + "节点10 VHS_VideoCombine mode=0;保存位置=11;原properties={\"cnr_id\": \"comfyui-videohelpersuite\", \"ver\": \"1.7.9\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"VHS_VideoCombine\"}", + "节点8 VHS_LoadVideo mode=0;保存位置=9;原properties={\"cnr_id\": \"comfyui-videohelpersuite\", \"ver\": \"1.7.9\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"VHS_LoadVideo\"}", + "节点6 VHS_LoadVideo mode=0;保存位置=10;原properties={\"cnr_id\": \"comfyui-videohelpersuite\", \"ver\": \"1.7.9\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}, \"Node name for S&R\": \"VHS_LoadVideo\"}", + "节点9 ImageConcatMulti mode=0;保存位置=4;原properties={\"cnr_id\": \"comfyui-kjnodes\", \"ver\": \"50a0837f9aea602b184bbf6dbabf66ed2c7a1d22\", \"ue_properties\": {\"widget_ue_connectable\": {}, \"input_ue_unconnectable\": {}}}" + ], + "flow_evidence": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23 + ], + "zero_saved_nodes": [ + { + "node_id": "5", + "class_type": "PreviewImage", + "evidence": [ + 19, + 20 + ], + "effect": "原widgets_values=[];mode4,继承SaveImage临时PNG/UI输出,无返回类型,未实跑。" + }, + { + "node_id": "11", + "class_type": "VHS_VideoInfoLoaded", + "effect": "原widgets_values={};视频信息槽0 loaded_fps覆盖合成10保存8,其余四槽未接。" + } + ], + "steps": [ + "这张图把两路视频画面上下合并;图片支路四节点均为mode4,不能当作已完成双图合成。活动路径为视频6和8→拼接9→合成10:素材6跳过53、上限62,素材8跳过55、上限64,起点和上限不同。播放帧率由素材6的信息覆盖保存8,音频来自素材8,不能保证跨素材同步。三个预览对象仅为历史缓存;未实跑、目标环境未知、转换保持关闭。", + "素材要求:两路可读取视频和可选两张图片;此处只显示引用,不读取、上传或验证素材。没有模型节点,不编模型依赖。", + "操作1:先核本图准确插件/core版本与素材,保持停用;图片支路mode4,不自行当作已启用或完成。", + "操作2:分别核两视频起点53/55与帧上限62/64,确认上下画面顺序6在上8在下、尺寸与批次末帧补齐条件。", + "操作3:核6→11→10帧率覆盖与8→10音频来源;不要用保存8或缓存30.000001657458657判断真实输出。", + "常见问题:画面末尾停住可能来自较短批次重复末帧;声音不齐须先核各素材起点和帧率,不能称自动同步。文件名前缀和旧预览不证明已生成;save_metadata与首帧PNG开关独立。", + "目标安装、素材存在性、目录权限、编码器/动态选项和真实效果待后续获准验证;本轮未执行插件、未构造prompt,未定稿、未实跑。" + ] +} diff --git a/docs/hel-892/concat-document-evidence/fixed-source-index.json b/docs/hel-892/concat-document-evidence/fixed-source-index.json new file mode 100644 index 00000000..e1a7892b --- /dev/null +++ b/docs/hel-892/concat-document-evidence/fixed-source-index.json @@ -0,0 +1,353 @@ +[ + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "vhs", + "file": "videohelpersuite/load_video_nodes.py", + "local_file": "../concat-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, + 168 + ], + "claim": "加载格式、尺寸对齐、采样、跳过和上限" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "vhs", + "file": "videohelpersuite/load_video_nodes.py", + "local_file": "../concat-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-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "vhs", + "file": "videohelpersuite/load_video_nodes.py", + "local_file": "../concat-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, + 477 + ], + "claim": "上传加载schema、输出槽和文件引用验证" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "vhs", + "file": "videohelpersuite/nodes.py", + "local_file": "../concat-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": [ + 48, + 165 + ], + "claim": "模板参数str展开、布尔False转字符串False、元数据临时文件条件" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "vhs", + "file": "videohelpersuite/nodes.py", + "local_file": "../concat-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, + 420 + ], + "claim": "合成schema、目录和独立首帧PNG条件" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "vhs", + "file": "videohelpersuite/nodes.py", + "local_file": "../concat-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": [ + 420, + 625 + ], + "claim": "视频编码、补边、循环、音频波形混流和中间文件条件" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "vhs", + "file": "videohelpersuite/nodes.py", + "local_file": "../concat-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, + 971 + ], + "claim": "VideoInfoLoaded按loaded键输出五槽,槽0为loaded_fps" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "vhs", + "file": "video_formats/h264-mp4.json", + "local_file": "../concat-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格式、像素格式、CRF和音频裁切模板" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "vhs", + "file": "web/js/VHS.core.js", + "local_file": "../concat-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": [ + 41, + 168 + ], + "claim": "VHS包内保存恢复代码;不证明未知前端或UE恢复次序" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "vhs", + "file": "web/js/VHS.core.js", + "local_file": "../concat-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": [ + 648, + 824 + ], + "claim": "格式回调和上传选择控件" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "vhs", + "file": "web/js/VHS.core.js", + "local_file": "../concat-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": [ + 915, + 970 + ], + "claim": "预览控件保存历史状态" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "vhs", + "file": "web/js/VHS.core.js", + "local_file": "../concat-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": [ + 1222, + 1282 + ], + "claim": "格式改变时额外控件重建" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "vhs", + "file": "videohelpersuite/utils.py", + "local_file": "../concat-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": [ + 20, + 56 + ], + "claim": "BIGMAX、DIMMAX、floatOrInt" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "vhs", + "file": "videohelpersuite/nodes.py", + "local_file": "../concat-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": [ + 1023, + 1050 + ], + "claim": "VHS加载、合成和视频信息注册" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "kj", + "file": "nodes/image_nodes.py", + "local_file": "../concat-reference/kj__nodes__image_nodes.py", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb", + "lines": [ + 2512, + 2561 + ], + "claim": "ImageConcatMulti自身schema与循环拼接实现" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "kj", + "file": "nodes/image_nodes.py", + "local_file": "../concat-reference/kj__nodes__image_nodes.py", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb", + "lines": [ + 329, + 425 + ], + "claim": "批次末帧补齐、宽高匹配、通道补齐与方向拼接" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "kj", + "file": "web/js/jsnodes.js", + "local_file": "../concat-reference/kj__web__js__jsnodes.js", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/web/js/jsnodes.js", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "0de818b79c5adf96f0d3a62d11cadfb8e4b8f56ed47ef0b2434935b3ee95af23", + "lines": [ + 36, + 66 + ], + "claim": "本提交创建Update inputs按钮,null槽身份仍缺前端恢复证明" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "kj", + "file": "__init__.py", + "local_file": "../concat-reference/kj____init__.py", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/__init__.py", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "0bc84dab300c15d8421161a97a7e03ddf041b40f9b17377b2450a6075a544cc2", + "lines": [ + 1, + 180 + ], + "claim": "KJ注册与类引用" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "core", + "file": "nodes.py", + "local_file": "../concat-reference/core__nodes.py", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "sha256": "427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38", + "lines": [ + 1698, + 1775 + ], + "claim": "LoadImage schema、EXIF、批次、RGB和MASK输出" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "core", + "file": "nodes.py", + "local_file": "../concat-reference/core__nodes.py", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "sha256": "427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38", + "lines": [ + 1625, + 1697 + ], + "claim": "PreviewImage继承保存实现,临时PNG/UI结果,无返回类型" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "core", + "file": "nodes.py", + "local_file": "../concat-reference/core__nodes.py", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "sha256": "427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38", + "lines": [ + 2035, + 2055 + ], + "claim": "core LoadImage与PreviewImage固定注册" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "vhs", + "file": "LICENSE", + "local_file": "../concat-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, + 674 + ], + "claim": "准确版本许可原文" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "kj", + "file": "LICENSE", + "local_file": "../concat-reference/kj__LICENSE", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/LICENSE", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986", + "lines": [ + 1, + 674 + ], + "claim": "准确版本许可原文" + }, + { + "document": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "id": "core", + "file": "LICENSE", + "local_file": "../concat-reference/core__LICENSE", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/LICENSE", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986", + "lines": [ + 1, + 674 + ], + "claim": "准确版本许可原文" + } +] diff --git a/docs/hel-892/concat-document-evidence/format-fix-second.txt b/docs/hel-892/concat-document-evidence/format-fix-second.txt new file mode 100644 index 00000000..10a55875 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/format-fix-second.txt @@ -0,0 +1 @@ +2 files reformatted, 4 files left unchanged diff --git a/docs/hel-892/concat-document-evidence/format-fix.txt b/docs/hel-892/concat-document-evidence/format-fix.txt new file mode 100644 index 00000000..2344bb79 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/format-fix.txt @@ -0,0 +1 @@ +1 file reformatted, 17 files left unchanged diff --git a/docs/hel-892/concat-document-evidence/format.txt b/docs/hel-892/concat-document-evidence/format.txt new file mode 100644 index 00000000..af86a6dd --- /dev/null +++ b/docs/hel-892/concat-document-evidence/format.txt @@ -0,0 +1 @@ +18 files already formatted diff --git a/docs/hel-892/concat-document-evidence/import-protection.json b/docs/hel-892/concat-document-evidence/import-protection.json new file mode 100644 index 00000000..0116cd43 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/import-protection.json @@ -0,0 +1,69 @@ +{ + "base": "d1ba22677740d8775bc2bc99ae767d5994338ebf", + "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": 42, + "new_notes": 0, + "old_saved": 576, + "old_notes": 15, + "overviews": 21, + "all_disabled": true, + "doc_done": 0, + "executed": 0 +} diff --git a/docs/hel-892/concat-document-evidence/js-syntax.txt b/docs/hel-892/concat-document-evidence/js-syntax.txt new file mode 100644 index 00000000..e69de29b diff --git a/docs/hel-892/concat-document-evidence/lint-fix.txt b/docs/hel-892/concat-document-evidence/lint-fix.txt new file mode 100644 index 00000000..d219893d --- /dev/null +++ b/docs/hel-892/concat-document-evidence/lint-fix.txt @@ -0,0 +1,198 @@ +E501 Line too long (124 > 100) + --> docs/hel-892/concat-document-evidence/build_definition.py:283:76 + | +281 | "布尔", +282 | "true/false;视频元数据分支", +283 | "保存true在视频元数据条件分支写入信息;独立首帧workflow PNG由VHS_MetadataImage默认true控制。两者不是同一开关。", + | ^^^^^^^^^^^^^^^^^^^^^^^^ +284 | ), +285 | ( + | + +E501 Line too long (138 > 100) + --> docs/hel-892/concat-document-evidence/build_definition.py:436:72 + | +434 | … 行。" +435 | … +436 | … 于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +437 | … +438 | … + | + +F404 `from __future__` imports must occur at the beginning of the file + --> docs/hel-892/concat-document-evidence/recompute.py:5:1 + | +3 | 'packages.' +4 | +5 | from __future__ import annotations + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 | +7 | import hashlib + | + +E402 Module level import not at top of file + --> docs/hel-892/concat-document-evidence/recompute.py:5:1 + | +3 | 'packages.' +4 | +5 | from __future__ import annotations + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 | +7 | import hashlib + | +help: Move module level imports to top of file + +E402 Module level import not at top of file + --> docs/hel-892/concat-document-evidence/recompute.py:7:1 + | +5 | from __future__ import annotations +6 | +7 | import hashlib + | ^^^^^^^^^^^^^^ +8 | import io +9 | import json + | +help: Move module level imports to top of file + +E402 Module level import not at top of file + --> docs/hel-892/concat-document-evidence/recompute.py:8:1 + | + 7 | import hashlib + 8 | import io + | ^^^^^^^^^ + 9 | import json +10 | import os + | +help: Move module level imports to top of file + +E402 Module level import not at top of file + --> docs/hel-892/concat-document-evidence/recompute.py:9:1 + | + 7 | import hashlib + 8 | import io + 9 | import json + | ^^^^^^^^^^^ +10 | import os +11 | import sqlite3 + | +help: Move module level imports to top of file + +E402 Module level import not at top of file + --> docs/hel-892/concat-document-evidence/recompute.py:10:1 + | + 8 | import io + 9 | import json +10 | import os + | ^^^^^^^^^ +11 | import sqlite3 +12 | import subprocess + | +help: Move module level imports to top of file + +E402 Module level import not at top of file + --> docs/hel-892/concat-document-evidence/recompute.py:11:1 + | + 9 | import json +10 | import os +11 | import sqlite3 + | ^^^^^^^^^^^^^^ +12 | import subprocess +13 | import sys + | +help: Move module level imports to top of file + +E402 Module level import not at top of file + --> docs/hel-892/concat-document-evidence/recompute.py:12:1 + | +10 | import os +11 | import sqlite3 +12 | import subprocess + | ^^^^^^^^^^^^^^^^^ +13 | import sys +14 | import tarfile + | +help: Move module level imports to top of file + +E402 Module level import not at top of file + --> docs/hel-892/concat-document-evidence/recompute.py:13:1 + | +11 | import sqlite3 +12 | import subprocess +13 | import sys + | ^^^^^^^^^^ +14 | import tarfile +15 | import tempfile + | +help: Move module level imports to top of file + +E402 Module level import not at top of file + --> docs/hel-892/concat-document-evidence/recompute.py:14:1 + | +12 | import subprocess +13 | import sys +14 | import tarfile + | ^^^^^^^^^^^^^^ +15 | import tempfile +16 | import zipfile + | +help: Move module level imports to top of file + +E402 Module level import not at top of file + --> docs/hel-892/concat-document-evidence/recompute.py:15:1 + | +13 | import sys +14 | import tarfile +15 | import tempfile + | ^^^^^^^^^^^^^^^ +16 | import zipfile +17 | from pathlib import Path + | +help: Move module level imports to top of file + +E402 Module level import not at top of file + --> docs/hel-892/concat-document-evidence/recompute.py:16:1 + | +14 | import tarfile +15 | import tempfile +16 | import zipfile + | ^^^^^^^^^^^^^^ +17 | from pathlib import Path + | +help: Move module level imports to top of file + +E402 Module level import not at top of file + --> docs/hel-892/concat-document-evidence/recompute.py:17:1 + | +15 | import tempfile +16 | import zipfile +17 | from pathlib import Path + | ^^^^^^^^^^^^^^^^^^^^^^^^ +18 | +19 | from build_definition import OUT, PATHS, REPO, canonical + | +help: Move module level imports to top of file + +E402 Module level import not at top of file + --> docs/hel-892/concat-document-evidence/recompute.py:19:1 + | +17 | from pathlib import Path +18 | +19 | from build_definition import OUT, PATHS, REPO, canonical + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +20 | from rebuild import BASE, RESOURCE, build_all + | +help: Move module level imports to top of file + +E402 Module level import not at top of file + --> docs/hel-892/concat-document-evidence/recompute.py:20:1 + | +19 | from build_definition import OUT, PATHS, REPO, canonical +20 | from rebuild import BASE, RESOURCE, build_all + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +21 | +22 | sys.path.insert(0, str(REPO / "calliope-backend")) + | +help: Move module level imports to top of file + +Found 18 errors (1 fixed, 17 remaining). diff --git a/docs/hel-892/concat-document-evidence/lint-initial.txt b/docs/hel-892/concat-document-evidence/lint-initial.txt new file mode 100644 index 00000000..09a55cf7 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/lint-initial.txt @@ -0,0 +1,156 @@ +I001 [*] Import block is un-sorted or un-formatted + --> docs/hel-892/concat-document-evidence/build_definition.py:3:1 + | +1 | """One source-bound editorial addition. Never imports upstream code or reads media.""" +2 | +3 | / from __future__ import annotations +4 | | import hashlib +5 | | import json +6 | | from pathlib import Path + | |________________________^ +7 | +8 | REPO = Path(__file__).resolve().parents[3] + | +help: Organize imports + | +3 | from __future__ import annotations +4 + +5 | import hashlib + | + +F841 Local variable `info` is assigned to but never used + --> docs/hel-892/concat-document-evidence/build_definition.py:76:5 + | +74 | "视频编码、补边、循环、音频波形混流和中间文件条件", +75 | ) +76 | info = ref( + | ^^^^ +77 | "vhs", +78 | "videohelpersuite/nodes.py", + | +help: Remove assignment to unused variable `info` + +F841 Local variable `vreg` is assigned to but never used + --> docs/hel-892/concat-document-evidence/build_definition.py:91:5 + | +89 | fmtjs = ref("vhs", "web/js/VHS.core.js", 1222, 1282, "格式改变时额外控件重建") +90 | utils = ref("vhs", "videohelpersuite/utils.py", 20, 56, "BIGMAX、DIMMAX、floatOrInt") +91 | vreg = ref("vhs", "videohelpersuite/nodes.py", 1023, 1050, "VHS加载、合成和视频信息注册") + | ^^^^ +92 | concat = ref( +93 | "kj", "nodes/image_nodes.py", 2512, 2561, "ImageConcatMulti自身schema与循环拼接实现" + | +help: Remove assignment to unused variable `vreg` + +F841 Local variable `corepreview` is assigned to but never used + --> docs/hel-892/concat-document-evidence/build_definition.py:101:5 + | + 99 | kjreg = ref("kj", "__init__.py", 1, 180, "KJ注册与类引用") +100 | coreload = ref("core", "nodes.py", 1698, 1775, "LoadImage schema、EXIF、批次、RGB和MASK输出") +101 | corepreview = ref( + | ^^^^^^^^^^^ +102 | "core", "nodes.py", 1625, 1697, "PreviewImage继承保存实现,临时PNG/UI结果,无返回类型" +103 | ) + | +help: Remove assignment to unused variable `corepreview` + +E501 Line too long (124 > 100) + --> docs/hel-892/concat-document-evidence/build_definition.py:280:76 + | +278 | "布尔", +279 | "true/false;视频元数据分支", +280 | "保存true在视频元数据条件分支写入信息;独立首帧workflow PNG由VHS_MetadataImage默认true控制。两者不是同一开关。", + | ^^^^^^^^^^^^^^^^^^^^^^^^ +281 | ), +282 | ( + | + +E501 Line too long (137 > 100) + --> docs/hel-892/concat-document-evidence/build_definition.py:320:78 + | +318 | … +319 | … 数", +320 | …h/workflow PNG/缓存FPS都不是当前产物或可达证明。纯文本显示,不请求api/view或媒体。", + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +321 | … +322 | … + | + +E501 Line too long (160 > 100) + --> docs/hel-892/concat-document-evidence/build_definition.py:363:76 + | +361 | … +362 | … +363 | … IMAGE输入;缺本图前端版本/UE恢复证据,不能确定第4保存槽最终身份或恢复效果,不作为执行参数。", + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +364 | … +365 | … + | + +E501 Line too long (138 > 100) + --> docs/hel-892/concat-document-evidence/build_definition.py:423:72 + | +421 | … 行。" +422 | … +423 | … 于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。", + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +424 | … +425 | … + | + +E501 Line too long (316 > 100) + --> docs/hel-892/concat-document-evidence/build_definition.py:427:62 + | +425 | … +426 | … +427 | … 动路径为视频6和8→拼接9→合成10:素材6跳过53、上限62,素材8跳过55、上限64,起点和上限不同。播放帧率由素材6的信息覆盖保存8,音频来自素材8,不能保证跨素材同步。三个预览对象仅为历史缓存;未实跑、目标环境未知、转换保持关闭。" + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +428 | … +429 | … + | + +E501 Line too long (149 > 100) + --> docs/hel-892/concat-document-evidence/build_definition.py:433:79 + | +431 | … 接匹配第一幅宽,按第二幅比例计算高度;批次不等时短批次末帧重复到长批次,不能称自动时间对齐。null槽仅为按钮候选,前端身份未知。", +432 | … 率未知。各自skip/cap不同,不推断原片同长、同时起始、同帧率或输出帧数。", +433 | …0.frame_rate,覆盖保存8。11其余四输出未接;缓存30.000001657458657不是实际FPS或产物保证。", + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +434 | … 材6。VHS按本加载器skip×target_frame_time为音频起点、cap×抽帧后frame_time为时长参数,不是跨素材共同配音或同步证明。", +435 | … pingpong=false不追加往返,save_metadata=true。save_output=true选择output而非temp;实际运行可能写独立首帧PNG、无声视频和混流文件,… + | + +E501 Line too long (105 > 100) + --> docs/hel-892/concat-document-evidence/build_definition.py:443:92 + | +441 | flow += ["源物理边:" + json.dumps(e, ensure_ascii=False) for e in graph["links"]] +442 | flow += [ +443 | f"节点{n['id']} {n['type']} mode={n['mode']};保存位置={len(n['widgets_values'])};原properties=" + | ^^^^^ +444 | + json.dumps(n["properties"], ensure_ascii=False) +445 | for n in graph["nodes"] + | + +E501 Line too long (124 > 100) + --> docs/hel-892/concat-document-evidence/build_definition.py:450:95 + | +448 | "VHS声明1.7.9,使用官方registry准确发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;完整45成员… +449 | "ImageConcatMulti4/9按KJ精确提交50a0837f9aea602b184bbf6dbabf66ed2c7a1d22注册/schema/实现/JS/许可。", +450 | "LoadImage1/2和PreviewImage5按官方core v0.12.3→cb459573c8fa025bbf9ecf312f6af376d659f567固定注册/schema/实现/许可。", + | ^^^^^^^^^^^^^^^^^^^^^^^ +451 | "无frontendVersion;目标安装/UE身份和次序/动态控件恢复未知,固定源码不是运行或目标安装证明。", +452 | ] + | + +E501 Line too long (156 > 100) + --> docs/hel-892/concat-document-evidence/recompute.py:359:101 + | +357 | … +358 | … +359 | …back1, edits1/29cols, fresh155, 1217/3660/294, 21 definitions, frozen boundaries, wheel/sdist" + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +360 | … + | + +Found 13 errors. +[*] 1 fixable with the `--fix` option (3 hidden fixes can be enabled with the `--unsafe-fixes` option). diff --git a/docs/hel-892/concat-document-evidence/lint.txt b/docs/hel-892/concat-document-evidence/lint.txt new file mode 100644 index 00000000..1f5f344d --- /dev/null +++ b/docs/hel-892/concat-document-evidence/lint.txt @@ -0,0 +1 @@ +All checks passed! diff --git a/docs/hel-892/concat-document-evidence/package-check.json b/docs/hel-892/concat-document-evidence/package-check.json new file mode 100644 index 00000000..0b29e1e9 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/package-check.json @@ -0,0 +1,23 @@ +[ + { + "file": "fixed_document.py", + "sha256": "dd0917ac17fb10af3de7d20c8355c7a0fd0c02e233896e2213096122354eda32", + "wheel": true, + "sdist": true, + "definitions": 21 + }, + { + "file": "source_reviews.json", + "sha256": "525c4488aef4dc894f16d9c3e755a9eafb78d19d30b45fbeba52e0b80c2e0630", + "wheel": true, + "sdist": true, + "definitions": 21 + }, + { + "file": "library.py", + "sha256": "b9cbfce28267642e6db3ebe9d591cf8dd260c7772a5a21a8d36cb98915eca13c", + "wheel": true, + "sdist": true, + "definitions": 21 + } +] diff --git a/docs/hel-892/concat-document-evidence/pins.json b/docs/hel-892/concat-document-evidence/pins.json new file mode 100644 index 00000000..9de5a735 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/pins.json @@ -0,0 +1,3 @@ +{ + "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json": "b6aaa6f5f66ceda4ea394b31901c4f5c776de829190577a9d26f50aaa9210c36" +} diff --git a/docs/hel-892/concat-document-evidence/pr-before.json b/docs/hel-892/concat-document-evidence/pr-before.json new file mode 100644 index 00000000..f4112dca --- /dev/null +++ b/docs/hel-892/concat-document-evidence/pr-before.json @@ -0,0 +1,11 @@ +{ + "number": 25, + "title": "WIP: HEL-892 离线全量工作流库与后台兼容框架", + "state": "open", + "merged": false, + "html_url": "http://gitea.xbay.cc/leefer/aigc-home/pulls/25", + "head_ref": "agent/agent/a64a969a6a44", + "head_sha": "d1ba22677740d8775bc2bc99ae767d5994338ebf", + "base_ref": "main", + "base_sha": "1fc8bdb8bb2a88ccace6f21a507fd77bcf22f532" +} diff --git a/docs/hel-892/concat-document-evidence/rebuild.py b/docs/hel-892/concat-document-evidence/rebuild.py new file mode 100644 index 00000000..e04f3bd2 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/rebuild.py @@ -0,0 +1,64 @@ +"""Add one reviewed definition; preserve every other review object exactly.""" + +from __future__ import annotations + +import hashlib +import json +import subprocess + +from build_definition import OUT, PATHS, REPO, build, canonical + +BASE = "d1ba22677740d8775bc2bc99ae767d5994338ebf" +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 20 blocks unchanged") + + +if __name__ == "__main__": + main() diff --git a/docs/hel-892/concat-document-evidence/recompute.py b/docs/hel-892/concat-document-evidence/recompute.py new file mode 100644 index 00000000..4a57f78f --- /dev/null +++ b/docs/hel-892/concat-document-evidence/recompute.py @@ -0,0 +1,367 @@ +"""Actual d1ba226 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 / "concat-reference" + entries = json.loads((reference / "sources.json").read_bytes())["sources"] + package_root = OUT.parent / "openpose-reference" + package = json.loads((package_root / "vhs-package-index.json").read_bytes()) + archive = (package_root / "vhs-1.7.9.zip").read_bytes() + assert hashlib.sha256(archive).hexdigest() == package["sha256"] + with zipfile.ZipFile(io.BytesIO(archive)) as z: + for e in package["members"]: + assert hashlib.sha256(z.read(e["file"])).hexdigest() == e["sha256"] + for e in entries: + raw = (reference / e["local_file"]).read_bytes() + assert hashlib.sha256(raw).hexdigest() == e["sha256"] + if e["id"] == "vhs": + assert z.read(e["file"]) == raw + assert (reference / "core-tag.txt").read_text().split() == [ + "cb459573c8fa025bbf9ecf312f6af376d659f567", + "refs/tags/v0.12.3", + ] + write( + "source-check.json", + dict( + fixed_originals=len(entries), + package_members=len(package["members"]), + package_sha256=package["sha256"], + git_commit_binding="unknown", + local_file_base="docs/hel-892/concat-reference", + imported_upstream=False, + target_installation=False, + ), + ) + graphs = [] + for path in PATHS: + raw = (REPO / path).read_bytes() + g = json.loads(raw) + by_id = {n["id"]: n for n in g["nodes"]} + assert len(g["nodes"]) == 9 and len(g["links"]) == 9 + assert sum(len(n["widgets_values"]) for n in g["nodes"]) == 42 + assert "frontendVersion" not in g["extra"] + assert {n["id"]: n["mode"] for n in g["nodes"]} == { + 1: 4, + 2: 4, + 4: 4, + 5: 4, + 6: 0, + 8: 0, + 9: 0, + 10: 0, + 11: 0, + } + assert by_id[5]["widgets_values"] == [] and by_id[11]["widgets_values"] == {} + for eid, origin, slot, target, inp, typ in g["links"]: + assert eid in by_id[origin]["outputs"][slot]["links"] + assert by_id[origin]["outputs"][slot]["type"] == typ + assert by_id[target]["inputs"][inp]["link"] == eid + assert by_id[target]["inputs"][inp]["type"] == typ + assert [8, 11, 0, 10, 4, "FLOAT"] in g["links"] + assert [14, 8, 2, 10, 1, "AUDIO"] in g["links"] + graphs.append( + dict( + source_path=path, + sha1=hashlib.sha1(raw).hexdigest(), + raw_sha256=hashlib.sha256(raw).hexdigest(), + canonical_sha256=hashlib.sha256(canonical(g)).hexdigest(), + nodes=g["nodes"], + links=g["links"], + saved_fields=42, + history_objects=3, + ) + ) + write("source-graphs.json", graphs) + 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) == 20 + 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=20, + old_saved=576, + old_notes=15, + new_saved=42, + new_notes=0, + total_documents=21, + total_saved=618, + 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=42, + new_notes=0, + old_saved=576, + old_notes=15, + overviews=21, + 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_twenty_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=21, + ) + ) + write("package-check.json", packages) + print( + "PASS actual d1ba226 upgrade1/skip154, repe" + "at155, rollback1, edits1/29cols, fresh155," + " 1217/3660/294, 21 definitions, frozen bou" + "ndaries, wheel/sdist" + ) + + +if __name__ == "__main__": + main() diff --git a/docs/hel-892/concat-document-evidence/recompute.txt b/docs/hel-892/concat-document-evidence/recompute.txt new file mode 100644 index 00000000..5b0534fd --- /dev/null +++ b/docs/hel-892/concat-document-evidence/recompute.txt @@ -0,0 +1 @@ +PASS actual d1ba226 upgrade1/skip154, repeat155, rollback1, edits1/29cols, fresh155, 1217/3660/294, 21 definitions, frozen boundaries, wheel/sdist diff --git a/docs/hel-892/concat-document-evidence/render_report.py b/docs/hel-892/concat-document-evidence/render_report.py new file mode 100644 index 00000000..4a4aa755 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/render_report.py @@ -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 = [ + "# 双图像或视频合并显示固定参考中文说明", + "", + "42新顶层保存位置(39标量含null与上传状态+3历史对象)+0新注释;旧20图576保存位置+15注释逐对象不变。21图618位置+15注释展示,155定稿0、实跑0、新增转换0。", + "", + "复用SQLite来源库→正常GET详情→现有说明抽屉;仅新增source_reviews说明块和显式受信摘要,不改变转换/执行链。来源索引local_file以docs/hel-892/concat-document-evidence为解析基准。", + "", + ] + 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 / "双图像或视频合并显示固定参考中文说明.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() diff --git a/docs/hel-892/concat-document-evidence/repeat.py b/docs/hel-892/concat-document-evidence/repeat.py new file mode 100644 index 00000000..8193fc01 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/repeat.py @@ -0,0 +1,42 @@ +"""Compare deterministic definitions and rendered artifacts without repeating unrelated tests.""" + +import hashlib +import json + +from build_definition import OUT, REPO, canonical +from rebuild import RESOURCE, build_all +from render_report import main as render + + +def main(): + a, old = build_all() + b, previous = build_all() + assert a == b and old == previous + assert a == json.loads((REPO / RESOURCE).read_bytes()) + render() + paths = [ + OUT / "fixed-source-index.json", + OUT.parent / "双图像或视频合并显示固定参考中文说明.md", + ] + before = {p.name: hashlib.sha256(p.read_bytes()).hexdigest() for p in paths} + render() + assert before == {p.name: hashlib.sha256(p.read_bytes()).hexdigest() for p in paths} + (OUT / "repeatability.json").write_text( + json.dumps( + dict( + definitions=21, + repeated_build_equal=True, + repeated_render_equal=True, + resource_sha256=hashlib.sha256(canonical(a)).hexdigest(), + artifacts=before, + ), + ensure_ascii=False, + indent=2, + ) + + "\n" + ) + print("PASS deterministic definitions and rendered artifacts: zero difference") + + +if __name__ == "__main__": + main() diff --git a/docs/hel-892/concat-document-evidence/repeat.txt b/docs/hel-892/concat-document-evidence/repeat.txt new file mode 100644 index 00000000..df043325 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/repeat.txt @@ -0,0 +1 @@ +PASS deterministic definitions and rendered artifacts: zero difference diff --git a/docs/hel-892/concat-document-evidence/repeatability.json b/docs/hel-892/concat-document-evidence/repeatability.json new file mode 100644 index 00000000..a317b691 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/repeatability.json @@ -0,0 +1,10 @@ +{ + "definitions": 21, + "repeated_build_equal": true, + "repeated_render_equal": true, + "resource_sha256": "f3064d4f1a787786a559f7f422bb593e10a1877face6cd00b08262b4514ae1f9", + "artifacts": { + "fixed-source-index.json": "c32a7e2d3167f7b90a350b0fda92248c532f120d86cac0edbcb5fd28bc5cf473", + "双图像或视频合并显示固定参考中文说明.md": "ce33252406b0861825267eb97a60edb26c04c205aae19b7cfb1d57553630884d" + } +} diff --git a/docs/hel-892/concat-document-evidence/request_counts.py b/docs/hel-892/concat-document-evidence/request_counts.py new file mode 100644 index 00000000..f471c9f8 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/request_counts.py @@ -0,0 +1,39 @@ +"""Count actual local server GETs separately from browser intercepted requests.""" + +import collections +import json +import re +from pathlib import Path + +OUT = Path(__file__).resolve().parent + + +def main(): + text = (OUT / "service-0.txt").read_text() + gets = re.findall(r'"GET ([^ ]+) HTTP/', text) + polling = [p for p in gets if p in ["/api/jobs", "/api/events"]] + result = dict( + total=len(gets), + fixed_count=len(gets) - len(polling), + polling_count=len(polling), + paths=dict(collections.Counter(gets)), + readiness_included=1, + reason=( + "就绪GET单列1;浏览记录含Node直连及Playwright本地拦截的GET," + "服务日志只含真正到后端者,不机械等同。" + "轮询可随计时边界±1,禁止请求始终零容忍。" + ), + ) + browser = json.loads((OUT / "browser-results.json").read_bytes()) + assert browser["errors"] == [] + assert all(r["method"] == "GET" for r in browser["requests"]) + assert all(not p.startswith("/api/view") for p in gets) + assert abs(result["polling_count"] - browser["request_accounting"]["polling_count"]) <= 1 + (OUT / "server-request-accounting.json").write_text( + json.dumps(result, ensure_ascii=False, indent=2) + "\n" + ) + print(json.dumps(result, ensure_ascii=False)) + + +if __name__ == "__main__": + main() diff --git a/docs/hel-892/concat-document-evidence/review-delta.json b/docs/hel-892/concat-document-evidence/review-delta.json new file mode 100644 index 00000000..6295dcfb --- /dev/null +++ b/docs/hel-892/concat-document-evidence/review-delta.json @@ -0,0 +1,15 @@ +{ + "base": "d1ba22677740d8775bc2bc99ae767d5994338ebf", + "changed_paths": [ + "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json" + ], + "other_reviews_unchanged": 155, + "old_blocks_unchanged": 20, + "old_saved": 576, + "old_notes": 15, + "new_saved": 42, + "new_notes": 0, + "total_documents": 21, + "total_saved": 618, + "total_notes": 15 +} diff --git a/docs/hel-892/concat-document-evidence/source-check.json b/docs/hel-892/concat-document-evidence/source-check.json new file mode 100644 index 00000000..3271dac0 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/source-check.json @@ -0,0 +1,9 @@ +{ + "fixed_originals": 12, + "package_members": 45, + "package_sha256": "ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8", + "git_commit_binding": "unknown", + "local_file_base": "docs/hel-892/concat-reference", + "imported_upstream": false, + "target_installation": false +} diff --git a/docs/hel-892/concat-document-evidence/source-graphs.json b/docs/hel-892/concat-document-evidence/source-graphs.json new file mode 100644 index 00000000..d3c8e1fa --- /dev/null +++ b/docs/hel-892/concat-document-evidence/source-graphs.json @@ -0,0 +1,1031 @@ +[ + { + "source_path": "example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json", + "sha1": "b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a", + "raw_sha256": "61a0b1a2aa17a7d8c4f09f4f57e276eaf37227f69b5fc5789193005e593548c9", + "canonical_sha256": "0a5fad1a4d9b69b6633cbd5e3b2aa253a4df5d26234e885e156c63a3d0f6e1c9", + "nodes": [ + { + "id": 1, + "type": "LoadImage", + "pos": [ + 2220, + -160 + ], + "size": [ + 270, + 314 + ], + "flags": {}, + "order": 0, + "mode": 4, + "inputs": [ + { + "localized_name": "图像", + "name": "image", + "type": "COMBO", + "widget": { + "name": "image" + }, + "link": null + }, + { + "localized_name": "选择文件上传", + "name": "upload", + "type": "IMAGEUPLOAD", + "widget": { + "name": "upload" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "图像", + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 1 + ] + }, + { + "localized_name": "遮罩", + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.12.3", + "ue_properties": { + "widget_ue_connectable": {}, + "input_ue_unconnectable": {} + }, + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "小云雀_1770719334800_0_m.jpg", + "image" + ] + }, + { + "id": 2, + "type": "LoadImage", + "pos": [ + 2220, + 210 + ], + "size": [ + 270, + 314 + ], + "flags": {}, + "order": 1, + "mode": 4, + "inputs": [ + { + "localized_name": "图像", + "name": "image", + "type": "COMBO", + "widget": { + "name": "image" + }, + "link": null + }, + { + "localized_name": "选择文件上传", + "name": "upload", + "type": "IMAGEUPLOAD", + "widget": { + "name": "upload" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "图像", + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 2 + ] + }, + { + "localized_name": "遮罩", + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.12.3", + "ue_properties": { + "widget_ue_connectable": {}, + "input_ue_unconnectable": {} + }, + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "ComfyUI_00038.png", + "image" + ] + }, + { + "id": 5, + "type": "PreviewImage", + "pos": [ + 3300, + -20 + ], + "size": [ + 500, + 500 + ], + "flags": {}, + "order": 7, + "mode": 4, + "inputs": [ + { + "localized_name": "图像", + "name": "images", + "type": "IMAGE", + "link": 3 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.12.3", + "ue_properties": { + "widget_ue_connectable": {}, + "input_ue_unconnectable": {} + }, + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [] + }, + { + "id": 4, + "type": "ImageConcatMulti", + "pos": [ + 2820, + -30 + ], + "size": [ + 270, + 150 + ], + "flags": {}, + "order": 4, + "mode": 4, + "inputs": [ + { + "label": "图像_1", + "localized_name": "图像_1", + "name": "image_1", + "type": "IMAGE", + "link": 1 + }, + { + "label": "图像_2", + "localized_name": "图像_2", + "name": "image_2", + "shape": 7, + "type": "IMAGE", + "link": 2 + }, + { + "label": "输入数量", + "localized_name": "输入数量", + "name": "inputcount", + "type": "INT", + "widget": { + "name": "inputcount" + }, + "link": null + }, + { + "label": "方向", + "localized_name": "方向", + "name": "direction", + "type": "COMBO", + "widget": { + "name": "direction" + }, + "link": null + }, + { + "label": "匹配尺寸", + "localized_name": "匹配尺寸", + "name": "match_image_size", + "type": "BOOLEAN", + "widget": { + "name": "match_image_size" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "图像", + "name": "图像", + "type": "IMAGE", + "links": [ + 3 + ] + } + ], + "properties": { + "cnr_id": "comfyui-kjnodes", + "ver": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "ue_properties": { + "widget_ue_connectable": {}, + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + 2, + "down", + true, + null + ] + }, + { + "id": 11, + "type": "VHS_VideoInfoLoaded", + "pos": [ + 3020, + 1000 + ], + "size": [ + 186, + 106 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "label": "视频信息", + "localized_name": "视频信息", + "name": "video_info", + "type": "VHS_VIDEOINFO", + "link": 7 + } + ], + "outputs": [ + { + "localized_name": "FPS🟦", + "name": "FPS🟦", + "type": "FLOAT", + "links": [ + 8 + ] + }, + { + "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", + "ue_properties": { + "widget_ue_connectable": {}, + "input_ue_unconnectable": {} + }, + "Node name for S&R": "VHS_VideoInfoLoaded" + }, + "widgets_values": {} + }, + { + "id": 10, + "type": "VHS_VideoCombine", + "pos": [ + 3440, + 780 + ], + "size": [ + 280, + 640.5 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "label": "图像", + "localized_name": "图像", + "name": "images", + "type": "IMAGE", + "link": 4 + }, + { + "label": "音频", + "localized_name": "音频", + "name": "audio", + "shape": 7, + "type": "AUDIO", + "link": 14 + }, + { + "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": 8 + }, + { + "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", + "ue_properties": { + "widget_ue_connectable": {}, + "input_ue_unconnectable": {} + }, + "Node name for S&R": "VHS_VideoCombine" + }, + "widgets_values": { + "frame_rate": 8, + "loop_count": 0, + "filename_prefix": "AnimateDiff", + "format": "video/h264-mp4", + "pix_fmt": "yuv420p", + "crf": 19, + "save_metadata": true, + "trim_to_audio": false, + "pingpong": false, + "save_output": true, + "videopreview": { + "hidden": false, + "paused": false, + "params": { + "filename": "AnimateDiff_00011-audio.mp4", + "subfolder": "", + "type": "output", + "format": "video/h264-mp4", + "frame_rate": 30.000001657458657, + "workflow": "AnimateDiff_00011.png", + "fullpath": "E:\\ComfyUI-Data\\output\\AnimateDiff_00011-audio.mp4" + } + } + } + }, + { + "id": 8, + "type": "VHS_LoadVideo", + "pos": [ + 2220, + 770 + ], + "size": [ + 370, + 521 + ], + "flags": {}, + "order": 2, + "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": [ + { + "localized_name": "图像", + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 11 + ] + }, + { + "localized_name": "帧计数", + "name": "帧计数", + "type": "INT", + "links": null + }, + { + "localized_name": "音频", + "name": "音频", + "type": "AUDIO", + "links": [ + 14 + ] + }, + { + "localized_name": "视频信息", + "name": "视频信息", + "type": "VHS_VIDEOINFO", + "links": [] + } + ], + "properties": { + "cnr_id": "comfyui-videohelpersuite", + "ver": "1.7.9", + "ue_properties": { + "widget_ue_connectable": {}, + "input_ue_unconnectable": {} + }, + "Node name for S&R": "VHS_LoadVideo" + }, + "widgets_values": { + "video": "2月10日.mp4", + "force_rate": 0, + "custom_width": 0, + "custom_height": 0, + "frame_load_cap": 64, + "skip_first_frames": 55, + "select_every_nth": 1, + "format": "AnimateDiff", + "videopreview": { + "hidden": false, + "paused": false, + "params": { + "filename": "2月10日.mp4", + "type": "input", + "format": "video/mp4", + "force_rate": 0, + "custom_width": 0, + "custom_height": 0, + "frame_load_cap": 64, + "skip_first_frames": 55, + "select_every_nth": 1 + } + } + } + }, + { + "id": 6, + "type": "VHS_LoadVideo", + "pos": [ + 2610, + 760 + ], + "size": [ + 370, + 521 + ], + "flags": {}, + "order": 3, + "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": [ + { + "localized_name": "图像", + "name": "图像", + "type": "IMAGE", + "links": [ + 10 + ] + }, + { + "localized_name": "帧计数", + "name": "帧计数", + "type": "INT", + "links": null + }, + { + "localized_name": "音频", + "name": "音频", + "type": "AUDIO", + "links": [] + }, + { + "localized_name": "视频信息", + "name": "视频信息", + "type": "VHS_VIDEOINFO", + "links": [ + 7 + ] + } + ], + "properties": { + "cnr_id": "comfyui-videohelpersuite", + "ver": "1.7.9", + "ue_properties": { + "widget_ue_connectable": {}, + "input_ue_unconnectable": {} + }, + "Node name for S&R": "VHS_LoadVideo" + }, + "widgets_values": { + "video": "小云雀_1770719334800_0_m.mp4", + "force_rate": 0, + "custom_width": 0, + "custom_height": 0, + "frame_load_cap": 62, + "skip_first_frames": 53, + "select_every_nth": 1, + "format": "AnimateDiff", + "choose video to upload": "image", + "videopreview": { + "hidden": false, + "paused": false, + "params": { + "filename": "小云雀_1770719334800_0_m.mp4", + "type": "input", + "format": "video/mp4", + "force_rate": 0, + "custom_width": 0, + "custom_height": 0, + "frame_load_cap": 62, + "skip_first_frames": 53, + "select_every_nth": 1 + } + } + } + }, + { + "id": 9, + "type": "ImageConcatMulti", + "pos": [ + 3130, + 770 + ], + "size": [ + 270, + 150 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "label": "图像_1", + "localized_name": "图像_1", + "name": "image_1", + "type": "IMAGE", + "link": 10 + }, + { + "label": "图像_2", + "localized_name": "图像_2", + "name": "image_2", + "shape": 7, + "type": "IMAGE", + "link": 11 + }, + { + "label": "输入数量", + "localized_name": "输入数量", + "name": "inputcount", + "type": "INT", + "widget": { + "name": "inputcount" + }, + "link": null + }, + { + "label": "方向", + "localized_name": "方向", + "name": "direction", + "type": "COMBO", + "widget": { + "name": "direction" + }, + "link": null + }, + { + "label": "匹配尺寸", + "localized_name": "匹配尺寸", + "name": "match_image_size", + "type": "BOOLEAN", + "widget": { + "name": "match_image_size" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "图像", + "name": "图像", + "type": "IMAGE", + "links": [ + 4 + ] + } + ], + "properties": { + "cnr_id": "comfyui-kjnodes", + "ver": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "ue_properties": { + "widget_ue_connectable": {}, + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + 2, + "down", + true, + null + ] + } + ], + "links": [ + [ + 1, + 1, + 0, + 4, + 0, + "IMAGE" + ], + [ + 2, + 2, + 0, + 4, + 1, + "IMAGE" + ], + [ + 3, + 4, + 0, + 5, + 0, + "IMAGE" + ], + [ + 4, + 9, + 0, + 10, + 0, + "IMAGE" + ], + [ + 7, + 6, + 3, + 11, + 0, + "VHS_VIDEOINFO" + ], + [ + 8, + 11, + 0, + 10, + 4, + "FLOAT" + ], + [ + 10, + 6, + 0, + 9, + 0, + "IMAGE" + ], + [ + 11, + 8, + 0, + 9, + 1, + "IMAGE" + ], + [ + 14, + 8, + 2, + 10, + 1, + "AUDIO" + ] + ], + "saved_fields": 42, + "history_objects": 3 + } +] diff --git a/docs/hel-892/concat-document-evidence/tests-initial.txt b/docs/hel-892/concat-document-evidence/tests-initial.txt new file mode 100644 index 00000000..19bc51a7 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/tests-initial.txt @@ -0,0 +1,177 @@ +.................................................F...................... [ 8%] +...........F............................................................ [ 16%] +......................................F................................. [ 24%] +........................................................................ [ 32%] +........................................................................ [ 41%] +........................................................................ [ 49%] +........................................................................ [ 57%] +........................................................................ [ 65%] +........................................................................ [ 73%] +........................................................................ [ 82%] +........................................................................ [ 90%] +........................................................................ [ 98%] +..........FF. [100%] +=================================== FAILURES =================================== +__ test_every_position_refuses_even_recomputed_caller_digest[saved-0-field7] ___ + +i = 0 +field = {'field': 'saved_position_3', 'label': '额外null保存槽(按钮候选)', 'type': '未确认前端状态', 'schema_default': '本提交JS创建Update inputs按钮,服务端无此参数', ...} +variant = 'saved' + + @pytest.mark.parametrize("i,field", FIELDS) + @pytest.mark.parametrize("variant", ["saved", "type", "text"]) + def test_every_position_refuses_even_recomputed_caller_digest(i, field, variant): + s, r = copy.deepcopy(SOURCES[i]), copy.deepcopy(REVIEWS[i]) + b = r["fixed_version_document"] + f = next(f for f in b["fields"] if f["pointer"] == field["pointer"]) + if variant == "text": + f["schema_default"] = "forged" + else: + parent, _, key = field["pointer"].rpartition("/") + target = pointer(s, parent) + target[int(key) if isinstance(target, list) else key] = ( + "forged" if variant == "type" else None + ) + f["value"] = pointer(s, field["pointer"]) + f["json_type"] = type(f["value"]).__name__ + b["canonical_sha256"] = hashlib.sha256(canonical(s)).hexdigest() + r["caller_digest"] = hashlib.sha256(canonical(b)).hexdigest() +> assert not doc(i, s, r)["fixed_version"]["matched"] +E assert not True + +calliope-backend/tests/test_concat_fixed_document.py:84: AssertionError +__ test_every_position_refuses_even_recomputed_caller_digest[saved-0-field41] __ + +i = 0 +field = {'field': 'saved_position_3', 'label': '额外null保存槽(按钮候选)', 'type': '未确认前端状态', 'schema_default': '本提交JS创建Update inputs按钮,服务端无此参数', ...} +variant = 'saved' + + @pytest.mark.parametrize("i,field", FIELDS) + @pytest.mark.parametrize("variant", ["saved", "type", "text"]) + def test_every_position_refuses_even_recomputed_caller_digest(i, field, variant): + s, r = copy.deepcopy(SOURCES[i]), copy.deepcopy(REVIEWS[i]) + b = r["fixed_version_document"] + f = next(f for f in b["fields"] if f["pointer"] == field["pointer"]) + if variant == "text": + f["schema_default"] = "forged" + else: + parent, _, key = field["pointer"].rpartition("/") + target = pointer(s, parent) + target[int(key) if isinstance(target, list) else key] = ( + "forged" if variant == "type" else None + ) + f["value"] = pointer(s, field["pointer"]) + f["json_type"] = type(f["value"]).__name__ + b["canonical_sha256"] = hashlib.sha256(canonical(s)).hexdigest() + r["caller_digest"] = hashlib.sha256(canonical(b)).hexdigest() +> assert not doc(i, s, r)["fixed_version"]["matched"] +E assert not True + +calliope-backend/tests/test_concat_fixed_document.py:84: AssertionError +__________ test_actual_paths_counts_old_objects_and_media_conditions ___________ + + def test_actual_paths_counts_old_objects_and_media_conditions(): + resource = "calliope-backend/src/calliope/comfyui/source_reviews.json" + old = json.loads(subprocess.check_output(["git", "show", "d1ba226:" + resource], cwd=REPO)) + now = json.loads((REPO / resource).read_bytes()) + b = now[PATHS[0]].pop("fixed_version_document") + d = doc(0) + assert now == old and len(DEFINITIONS) == 21 + assert d["fixed_version"]["matched"] and len(b["fields"]) == 42 + assert b["comments"] == [] and b["counts"]["history_objects"] == 3 + assert b["counts"]["scalar_saved_positions"] == 39 + assert b["counts"]["linked_saved_fields"] == 1 + assert d["status"] == dict(imported=True, doc_done=False, exec_verified=False) + assert d["dependencies"]["check_state"] == "unchecked" + assert review_for(PATHS[0], "0" * 40) is None + blocks = [r["fixed_version_document"] for r in old.values() if "fixed_version_document" in r] + assert len(blocks) == 20 and sum(len(b["fields"]) for b in blocks) == 576 +> assert sum(len(b["comments"]) for b in blocks) == 15 + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +calliope-backend/tests/test_concat_fixed_document.py:168: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + +.0 = + +> assert sum(len(b["comments"]) for b in blocks) == 15 + ^^^^^^^^^^^^^ +E KeyError: 'comments' + +calliope-backend/tests/test_concat_fixed_document.py:168: KeyError +______________ 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 and not p.endswith(("NLF_视频人物动作骨架获取.json", "/视频倒放.json")) + ) + resource = "calliope-backend/src/calliope/comfyui/source_reviews.json" + now = json.loads((REPO / resource).read_bytes()) + for added in [ + p + for p in now + if p.endswith( + ("视频转gif动图图片.json", "加载图片合成视频.json", "双图像或视频合并显示.json") + ) + ]: + now[added].pop("fixed_version_document") + reverse = next(p for p in now if p.endswith("/视频倒放.json")) + now[reverse].pop("fixed_version_document") + nlf = next(p for p in now if p.endswith("NLF_视频人物动作骨架获取.json")) + now[nlf].pop("fixed_version_document") + openpose = next(p for p in now if p.endswith("openpose-video-姿态检测.json")) +> review["fixed_version_document"] = now[other]["fixed_version_document"] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +E KeyError: 'fixed_version_document' + +calliope-backend/tests/test_sdpose_fixed_document.py:173: KeyError +______ test_ten_documents_only_gain_overview_and_new_block_is_independent ______ + + def test_ten_documents_only_gain_overview_and_new_block_is_independent(): + p = "calliope-backend/src/calliope/comfyui/source_reviews.json" + old = json.loads(subprocess.check_output(["git", "show", "ec3388a:" + p], cwd=REPO)) + now = json.loads((REPO / p).read_bytes()) + # Freeze the historical eleven-document revision; the two grid additions are + # independently compared against 27e6d56 in test_grid_fixed_document. + # Gemma is separately checked against 9dac1b4 in test_gemma_fixed_document. + additions = [ + p + for p in DEFINITIONS + if p.endswith( + ( + "图像合并成四宫格.json", + "图像分割-多宫格分割.json", + "gemma4_提示词反推(图像视频音频).json", + "sdpose_视频人物姿势骨架提取.json", + "openpose-video-姿态检测.json", + "NLF_视频人物动作骨架获取.json", + "/视频倒放.json", + "视频转gif动图图片.json", + "加载图片合成视频.json", + ) + ) + ] + assert len(additions) == 9 + for p in additions: + now[p].pop("fixed_version_document") + historical = [p for p in DEFINITIONS if p not in additions] +> assert len(historical) == 11 +E AssertionError: assert 12 == 11 +E + where 12 = len(['example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json', 'example_ComfyUI_workflows/3-图像生成/Qwen-Im...图像视频放大/Minimax-H3提示词增强.json', 'example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/ControlNet_aux_常用样例.json', ...]) + +calliope-backend/tests/test_background_fixed_document.py:217: AssertionError +=========================== short test summary info ============================ +FAILED calliope-backend/tests/test_concat_fixed_document.py::test_every_position_refuses_even_recomputed_caller_digest[saved-0-field7] +FAILED calliope-backend/tests/test_concat_fixed_document.py::test_every_position_refuses_even_recomputed_caller_digest[saved-0-field41] +FAILED calliope-backend/tests/test_concat_fixed_document.py::test_actual_paths_counts_old_objects_and_media_conditions +FAILED calliope-backend/tests/test_sdpose_fixed_document.py::test_real_document_and_frozen_old_fourteen_blocks +FAILED calliope-backend/tests/test_background_fixed_document.py::test_ten_documents_only_gain_overview_and_new_block_is_independent +5 failed, 872 passed, 1 warning in 6.39s diff --git a/docs/hel-892/concat-document-evidence/tests-second.txt b/docs/hel-892/concat-document-evidence/tests-second.txt new file mode 100644 index 00000000..61cb79bb --- /dev/null +++ b/docs/hel-892/concat-document-evidence/tests-second.txt @@ -0,0 +1,14 @@ +........................................................................ [ 8%] +........................................................................ [ 16%] +........................................................................ [ 24%] +........................................................................ [ 32%] +........................................................................ [ 41%] +........................................................................ [ 49%] +........................................................................ [ 57%] +........................................................................ [ 65%] +........................................................................ [ 73%] +........................................................................ [ 82%] +........................................................................ [ 90%] +........................................................................ [ 98%] +............. [100%] +877 passed, 1 warning in 5.95s diff --git a/docs/hel-892/concat-document-evidence/validation-commands.txt b/docs/hel-892/concat-document-evidence/validation-commands.txt new file mode 100644 index 00000000..35664df7 --- /dev/null +++ b/docs/hel-892/concat-document-evidence/validation-commands.txt @@ -0,0 +1,15 @@ +# 仓库根;既有Python3.11/锁定依赖;不执行上游插件,不读取媒体/目标机。 +uv sync --project calliope-backend --frozen --extra dev --python 3.11 --offline +npm ci --prefix calliope-web --ignore-scripts --offline +python3 docs/hel-892/concat-document-evidence/rebuild.py +uv run --project calliope-backend --offline ruff format --config calliope-backend/pyproject.toml calliope-backend/src/calliope/comfyui/fixed_document.py +uv build --project calliope-backend --offline +uv run --project calliope-backend --offline python docs/hel-892/concat-document-evidence/recompute.py +python3 docs/hel-892/concat-document-evidence/repeat.py +uv run --project calliope-backend --offline pytest calliope-backend/tests/test_gif_images_fixed_document.py calliope-backend/tests/test_reverse_fixed_document.py calliope-backend/tests/test_workflow_library.py calliope-backend/tests/test_nlf_fixed_document.py::test_exact_topology_counts_modes_unknowns_and_old_objects calliope-backend/tests/test_openpose_fixed_document.py::test_exact_document_topology_and_preservation calliope-backend/tests/test_grid_fixed_document.py::test_only_two_reviews_change_and_all_old_blocks_preserved calliope-backend/tests/test_gemma_fixed_document.py::test_real_document_and_frozen_old_thirteen_blocks calliope-backend/tests/test_sdpose_fixed_document.py::test_real_document_and_frozen_old_fourteen_blocks calliope-backend/tests/test_background_fixed_document.py::test_ten_documents_only_gain_overview_and_new_block_is_independent calliope-backend/tests/test_controlnet_fixed_document.py::test_other_documents_and_block_swaps -q --disable-warnings +uv run --project calliope-backend --offline ruff check --config calliope-backend/pyproject.toml docs/hel-892/concat-document-evidence e2e/run-concat-document.py calliope-backend/src/calliope/comfyui/fixed_document.py calliope-backend/tests/test_{concat,gif_images,reverse,nlf,openpose,grid,gemma,sdpose,background,controlnet}_fixed_document.py +uv run --project calliope-backend --offline ruff format --check --config calliope-backend/pyproject.toml docs/hel-892/concat-document-evidence e2e/run-concat-document.py calliope-backend/src/calliope/comfyui/fixed_document.py calliope-backend/tests/test_{concat,gif_images,reverse,nlf,openpose,grid,gemma,sdpose,background,controlnet}_fixed_document.py +node --check e2e/concat-document.mjs +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-concat-document.py +# 浏览runner finally终止两个本地服务;最后产物复制到本目录再复算实际请求: +python3 docs/hel-892/concat-document-evidence/request_counts.py diff --git a/docs/hel-892/concat-reference/core-tag.txt b/docs/hel-892/concat-reference/core-tag.txt new file mode 100644 index 00000000..e1c051c8 --- /dev/null +++ b/docs/hel-892/concat-reference/core-tag.txt @@ -0,0 +1 @@ +cb459573c8fa025bbf9ecf312f6af376d659f567 refs/tags/v0.12.3 diff --git a/docs/hel-892/concat-reference/core__LICENSE b/docs/hel-892/concat-reference/core__LICENSE new file mode 100644 index 00000000..f288702d --- /dev/null +++ b/docs/hel-892/concat-reference/core__LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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. + + + Copyright (C) + + 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 . + +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: + + Copyright (C) + 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 +. + + 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 +. diff --git a/docs/hel-892/concat-reference/core__nodes.py b/docs/hel-892/concat-reference/core__nodes.py new file mode 100644 index 00000000..e11a8ed8 --- /dev/null +++ b/docs/hel-892/concat-reference/core__nodes.py @@ -0,0 +1,2502 @@ +from __future__ import annotations +import torch + + +import os +import sys +import json +import glob +import hashlib +import inspect +import traceback +import math +import time +import random +import logging + +from PIL import Image, ImageOps, ImageSequence +from PIL.PngImagePlugin import PngInfo + +import numpy as np +import safetensors.torch + +sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), "comfy")) + +import comfy.diffusers_load +import comfy.samplers +import comfy.sample +import comfy.sd +import comfy.utils +import comfy.controlnet +from comfy.comfy_types import IO, ComfyNodeABC, InputTypeDict, FileLocator +from comfy_api.internal import register_versions, ComfyAPIWithVersion +from comfy_api.version_list import supported_versions +from comfy_api.latest import io, ComfyExtension + +import comfy.clip_vision + +import comfy.model_management +from comfy.cli_args import args + +import importlib + +import folder_paths +import latent_preview +import node_helpers + +if args.enable_manager: + import comfyui_manager + +def before_node_execution(): + comfy.model_management.throw_exception_if_processing_interrupted() + +def interrupt_processing(value=True): + comfy.model_management.interrupt_current_processing(value) + +MAX_RESOLUTION=16384 + +class CLIPTextEncode(ComfyNodeABC): + @classmethod + def INPUT_TYPES(s) -> InputTypeDict: + return { + "required": { + "text": (IO.STRING, {"multiline": True, "dynamicPrompts": True, "tooltip": "The text to be encoded."}), + "clip": (IO.CLIP, {"tooltip": "The CLIP model used for encoding the text."}) + } + } + RETURN_TYPES = (IO.CONDITIONING,) + OUTPUT_TOOLTIPS = ("A conditioning containing the embedded text used to guide the diffusion model.",) + FUNCTION = "encode" + + CATEGORY = "conditioning" + DESCRIPTION = "Encodes a text prompt using a CLIP model into an embedding that can be used to guide the diffusion model towards generating specific images." + SEARCH_ALIASES = ["text", "prompt", "text prompt", "positive prompt", "negative prompt", "encode text", "text encoder", "encode prompt"] + + def encode(self, clip, text): + if clip is None: + raise RuntimeError("ERROR: clip input is invalid: None\n\nIf the clip is from a checkpoint loader node your checkpoint does not contain a valid clip or text encoder model.") + tokens = clip.tokenize(text) + return (clip.encode_from_tokens_scheduled(tokens), ) + + +class ConditioningCombine: + @classmethod + def INPUT_TYPES(s): + return {"required": {"conditioning_1": ("CONDITIONING", ), "conditioning_2": ("CONDITIONING", )}} + RETURN_TYPES = ("CONDITIONING",) + FUNCTION = "combine" + + CATEGORY = "conditioning" + SEARCH_ALIASES = ["combine", "merge conditioning", "combine prompts", "merge prompts", "mix prompts", "add prompt"] + + def combine(self, conditioning_1, conditioning_2): + return (conditioning_1 + conditioning_2, ) + +class ConditioningAverage : + SEARCH_ALIASES = ["blend prompts", "interpolate conditioning", "mix prompts", "style fusion", "weighted blend"] + + @classmethod + def INPUT_TYPES(s): + return {"required": {"conditioning_to": ("CONDITIONING", ), "conditioning_from": ("CONDITIONING", ), + "conditioning_to_strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01}) + }} + RETURN_TYPES = ("CONDITIONING",) + FUNCTION = "addWeighted" + + CATEGORY = "conditioning" + + def addWeighted(self, conditioning_to, conditioning_from, conditioning_to_strength): + out = [] + + if len(conditioning_from) > 1: + logging.warning("Warning: ConditioningAverage conditioning_from contains more than 1 cond, only the first one will actually be applied to conditioning_to.") + + cond_from = conditioning_from[0][0] + pooled_output_from = conditioning_from[0][1].get("pooled_output", None) + + for i in range(len(conditioning_to)): + t1 = conditioning_to[i][0] + pooled_output_to = conditioning_to[i][1].get("pooled_output", pooled_output_from) + t0 = cond_from[:,:t1.shape[1]] + if t0.shape[1] < t1.shape[1]: + t0 = torch.cat([t0] + [torch.zeros((1, (t1.shape[1] - t0.shape[1]), t1.shape[2]))], dim=1) + + tw = torch.mul(t1, conditioning_to_strength) + torch.mul(t0, (1.0 - conditioning_to_strength)) + t_to = conditioning_to[i][1].copy() + if pooled_output_from is not None and pooled_output_to is not None: + t_to["pooled_output"] = torch.mul(pooled_output_to, conditioning_to_strength) + torch.mul(pooled_output_from, (1.0 - conditioning_to_strength)) + elif pooled_output_from is not None: + t_to["pooled_output"] = pooled_output_from + + n = [tw, t_to] + out.append(n) + return (out, ) + +class ConditioningConcat: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "conditioning_to": ("CONDITIONING",), + "conditioning_from": ("CONDITIONING",), + }} + RETURN_TYPES = ("CONDITIONING",) + FUNCTION = "concat" + + CATEGORY = "conditioning" + + def concat(self, conditioning_to, conditioning_from): + out = [] + + if len(conditioning_from) > 1: + logging.warning("Warning: ConditioningConcat conditioning_from contains more than 1 cond, only the first one will actually be applied to conditioning_to.") + + cond_from = conditioning_from[0][0] + + for i in range(len(conditioning_to)): + t1 = conditioning_to[i][0] + tw = torch.cat((t1, cond_from),1) + n = [tw, conditioning_to[i][1].copy()] + out.append(n) + + return (out, ) + +class ConditioningSetArea: + SEARCH_ALIASES = ["regional prompt", "area prompt", "spatial conditioning", "localized prompt"] + + @classmethod + def INPUT_TYPES(s): + return {"required": {"conditioning": ("CONDITIONING", ), + "width": ("INT", {"default": 64, "min": 64, "max": MAX_RESOLUTION, "step": 8}), + "height": ("INT", {"default": 64, "min": 64, "max": MAX_RESOLUTION, "step": 8}), + "x": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "y": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}), + }} + RETURN_TYPES = ("CONDITIONING",) + FUNCTION = "append" + + CATEGORY = "conditioning" + + def append(self, conditioning, width, height, x, y, strength): + c = node_helpers.conditioning_set_values(conditioning, {"area": (height // 8, width // 8, y // 8, x // 8), + "strength": strength, + "set_area_to_bounds": False}) + return (c, ) + +class ConditioningSetAreaPercentage: + @classmethod + def INPUT_TYPES(s): + return {"required": {"conditioning": ("CONDITIONING", ), + "width": ("FLOAT", {"default": 1.0, "min": 0, "max": 1.0, "step": 0.01}), + "height": ("FLOAT", {"default": 1.0, "min": 0, "max": 1.0, "step": 0.01}), + "x": ("FLOAT", {"default": 0, "min": 0, "max": 1.0, "step": 0.01}), + "y": ("FLOAT", {"default": 0, "min": 0, "max": 1.0, "step": 0.01}), + "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}), + }} + RETURN_TYPES = ("CONDITIONING",) + FUNCTION = "append" + + CATEGORY = "conditioning" + + def append(self, conditioning, width, height, x, y, strength): + c = node_helpers.conditioning_set_values(conditioning, {"area": ("percentage", height, width, y, x), + "strength": strength, + "set_area_to_bounds": False}) + return (c, ) + +class ConditioningSetAreaStrength: + @classmethod + def INPUT_TYPES(s): + return {"required": {"conditioning": ("CONDITIONING", ), + "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}), + }} + RETURN_TYPES = ("CONDITIONING",) + FUNCTION = "append" + + CATEGORY = "conditioning" + + def append(self, conditioning, strength): + c = node_helpers.conditioning_set_values(conditioning, {"strength": strength}) + return (c, ) + + +class ConditioningSetMask: + SEARCH_ALIASES = ["masked prompt", "regional inpaint conditioning", "mask conditioning"] + + @classmethod + def INPUT_TYPES(s): + return {"required": {"conditioning": ("CONDITIONING", ), + "mask": ("MASK", ), + "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}), + "set_cond_area": (["default", "mask bounds"],), + }} + RETURN_TYPES = ("CONDITIONING",) + FUNCTION = "append" + + CATEGORY = "conditioning" + + def append(self, conditioning, mask, set_cond_area, strength): + set_area_to_bounds = False + if set_cond_area != "default": + set_area_to_bounds = True + if len(mask.shape) < 3: + mask = mask.unsqueeze(0) + + c = node_helpers.conditioning_set_values(conditioning, {"mask": mask, + "set_area_to_bounds": set_area_to_bounds, + "mask_strength": strength}) + return (c, ) + +class ConditioningZeroOut: + SEARCH_ALIASES = ["null conditioning", "clear conditioning"] + + @classmethod + def INPUT_TYPES(s): + return {"required": {"conditioning": ("CONDITIONING", )}} + RETURN_TYPES = ("CONDITIONING",) + FUNCTION = "zero_out" + + CATEGORY = "advanced/conditioning" + + def zero_out(self, conditioning): + c = [] + for t in conditioning: + d = t[1].copy() + pooled_output = d.get("pooled_output", None) + if pooled_output is not None: + d["pooled_output"] = torch.zeros_like(pooled_output) + conditioning_lyrics = d.get("conditioning_lyrics", None) + if conditioning_lyrics is not None: + d["conditioning_lyrics"] = torch.zeros_like(conditioning_lyrics) + n = [torch.zeros_like(t[0]), d] + c.append(n) + return (c, ) + +class ConditioningSetTimestepRange: + @classmethod + def INPUT_TYPES(s): + return {"required": {"conditioning": ("CONDITIONING", ), + "start": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001}), + "end": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001}) + }} + RETURN_TYPES = ("CONDITIONING",) + FUNCTION = "set_range" + + CATEGORY = "advanced/conditioning" + + def set_range(self, conditioning, start, end): + c = node_helpers.conditioning_set_values(conditioning, {"start_percent": start, + "end_percent": end}) + return (c, ) + +class VAEDecode: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "samples": ("LATENT", {"tooltip": "The latent to be decoded."}), + "vae": ("VAE", {"tooltip": "The VAE model used for decoding the latent."}) + } + } + RETURN_TYPES = ("IMAGE",) + OUTPUT_TOOLTIPS = ("The decoded image.",) + FUNCTION = "decode" + + CATEGORY = "latent" + DESCRIPTION = "Decodes latent images back into pixel space images." + SEARCH_ALIASES = ["decode", "decode latent", "latent to image", "render latent"] + + def decode(self, vae, samples): + latent = samples["samples"] + if latent.is_nested: + latent = latent.unbind()[0] + + images = vae.decode(latent) + if len(images.shape) == 5: #Combine batches + images = images.reshape(-1, images.shape[-3], images.shape[-2], images.shape[-1]) + return (images, ) + +class VAEDecodeTiled: + @classmethod + def INPUT_TYPES(s): + return {"required": {"samples": ("LATENT", ), "vae": ("VAE", ), + "tile_size": ("INT", {"default": 512, "min": 64, "max": 4096, "step": 32}), + "overlap": ("INT", {"default": 64, "min": 0, "max": 4096, "step": 32}), + "temporal_size": ("INT", {"default": 64, "min": 8, "max": 4096, "step": 4, "tooltip": "Only used for video VAEs: Amount of frames to decode at a time."}), + "temporal_overlap": ("INT", {"default": 8, "min": 4, "max": 4096, "step": 4, "tooltip": "Only used for video VAEs: Amount of frames to overlap."}), + }} + RETURN_TYPES = ("IMAGE",) + FUNCTION = "decode" + + CATEGORY = "_for_testing" + + def decode(self, vae, samples, tile_size, overlap=64, temporal_size=64, temporal_overlap=8): + if tile_size < overlap * 4: + overlap = tile_size // 4 + if temporal_size < temporal_overlap * 2: + temporal_overlap = temporal_overlap // 2 + temporal_compression = vae.temporal_compression_decode() + if temporal_compression is not None: + temporal_size = max(2, temporal_size // temporal_compression) + temporal_overlap = max(1, min(temporal_size // 2, temporal_overlap // temporal_compression)) + else: + temporal_size = None + temporal_overlap = None + + compression = vae.spacial_compression_decode() + images = vae.decode_tiled(samples["samples"], tile_x=tile_size // compression, tile_y=tile_size // compression, overlap=overlap // compression, tile_t=temporal_size, overlap_t=temporal_overlap) + if len(images.shape) == 5: #Combine batches + images = images.reshape(-1, images.shape[-3], images.shape[-2], images.shape[-1]) + return (images, ) + +class VAEEncode: + @classmethod + def INPUT_TYPES(s): + return {"required": { "pixels": ("IMAGE", ), "vae": ("VAE", )}} + RETURN_TYPES = ("LATENT",) + FUNCTION = "encode" + + CATEGORY = "latent" + SEARCH_ALIASES = ["encode", "encode image", "image to latent"] + + def encode(self, vae, pixels): + t = vae.encode(pixels) + return ({"samples":t}, ) + +class VAEEncodeTiled: + @classmethod + def INPUT_TYPES(s): + return {"required": {"pixels": ("IMAGE", ), "vae": ("VAE", ), + "tile_size": ("INT", {"default": 512, "min": 64, "max": 4096, "step": 64}), + "overlap": ("INT", {"default": 64, "min": 0, "max": 4096, "step": 32}), + "temporal_size": ("INT", {"default": 64, "min": 8, "max": 4096, "step": 4, "tooltip": "Only used for video VAEs: Amount of frames to encode at a time."}), + "temporal_overlap": ("INT", {"default": 8, "min": 4, "max": 4096, "step": 4, "tooltip": "Only used for video VAEs: Amount of frames to overlap."}), + }} + RETURN_TYPES = ("LATENT",) + FUNCTION = "encode" + + CATEGORY = "_for_testing" + + def encode(self, vae, pixels, tile_size, overlap, temporal_size=64, temporal_overlap=8): + t = vae.encode_tiled(pixels, tile_x=tile_size, tile_y=tile_size, overlap=overlap, tile_t=temporal_size, overlap_t=temporal_overlap) + return ({"samples": t}, ) + +class VAEEncodeForInpaint: + @classmethod + def INPUT_TYPES(s): + return {"required": { "pixels": ("IMAGE", ), "vae": ("VAE", ), "mask": ("MASK", ), "grow_mask_by": ("INT", {"default": 6, "min": 0, "max": 64, "step": 1}),}} + RETURN_TYPES = ("LATENT",) + FUNCTION = "encode" + + CATEGORY = "latent/inpaint" + + def encode(self, vae, pixels, mask, grow_mask_by=6): + downscale_ratio = vae.spacial_compression_encode() + x = (pixels.shape[1] // downscale_ratio) * downscale_ratio + y = (pixels.shape[2] // downscale_ratio) * downscale_ratio + mask = torch.nn.functional.interpolate(mask.reshape((-1, 1, mask.shape[-2], mask.shape[-1])), size=(pixels.shape[1], pixels.shape[2]), mode="bilinear") + + pixels = pixels.clone() + if pixels.shape[1] != x or pixels.shape[2] != y: + x_offset = (pixels.shape[1] % downscale_ratio) // 2 + y_offset = (pixels.shape[2] % downscale_ratio) // 2 + pixels = pixels[:,x_offset:x + x_offset, y_offset:y + y_offset,:] + mask = mask[:,:,x_offset:x + x_offset, y_offset:y + y_offset] + + #grow mask by a few pixels to keep things seamless in latent space + if grow_mask_by == 0: + mask_erosion = mask + else: + kernel_tensor = torch.ones((1, 1, grow_mask_by, grow_mask_by)) + padding = math.ceil((grow_mask_by - 1) / 2) + + mask_erosion = torch.clamp(torch.nn.functional.conv2d(mask.round(), kernel_tensor, padding=padding), 0, 1) + + m = (1.0 - mask.round()).squeeze(1) + for i in range(3): + pixels[:,:,:,i] -= 0.5 + pixels[:,:,:,i] *= m + pixels[:,:,:,i] += 0.5 + t = vae.encode(pixels) + + return ({"samples":t, "noise_mask": (mask_erosion[:,:,:x,:y].round())}, ) + + +class InpaintModelConditioning: + @classmethod + def INPUT_TYPES(s): + return {"required": {"positive": ("CONDITIONING", ), + "negative": ("CONDITIONING", ), + "vae": ("VAE", ), + "pixels": ("IMAGE", ), + "mask": ("MASK", ), + "noise_mask": ("BOOLEAN", {"default": True, "tooltip": "Add a noise mask to the latent so sampling will only happen within the mask. Might improve results or completely break things depending on the model."}), + }} + + RETURN_TYPES = ("CONDITIONING","CONDITIONING","LATENT") + RETURN_NAMES = ("positive", "negative", "latent") + FUNCTION = "encode" + + CATEGORY = "conditioning/inpaint" + + def encode(self, positive, negative, pixels, vae, mask, noise_mask=True): + x = (pixels.shape[1] // 8) * 8 + y = (pixels.shape[2] // 8) * 8 + mask = torch.nn.functional.interpolate(mask.reshape((-1, 1, mask.shape[-2], mask.shape[-1])), size=(pixels.shape[1], pixels.shape[2]), mode="bilinear") + + orig_pixels = pixels + pixels = orig_pixels.clone() + if pixels.shape[1] != x or pixels.shape[2] != y: + x_offset = (pixels.shape[1] % 8) // 2 + y_offset = (pixels.shape[2] % 8) // 2 + pixels = pixels[:,x_offset:x + x_offset, y_offset:y + y_offset,:] + mask = mask[:,:,x_offset:x + x_offset, y_offset:y + y_offset] + + m = (1.0 - mask.round()).squeeze(1) + for i in range(3): + pixels[:,:,:,i] -= 0.5 + pixels[:,:,:,i] *= m + pixels[:,:,:,i] += 0.5 + concat_latent = vae.encode(pixels) + orig_latent = vae.encode(orig_pixels) + + out_latent = {} + + out_latent["samples"] = orig_latent + if noise_mask: + out_latent["noise_mask"] = mask + + out = [] + for conditioning in [positive, negative]: + c = node_helpers.conditioning_set_values(conditioning, {"concat_latent_image": concat_latent, + "concat_mask": mask}) + out.append(c) + return (out[0], out[1], out_latent) + + +class SaveLatent: + SEARCH_ALIASES = ["export latent"] + + def __init__(self): + self.output_dir = folder_paths.get_output_directory() + + @classmethod + def INPUT_TYPES(s): + return {"required": { "samples": ("LATENT", ), + "filename_prefix": ("STRING", {"default": "latents/ComfyUI"})}, + "hidden": {"prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO"}, + } + RETURN_TYPES = () + FUNCTION = "save" + + OUTPUT_NODE = True + + CATEGORY = "_for_testing" + + def save(self, samples, filename_prefix="ComfyUI", prompt=None, extra_pnginfo=None): + full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir) + + # support save metadata for latent sharing + prompt_info = "" + if prompt is not None: + prompt_info = json.dumps(prompt) + + metadata = None + if not args.disable_metadata: + metadata = {"prompt": prompt_info} + if extra_pnginfo is not None: + for x in extra_pnginfo: + metadata[x] = json.dumps(extra_pnginfo[x]) + + file = f"{filename}_{counter:05}_.latent" + + results: list[FileLocator] = [] + results.append({ + "filename": file, + "subfolder": subfolder, + "type": "output" + }) + + file = os.path.join(full_output_folder, file) + + output = {} + output["latent_tensor"] = samples["samples"].contiguous() + output["latent_format_version_0"] = torch.tensor([]) + + comfy.utils.save_torch_file(output, file, metadata=metadata) + return { "ui": { "latents": results } } + + +class LoadLatent: + SEARCH_ALIASES = ["import latent", "open latent"] + + @classmethod + def INPUT_TYPES(s): + input_dir = folder_paths.get_input_directory() + files = [f for f in os.listdir(input_dir) if os.path.isfile(os.path.join(input_dir, f)) and f.endswith(".latent")] + return {"required": {"latent": [sorted(files), ]}, } + + CATEGORY = "_for_testing" + + RETURN_TYPES = ("LATENT", ) + FUNCTION = "load" + + def load(self, latent): + latent_path = folder_paths.get_annotated_filepath(latent) + latent = safetensors.torch.load_file(latent_path, device="cpu") + multiplier = 1.0 + if "latent_format_version_0" not in latent: + multiplier = 1.0 / 0.18215 + samples = {"samples": latent["latent_tensor"].float() * multiplier} + return (samples, ) + + @classmethod + def IS_CHANGED(s, latent): + image_path = folder_paths.get_annotated_filepath(latent) + m = hashlib.sha256() + with open(image_path, 'rb') as f: + m.update(f.read()) + return m.digest().hex() + + @classmethod + def VALIDATE_INPUTS(s, latent): + if not folder_paths.exists_annotated_filepath(latent): + return "Invalid latent file: {}".format(latent) + return True + + +class CheckpointLoader: + SEARCH_ALIASES = ["load model", "model loader"] + + @classmethod + def INPUT_TYPES(s): + return {"required": { "config_name": (folder_paths.get_filename_list("configs"), ), + "ckpt_name": (folder_paths.get_filename_list("checkpoints"), )}} + RETURN_TYPES = ("MODEL", "CLIP", "VAE") + FUNCTION = "load_checkpoint" + + CATEGORY = "advanced/loaders" + DEPRECATED = True + + def load_checkpoint(self, config_name, ckpt_name): + config_path = folder_paths.get_full_path("configs", config_name) + ckpt_path = folder_paths.get_full_path_or_raise("checkpoints", ckpt_name) + return comfy.sd.load_checkpoint(config_path, ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings")) + +class CheckpointLoaderSimple: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "ckpt_name": (folder_paths.get_filename_list("checkpoints"), {"tooltip": "The name of the checkpoint (model) to load."}), + } + } + RETURN_TYPES = ("MODEL", "CLIP", "VAE") + OUTPUT_TOOLTIPS = ("The model used for denoising latents.", + "The CLIP model used for encoding text prompts.", + "The VAE model used for encoding and decoding images to and from latent space.") + FUNCTION = "load_checkpoint" + + CATEGORY = "loaders" + DESCRIPTION = "Loads a diffusion model checkpoint, diffusion models are used to denoise latents." + SEARCH_ALIASES = ["load model", "checkpoint", "model loader", "load checkpoint", "ckpt", "model"] + + def load_checkpoint(self, ckpt_name): + ckpt_path = folder_paths.get_full_path_or_raise("checkpoints", ckpt_name) + out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings")) + return out[:3] + +class DiffusersLoader: + SEARCH_ALIASES = ["load diffusers model"] + + @classmethod + def INPUT_TYPES(cls): + paths = [] + for search_path in folder_paths.get_folder_paths("diffusers"): + if os.path.exists(search_path): + for root, subdir, files in os.walk(search_path, followlinks=True): + if "model_index.json" in files: + paths.append(os.path.relpath(root, start=search_path)) + + return {"required": {"model_path": (paths,), }} + RETURN_TYPES = ("MODEL", "CLIP", "VAE") + FUNCTION = "load_checkpoint" + + CATEGORY = "advanced/loaders/deprecated" + + def load_checkpoint(self, model_path, output_vae=True, output_clip=True): + for search_path in folder_paths.get_folder_paths("diffusers"): + if os.path.exists(search_path): + path = os.path.join(search_path, model_path) + if os.path.exists(path): + model_path = path + break + + return comfy.diffusers_load.load_diffusers(model_path, output_vae=output_vae, output_clip=output_clip, embedding_directory=folder_paths.get_folder_paths("embeddings")) + + +class unCLIPCheckpointLoader: + @classmethod + def INPUT_TYPES(s): + return {"required": { "ckpt_name": (folder_paths.get_filename_list("checkpoints"), ), + }} + RETURN_TYPES = ("MODEL", "CLIP", "VAE", "CLIP_VISION") + FUNCTION = "load_checkpoint" + + CATEGORY = "loaders" + + def load_checkpoint(self, ckpt_name, output_vae=True, output_clip=True): + ckpt_path = folder_paths.get_full_path_or_raise("checkpoints", ckpt_name) + out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, output_clipvision=True, embedding_directory=folder_paths.get_folder_paths("embeddings")) + return out + +class CLIPSetLastLayer: + @classmethod + def INPUT_TYPES(s): + return {"required": { "clip": ("CLIP", ), + "stop_at_clip_layer": ("INT", {"default": -1, "min": -24, "max": -1, "step": 1}), + }} + RETURN_TYPES = ("CLIP",) + FUNCTION = "set_last_layer" + + CATEGORY = "conditioning" + + def set_last_layer(self, clip, stop_at_clip_layer): + clip = clip.clone() + clip.clip_layer(stop_at_clip_layer) + return (clip,) + +class LoraLoader: + def __init__(self): + self.loaded_lora = None + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "model": ("MODEL", {"tooltip": "The diffusion model the LoRA will be applied to."}), + "clip": ("CLIP", {"tooltip": "The CLIP model the LoRA will be applied to."}), + "lora_name": (folder_paths.get_filename_list("loras"), {"tooltip": "The name of the LoRA."}), + "strength_model": ("FLOAT", {"default": 1.0, "min": -100.0, "max": 100.0, "step": 0.01, "tooltip": "How strongly to modify the diffusion model. This value can be negative."}), + "strength_clip": ("FLOAT", {"default": 1.0, "min": -100.0, "max": 100.0, "step": 0.01, "tooltip": "How strongly to modify the CLIP model. This value can be negative."}), + } + } + + RETURN_TYPES = ("MODEL", "CLIP") + OUTPUT_TOOLTIPS = ("The modified diffusion model.", "The modified CLIP model.") + FUNCTION = "load_lora" + + CATEGORY = "loaders" + DESCRIPTION = "LoRAs are used to modify diffusion and CLIP models, altering the way in which latents are denoised such as applying styles. Multiple LoRA nodes can be linked together." + SEARCH_ALIASES = ["lora", "load lora", "apply lora", "lora loader", "lora model"] + + def load_lora(self, model, clip, lora_name, strength_model, strength_clip): + if strength_model == 0 and strength_clip == 0: + return (model, clip) + + lora_path = folder_paths.get_full_path_or_raise("loras", lora_name) + lora = None + if self.loaded_lora is not None: + if self.loaded_lora[0] == lora_path: + lora = self.loaded_lora[1] + else: + self.loaded_lora = None + + if lora is None: + lora = comfy.utils.load_torch_file(lora_path, safe_load=True) + self.loaded_lora = (lora_path, lora) + + model_lora, clip_lora = comfy.sd.load_lora_for_models(model, clip, lora, strength_model, strength_clip) + return (model_lora, clip_lora) + +class LoraLoaderModelOnly(LoraLoader): + @classmethod + def INPUT_TYPES(s): + return {"required": { "model": ("MODEL",), + "lora_name": (folder_paths.get_filename_list("loras"), ), + "strength_model": ("FLOAT", {"default": 1.0, "min": -100.0, "max": 100.0, "step": 0.01}), + }} + RETURN_TYPES = ("MODEL",) + FUNCTION = "load_lora_model_only" + + def load_lora_model_only(self, model, lora_name, strength_model): + return (self.load_lora(model, None, lora_name, strength_model, 0)[0],) + +class VAELoader: + video_taes = ["taehv", "lighttaew2_2", "lighttaew2_1", "lighttaehy1_5", "taeltx_2"] + image_taes = ["taesd", "taesdxl", "taesd3", "taef1"] + @staticmethod + def vae_list(s): + vaes = folder_paths.get_filename_list("vae") + approx_vaes = folder_paths.get_filename_list("vae_approx") + sdxl_taesd_enc = False + sdxl_taesd_dec = False + sd1_taesd_enc = False + sd1_taesd_dec = False + sd3_taesd_enc = False + sd3_taesd_dec = False + f1_taesd_enc = False + f1_taesd_dec = False + + for v in approx_vaes: + if v.startswith("taesd_decoder."): + sd1_taesd_dec = True + elif v.startswith("taesd_encoder."): + sd1_taesd_enc = True + elif v.startswith("taesdxl_decoder."): + sdxl_taesd_dec = True + elif v.startswith("taesdxl_encoder."): + sdxl_taesd_enc = True + elif v.startswith("taesd3_decoder."): + sd3_taesd_dec = True + elif v.startswith("taesd3_encoder."): + sd3_taesd_enc = True + elif v.startswith("taef1_encoder."): + f1_taesd_dec = True + elif v.startswith("taef1_decoder."): + f1_taesd_enc = True + else: + for tae in s.video_taes: + if v.startswith(tae): + vaes.append(v) + + if sd1_taesd_dec and sd1_taesd_enc: + vaes.append("taesd") + if sdxl_taesd_dec and sdxl_taesd_enc: + vaes.append("taesdxl") + if sd3_taesd_dec and sd3_taesd_enc: + vaes.append("taesd3") + if f1_taesd_dec and f1_taesd_enc: + vaes.append("taef1") + vaes.append("pixel_space") + return vaes + + @staticmethod + def load_taesd(name): + sd = {} + approx_vaes = folder_paths.get_filename_list("vae_approx") + + encoder = next(filter(lambda a: a.startswith("{}_encoder.".format(name)), approx_vaes)) + decoder = next(filter(lambda a: a.startswith("{}_decoder.".format(name)), approx_vaes)) + + enc = comfy.utils.load_torch_file(folder_paths.get_full_path_or_raise("vae_approx", encoder)) + for k in enc: + sd["taesd_encoder.{}".format(k)] = enc[k] + + dec = comfy.utils.load_torch_file(folder_paths.get_full_path_or_raise("vae_approx", decoder)) + for k in dec: + sd["taesd_decoder.{}".format(k)] = dec[k] + + if name == "taesd": + sd["vae_scale"] = torch.tensor(0.18215) + sd["vae_shift"] = torch.tensor(0.0) + elif name == "taesdxl": + sd["vae_scale"] = torch.tensor(0.13025) + sd["vae_shift"] = torch.tensor(0.0) + elif name == "taesd3": + sd["vae_scale"] = torch.tensor(1.5305) + sd["vae_shift"] = torch.tensor(0.0609) + elif name == "taef1": + sd["vae_scale"] = torch.tensor(0.3611) + sd["vae_shift"] = torch.tensor(0.1159) + return sd + + @classmethod + def INPUT_TYPES(s): + return {"required": { "vae_name": (s.vae_list(s), )}} + RETURN_TYPES = ("VAE",) + FUNCTION = "load_vae" + + CATEGORY = "loaders" + + #TODO: scale factor? + def load_vae(self, vae_name): + metadata = None + if vae_name == "pixel_space": + sd = {} + sd["pixel_space_vae"] = torch.tensor(1.0) + elif vae_name in self.image_taes: + sd = self.load_taesd(vae_name) + else: + if os.path.splitext(vae_name)[0] in self.video_taes: + vae_path = folder_paths.get_full_path_or_raise("vae_approx", vae_name) + else: + vae_path = folder_paths.get_full_path_or_raise("vae", vae_name) + sd, metadata = comfy.utils.load_torch_file(vae_path, return_metadata=True) + vae = comfy.sd.VAE(sd=sd, metadata=metadata) + vae.throw_exception_if_invalid() + return (vae,) + +class ControlNetLoader: + @classmethod + def INPUT_TYPES(s): + return {"required": { "control_net_name": (folder_paths.get_filename_list("controlnet"), )}} + + RETURN_TYPES = ("CONTROL_NET",) + FUNCTION = "load_controlnet" + + CATEGORY = "loaders" + SEARCH_ALIASES = ["controlnet", "control net", "cn", "load controlnet", "controlnet loader"] + + def load_controlnet(self, control_net_name): + controlnet_path = folder_paths.get_full_path_or_raise("controlnet", control_net_name) + controlnet = comfy.controlnet.load_controlnet(controlnet_path) + if controlnet is None: + raise RuntimeError("ERROR: controlnet file is invalid and does not contain a valid controlnet model.") + return (controlnet,) + +class DiffControlNetLoader: + @classmethod + def INPUT_TYPES(s): + return {"required": { "model": ("MODEL",), + "control_net_name": (folder_paths.get_filename_list("controlnet"), )}} + + RETURN_TYPES = ("CONTROL_NET",) + FUNCTION = "load_controlnet" + + CATEGORY = "loaders" + + def load_controlnet(self, model, control_net_name): + controlnet_path = folder_paths.get_full_path_or_raise("controlnet", control_net_name) + controlnet = comfy.controlnet.load_controlnet(controlnet_path, model) + return (controlnet,) + + +class ControlNetApply: + @classmethod + def INPUT_TYPES(s): + return {"required": {"conditioning": ("CONDITIONING", ), + "control_net": ("CONTROL_NET", ), + "image": ("IMAGE", ), + "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}) + }} + RETURN_TYPES = ("CONDITIONING",) + FUNCTION = "apply_controlnet" + + DEPRECATED = True + CATEGORY = "conditioning/controlnet" + + def apply_controlnet(self, conditioning, control_net, image, strength): + if strength == 0: + return (conditioning, ) + + c = [] + control_hint = image.movedim(-1,1) + for t in conditioning: + n = [t[0], t[1].copy()] + c_net = control_net.copy().set_cond_hint(control_hint, strength) + if 'control' in t[1]: + c_net.set_previous_controlnet(t[1]['control']) + n[1]['control'] = c_net + n[1]['control_apply_to_uncond'] = True + c.append(n) + return (c, ) + + +class ControlNetApplyAdvanced: + @classmethod + def INPUT_TYPES(s): + return {"required": {"positive": ("CONDITIONING", ), + "negative": ("CONDITIONING", ), + "control_net": ("CONTROL_NET", ), + "image": ("IMAGE", ), + "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}), + "start_percent": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001}), + "end_percent": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001}) + }, + "optional": {"vae": ("VAE", ), + } + } + + RETURN_TYPES = ("CONDITIONING","CONDITIONING") + RETURN_NAMES = ("positive", "negative") + FUNCTION = "apply_controlnet" + + CATEGORY = "conditioning/controlnet" + SEARCH_ALIASES = ["controlnet", "apply controlnet", "use controlnet", "control net"] + + def apply_controlnet(self, positive, negative, control_net, image, strength, start_percent, end_percent, vae=None, extra_concat=[]): + if strength == 0: + return (positive, negative) + + control_hint = image.movedim(-1,1) + cnets = {} + + out = [] + for conditioning in [positive, negative]: + c = [] + for t in conditioning: + d = t[1].copy() + + prev_cnet = d.get('control', None) + if prev_cnet in cnets: + c_net = cnets[prev_cnet] + else: + c_net = control_net.copy().set_cond_hint(control_hint, strength, (start_percent, end_percent), vae=vae, extra_concat=extra_concat) + c_net.set_previous_controlnet(prev_cnet) + cnets[prev_cnet] = c_net + + d['control'] = c_net + d['control_apply_to_uncond'] = False + n = [t[0], d] + c.append(n) + out.append(c) + return (out[0], out[1]) + + +class UNETLoader: + @classmethod + def INPUT_TYPES(s): + return {"required": { "unet_name": (folder_paths.get_filename_list("diffusion_models"), ), + "weight_dtype": (["default", "fp8_e4m3fn", "fp8_e4m3fn_fast", "fp8_e5m2"],) + }} + RETURN_TYPES = ("MODEL",) + FUNCTION = "load_unet" + + CATEGORY = "advanced/loaders" + + def load_unet(self, unet_name, weight_dtype): + model_options = {} + if weight_dtype == "fp8_e4m3fn": + model_options["dtype"] = torch.float8_e4m3fn + elif weight_dtype == "fp8_e4m3fn_fast": + model_options["dtype"] = torch.float8_e4m3fn + model_options["fp8_optimizations"] = True + elif weight_dtype == "fp8_e5m2": + model_options["dtype"] = torch.float8_e5m2 + + unet_path = folder_paths.get_full_path_or_raise("diffusion_models", unet_name) + model = comfy.sd.load_diffusion_model(unet_path, model_options=model_options) + return (model,) + +class CLIPLoader: + @classmethod + def INPUT_TYPES(s): + return {"required": { "clip_name": (folder_paths.get_filename_list("text_encoders"), ), + "type": (["stable_diffusion", "stable_cascade", "sd3", "stable_audio", "mochi", "ltxv", "pixart", "cosmos", "lumina2", "wan", "hidream", "chroma", "ace", "omnigen2", "qwen_image", "hunyuan_image", "flux2", "ovis"], ), + }, + "optional": { + "device": (["default", "cpu"], {"advanced": True}), + }} + RETURN_TYPES = ("CLIP",) + FUNCTION = "load_clip" + + CATEGORY = "advanced/loaders" + + DESCRIPTION = "[Recipes]\n\nstable_diffusion: clip-l\nstable_cascade: clip-g\nsd3: t5 xxl/ clip-g / clip-l\nstable_audio: t5 base\nmochi: t5 xxl\ncosmos: old t5 xxl\nlumina2: gemma 2 2B\nwan: umt5 xxl\n hidream: llama-3.1 (Recommend) or t5\nomnigen2: qwen vl 2.5 3B" + + def load_clip(self, clip_name, type="stable_diffusion", device="default"): + clip_type = getattr(comfy.sd.CLIPType, type.upper(), comfy.sd.CLIPType.STABLE_DIFFUSION) + + model_options = {} + if device == "cpu": + model_options["load_device"] = model_options["offload_device"] = torch.device("cpu") + + clip_path = folder_paths.get_full_path_or_raise("text_encoders", clip_name) + clip = comfy.sd.load_clip(ckpt_paths=[clip_path], embedding_directory=folder_paths.get_folder_paths("embeddings"), clip_type=clip_type, model_options=model_options) + return (clip,) + +class DualCLIPLoader: + @classmethod + def INPUT_TYPES(s): + return {"required": { "clip_name1": (folder_paths.get_filename_list("text_encoders"), ), + "clip_name2": (folder_paths.get_filename_list("text_encoders"), ), + "type": (["sdxl", "sd3", "flux", "hunyuan_video", "hidream", "hunyuan_image", "hunyuan_video_15", "kandinsky5", "kandinsky5_image", "ltxv", "newbie", "ace"], ), + }, + "optional": { + "device": (["default", "cpu"], {"advanced": True}), + }} + RETURN_TYPES = ("CLIP",) + FUNCTION = "load_clip" + + CATEGORY = "advanced/loaders" + + DESCRIPTION = "[Recipes]\n\nsdxl: clip-l, clip-g\nsd3: clip-l, clip-g / clip-l, t5 / clip-g, t5\nflux: clip-l, t5\nhidream: at least one of t5 or llama, recommended t5 and llama\nhunyuan_image: qwen2.5vl 7b and byt5 small\nnewbie: gemma-3-4b-it, jina clip v2" + + def load_clip(self, clip_name1, clip_name2, type, device="default"): + clip_type = getattr(comfy.sd.CLIPType, type.upper(), comfy.sd.CLIPType.STABLE_DIFFUSION) + + clip_path1 = folder_paths.get_full_path_or_raise("text_encoders", clip_name1) + clip_path2 = folder_paths.get_full_path_or_raise("text_encoders", clip_name2) + + model_options = {} + if device == "cpu": + model_options["load_device"] = model_options["offload_device"] = torch.device("cpu") + + clip = comfy.sd.load_clip(ckpt_paths=[clip_path1, clip_path2], embedding_directory=folder_paths.get_folder_paths("embeddings"), clip_type=clip_type, model_options=model_options) + return (clip,) + +class CLIPVisionLoader: + @classmethod + def INPUT_TYPES(s): + return {"required": { "clip_name": (folder_paths.get_filename_list("clip_vision"), ), + }} + RETURN_TYPES = ("CLIP_VISION",) + FUNCTION = "load_clip" + + CATEGORY = "loaders" + + def load_clip(self, clip_name): + clip_path = folder_paths.get_full_path_or_raise("clip_vision", clip_name) + clip_vision = comfy.clip_vision.load(clip_path) + if clip_vision is None: + raise RuntimeError("ERROR: clip vision file is invalid and does not contain a valid vision model.") + return (clip_vision,) + +class CLIPVisionEncode: + @classmethod + def INPUT_TYPES(s): + return {"required": { "clip_vision": ("CLIP_VISION",), + "image": ("IMAGE",), + "crop": (["center", "none"],) + }} + RETURN_TYPES = ("CLIP_VISION_OUTPUT",) + FUNCTION = "encode" + + CATEGORY = "conditioning" + + def encode(self, clip_vision, image, crop): + crop_image = True + if crop != "center": + crop_image = False + output = clip_vision.encode_image(image, crop=crop_image) + return (output,) + +class StyleModelLoader: + @classmethod + def INPUT_TYPES(s): + return {"required": { "style_model_name": (folder_paths.get_filename_list("style_models"), )}} + + RETURN_TYPES = ("STYLE_MODEL",) + FUNCTION = "load_style_model" + + CATEGORY = "loaders" + + def load_style_model(self, style_model_name): + style_model_path = folder_paths.get_full_path_or_raise("style_models", style_model_name) + style_model = comfy.sd.load_style_model(style_model_path) + return (style_model,) + + +class StyleModelApply: + SEARCH_ALIASES = ["style transfer"] + + @classmethod + def INPUT_TYPES(s): + return {"required": {"conditioning": ("CONDITIONING", ), + "style_model": ("STYLE_MODEL", ), + "clip_vision_output": ("CLIP_VISION_OUTPUT", ), + "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.001}), + "strength_type": (["multiply", "attn_bias"], ), + }} + RETURN_TYPES = ("CONDITIONING",) + FUNCTION = "apply_stylemodel" + + CATEGORY = "conditioning/style_model" + + def apply_stylemodel(self, conditioning, style_model, clip_vision_output, strength, strength_type): + cond = style_model.get_cond(clip_vision_output).flatten(start_dim=0, end_dim=1).unsqueeze(dim=0) + if strength_type == "multiply": + cond *= strength + + n = cond.shape[1] + c_out = [] + for t in conditioning: + (txt, keys) = t + keys = keys.copy() + # even if the strength is 1.0 (i.e, no change), if there's already a mask, we have to add to it + if "attention_mask" in keys or (strength_type == "attn_bias" and strength != 1.0): + # math.log raises an error if the argument is zero + # torch.log returns -inf, which is what we want + attn_bias = torch.log(torch.Tensor([strength if strength_type == "attn_bias" else 1.0])) + # get the size of the mask image + mask_ref_size = keys.get("attention_mask_img_shape", (1, 1)) + n_ref = mask_ref_size[0] * mask_ref_size[1] + n_txt = txt.shape[1] + # grab the existing mask + mask = keys.get("attention_mask", None) + # create a default mask if it doesn't exist + if mask is None: + mask = torch.zeros((txt.shape[0], n_txt + n_ref, n_txt + n_ref), dtype=torch.float16) + # convert the mask dtype, because it might be boolean + # we want it to be interpreted as a bias + if mask.dtype == torch.bool: + # log(True) = log(1) = 0 + # log(False) = log(0) = -inf + mask = torch.log(mask.to(dtype=torch.float16)) + # now we make the mask bigger to add space for our new tokens + new_mask = torch.zeros((txt.shape[0], n_txt + n + n_ref, n_txt + n + n_ref), dtype=torch.float16) + # copy over the old mask, in quandrants + new_mask[:, :n_txt, :n_txt] = mask[:, :n_txt, :n_txt] + new_mask[:, :n_txt, n_txt+n:] = mask[:, :n_txt, n_txt:] + new_mask[:, n_txt+n:, :n_txt] = mask[:, n_txt:, :n_txt] + new_mask[:, n_txt+n:, n_txt+n:] = mask[:, n_txt:, n_txt:] + # now fill in the attention bias to our redux tokens + new_mask[:, :n_txt, n_txt:n_txt+n] = attn_bias + new_mask[:, n_txt+n:, n_txt:n_txt+n] = attn_bias + keys["attention_mask"] = new_mask.to(txt.device) + keys["attention_mask_img_shape"] = mask_ref_size + + c_out.append([torch.cat((txt, cond), dim=1), keys]) + + return (c_out,) + +class unCLIPConditioning: + @classmethod + def INPUT_TYPES(s): + return {"required": {"conditioning": ("CONDITIONING", ), + "clip_vision_output": ("CLIP_VISION_OUTPUT", ), + "strength": ("FLOAT", {"default": 1.0, "min": -10.0, "max": 10.0, "step": 0.01}), + "noise_augmentation": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.01}), + }} + RETURN_TYPES = ("CONDITIONING",) + FUNCTION = "apply_adm" + + CATEGORY = "conditioning" + + def apply_adm(self, conditioning, clip_vision_output, strength, noise_augmentation): + if strength == 0: + return (conditioning, ) + + c = node_helpers.conditioning_set_values(conditioning, {"unclip_conditioning": [{"clip_vision_output": clip_vision_output, "strength": strength, "noise_augmentation": noise_augmentation}]}, append=True) + return (c, ) + +class GLIGENLoader: + @classmethod + def INPUT_TYPES(s): + return {"required": { "gligen_name": (folder_paths.get_filename_list("gligen"), )}} + + RETURN_TYPES = ("GLIGEN",) + FUNCTION = "load_gligen" + + CATEGORY = "loaders" + + def load_gligen(self, gligen_name): + gligen_path = folder_paths.get_full_path_or_raise("gligen", gligen_name) + gligen = comfy.sd.load_gligen(gligen_path) + return (gligen,) + +class GLIGENTextBoxApply: + @classmethod + def INPUT_TYPES(s): + return {"required": {"conditioning_to": ("CONDITIONING", ), + "clip": ("CLIP", ), + "gligen_textbox_model": ("GLIGEN", ), + "text": ("STRING", {"multiline": True, "dynamicPrompts": True}), + "width": ("INT", {"default": 64, "min": 8, "max": MAX_RESOLUTION, "step": 8}), + "height": ("INT", {"default": 64, "min": 8, "max": MAX_RESOLUTION, "step": 8}), + "x": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "y": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + }} + RETURN_TYPES = ("CONDITIONING",) + FUNCTION = "append" + + CATEGORY = "conditioning/gligen" + + def append(self, conditioning_to, clip, gligen_textbox_model, text, width, height, x, y): + c = [] + cond, cond_pooled = clip.encode_from_tokens(clip.tokenize(text), return_pooled="unprojected") + for t in conditioning_to: + n = [t[0], t[1].copy()] + position_params = [(cond_pooled, height // 8, width // 8, y // 8, x // 8)] + prev = [] + if "gligen" in n[1]: + prev = n[1]['gligen'][2] + + n[1]['gligen'] = ("position", gligen_textbox_model, prev + position_params) + c.append(n) + return (c, ) + +class EmptyLatentImage: + def __init__(self): + self.device = comfy.model_management.intermediate_device() + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "width": ("INT", {"default": 512, "min": 16, "max": MAX_RESOLUTION, "step": 8, "tooltip": "The width of the latent images in pixels."}), + "height": ("INT", {"default": 512, "min": 16, "max": MAX_RESOLUTION, "step": 8, "tooltip": "The height of the latent images in pixels."}), + "batch_size": ("INT", {"default": 1, "min": 1, "max": 4096, "tooltip": "The number of latent images in the batch."}) + } + } + RETURN_TYPES = ("LATENT",) + OUTPUT_TOOLTIPS = ("The empty latent image batch.",) + FUNCTION = "generate" + + CATEGORY = "latent" + DESCRIPTION = "Create a new batch of empty latent images to be denoised via sampling." + SEARCH_ALIASES = ["empty", "empty latent", "new latent", "create latent", "blank latent", "blank"] + + def generate(self, width, height, batch_size=1): + latent = torch.zeros([batch_size, 4, height // 8, width // 8], device=self.device) + return ({"samples": latent, "downscale_ratio_spacial": 8}, ) + + +class LatentFromBatch: + SEARCH_ALIASES = ["select from batch", "pick latent", "batch subset"] + + @classmethod + def INPUT_TYPES(s): + return {"required": { "samples": ("LATENT",), + "batch_index": ("INT", {"default": 0, "min": 0, "max": 63}), + "length": ("INT", {"default": 1, "min": 1, "max": 64}), + }} + RETURN_TYPES = ("LATENT",) + FUNCTION = "frombatch" + + CATEGORY = "latent/batch" + + def frombatch(self, samples, batch_index, length): + s = samples.copy() + s_in = samples["samples"] + batch_index = min(s_in.shape[0] - 1, batch_index) + length = min(s_in.shape[0] - batch_index, length) + s["samples"] = s_in[batch_index:batch_index + length].clone() + if "noise_mask" in samples: + masks = samples["noise_mask"] + if masks.shape[0] == 1: + s["noise_mask"] = masks.clone() + else: + if masks.shape[0] < s_in.shape[0]: + masks = masks.repeat(math.ceil(s_in.shape[0] / masks.shape[0]), 1, 1, 1)[:s_in.shape[0]] + s["noise_mask"] = masks[batch_index:batch_index + length].clone() + if "batch_index" not in s: + s["batch_index"] = [x for x in range(batch_index, batch_index+length)] + else: + s["batch_index"] = samples["batch_index"][batch_index:batch_index + length] + return (s,) + +class RepeatLatentBatch: + SEARCH_ALIASES = ["duplicate latent", "clone latent"] + + @classmethod + def INPUT_TYPES(s): + return {"required": { "samples": ("LATENT",), + "amount": ("INT", {"default": 1, "min": 1, "max": 64}), + }} + RETURN_TYPES = ("LATENT",) + FUNCTION = "repeat" + + CATEGORY = "latent/batch" + + def repeat(self, samples, amount): + s = samples.copy() + s_in = samples["samples"] + + s["samples"] = s_in.repeat((amount,) + ((1,) * (s_in.ndim - 1))) + if "noise_mask" in samples and samples["noise_mask"].shape[0] > 1: + masks = samples["noise_mask"] + if masks.shape[0] < s_in.shape[0]: + masks = masks.repeat((math.ceil(s_in.shape[0] / masks.shape[0]),) + ((1,) * (masks.ndim - 1)))[:s_in.shape[0]] + s["noise_mask"] = samples["noise_mask"].repeat((amount,) + ((1,) * (samples["noise_mask"].ndim - 1))) + if "batch_index" in s: + offset = max(s["batch_index"]) - min(s["batch_index"]) + 1 + s["batch_index"] = s["batch_index"] + [x + (i * offset) for i in range(1, amount) for x in s["batch_index"]] + return (s,) + +class LatentUpscale: + SEARCH_ALIASES = ["enlarge latent", "resize latent"] + + upscale_methods = ["nearest-exact", "bilinear", "area", "bicubic", "bislerp"] + crop_methods = ["disabled", "center"] + + @classmethod + def INPUT_TYPES(s): + return {"required": { "samples": ("LATENT",), "upscale_method": (s.upscale_methods,), + "width": ("INT", {"default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "height": ("INT", {"default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "crop": (s.crop_methods,)}} + RETURN_TYPES = ("LATENT",) + FUNCTION = "upscale" + + CATEGORY = "latent" + + def upscale(self, samples, upscale_method, width, height, crop): + if width == 0 and height == 0: + s = samples + else: + s = samples.copy() + + if width == 0: + height = max(64, height) + width = max(64, round(samples["samples"].shape[-1] * height / samples["samples"].shape[-2])) + elif height == 0: + width = max(64, width) + height = max(64, round(samples["samples"].shape[-2] * width / samples["samples"].shape[-1])) + else: + width = max(64, width) + height = max(64, height) + + s["samples"] = comfy.utils.common_upscale(samples["samples"], width // 8, height // 8, upscale_method, crop) + return (s,) + +class LatentUpscaleBy: + SEARCH_ALIASES = ["enlarge latent", "resize latent", "scale latent"] + + upscale_methods = ["nearest-exact", "bilinear", "area", "bicubic", "bislerp"] + + @classmethod + def INPUT_TYPES(s): + return {"required": { "samples": ("LATENT",), "upscale_method": (s.upscale_methods,), + "scale_by": ("FLOAT", {"default": 1.5, "min": 0.01, "max": 8.0, "step": 0.01}),}} + RETURN_TYPES = ("LATENT",) + FUNCTION = "upscale" + + CATEGORY = "latent" + + def upscale(self, samples, upscale_method, scale_by): + s = samples.copy() + width = round(samples["samples"].shape[-1] * scale_by) + height = round(samples["samples"].shape[-2] * scale_by) + s["samples"] = comfy.utils.common_upscale(samples["samples"], width, height, upscale_method, "disabled") + return (s,) + +class LatentRotate: + @classmethod + def INPUT_TYPES(s): + return {"required": { "samples": ("LATENT",), + "rotation": (["none", "90 degrees", "180 degrees", "270 degrees"],), + }} + RETURN_TYPES = ("LATENT",) + FUNCTION = "rotate" + + CATEGORY = "latent/transform" + + def rotate(self, samples, rotation): + s = samples.copy() + rotate_by = 0 + if rotation.startswith("90"): + rotate_by = 1 + elif rotation.startswith("180"): + rotate_by = 2 + elif rotation.startswith("270"): + rotate_by = 3 + + s["samples"] = torch.rot90(samples["samples"], k=rotate_by, dims=[3, 2]) + return (s,) + +class LatentFlip: + SEARCH_ALIASES = ["mirror latent"] + + @classmethod + def INPUT_TYPES(s): + return {"required": { "samples": ("LATENT",), + "flip_method": (["x-axis: vertically", "y-axis: horizontally"],), + }} + RETURN_TYPES = ("LATENT",) + FUNCTION = "flip" + + CATEGORY = "latent/transform" + + def flip(self, samples, flip_method): + s = samples.copy() + if flip_method.startswith("x"): + s["samples"] = torch.flip(samples["samples"], dims=[2]) + elif flip_method.startswith("y"): + s["samples"] = torch.flip(samples["samples"], dims=[3]) + + return (s,) + +class LatentComposite: + SEARCH_ALIASES = ["overlay latent", "layer latent", "paste latent"] + + @classmethod + def INPUT_TYPES(s): + return {"required": { "samples_to": ("LATENT",), + "samples_from": ("LATENT",), + "x": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "y": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "feather": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + }} + RETURN_TYPES = ("LATENT",) + FUNCTION = "composite" + + CATEGORY = "latent" + + def composite(self, samples_to, samples_from, x, y, composite_method="normal", feather=0): + x = x // 8 + y = y // 8 + feather = feather // 8 + samples_out = samples_to.copy() + s = samples_to["samples"].clone() + samples_to = samples_to["samples"] + samples_from = samples_from["samples"] + if feather == 0: + s[:,:,y:y+samples_from.shape[2],x:x+samples_from.shape[3]] = samples_from[:,:,:samples_to.shape[2] - y, :samples_to.shape[3] - x] + else: + samples_from = samples_from[:,:,:samples_to.shape[2] - y, :samples_to.shape[3] - x] + mask = torch.ones_like(samples_from) + for t in range(feather): + if y != 0: + mask[:,:,t:1+t,:] *= ((1.0/feather) * (t + 1)) + + if y + samples_from.shape[2] < samples_to.shape[2]: + mask[:,:,mask.shape[2] -1 -t: mask.shape[2]-t,:] *= ((1.0/feather) * (t + 1)) + if x != 0: + mask[:,:,:,t:1+t] *= ((1.0/feather) * (t + 1)) + if x + samples_from.shape[3] < samples_to.shape[3]: + mask[:,:,:,mask.shape[3]- 1 - t: mask.shape[3]- t] *= ((1.0/feather) * (t + 1)) + rev_mask = torch.ones_like(mask) - mask + s[:,:,y:y+samples_from.shape[2],x:x+samples_from.shape[3]] = samples_from[:,:,:samples_to.shape[2] - y, :samples_to.shape[3] - x] * mask + s[:,:,y:y+samples_from.shape[2],x:x+samples_from.shape[3]] * rev_mask + samples_out["samples"] = s + return (samples_out,) + +class LatentBlend: + SEARCH_ALIASES = ["mix latents", "interpolate latents"] + + @classmethod + def INPUT_TYPES(s): + return {"required": { + "samples1": ("LATENT",), + "samples2": ("LATENT",), + "blend_factor": ("FLOAT", { + "default": 0.5, + "min": 0, + "max": 1, + "step": 0.01 + }), + }} + + RETURN_TYPES = ("LATENT",) + FUNCTION = "blend" + + CATEGORY = "_for_testing" + + def blend(self, samples1, samples2, blend_factor:float, blend_mode: str="normal"): + + samples_out = samples1.copy() + samples1 = samples1["samples"] + samples2 = samples2["samples"] + + if samples1.shape != samples2.shape: + samples2.permute(0, 3, 1, 2) + samples2 = comfy.utils.common_upscale(samples2, samples1.shape[3], samples1.shape[2], 'bicubic', crop='center') + samples2.permute(0, 2, 3, 1) + + samples_blended = self.blend_mode(samples1, samples2, blend_mode) + samples_blended = samples1 * blend_factor + samples_blended * (1 - blend_factor) + samples_out["samples"] = samples_blended + return (samples_out,) + + def blend_mode(self, img1, img2, mode): + if mode == "normal": + return img2 + else: + raise ValueError(f"Unsupported blend mode: {mode}") + +class LatentCrop: + SEARCH_ALIASES = ["trim latent", "cut latent"] + + @classmethod + def INPUT_TYPES(s): + return {"required": { "samples": ("LATENT",), + "width": ("INT", {"default": 512, "min": 64, "max": MAX_RESOLUTION, "step": 8}), + "height": ("INT", {"default": 512, "min": 64, "max": MAX_RESOLUTION, "step": 8}), + "x": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "y": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + }} + RETURN_TYPES = ("LATENT",) + FUNCTION = "crop" + + CATEGORY = "latent/transform" + + def crop(self, samples, width, height, x, y): + s = samples.copy() + samples = samples['samples'] + x = x // 8 + y = y // 8 + + #enfonce minimum size of 64 + if x > (samples.shape[3] - 8): + x = samples.shape[3] - 8 + if y > (samples.shape[2] - 8): + y = samples.shape[2] - 8 + + new_height = height // 8 + new_width = width // 8 + to_x = new_width + x + to_y = new_height + y + s['samples'] = samples[:,:,y:to_y, x:to_x] + return (s,) + +class SetLatentNoiseMask: + @classmethod + def INPUT_TYPES(s): + return {"required": { "samples": ("LATENT",), + "mask": ("MASK",), + }} + RETURN_TYPES = ("LATENT",) + FUNCTION = "set_mask" + + CATEGORY = "latent/inpaint" + + def set_mask(self, samples, mask): + s = samples.copy() + s["noise_mask"] = mask.reshape((-1, 1, mask.shape[-2], mask.shape[-1])) + return (s,) + +def common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent, denoise=1.0, disable_noise=False, start_step=None, last_step=None, force_full_denoise=False): + latent_image = latent["samples"] + latent_image = comfy.sample.fix_empty_latent_channels(model, latent_image, latent.get("downscale_ratio_spacial", None)) + + if disable_noise: + noise = torch.zeros(latent_image.size(), dtype=latent_image.dtype, layout=latent_image.layout, device="cpu") + else: + batch_inds = latent["batch_index"] if "batch_index" in latent else None + noise = comfy.sample.prepare_noise(latent_image, seed, batch_inds) + + noise_mask = None + if "noise_mask" in latent: + noise_mask = latent["noise_mask"] + + callback = latent_preview.prepare_callback(model, steps) + disable_pbar = not comfy.utils.PROGRESS_BAR_ENABLED + samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, + denoise=denoise, disable_noise=disable_noise, start_step=start_step, last_step=last_step, + force_full_denoise=force_full_denoise, noise_mask=noise_mask, callback=callback, disable_pbar=disable_pbar, seed=seed) + out = latent.copy() + out.pop("downscale_ratio_spacial", None) + out["samples"] = samples + return (out, ) + +class KSampler: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "model": ("MODEL", {"tooltip": "The model used for denoising the input latent."}), + "seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff, "control_after_generate": True, "tooltip": "The random seed used for creating the noise."}), + "steps": ("INT", {"default": 20, "min": 1, "max": 10000, "tooltip": "The number of steps used in the denoising process."}), + "cfg": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":0.1, "round": 0.01, "tooltip": "The Classifier-Free Guidance scale balances creativity and adherence to the prompt. Higher values result in images more closely matching the prompt however too high values will negatively impact quality."}), + "sampler_name": (comfy.samplers.KSampler.SAMPLERS, {"tooltip": "The algorithm used when sampling, this can affect the quality, speed, and style of the generated output."}), + "scheduler": (comfy.samplers.KSampler.SCHEDULERS, {"tooltip": "The scheduler controls how noise is gradually removed to form the image."}), + "positive": ("CONDITIONING", {"tooltip": "The conditioning describing the attributes you want to include in the image."}), + "negative": ("CONDITIONING", {"tooltip": "The conditioning describing the attributes you want to exclude from the image."}), + "latent_image": ("LATENT", {"tooltip": "The latent image to denoise."}), + "denoise": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01, "tooltip": "The amount of denoising applied, lower values will maintain the structure of the initial image allowing for image to image sampling."}), + } + } + + RETURN_TYPES = ("LATENT",) + OUTPUT_TOOLTIPS = ("The denoised latent.",) + FUNCTION = "sample" + + CATEGORY = "sampling" + DESCRIPTION = "Uses the provided model, positive and negative conditioning to denoise the latent image." + SEARCH_ALIASES = ["sampler", "sample", "generate", "denoise", "diffuse", "txt2img", "img2img"] + + def sample(self, model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=1.0): + return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise) + +class KSamplerAdvanced: + @classmethod + def INPUT_TYPES(s): + return {"required": + {"model": ("MODEL",), + "add_noise": (["enable", "disable"], ), + "noise_seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff, "control_after_generate": True}), + "steps": ("INT", {"default": 20, "min": 1, "max": 10000}), + "cfg": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":0.1, "round": 0.01}), + "sampler_name": (comfy.samplers.KSampler.SAMPLERS, ), + "scheduler": (comfy.samplers.KSampler.SCHEDULERS, ), + "positive": ("CONDITIONING", ), + "negative": ("CONDITIONING", ), + "latent_image": ("LATENT", ), + "start_at_step": ("INT", {"default": 0, "min": 0, "max": 10000}), + "end_at_step": ("INT", {"default": 10000, "min": 0, "max": 10000}), + "return_with_leftover_noise": (["disable", "enable"], ), + } + } + + RETURN_TYPES = ("LATENT",) + FUNCTION = "sample" + + CATEGORY = "sampling" + + def sample(self, model, add_noise, noise_seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, start_at_step, end_at_step, return_with_leftover_noise, denoise=1.0): + force_full_denoise = True + if return_with_leftover_noise == "enable": + force_full_denoise = False + disable_noise = False + if add_noise == "disable": + disable_noise = True + return common_ksampler(model, noise_seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise, disable_noise=disable_noise, start_step=start_at_step, last_step=end_at_step, force_full_denoise=force_full_denoise) + +class SaveImage: + def __init__(self): + self.output_dir = folder_paths.get_output_directory() + self.type = "output" + self.prefix_append = "" + self.compress_level = 4 + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "images": ("IMAGE", {"tooltip": "The images to save."}), + "filename_prefix": ("STRING", {"default": "ComfyUI", "tooltip": "The prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes."}) + }, + "hidden": { + "prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO" + }, + } + + RETURN_TYPES = () + FUNCTION = "save_images" + + OUTPUT_NODE = True + + CATEGORY = "image" + DESCRIPTION = "Saves the input images to your ComfyUI output directory." + SEARCH_ALIASES = ["save", "save image", "export image", "output image", "write image", "download"] + + def save_images(self, images, filename_prefix="ComfyUI", prompt=None, extra_pnginfo=None): + filename_prefix += self.prefix_append + full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir, images[0].shape[1], images[0].shape[0]) + results = list() + for (batch_number, image) in enumerate(images): + i = 255. * image.cpu().numpy() + img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8)) + metadata = None + if not args.disable_metadata: + metadata = PngInfo() + if prompt is not None: + metadata.add_text("prompt", json.dumps(prompt)) + if extra_pnginfo is not None: + for x in extra_pnginfo: + metadata.add_text(x, json.dumps(extra_pnginfo[x])) + + filename_with_batch_num = filename.replace("%batch_num%", str(batch_number)) + file = f"{filename_with_batch_num}_{counter:05}_.png" + img.save(os.path.join(full_output_folder, file), pnginfo=metadata, compress_level=self.compress_level) + results.append({ + "filename": file, + "subfolder": subfolder, + "type": self.type + }) + counter += 1 + + return { "ui": { "images": results } } + +class PreviewImage(SaveImage): + def __init__(self): + self.output_dir = folder_paths.get_temp_directory() + self.type = "temp" + self.prefix_append = "_temp_" + ''.join(random.choice("abcdefghijklmnopqrstupvxyz") for x in range(5)) + self.compress_level = 1 + + SEARCH_ALIASES = ["preview", "preview image", "show image", "view image", "display image", "image viewer"] + + @classmethod + def INPUT_TYPES(s): + return {"required": + {"images": ("IMAGE", ), }, + "hidden": {"prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO"}, + } + +class LoadImage: + @classmethod + def INPUT_TYPES(s): + input_dir = folder_paths.get_input_directory() + files = [f for f in os.listdir(input_dir) if os.path.isfile(os.path.join(input_dir, f))] + files = folder_paths.filter_files_content_types(files, ["image"]) + return {"required": + {"image": (sorted(files), {"image_upload": True})}, + } + + CATEGORY = "image" + SEARCH_ALIASES = ["load image", "open image", "import image", "image input", "upload image", "read image", "image loader"] + + RETURN_TYPES = ("IMAGE", "MASK") + FUNCTION = "load_image" + def load_image(self, image): + image_path = folder_paths.get_annotated_filepath(image) + + img = node_helpers.pillow(Image.open, image_path) + + output_images = [] + output_masks = [] + w, h = None, None + + for i in ImageSequence.Iterator(img): + i = node_helpers.pillow(ImageOps.exif_transpose, i) + + if i.mode == 'I': + i = i.point(lambda i: i * (1 / 255)) + image = i.convert("RGB") + + if len(output_images) == 0: + w = image.size[0] + h = image.size[1] + + if image.size[0] != w or image.size[1] != h: + continue + + image = np.array(image).astype(np.float32) / 255.0 + image = torch.from_numpy(image)[None,] + if 'A' in i.getbands(): + mask = np.array(i.getchannel('A')).astype(np.float32) / 255.0 + mask = 1. - torch.from_numpy(mask) + elif i.mode == 'P' and 'transparency' in i.info: + mask = np.array(i.convert('RGBA').getchannel('A')).astype(np.float32) / 255.0 + mask = 1. - torch.from_numpy(mask) + else: + mask = torch.zeros((64,64), dtype=torch.float32, device="cpu") + output_images.append(image) + output_masks.append(mask.unsqueeze(0)) + + if img.format == "MPO": + break # ignore all frames except the first one for MPO format + + if len(output_images) > 1: + output_image = torch.cat(output_images, dim=0) + output_mask = torch.cat(output_masks, dim=0) + else: + output_image = output_images[0] + output_mask = output_masks[0] + + return (output_image, output_mask) + + @classmethod + def IS_CHANGED(s, image): + image_path = folder_paths.get_annotated_filepath(image) + m = hashlib.sha256() + with open(image_path, 'rb') as f: + m.update(f.read()) + return m.digest().hex() + + @classmethod + def VALIDATE_INPUTS(s, image): + if not folder_paths.exists_annotated_filepath(image): + return "Invalid image file: {}".format(image) + + return True + +class LoadImageMask: + SEARCH_ALIASES = ["import mask", "alpha mask", "channel mask"] + + _color_channels = ["alpha", "red", "green", "blue"] + @classmethod + def INPUT_TYPES(s): + input_dir = folder_paths.get_input_directory() + files = [f for f in os.listdir(input_dir) if os.path.isfile(os.path.join(input_dir, f))] + return {"required": + {"image": (sorted(files), {"image_upload": True}), + "channel": (s._color_channels, ), } + } + + CATEGORY = "mask" + + RETURN_TYPES = ("MASK",) + FUNCTION = "load_image" + def load_image(self, image, channel): + image_path = folder_paths.get_annotated_filepath(image) + i = node_helpers.pillow(Image.open, image_path) + i = node_helpers.pillow(ImageOps.exif_transpose, i) + if i.getbands() != ("R", "G", "B", "A"): + if i.mode == 'I': + i = i.point(lambda i: i * (1 / 255)) + i = i.convert("RGBA") + mask = None + c = channel[0].upper() + if c in i.getbands(): + mask = np.array(i.getchannel(c)).astype(np.float32) / 255.0 + mask = torch.from_numpy(mask) + if c == 'A': + mask = 1. - mask + else: + mask = torch.zeros((64,64), dtype=torch.float32, device="cpu") + return (mask.unsqueeze(0),) + + @classmethod + def IS_CHANGED(s, image, channel): + image_path = folder_paths.get_annotated_filepath(image) + m = hashlib.sha256() + with open(image_path, 'rb') as f: + m.update(f.read()) + return m.digest().hex() + + @classmethod + def VALIDATE_INPUTS(s, image): + if not folder_paths.exists_annotated_filepath(image): + return "Invalid image file: {}".format(image) + + return True + + +class LoadImageOutput(LoadImage): + SEARCH_ALIASES = ["output image", "previous generation"] + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "image": ("COMBO", { + "image_upload": True, + "image_folder": "output", + "remote": { + "route": "/internal/files/output", + "refresh_button": True, + "control_after_refresh": "first", + }, + }), + } + } + + DESCRIPTION = "Load an image from the output folder. When the refresh button is clicked, the node will update the image list and automatically select the first image, allowing for easy iteration." + EXPERIMENTAL = True + FUNCTION = "load_image" + + +class ImageScale: + upscale_methods = ["nearest-exact", "bilinear", "area", "bicubic", "lanczos"] + crop_methods = ["disabled", "center"] + + @classmethod + def INPUT_TYPES(s): + return {"required": { "image": ("IMAGE",), "upscale_method": (s.upscale_methods,), + "width": ("INT", {"default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 1}), + "height": ("INT", {"default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 1}), + "crop": (s.crop_methods,)}} + RETURN_TYPES = ("IMAGE",) + FUNCTION = "upscale" + + CATEGORY = "image/upscaling" + SEARCH_ALIASES = ["resize", "resize image", "scale image", "image resize", "zoom", "zoom in", "change size"] + + def upscale(self, image, upscale_method, width, height, crop): + if width == 0 and height == 0: + s = image + else: + samples = image.movedim(-1,1) + + if width == 0: + width = max(1, round(samples.shape[3] * height / samples.shape[2])) + elif height == 0: + height = max(1, round(samples.shape[2] * width / samples.shape[3])) + + s = comfy.utils.common_upscale(samples, width, height, upscale_method, crop) + s = s.movedim(1,-1) + return (s,) + +class ImageScaleBy: + upscale_methods = ["nearest-exact", "bilinear", "area", "bicubic", "lanczos"] + + @classmethod + def INPUT_TYPES(s): + return {"required": { "image": ("IMAGE",), "upscale_method": (s.upscale_methods,), + "scale_by": ("FLOAT", {"default": 1.0, "min": 0.01, "max": 8.0, "step": 0.01}),}} + RETURN_TYPES = ("IMAGE",) + FUNCTION = "upscale" + + CATEGORY = "image/upscaling" + + def upscale(self, image, upscale_method, scale_by): + samples = image.movedim(-1,1) + width = round(samples.shape[3] * scale_by) + height = round(samples.shape[2] * scale_by) + s = comfy.utils.common_upscale(samples, width, height, upscale_method, "disabled") + s = s.movedim(1,-1) + return (s,) + +class ImageInvert: + SEARCH_ALIASES = ["reverse colors"] + + @classmethod + def INPUT_TYPES(s): + return {"required": { "image": ("IMAGE",)}} + + RETURN_TYPES = ("IMAGE",) + FUNCTION = "invert" + + CATEGORY = "image" + + def invert(self, image): + s = 1.0 - image + return (s,) + +class ImageBatch: + SEARCH_ALIASES = ["combine images", "merge images", "stack images"] + + @classmethod + def INPUT_TYPES(s): + return {"required": { "image1": ("IMAGE",), "image2": ("IMAGE",)}} + + RETURN_TYPES = ("IMAGE",) + FUNCTION = "batch" + + CATEGORY = "image" + DEPRECATED = True + + def batch(self, image1, image2): + if image1.shape[-1] != image2.shape[-1]: + if image1.shape[-1] > image2.shape[-1]: + image2 = torch.nn.functional.pad(image2, (0,1), mode='constant', value=1.0) + else: + image1 = torch.nn.functional.pad(image1, (0,1), mode='constant', value=1.0) + if image1.shape[1:] != image2.shape[1:]: + image2 = comfy.utils.common_upscale(image2.movedim(-1,1), image1.shape[2], image1.shape[1], "bilinear", "center").movedim(1,-1) + s = torch.cat((image1, image2), dim=0) + return (s,) + +class EmptyImage: + def __init__(self, device="cpu"): + self.device = device + + @classmethod + def INPUT_TYPES(s): + return {"required": { "width": ("INT", {"default": 512, "min": 1, "max": MAX_RESOLUTION, "step": 1}), + "height": ("INT", {"default": 512, "min": 1, "max": MAX_RESOLUTION, "step": 1}), + "batch_size": ("INT", {"default": 1, "min": 1, "max": 4096}), + "color": ("INT", {"default": 0, "min": 0, "max": 0xFFFFFF, "step": 1, "display": "color"}), + }} + RETURN_TYPES = ("IMAGE",) + FUNCTION = "generate" + + CATEGORY = "image" + + def generate(self, width, height, batch_size=1, color=0): + r = torch.full([batch_size, height, width, 1], ((color >> 16) & 0xFF) / 0xFF) + g = torch.full([batch_size, height, width, 1], ((color >> 8) & 0xFF) / 0xFF) + b = torch.full([batch_size, height, width, 1], ((color) & 0xFF) / 0xFF) + return (torch.cat((r, g, b), dim=-1), ) + +class ImagePadForOutpaint: + SEARCH_ALIASES = ["extend canvas", "expand image"] + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "image": ("IMAGE",), + "left": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "top": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "right": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "bottom": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "feathering": ("INT", {"default": 40, "min": 0, "max": MAX_RESOLUTION, "step": 1}), + } + } + + RETURN_TYPES = ("IMAGE", "MASK") + FUNCTION = "expand_image" + + CATEGORY = "image" + + def expand_image(self, image, left, top, right, bottom, feathering): + d1, d2, d3, d4 = image.size() + + new_image = torch.ones( + (d1, d2 + top + bottom, d3 + left + right, d4), + dtype=torch.float32, + ) * 0.5 + + new_image[:, top:top + d2, left:left + d3, :] = image + + mask = torch.ones( + (d2 + top + bottom, d3 + left + right), + dtype=torch.float32, + ) + + t = torch.zeros( + (d2, d3), + dtype=torch.float32 + ) + + if feathering > 0 and feathering * 2 < d2 and feathering * 2 < d3: + + for i in range(d2): + for j in range(d3): + dt = i if top != 0 else d2 + db = d2 - i if bottom != 0 else d2 + + dl = j if left != 0 else d3 + dr = d3 - j if right != 0 else d3 + + d = min(dt, db, dl, dr) + + if d >= feathering: + continue + + v = (feathering - d) / feathering + + t[i, j] = v * v + + mask[top:top + d2, left:left + d3] = t + + return (new_image, mask.unsqueeze(0)) + + +NODE_CLASS_MAPPINGS = { + "KSampler": KSampler, + "CheckpointLoaderSimple": CheckpointLoaderSimple, + "CLIPTextEncode": CLIPTextEncode, + "CLIPSetLastLayer": CLIPSetLastLayer, + "VAEDecode": VAEDecode, + "VAEEncode": VAEEncode, + "VAEEncodeForInpaint": VAEEncodeForInpaint, + "VAELoader": VAELoader, + "EmptyLatentImage": EmptyLatentImage, + "LatentUpscale": LatentUpscale, + "LatentUpscaleBy": LatentUpscaleBy, + "LatentFromBatch": LatentFromBatch, + "RepeatLatentBatch": RepeatLatentBatch, + "SaveImage": SaveImage, + "PreviewImage": PreviewImage, + "LoadImage": LoadImage, + "LoadImageMask": LoadImageMask, + "LoadImageOutput": LoadImageOutput, + "ImageScale": ImageScale, + "ImageScaleBy": ImageScaleBy, + "ImageInvert": ImageInvert, + "ImageBatch": ImageBatch, + "ImagePadForOutpaint": ImagePadForOutpaint, + "EmptyImage": EmptyImage, + "ConditioningAverage": ConditioningAverage , + "ConditioningCombine": ConditioningCombine, + "ConditioningConcat": ConditioningConcat, + "ConditioningSetArea": ConditioningSetArea, + "ConditioningSetAreaPercentage": ConditioningSetAreaPercentage, + "ConditioningSetAreaStrength": ConditioningSetAreaStrength, + "ConditioningSetMask": ConditioningSetMask, + "KSamplerAdvanced": KSamplerAdvanced, + "SetLatentNoiseMask": SetLatentNoiseMask, + "LatentComposite": LatentComposite, + "LatentBlend": LatentBlend, + "LatentRotate": LatentRotate, + "LatentFlip": LatentFlip, + "LatentCrop": LatentCrop, + "LoraLoader": LoraLoader, + "CLIPLoader": CLIPLoader, + "UNETLoader": UNETLoader, + "DualCLIPLoader": DualCLIPLoader, + "CLIPVisionEncode": CLIPVisionEncode, + "StyleModelApply": StyleModelApply, + "unCLIPConditioning": unCLIPConditioning, + "ControlNetApply": ControlNetApply, + "ControlNetApplyAdvanced": ControlNetApplyAdvanced, + "ControlNetLoader": ControlNetLoader, + "DiffControlNetLoader": DiffControlNetLoader, + "StyleModelLoader": StyleModelLoader, + "CLIPVisionLoader": CLIPVisionLoader, + "VAEDecodeTiled": VAEDecodeTiled, + "VAEEncodeTiled": VAEEncodeTiled, + "unCLIPCheckpointLoader": unCLIPCheckpointLoader, + "GLIGENLoader": GLIGENLoader, + "GLIGENTextBoxApply": GLIGENTextBoxApply, + "InpaintModelConditioning": InpaintModelConditioning, + + "CheckpointLoader": CheckpointLoader, + "DiffusersLoader": DiffusersLoader, + + "LoadLatent": LoadLatent, + "SaveLatent": SaveLatent, + + "ConditioningZeroOut": ConditioningZeroOut, + "ConditioningSetTimestepRange": ConditioningSetTimestepRange, + "LoraLoaderModelOnly": LoraLoaderModelOnly, +} + +NODE_DISPLAY_NAME_MAPPINGS = { + # Sampling + "KSampler": "KSampler", + "KSamplerAdvanced": "KSampler (Advanced)", + # Loaders + "CheckpointLoader": "Load Checkpoint With Config (DEPRECATED)", + "CheckpointLoaderSimple": "Load Checkpoint", + "VAELoader": "Load VAE", + "LoraLoader": "Load LoRA (Model and CLIP)", + "LoraLoaderModelOnly": "Load LoRA", + "CLIPLoader": "Load CLIP", + "ControlNetLoader": "Load ControlNet Model", + "DiffControlNetLoader": "Load ControlNet Model (diff)", + "StyleModelLoader": "Load Style Model", + "CLIPVisionLoader": "Load CLIP Vision", + "UNETLoader": "Load Diffusion Model", + # Conditioning + "CLIPVisionEncode": "CLIP Vision Encode", + "StyleModelApply": "Apply Style Model", + "CLIPTextEncode": "CLIP Text Encode (Prompt)", + "CLIPSetLastLayer": "CLIP Set Last Layer", + "ConditioningCombine": "Conditioning (Combine)", + "ConditioningAverage ": "Conditioning (Average)", + "ConditioningConcat": "Conditioning (Concat)", + "ConditioningSetArea": "Conditioning (Set Area)", + "ConditioningSetAreaPercentage": "Conditioning (Set Area with Percentage)", + "ConditioningSetMask": "Conditioning (Set Mask)", + "ControlNetApply": "Apply ControlNet (OLD)", + "ControlNetApplyAdvanced": "Apply ControlNet", + # Latent + "VAEEncodeForInpaint": "VAE Encode (for Inpainting)", + "SetLatentNoiseMask": "Set Latent Noise Mask", + "VAEDecode": "VAE Decode", + "VAEEncode": "VAE Encode", + "LatentRotate": "Rotate Latent", + "LatentFlip": "Flip Latent", + "LatentCrop": "Crop Latent", + "EmptyLatentImage": "Empty Latent Image", + "LatentUpscale": "Upscale Latent", + "LatentUpscaleBy": "Upscale Latent By", + "LatentComposite": "Latent Composite", + "LatentBlend": "Latent Blend", + "LatentFromBatch" : "Latent From Batch", + "RepeatLatentBatch": "Repeat Latent Batch", + # Image + "SaveImage": "Save Image", + "PreviewImage": "Preview Image", + "LoadImage": "Load Image", + "LoadImageMask": "Load Image (as Mask)", + "LoadImageOutput": "Load Image (from Outputs)", + "ImageScale": "Upscale Image", + "ImageScaleBy": "Upscale Image By", + "ImageInvert": "Invert Image", + "ImagePadForOutpaint": "Pad Image for Outpainting", + "ImageBatch": "Batch Images", + "ImageCrop": "Image Crop", + "ImageStitch": "Image Stitch", + "ImageBlend": "Image Blend", + "ImageBlur": "Image Blur", + "ImageQuantize": "Image Quantize", + "ImageSharpen": "Image Sharpen", + "ImageScaleToTotalPixels": "Scale Image to Total Pixels", + "GetImageSize": "Get Image Size", + # _for_testing + "VAEDecodeTiled": "VAE Decode (Tiled)", + "VAEEncodeTiled": "VAE Encode (Tiled)", +} + +EXTENSION_WEB_DIRS = {} + +# Dictionary of successfully loaded module names and associated directories. +LOADED_MODULE_DIRS = {} + + +def get_module_name(module_path: str) -> str: + """ + Returns the module name based on the given module path. + Examples: + get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node.py") -> "my_custom_node" + get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node") -> "my_custom_node" + get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node/") -> "my_custom_node" + get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node/__init__.py") -> "my_custom_node" + get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node/__init__") -> "my_custom_node" + get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node/__init__/") -> "my_custom_node" + get_module_name("C:/Users/username/ComfyUI/custom_nodes/my_custom_node.disabled") -> "custom_nodes + Args: + module_path (str): The path of the module. + Returns: + str: The module name. + """ + base_path = os.path.basename(module_path) + if os.path.isfile(module_path): + base_path = os.path.splitext(base_path)[0] + return base_path + + +async def load_custom_node(module_path: str, ignore=set(), module_parent="custom_nodes") -> bool: + module_name = get_module_name(module_path) + if os.path.isfile(module_path): + sp = os.path.splitext(module_path) + module_name = sp[0] + sys_module_name = module_name + elif os.path.isdir(module_path): + sys_module_name = module_path.replace(".", "_x_") + + try: + logging.debug("Trying to load custom node {}".format(module_path)) + if os.path.isfile(module_path): + module_spec = importlib.util.spec_from_file_location(sys_module_name, module_path) + module_dir = os.path.split(module_path)[0] + else: + module_spec = importlib.util.spec_from_file_location(sys_module_name, os.path.join(module_path, "__init__.py")) + module_dir = module_path + + module = importlib.util.module_from_spec(module_spec) + sys.modules[sys_module_name] = module + module_spec.loader.exec_module(module) + + LOADED_MODULE_DIRS[module_name] = os.path.abspath(module_dir) + + try: + from comfy_config import config_parser + + project_config = config_parser.extract_node_configuration(module_path) + + web_dir_name = project_config.tool_comfy.web + + if web_dir_name: + web_dir_path = os.path.join(module_path, web_dir_name) + + if os.path.isdir(web_dir_path): + project_name = project_config.project.name + + EXTENSION_WEB_DIRS[project_name] = web_dir_path + + logging.info("Automatically register web folder {} for {}".format(web_dir_name, project_name)) + except Exception as e: + logging.warning(f"Unable to parse pyproject.toml due to lack dependency pydantic-settings, please run 'pip install -r requirements.txt': {e}") + + if hasattr(module, "WEB_DIRECTORY") and getattr(module, "WEB_DIRECTORY") is not None: + web_dir = os.path.abspath(os.path.join(module_dir, getattr(module, "WEB_DIRECTORY"))) + if os.path.isdir(web_dir): + EXTENSION_WEB_DIRS[module_name] = web_dir + + # V1 node definition + if hasattr(module, "NODE_CLASS_MAPPINGS") and getattr(module, "NODE_CLASS_MAPPINGS") is not None: + for name, node_cls in module.NODE_CLASS_MAPPINGS.items(): + if name not in ignore: + NODE_CLASS_MAPPINGS[name] = node_cls + node_cls.RELATIVE_PYTHON_MODULE = "{}.{}".format(module_parent, get_module_name(module_path)) + if hasattr(module, "NODE_DISPLAY_NAME_MAPPINGS") and getattr(module, "NODE_DISPLAY_NAME_MAPPINGS") is not None: + NODE_DISPLAY_NAME_MAPPINGS.update(module.NODE_DISPLAY_NAME_MAPPINGS) + return True + # V3 Extension Definition + elif hasattr(module, "comfy_entrypoint"): + entrypoint = getattr(module, "comfy_entrypoint") + if not callable(entrypoint): + logging.warning(f"comfy_entrypoint in {module_path} is not callable, skipping.") + return False + try: + if inspect.iscoroutinefunction(entrypoint): + extension = await entrypoint() + else: + extension = entrypoint() + if not isinstance(extension, ComfyExtension): + logging.warning(f"comfy_entrypoint in {module_path} did not return a ComfyExtension, skipping.") + return False + node_list = await extension.get_node_list() + if not isinstance(node_list, list): + logging.warning(f"comfy_entrypoint in {module_path} did not return a list of nodes, skipping.") + return False + for node_cls in node_list: + node_cls: io.ComfyNode + schema = node_cls.GET_SCHEMA() + if schema.node_id not in ignore: + NODE_CLASS_MAPPINGS[schema.node_id] = node_cls + node_cls.RELATIVE_PYTHON_MODULE = "{}.{}".format(module_parent, get_module_name(module_path)) + if schema.display_name is not None: + NODE_DISPLAY_NAME_MAPPINGS[schema.node_id] = schema.display_name + return True + except Exception as e: + logging.warning(f"Error while calling comfy_entrypoint in {module_path}: {e}") + return False + else: + logging.warning(f"Skip {module_path} module for custom nodes due to the lack of NODE_CLASS_MAPPINGS or NODES_LIST (need one).") + return False + except Exception as e: + logging.warning(traceback.format_exc()) + logging.warning(f"Cannot import {module_path} module for custom nodes: {e}") + return False + +async def init_external_custom_nodes(): + """ + Initializes the external custom nodes. + + This function loads custom nodes from the specified folder paths and imports them into the application. + It measures the import times for each custom node and logs the results. + + Returns: + None + """ + base_node_names = set(NODE_CLASS_MAPPINGS.keys()) + node_paths = folder_paths.get_folder_paths("custom_nodes") + node_import_times = [] + for custom_node_path in node_paths: + possible_modules = os.listdir(os.path.realpath(custom_node_path)) + if "__pycache__" in possible_modules: + possible_modules.remove("__pycache__") + + for possible_module in possible_modules: + module_path = os.path.join(custom_node_path, possible_module) + if os.path.isfile(module_path) and os.path.splitext(module_path)[1] != ".py": + continue + if module_path.endswith(".disabled"): + continue + if args.disable_all_custom_nodes and possible_module not in args.whitelist_custom_nodes: + logging.info(f"Skipping {possible_module} due to disable_all_custom_nodes and whitelist_custom_nodes") + continue + + if args.enable_manager: + if comfyui_manager.should_be_disabled(module_path): + logging.info(f"Blocked by policy: {module_path}") + continue + + time_before = time.perf_counter() + success = await load_custom_node(module_path, base_node_names, module_parent="custom_nodes") + node_import_times.append((time.perf_counter() - time_before, module_path, success)) + + if len(node_import_times) > 0: + logging.info("\nImport times for custom nodes:") + for n in sorted(node_import_times): + if n[2]: + import_message = "" + else: + import_message = " (IMPORT FAILED)" + logging.info("{:6.1f} seconds{}: {}".format(n[0], import_message, n[1])) + logging.info("") + +async def init_builtin_extra_nodes(): + """ + Initializes the built-in extra nodes in ComfyUI. + + This function loads the extra node files located in the "comfy_extras" directory and imports them into ComfyUI. + If any of the extra node files fail to import, a warning message is logged. + + Returns: + None + """ + extras_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "comfy_extras") + extras_files = [ + "nodes_latent.py", + "nodes_hypernetwork.py", + "nodes_upscale_model.py", + "nodes_post_processing.py", + "nodes_mask.py", + "nodes_compositing.py", + "nodes_rebatch.py", + "nodes_model_merging.py", + "nodes_tomesd.py", + "nodes_clip_sdxl.py", + "nodes_canny.py", + "nodes_freelunch.py", + "nodes_custom_sampler.py", + "nodes_hypertile.py", + "nodes_model_advanced.py", + "nodes_model_downscale.py", + "nodes_images.py", + "nodes_video_model.py", + "nodes_train.py", + "nodes_dataset.py", + "nodes_sag.py", + "nodes_perpneg.py", + "nodes_stable3d.py", + "nodes_sdupscale.py", + "nodes_photomaker.py", + "nodes_pixart.py", + "nodes_cond.py", + "nodes_morphology.py", + "nodes_stable_cascade.py", + "nodes_differential_diffusion.py", + "nodes_ip2p.py", + "nodes_model_merging_model_specific.py", + "nodes_pag.py", + "nodes_align_your_steps.py", + "nodes_attention_multiply.py", + "nodes_advanced_samplers.py", + "nodes_webcam.py", + "nodes_audio.py", + "nodes_sd3.py", + "nodes_gits.py", + "nodes_controlnet.py", + "nodes_hunyuan.py", + "nodes_eps.py", + "nodes_flux.py", + "nodes_lora_extract.py", + "nodes_torch_compile.py", + "nodes_mochi.py", + "nodes_slg.py", + "nodes_mahiro.py", + "nodes_lt_upsampler.py", + "nodes_lt_audio.py", + "nodes_lt.py", + "nodes_hooks.py", + "nodes_load_3d.py", + "nodes_cosmos.py", + "nodes_video.py", + "nodes_lumina2.py", + "nodes_wan.py", + "nodes_lotus.py", + "nodes_hunyuan3d.py", + "nodes_primitive.py", + "nodes_cfg.py", + "nodes_optimalsteps.py", + "nodes_hidream.py", + "nodes_fresca.py", + "nodes_apg.py", + "nodes_preview_any.py", + "nodes_ace.py", + "nodes_string.py", + "nodes_camera_trajectory.py", + "nodes_edit_model.py", + "nodes_tcfg.py", + "nodes_context_windows.py", + "nodes_qwen.py", + "nodes_chroma_radiance.py", + "nodes_model_patch.py", + "nodes_easycache.py", + "nodes_audio_encoder.py", + "nodes_rope.py", + "nodes_logic.py", + "nodes_nop.py", + "nodes_kandinsky5.py", + "nodes_wanmove.py", + "nodes_image_compare.py", + "nodes_zimage.py", + "nodes_lora_debug.py", + "nodes_color.py" + ] + + import_failed = [] + for node_file in extras_files: + if not await load_custom_node(os.path.join(extras_dir, node_file), module_parent="comfy_extras"): + import_failed.append(node_file) + + return import_failed + + +async def init_builtin_api_nodes(): + api_nodes_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "comfy_api_nodes") + api_nodes_files = sorted(glob.glob(os.path.join(api_nodes_dir, "nodes_*.py"))) + + import_failed = [] + for node_file in api_nodes_files: + if not await load_custom_node(node_file, module_parent="comfy_api_nodes"): + import_failed.append(os.path.basename(node_file)) + + return import_failed + +async def init_public_apis(): + register_versions([ + ComfyAPIWithVersion( + version=getattr(v, "VERSION"), + api_class=v + ) for v in supported_versions + ]) + +async def init_extra_nodes(init_custom_nodes=True, init_api_nodes=True): + await init_public_apis() + + import_failed = await init_builtin_extra_nodes() + + import_failed_api = [] + if init_api_nodes: + import_failed_api = await init_builtin_api_nodes() + + if init_custom_nodes: + await init_external_custom_nodes() + else: + logging.info("Skipping loading of custom nodes") + + if len(import_failed_api) > 0: + logging.warning("WARNING: some comfy_api_nodes/ nodes did not import correctly. This may be because they are missing some dependencies.\n") + for node in import_failed_api: + logging.warning("IMPORT FAILED: {}".format(node)) + logging.warning("\nThis issue might be caused by new missing dependencies added the last time you updated ComfyUI.") + if args.windows_standalone_build: + logging.warning("Please run the update script: update/update_comfyui.bat") + else: + logging.warning("Please do a: pip install -r requirements.txt") + logging.warning("") + + if len(import_failed) > 0: + logging.warning("WARNING: some comfy_extras/ nodes did not import correctly. This may be because they are missing some dependencies.\n") + for node in import_failed: + logging.warning("IMPORT FAILED: {}".format(node)) + logging.warning("\nThis issue might be caused by new missing dependencies added the last time you updated ComfyUI.") + if args.windows_standalone_build: + logging.warning("Please run the update script: update/update_comfyui.bat") + else: + logging.warning("Please do a: pip install -r requirements.txt") + logging.warning("") + + return import_failed diff --git a/docs/hel-892/concat-reference/kj__LICENSE b/docs/hel-892/concat-reference/kj__LICENSE new file mode 100644 index 00000000..f288702d --- /dev/null +++ b/docs/hel-892/concat-reference/kj__LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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. + + + Copyright (C) + + 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 . + +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: + + Copyright (C) + 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 +. + + 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 +. diff --git a/docs/hel-892/concat-reference/kj____init__.py b/docs/hel-892/concat-reference/kj____init__.py new file mode 100644 index 00000000..0d7863c1 --- /dev/null +++ b/docs/hel-892/concat-reference/kj____init__.py @@ -0,0 +1,295 @@ +from .nodes.nodes import * +from .nodes.curve_nodes import * +from .nodes.batchcrop_nodes import * +from .nodes.audioscheduler_nodes import * +from .nodes.image_nodes import * +from .nodes.intrinsic_lora_nodes import * +from .nodes.mask_nodes import * +from .nodes.model_optimization_nodes import * +from .nodes.lora_nodes import * + + +NODE_CONFIG = { + #constants + "BOOLConstant": {"class": BOOLConstant, "name": "BOOL Constant"}, + "INTConstant": {"class": INTConstant, "name": "INT Constant"}, + "FloatConstant": {"class": FloatConstant, "name": "Float Constant"}, + "StringConstant": {"class": StringConstant, "name": "String Constant"}, + "StringConstantMultiline": {"class": StringConstantMultiline, "name": "String Constant Multiline"}, + #conditioning + "ConditioningMultiCombine": {"class": ConditioningMultiCombine, "name": "Conditioning Multi Combine"}, + "ConditioningSetMaskAndCombine": {"class": ConditioningSetMaskAndCombine, "name": "ConditioningSetMaskAndCombine"}, + "ConditioningSetMaskAndCombine3": {"class": ConditioningSetMaskAndCombine3, "name": "ConditioningSetMaskAndCombine3"}, + "ConditioningSetMaskAndCombine4": {"class": ConditioningSetMaskAndCombine4, "name": "ConditioningSetMaskAndCombine4"}, + "ConditioningSetMaskAndCombine5": {"class": ConditioningSetMaskAndCombine5, "name": "ConditioningSetMaskAndCombine5"}, + "CondPassThrough": {"class": CondPassThrough}, + "WanImageToVideoSVIPro": {"class": WanImageToVideoSVIPro, "name": "Wan Image To Video SVIPro"}, + #masking + "DrawMaskOnImage": {"class": DrawMaskOnImage, "name": "Draw Mask On Image"}, + "DownloadAndLoadCLIPSeg": {"class": DownloadAndLoadCLIPSeg, "name": "(Down)load CLIPSeg"}, + "BatchCLIPSeg": {"class": BatchCLIPSeg, "name": "Batch CLIPSeg"}, + "BlockifyMask": {"class": BlockifyMask, "name": "Blockify Mask"}, + "ColorToMask": {"class": ColorToMask, "name": "Color To Mask"}, + "CreateGradientMask": {"class": CreateGradientMask, "name": "Create Gradient Mask"}, + "CreateTextMask": {"class": CreateTextMask, "name": "Create Text Mask"}, + "CreateAudioMask": {"class": CreateAudioMask, "name": "Create Audio Mask"}, + "CreateFadeMask": {"class": CreateFadeMask, "name": "Create Fade Mask"}, + "CreateFadeMaskAdvanced": {"class": CreateFadeMaskAdvanced, "name": "Create Fade Mask Advanced"}, + "CreateFluidMask": {"class": CreateFluidMask, "name": "Create Fluid Mask"}, + "CreateShapeMask": {"class": CreateShapeMask, "name": "Create Shape Mask"}, + "CreateVoronoiMask": {"class": CreateVoronoiMask, "name": "Create Voronoi Mask"}, + "CreateMagicMask": {"class": CreateMagicMask, "name": "Create Magic Mask"}, + "GetMaskSizeAndCount": {"class": GetMaskSizeAndCount, "name": "Get Mask Size & Count"}, + "GrowMaskWithBlur": {"class": GrowMaskWithBlur, "name": "Grow Mask With Blur"}, + "MaskBatchMulti": {"class": MaskBatchMulti, "name": "Mask Batch Multi"}, + "OffsetMask": {"class": OffsetMask, "name": "Offset Mask"}, + "RemapMaskRange": {"class": RemapMaskRange, "name": "Remap Mask Range"}, + "ResizeMask": {"class": ResizeMask, "name": "Resize Mask"}, + "RoundMask": {"class": RoundMask, "name": "Round Mask"}, + "SeparateMasks": {"class": SeparateMasks, "name": "Separate Masks"}, + "ConsolidateMasksKJ": {"class": ConsolidateMasksKJ, "name": "Consolidate Masks"}, + #images + "AddLabel": {"class": AddLabel, "name": "Add Label"}, + "ColorMatch": {"class": ColorMatch, "name": "Color Match"}, + "ColorMatchV2": {"class": ColorMatchV2, "name": "Color Match V2"}, + "ImageTensorList": {"class": ImageTensorList, "name": "Image Tensor List"}, + "CrossFadeImages": {"class": CrossFadeImages, "name": "Cross Fade Images"}, + "CrossFadeImagesMulti": {"class": CrossFadeImagesMulti, "name": "Cross Fade Images Multi"}, + "GetImagesFromBatchIndexed": {"class": GetImagesFromBatchIndexed, "name": "Get Images From Batch Indexed"}, + "GetImageRangeFromBatch": {"class": GetImageRangeFromBatch, "name": "Get Image or Mask Range From Batch"}, + "GetLatentRangeFromBatch": {"class": GetLatentRangeFromBatch, "name": "Get Latent Range From Batch"}, + "GetLatentSizeAndCount": {"class": GetLatentSizeAndCount, "name": "Get Latent Size & Count"}, + "GetImageSizeAndCount": {"class": GetImageSizeAndCount, "name": "Get Image Size & Count"}, + "FastPreview": {"class": FastPreview, "name": "Fast Preview"}, + "ImageBatchFilter": {"class": ImageBatchFilter, "name": "Image Batch Filter"}, + "ImageAndMaskPreview": {"class": ImageAndMaskPreview}, + "ImageAddMulti": {"class": ImageAddMulti, "name": "Image Add Multi"}, + "ImageBatchJoinWithTransition": {"class": ImageBatchJoinWithTransition, "name": "Image Batch Join With Transition"}, + "ImageBatchMulti": {"class": ImageBatchMulti, "name": "Image Batch Multi"}, + "ImageBatchRepeatInterleaving": {"class": ImageBatchRepeatInterleaving}, + "ImageBatchTestPattern": {"class": ImageBatchTestPattern, "name": "Image Batch Test Pattern"}, + "ImageConcanate": {"class": ImageConcanate, "name": "Image Concatenate"}, + "ImageConcatFromBatch": {"class": ImageConcatFromBatch, "name": "Image Concatenate From Batch"}, + "ImageConcatMulti": {"class": ImageConcatMulti, "name": "Image Concatenate Multi"}, + "ImageCropByMask": {"class": ImageCropByMask, "name": "Image Crop By Mask"}, + "ImageCropByMaskAndResize": {"class": ImageCropByMaskAndResize, "name": "Image Crop By Mask And Resize"}, + "ImageCropByMaskBatch": {"class": ImageCropByMaskBatch, "name": "Image Crop By Mask Batch"}, + "ImageUncropByMask": {"class": ImageUncropByMask, "name": "Image Uncrop By Mask"}, + "ImageBatchExtendWithOverlap": {"class": ImageBatchExtendWithOverlap, "name": "Image Batch Extend With Overlap"}, + "ImageGrabPIL": {"class": ImageGrabPIL, "name": "Image Grab PIL"}, + "ImageGridComposite2x2": {"class": ImageGridComposite2x2, "name": "Image Grid Composite 2x2"}, + "ImageGridComposite3x3": {"class": ImageGridComposite3x3, "name": "Image Grid Composite 3x3"}, + "ImageGridtoBatch": {"class": ImageGridtoBatch, "name": "Image Grid To Batch"}, + "ImageNoiseAugmentation": {"class": ImageNoiseAugmentation, "name": "Image Noise Augmentation"}, + "ImageNormalize_Neg1_To_1": {"class": ImageNormalize_Neg1_To_1, "name": "Image Normalize -1 to 1"}, + "ImagePass": {"class": ImagePass}, + "ImagePadKJ": {"class": ImagePadKJ, "name": "ImagePad KJ"}, + "ImagePadForOutpaintMasked": {"class": ImagePadForOutpaintMasked, "name": "Image Pad For Outpaint Masked"}, + "ImagePadForOutpaintTargetSize": {"class": ImagePadForOutpaintTargetSize, "name": "Image Pad For Outpaint Target Size"}, + "ImagePrepForICLora": {"class": ImagePrepForICLora, "name": "Image Prep For ICLora"}, + "ImageResizeKJ": {"class": ImageResizeKJ, "name": "Resize Image (deprecated)"}, + "ImageResizeKJv2": {"class": ImageResizeKJv2, "name": "Resize Image v2"}, + "ImageUpscaleWithModelBatched": {"class": ImageUpscaleWithModelBatched, "name": "Image Upscale With Model Batched"}, + "InsertImagesToBatchIndexed": {"class": InsertImagesToBatchIndexed, "name": "Insert Images To Batch Indexed"}, + "InsertLatentToIndexed": {"class": InsertLatentToIndex, "name": "Insert Latent To Index"}, + "LoadAndResizeImage": {"class": LoadAndResizeImage, "name": "Load & Resize Image"}, + "LoadImagesFromFolderKJ": {"class": LoadImagesFromFolderKJ, "name": "Load Images From Folder (KJ)"}, + "LoadVideosFromFolder": {"class": LoadVideosFromFolder, "name": "Load Videos From Folder"}, + "MergeImageChannels": {"class": MergeImageChannels, "name": "Merge Image Channels"}, + "PadImageBatchInterleaved": {"class": PadImageBatchInterleaved, "name": "Pad Image Batch Interleaved"}, + "PreviewAnimation": {"class": PreviewAnimation, "name": "Preview Animation"}, + "RemapImageRange": {"class": RemapImageRange, "name": "Remap Image Range"}, + "ReverseImageBatch": {"class": ReverseImageBatch, "name": "Reverse Image Batch"}, + "ReplaceImagesInBatch": {"class": ReplaceImagesInBatch, "name": "Replace Images In Batch"}, + "SaveImageWithAlpha": {"class": SaveImageWithAlpha, "name": "Save Image With Alpha"}, + "SaveImageKJ": {"class": SaveImageKJ, "name": "Save Image KJ"}, + "ShuffleImageBatch": {"class": ShuffleImageBatch, "name": "Shuffle Image Batch"}, + "SplitImageChannels": {"class": SplitImageChannels, "name": "Split Image Channels"}, + "TransitionImagesMulti": {"class": TransitionImagesMulti, "name": "Transition Images Multi"}, + "TransitionImagesInBatch": {"class": TransitionImagesInBatch, "name": "Transition Images In Batch"}, + #batch cropping + "BatchCropFromMask": {"class": BatchCropFromMask, "name": "Batch Crop From Mask"}, + "BatchCropFromMaskAdvanced": {"class": BatchCropFromMaskAdvanced, "name": "Batch Crop From Mask Advanced"}, + "FilterZeroMasksAndCorrespondingImages": {"class": FilterZeroMasksAndCorrespondingImages}, + "InsertImageBatchByIndexes": {"class": InsertImageBatchByIndexes, "name": "Insert Image Batch By Indexes"}, + "BatchUncrop": {"class": BatchUncrop, "name": "Batch Uncrop"}, + "BatchUncropAdvanced": {"class": BatchUncropAdvanced, "name": "Batch Uncrop Advanced"}, + "SplitBboxes": {"class": SplitBboxes, "name": "Split Bboxes"}, + "BboxToInt": {"class": BboxToInt, "name": "Bbox To Int"}, + "BboxVisualize": {"class": BboxVisualize, "name": "Bbox Visualize"}, + #noise + "GenerateNoise": {"class": GenerateNoise, "name": "Generate Noise"}, + "FlipSigmasAdjusted": {"class": FlipSigmasAdjusted, "name": "Flip Sigmas Adjusted"}, + "InjectNoiseToLatent": {"class": InjectNoiseToLatent, "name": "Inject Noise To Latent"}, + "CustomSigmas": {"class": CustomSigmas, "name": "Custom Sigmas"}, + #utility + "StringToFloatList": {"class": StringToFloatList, "name": "String to Float List"}, + "WidgetToString": {"class": WidgetToString, "name": "Widget To String"}, + "SaveStringKJ": {"class": SaveStringKJ, "name": "Save String KJ"}, + "DummyOut": {"class": DummyOut, "name": "Dummy Out"}, + "GetLatentsFromBatchIndexed": {"class": GetLatentsFromBatchIndexed, "name": "Get Latents From Batch Indexed"}, + "ScaleBatchPromptSchedule": {"class": ScaleBatchPromptSchedule, "name": "Scale Batch Prompt Schedule"}, + "CameraPoseVisualizer": {"class": CameraPoseVisualizer, "name": "Camera Pose Visualizer"}, + "AppendStringsToList": {"class": AppendStringsToList, "name": "Append Strings To List"}, + "JoinStrings": {"class": JoinStrings, "name": "Join Strings"}, + "JoinStringMulti": {"class": JoinStringMulti, "name": "Join String Multi"}, + "SimpleCalculatorKJ": {"class": SimpleCalculatorKJ, "name": "Simple Calculator KJ"}, + "SomethingToString": {"class": SomethingToString, "name": "Something To String"}, + "Sleep": {"class": Sleep, "name": "Sleep"}, + "VRAM_Debug": {"class": VRAM_Debug, "name": "VRAM Debug"}, + "EmptyLatentImagePresets": {"class": EmptyLatentImagePresets, "name": "Empty Latent Image Presets"}, + "EmptyLatentImageCustomPresets": {"class": EmptyLatentImageCustomPresets, "name": "Empty Latent Image Custom Presets"}, + "ModelPassThrough": {"class": ModelPassThrough, "name": "ModelPass"}, + "ModelSaveKJ": {"class": ModelSaveKJ, "name": "Model Save KJ"}, + "SetShakkerLabsUnionControlNetType": {"class": SetShakkerLabsUnionControlNetType, "name": "Set Shakker Labs Union ControlNet Type"}, + "StyleModelApplyAdvanced": {"class": StyleModelApplyAdvanced, "name": "Style Model Apply Advanced"}, + "DiffusionModelSelector": {"class": DiffusionModelSelector, "name": "Diffusion Model Selector"}, + "LazySwitchKJ": {"class": LazySwitchKJ, "name": "Lazy Switch KJ"}, + "VisualizeSigmasKJ": {"class": VisualizeSigmasKJ, "name": "Visualize Sigmas KJ"}, + #audioscheduler stuff + "NormalizedAmplitudeToMask": {"class": NormalizedAmplitudeToMask}, + "NormalizedAmplitudeToFloatList": {"class": NormalizedAmplitudeToFloatList}, + "OffsetMaskByNormalizedAmplitude": {"class": OffsetMaskByNormalizedAmplitude}, + "ImageTransformByNormalizedAmplitude": {"class": ImageTransformByNormalizedAmplitude}, + "AudioConcatenate": {"class": AudioConcatenate}, + #curve nodes + "SplineEditor": {"class": SplineEditor, "name": "Spline Editor"}, + "CreateShapeImageOnPath": {"class": CreateShapeImageOnPath, "name": "Create Shape Image On Path"}, + "CreateShapeMaskOnPath": {"class": CreateShapeMaskOnPath, "name": "Create Shape Mask On Path"}, + "CreateTextOnPath": {"class": CreateTextOnPath, "name": "Create Text On Path"}, + "CreateGradientFromCoords": {"class": CreateGradientFromCoords, "name": "Create Gradient From Coords"}, + "CutAndDragOnPath": {"class": CutAndDragOnPath, "name": "Cut And Drag On Path"}, + "GradientToFloat": {"class": GradientToFloat, "name": "Gradient To Float"}, + "WeightScheduleExtend": {"class": WeightScheduleExtend, "name": "Weight Schedule Extend"}, + "MaskOrImageToWeight": {"class": MaskOrImageToWeight, "name": "Mask Or Image To Weight"}, + "WeightScheduleConvert": {"class": WeightScheduleConvert, "name": "Weight Schedule Convert"}, + "FloatToMask": {"class": FloatToMask, "name": "Float To Mask"}, + "FloatToSigmas": {"class": FloatToSigmas, "name": "Float To Sigmas"}, + "SigmasToFloat": {"class": SigmasToFloat, "name": "Sigmas To Float"}, + "PlotCoordinates": {"class": PlotCoordinates, "name": "Plot Coordinates"}, + "InterpolateCoords": {"class": InterpolateCoords, "name": "Interpolate Coords"}, + "PointsEditor": {"class": PointsEditor, "name": "Points Editor"}, + #experimental + "SoundReactive": {"class": SoundReactive, "name": "Sound Reactive"}, + "StableZero123_BatchSchedule": {"class": StableZero123_BatchSchedule, "name": "Stable Zero123 Batch Schedule"}, + "SV3D_BatchSchedule": {"class": SV3D_BatchSchedule, "name": "SV3D Batch Schedule"}, + "LoadResAdapterNormalization": {"class": LoadResAdapterNormalization}, + "Superprompt": {"class": Superprompt, "name": "Superprompt"}, + "GLIGENTextBoxApplyBatchCoords": {"class": GLIGENTextBoxApplyBatchCoords}, + "Intrinsic_lora_sampling": {"class": Intrinsic_lora_sampling, "name": "Intrinsic Lora Sampling"}, + "CheckpointPerturbWeights": {"class": CheckpointPerturbWeights, "name": "CheckpointPerturbWeights"}, + "Screencap_mss": {"class": Screencap_mss, "name": "Screencap mss"}, + "WebcamCaptureCV2": {"class": WebcamCaptureCV2, "name": "Webcam Capture CV2"}, + "DifferentialDiffusionAdvanced": {"class": DifferentialDiffusionAdvanced, "name": "Differential Diffusion Advanced"}, + "DiTBlockLoraLoader": {"class": DiTBlockLoraLoader, "name": "DiT Block Lora Loader"}, + "FluxBlockLoraSelect": {"class": FluxBlockLoraSelect, "name": "Flux Block Lora Select"}, + "HunyuanVideoBlockLoraSelect": {"class": HunyuanVideoBlockLoraSelect, "name": "Hunyuan Video Block Lora Select"}, + "Wan21BlockLoraSelect": {"class": Wan21BlockLoraSelect, "name": "Wan21 Block Lora Select"}, + "LTX2BlockLoraSelect": {"class": LTX2BlockLoraSelect, "name": "LTX2 Block Lora Select"}, + "CustomControlNetWeightsFluxFromList": {"class": CustomControlNetWeightsFluxFromList, "name": "Custom ControlNet Weights Flux From List"}, + "CheckpointLoaderKJ": {"class": CheckpointLoaderKJ, "name": "CheckpointLoaderKJ"}, + "DiffusionModelLoaderKJ": {"class": DiffusionModelLoaderKJ, "name": "Diffusion Model Loader KJ"}, + "TorchCompileModelFluxAdvancedV2": {"class": TorchCompileModelFluxAdvancedV2, "name": "TorchCompileModelFluxAdvancedV2"}, + "TorchCompileVAE": {"class": TorchCompileVAE, "name": "TorchCompileVAE"}, + "TorchCompileControlNet": {"class": TorchCompileControlNet, "name": "TorchCompileControlNet"}, + "TorchCompileModelWanVideoV2": {"class": TorchCompileModelWanVideoV2, "name": "TorchCompileModelWanVideoV2"}, + "PathchSageAttentionKJ": {"class": PathchSageAttentionKJ, "name": "Patch Sage Attention KJ"}, + "LeapfusionHunyuanI2VPatcher": {"class": LeapfusionHunyuanI2V, "name": "Leapfusion Hunyuan I2V Patcher"}, + "VAELoaderKJ": {"class": VAELoaderKJ, "name": "VAELoader KJ"}, + "VAEDecodeLoopKJ": {"class": VAEDecodeLoopKJ, "name": "VAE Decode Loop KJ"}, + "ScheduledCFGGuidance": {"class": ScheduledCFGGuidance, "name": "Scheduled CFG Guidance"}, + "ApplyRifleXRoPE_HunuyanVideo": {"class": ApplyRifleXRoPE_HunuyanVideo, "name": "Apply RifleXRoPE HunuyanVideo"}, + "ApplyRifleXRoPE_WanVideo": {"class": ApplyRifleXRoPE_WanVideo, "name": "Apply RifleXRoPE WanVideo"}, + "WanVideoTeaCacheKJ": {"class": WanVideoTeaCacheKJ, "name": "WanVideo Tea Cache (native)"}, + "WanVideoEnhanceAVideoKJ": {"class": WanVideoEnhanceAVideoKJ, "name": "WanVideo Enhance A Video (native)"}, + "SkipLayerGuidanceWanVideo": {"class": SkipLayerGuidanceWanVideo, "name": "Skip Layer Guidance WanVideo"}, + "TimerNodeKJ": {"class": TimerNodeKJ, "name": "Timer Node KJ"}, + "HunyuanVideoEncodeKeyframesToCond": {"class": HunyuanVideoEncodeKeyframesToCond, "name": "HunyuanVideo Encode Keyframes To Cond"}, + "CFGZeroStarAndInit": {"class": CFGZeroStarAndInit, "name": "CFG Zero Star/Init"}, + "ModelPatchTorchSettings": {"class": ModelPatchTorchSettings, "name": "Model Patch Torch Settings"}, + "WanVideoNAG": {"class": WanVideoNAG, "name": "WanVideoNAG"}, + "GGUFLoaderKJ": {"class": GGUFLoaderKJ, "name": "GGUF Loader KJ"}, + "LatentInpaintTTM": {"class": LatentInpaintTTM, "name": "Latent Inpaint TTM"}, + "NABLA_AttentionKJ": {"class": NABLA_AttentionKJ, "name": "NABLA Attention KJ"}, + "TorchCompileModelAdvanced": {"class": TorchCompileModelAdvanced, "name": "TorchCompileModelAdvanced"}, + "StartRecordCUDAMemoryHistory": {"class": StartRecordCUDAMemoryHistory, "name": "Start Recording CUDAMemory History"}, + "EndRecordCUDAMemoryHistory": {"class": EndRecordCUDAMemoryHistory, "name": "End Recording CUDAMemory History"}, + "VisualizeCUDAMemoryHistory": {"class": VisualizeCUDAMemoryHistory, "name": "Visualize CUDAMemory History"}, + "PreviewLatentNoiseMask": {"class": PreviewLatentNoiseMask, "name": "Preview Latent Noise Mask"}, + "ModelMemoryUseReportPatch": {"class": ModelMemoryUseReportPatch, "name": "Model Memory Use Report Patch"}, + "ModelMemoryUsageFactorOverride": {"class": ModelMemoryUsageFactorOverride, "name": "Model Memory Usage Factor Override"}, + "WanChunkFeedForward": {"class": WanChunkFeedForward, "name": "Wan ChunkFeedForward"}, + "SamplerSelfRefineVideo": {"class": SamplerSelfRefineVideo, "name": "Sampler SelfRefineVideo"}, + + #instance diffusion + "CreateInstanceDiffusionTracking": {"class": CreateInstanceDiffusionTracking}, + "AppendInstanceDiffusionTracking": {"class": AppendInstanceDiffusionTracking}, + "DrawInstanceDiffusionTracking": {"class": DrawInstanceDiffusionTracking}, + + #lora + "LoraExtractKJ": {"class": LoraExtractKJ, "name": "LoraExtractKJ"}, + "LoraReduceRankKJ": {"class": LoraReduceRank, "name": "LoraReduceRank"}, + + #tracks + "GetTrackRange": {"class": GetTrackRange, "name": "Get Track Range"}, + "AddNoiseToTrackPath": {"class": AddNoiseToTrackPath, "name": "Add Noise To Track"}, + + # deprecated + "PatchModelPatcherOrder": {"class": PatchModelPatcherOrder, "name": "Patch Model Patcher Order"}, + "TorchCompileModelFluxAdvanced": {"class": DeprecatedCompileNodeKJ, "name": "TorchCompileModelFluxAdvanced"}, + "TorchCompileLTXModel": {"class": DeprecatedCompileNodeKJ, "name": "TorchCompileLTXModel"}, + "TorchCompileCosmosModel": {"class": DeprecatedCompileNodeKJ, "name": "TorchCompileCosmosModel"}, + "TorchCompileModelHyVideo": {"class": DeprecatedCompileNodeKJ, "name": "TorchCompileModelHyVideo"}, + "TorchCompileModelQwenImage": {"class": DeprecatedCompileNodeKJ, "name": "TorchCompileModelQwenImage"}, + "TorchCompileModelWanVideo": {"class": DeprecatedCompileNodeKJ, "name": "TorchCompileModelWanVideo"}, +} + +#ltxv +try: + from .nodes.ltxv_nodes import * + NODE_CONFIG.update({ + "LTXVEnhanceAVideoKJ": {"class": LTXVEnhanceAVideoKJ, "name": "LTXV Enhance A Video KJ"}, + "LTXVAddGuideMulti": {"class": LTXVAddGuideMulti, "name": "LTXV Add Guide Multi"}, + "LTXVAddGuidesFromBatch": {"class": LTXVAddGuidesFromBatch, "name": "LTXV Add Guides From Batch"}, + "LTXVAudioVideoMask": {"class": LTXVAudioVideoMask, "name": "LTXV Audio Video Mask"}, + "LTX2_NAG": {"class": LTX2_NAG, "name": "LTX2 NAG"}, + "LTXVChunkFeedForward": {"class": LTXVChunkFeedForward, "name": "LTXV Chunk Feed Forward"}, + "LTX2SamplingPreviewOverride": {"class": LTX2SamplingPreviewOverride, "name": "LTX2 Sampling Preview Override"}, + "LTX2AudioLatentNormalizingSampling": {"class": LTX2AudioLatentNormalizingSampling, "name": "LTX2 Audio Latent Normalizing Sampling"}, + "LTXVImgToVideoInplaceKJ": {"class": LTXVImgToVideoInplaceKJ, "name": "LTXV Img To Video Inplace KJ"}, + "LTX2AttentionTunerPatch": {"class": LTX2AttentionTunerPatch, "name": "LTX2 Attention Tuner Patch"}, + "LTX2MemoryEfficientSageAttentionPatch": {"class": LTX2MemoryEfficientSageAttentionPatch, "name": "LTX2 Memory Efficient Sage Attention Patch"}, + "LTX2LoraLoaderAdvanced": {"class": LTX2LoraLoaderAdvanced, "name": "LTX2 Lora Loader Advanced"}, + }) +except Exception as e: + logging.warning(f"KJNodes: LTXV nodes could not be imported. LTXV nodes will be unavailable. Error: {e}") + +def generate_node_mappings(node_config): + node_class_mappings = {} + node_display_name_mappings = {} + + for node_name, node_info in node_config.items(): + node_class_mappings[node_name] = node_info["class"] + node_display_name_mappings[node_name] = node_info.get("name", node_info["class"].__name__) + + return node_class_mappings, node_display_name_mappings + +NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS = generate_node_mappings(NODE_CONFIG) + +__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"] + +WEB_DIRECTORY = "./web" + +from aiohttp import web +from server import PromptServer +from pathlib import Path + +if hasattr(PromptServer, "instance"): + try: + # NOTE: we add an extra static path to avoid comfy mechanism + # that loads every script in web. + PromptServer.instance.app.add_routes( + [web.static("/kjweb_async", (Path(__file__).parent.absolute() / "kjweb_async").as_posix())] + ) + except: + pass diff --git a/docs/hel-892/concat-reference/kj__nodes__image_nodes.py b/docs/hel-892/concat-reference/kj__nodes__image_nodes.py new file mode 100644 index 00000000..28780772 --- /dev/null +++ b/docs/hel-892/concat-reference/kj__nodes__image_nodes.py @@ -0,0 +1,4226 @@ +import numpy as np +import time +import torch +import torch.nn.functional as F +import torchvision.transforms as T +import base64 +import random +import math +import os +import re +import json +import importlib +import logging +from PIL.PngImagePlugin import PngInfo +from io import BytesIO + +try: + import cv2 +except: + print("OpenCV not installed") + pass +from PIL import ImageGrab, ImageDraw, ImageFont, Image, ImageOps + +from nodes import MAX_RESOLUTION, SaveImage +from comfy_extras.nodes_mask import composite +from comfy.cli_args import args +from comfy.utils import ProgressBar, common_upscale +from comfy import model_management +from comfy_api.latest import io +import node_helpers +import folder_paths + +from ..utility.utility import string_to_color + +try: + from server import PromptServer +except: + PromptServer = None +from concurrent.futures import ThreadPoolExecutor + +script_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + +class ImagePass: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + }, + "optional": { + "image": ("IMAGE",), + }, + } + RETURN_TYPES = ("IMAGE",) + FUNCTION = "passthrough" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Passes the image through without modifying it. +""" + + def passthrough(self, image=None): + return image, + +class ColorMatch: + @classmethod + def INPUT_TYPES(cls): + return { + "required": { + "image_ref": ("IMAGE",), + "image_target": ("IMAGE",), + "method": ( + [ + 'mkl', + 'hm', + 'reinhard', + 'mvgd', + 'hm-mvgd-hm', + 'hm-mkl-hm', + ], { + "default": 'mkl' + }), + }, + "optional": { + "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}), + "multithread": ("BOOLEAN", {"default": True}), + } + } + + CATEGORY = "KJNodes/image" + + RETURN_TYPES = ("IMAGE",) + RETURN_NAMES = ("image",) + FUNCTION = "colormatch" + DESCRIPTION = """ +color-matcher enables color transfer across images which comes in handy for automatic +color-grading of photographs, paintings and film sequences as well as light-field +and stopmotion corrections. + +The methods behind the mappings are based on the approach from Reinhard et al., +the Monge-Kantorovich Linearization (MKL) as proposed by Pitie et al. and our analytical solution +to a Multi-Variate Gaussian Distribution (MVGD) transfer in conjunction with classical histogram +matching. As shown below our HM-MVGD-HM compound outperforms existing methods. +https://github.com/hahnec/color-matcher/ + +""" + + def colormatch(self, image_ref, image_target, method, strength=1.0, multithread=True): + # Skip unnecessary processing + if strength == 0: + return (image_target,) + + try: + from color_matcher import ColorMatcher + except: + raise Exception("Can't import color-matcher, did you install requirements.txt? Manual install: pip install color-matcher") + + image_ref = image_ref.cpu() + image_target = image_target.cpu() + batch_size = image_target.size(0) + + images_target = image_target.squeeze() + images_ref = image_ref.squeeze() + + image_ref_np = images_ref.numpy() + images_target_np = images_target.numpy() + + def process(i): + cm = ColorMatcher() + image_target_np_i = images_target_np if batch_size == 1 else images_target[i].numpy() + image_ref_np_i = image_ref_np if image_ref.size(0) == 1 else images_ref[i].numpy() + try: + image_result = cm.transfer(src=image_target_np_i, ref=image_ref_np_i, method=method) # Avoid potential blur when only the fully color-matched image is used + if strength != 1: + image_result = image_target_np_i + strength * (image_result - image_target_np_i) + + return torch.from_numpy(image_result) + + except Exception as e: + print(f"Thread {i} error: {e}") + return torch.from_numpy(image_target_np_i) # fallback + + if multithread and batch_size > 1: + max_threads = min(os.cpu_count() or 1, batch_size) + with ThreadPoolExecutor(max_workers=max_threads) as executor: + out = list(executor.map(process, range(batch_size))) + else: + out = [process(i) for i in range(batch_size)] + + out = torch.stack(out, dim=0).to(torch.float32) + out.clamp_(0, 1) + return (out,) + +class ColorMatchV2(io.ComfyNode): + @classmethod + def define_schema(cls): + return io.Schema( + node_id="ColorMatchV2", + category="KJNodes/image", + description=""" +color-matcher enables color transfer across images which comes in handy for automatic +color-grading of photographs, paintings and film sequences as well as light-field +and stopmotion corrections. + +The methods behind the mappings are based on the approach from Reinhard et al., +the Monge-Kantorovich Linearization (MKL) as proposed by Pitie et al. and our analytical solution +to a Multi-Variate Gaussian Distribution (MVGD) transfer in conjunction with classical histogram +matching. As shown below our HM-MVGD-HM compound outperforms existing methods. +https://github.com/hahnec/color-matcher/ + +'reinhard_lab_gpu' method uses Kornia for GPU-accelerated color transfer in Lab color space. +""", + inputs=[ + io.Image.Input("image_target"), + io.Image.Input("image_ref"), + io.Combo.Input("method", + options=['mkl', 'hm', 'reinhard', 'mvgd', 'hm-mvgd-hm', 'hm-mkl-hm', 'reinhard_lab_gpu'], + default='mkl'), + io.Float.Input("strength", default=1.0, min=0.0, max=10.0, step=0.01), + io.Boolean.Input("multithread", default=True), + ], + outputs=[ + io.Image.Output(display_name="image"), + ], + ) + + @classmethod + def execute(cls, image_target, image_ref, method, strength=1.0, multithread=True) -> io.NodeOutput: + # Skip unnecessary processing + if strength == 0: + return io.NodeOutput(image_target) + + if method == "reinhard_lab_gpu": + import kornia + device = model_management.get_torch_device() + + B, H, W, C = image_target.shape + + src_bchw = image_target.to(device).permute(0, 3, 1, 2).contiguous() # (B, H, W, C) -> (B, C, H, W) + ref_bchw = image_ref.to(device).permute(0, 3, 1, 2).contiguous() + # RGB->Lab + src_lab = kornia.color.rgb_to_lab(src_bchw) + ref_lab = kornia.color.rgb_to_lab(ref_bchw) + + src_lab_flat = src_lab.view(B, C, -1) # (B, C, HW) + ref_lab_flat = ref_lab.view(ref_lab.shape[0], C, -1) # (B or 1, C, HW) + + src_std, src_mean = torch.std_mean(src_lab_flat, dim=-1, keepdim=True, unbiased=False) + ref_std, ref_mean = torch.std_mean(ref_lab_flat, dim=-1, keepdim=True, unbiased=False) + src_std = src_std.clamp_min_(1e-6) + + if ref_lab.shape[0] == 1 and B > 1: + ref_mean = ref_mean.expand(B, -1, -1) + ref_std = ref_std.expand(B, -1, -1) + + corrected_lab_flat = (src_lab_flat - src_mean) * (ref_std / src_std) + ref_mean + corrected_lab = corrected_lab_flat.view(B, C, H, W) + + # Lab->RGB + corrected_rgb_01 = kornia.color.lab_to_rgb(corrected_lab) + out = (1.0 - strength) * src_bchw + strength * corrected_rgb_01 + out = out.permute(0, 2, 3, 1).contiguous() # (B, C, H, W) -> (B, H, W, C) + + return io.NodeOutput(out.cpu().float().clamp_(0, 1)) + + try: + from color_matcher import ColorMatcher + except: + raise Exception("Can't import color-matcher, did you install requirements.txt? Manual install: pip install color-matcher") + + batch_size = image_target.size(0) + ref_batch_size = image_ref.size(0) + + def process(i): + cm = ColorMatcher() + image_target_np = image_target[i].cpu().numpy() + image_ref_np = image_ref[min(i, ref_batch_size - 1)].cpu().numpy() + try: + image_result = cm.transfer(src=image_target_np, ref=image_ref_np, method=method) + if strength != 1: + image_result = image_target_np + strength * (image_result - image_target_np) + + return torch.from_numpy(image_result) + + except Exception as e: + logging.error(f"Thread {i} error: {e}") + return torch.from_numpy(image_target_np) # fallback + if multithread and batch_size > 1: + max_threads = min(os.cpu_count() or 1, batch_size) + with ThreadPoolExecutor(max_workers=max_threads) as executor: + out = list(executor.map(process, range(batch_size))) + else: + out = [process(i) for i in range(batch_size)] + + out = torch.stack(out, dim=0).to(torch.float32).clamp_(0, 1) + + return io.NodeOutput(out) + +class SaveImageWithAlpha: + def __init__(self): + self.output_dir = folder_paths.get_output_directory() + self.type = "output" + self.prefix_append = "" + + @classmethod + def INPUT_TYPES(s): + return {"required": + {"images": ("IMAGE", ), + "mask": ("MASK", ), + "filename_prefix": ("STRING", {"default": "ComfyUI"})}, + "hidden": {"prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO"}, + } + + RETURN_TYPES = () + FUNCTION = "save_images_alpha" + OUTPUT_NODE = True + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Saves an image and mask as .PNG with the mask as the alpha channel. +""" + + def save_images_alpha(self, images, mask, filename_prefix="ComfyUI_image_with_alpha", prompt=None, extra_pnginfo=None): + from PIL.PngImagePlugin import PngInfo + filename_prefix += self.prefix_append + full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir, images[0].shape[1], images[0].shape[0]) + results = list() + def file_counter(): + max_counter = 0 + # Loop through the existing files + for existing_file in sorted(os.listdir(full_output_folder)): + # Check if the file matches the expected format + match = re.fullmatch(fr"{filename}_(\d+)_?\.[a-zA-Z0-9]+", existing_file) + if match: + # Extract the numeric portion of the filename + file_counter = int(match.group(1)) + # Update the maximum counter value if necessary + if file_counter > max_counter: + max_counter = file_counter + return max_counter + + for image, alpha in zip(images, mask): + i = 255. * image.cpu().numpy() + a = 255. * (1.0 - alpha.cpu().float()).numpy() + img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8)) + + # Resize the mask to match the image size + a_resized = Image.fromarray(a).resize(img.size, Image.LANCZOS) + a_resized = np.clip(a_resized, 0, 255).astype(np.uint8) + img.putalpha(Image.fromarray(a_resized, mode='L')) + metadata = None + if not args.disable_metadata: + metadata = PngInfo() + if prompt is not None: + metadata.add_text("prompt", json.dumps(prompt)) + if extra_pnginfo is not None: + for x in extra_pnginfo: + metadata.add_text(x, json.dumps(extra_pnginfo[x])) + + # Increment the counter by 1 to get the next available value + counter = file_counter() + 1 + file = f"{filename}_{counter:05}.png" + img.save(os.path.join(full_output_folder, file), pnginfo=metadata, compress_level=4) + results.append({ + "filename": file, + "subfolder": subfolder, + "type": self.type + }) + + return { "ui": { "images": results } } + +class ImageConcanate: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "image1": ("IMAGE",), + "image2": ("IMAGE",), + "direction": ( + [ 'right', + 'down', + 'left', + 'up', + ], + { + "default": 'right' + }), + "match_image_size": ("BOOLEAN", {"default": True}), + }} + + RETURN_TYPES = ("IMAGE",) + FUNCTION = "concatenate" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Concatenates the image2 to image1 in the specified direction. +""" + + def concatenate(self, image1, image2, direction, match_image_size, first_image_shape=None): + # Check if the batch sizes are different + batch_size1 = image1.shape[0] + batch_size2 = image2.shape[0] + + if batch_size1 != batch_size2: + # Calculate the number of repetitions needed + max_batch_size = max(batch_size1, batch_size2) + repeats1 = max_batch_size - batch_size1 + repeats2 = max_batch_size - batch_size2 + + # Repeat the last image to match the largest batch size + if repeats1 > 0: + last_image1 = image1[-1].unsqueeze(0).repeat(repeats1, 1, 1, 1) + image1 = torch.cat([image1.clone(), last_image1], dim=0) + if repeats2 > 0: + last_image2 = image2[-1].unsqueeze(0).repeat(repeats2, 1, 1, 1) + image2 = torch.cat([image2.clone(), last_image2], dim=0) + + if match_image_size: + # Use first_image_shape if provided; otherwise, default to image1's shape + target_shape = first_image_shape if first_image_shape is not None else image1.shape + + original_height = image2.shape[1] + original_width = image2.shape[2] + original_aspect_ratio = original_width / original_height + + if direction in ['left', 'right']: + # Match the height and adjust the width to preserve aspect ratio + target_height = target_shape[1] # B, H, W, C format + target_width = int(target_height * original_aspect_ratio) + elif direction in ['up', 'down']: + # Match the width and adjust the height to preserve aspect ratio + target_width = target_shape[2] # B, H, W, C format + target_height = int(target_width / original_aspect_ratio) + + # Adjust image2 to the expected format for common_upscale + image2_for_upscale = image2.movedim(-1, 1) # Move C to the second position (B, C, H, W) + + # Resize image2 to match the target size while preserving aspect ratio + image2_resized = common_upscale(image2_for_upscale, target_width, target_height, "lanczos", "disabled") + + # Adjust image2 back to the original format (B, H, W, C) after resizing + image2_resized = image2_resized.movedim(1, -1) + else: + image2_resized = image2 + + # Ensure both images have the same number of channels + channels_image1 = image1.shape[-1] + channels_image2 = image2_resized.shape[-1] + + if channels_image1 != channels_image2: + if channels_image1 < channels_image2: + # Add alpha channel to image1 if image2 has it + alpha_channel = torch.ones((*image1.shape[:-1], channels_image2 - channels_image1), device=image1.device) + image1 = torch.cat((image1, alpha_channel), dim=-1) + else: + # Add alpha channel to image2 if image1 has it + alpha_channel = torch.ones((*image2_resized.shape[:-1], channels_image1 - channels_image2), device=image2_resized.device) + image2_resized = torch.cat((image2_resized, alpha_channel), dim=-1) + + + # Concatenate based on the specified direction + if direction == 'right': + concatenated_image = torch.cat((image1, image2_resized), dim=2) # Concatenate along width + elif direction == 'down': + concatenated_image = torch.cat((image1, image2_resized), dim=1) # Concatenate along height + elif direction == 'left': + concatenated_image = torch.cat((image2_resized, image1), dim=2) # Concatenate along width + elif direction == 'up': + concatenated_image = torch.cat((image2_resized, image1), dim=1) # Concatenate along height + return concatenated_image, + +import torch # Make sure you have PyTorch installed + +class ImageConcatFromBatch: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "images": ("IMAGE",), + "num_columns": ("INT", {"default": 3, "min": 1, "max": 255, "step": 1}), + "match_image_size": ("BOOLEAN", {"default": False}), + "max_resolution": ("INT", {"default": 4096}), + }, + } + + RETURN_TYPES = ("IMAGE",) + FUNCTION = "concat" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ + Concatenates images from a batch into a grid with a specified number of columns. + """ + + def concat(self, images, num_columns, match_image_size, max_resolution): + # Assuming images is a batch of images (B, H, W, C) + batch_size, height, width, channels = images.shape + num_rows = (batch_size + num_columns - 1) // num_columns # Calculate number of rows + + print(f"Initial dimensions: batch_size={batch_size}, height={height}, width={width}, channels={channels}") + print(f"num_rows={num_rows}, num_columns={num_columns}") + + if match_image_size: + target_shape = images[0].shape + + resized_images = [] + for image in images: + original_height = image.shape[0] + original_width = image.shape[1] + original_aspect_ratio = original_width / original_height + + if original_aspect_ratio > 1: + target_height = target_shape[0] + target_width = int(target_height * original_aspect_ratio) + else: + target_width = target_shape[1] + target_height = int(target_width / original_aspect_ratio) + + print(f"Resizing image from ({original_height}, {original_width}) to ({target_height}, {target_width})") + + # Resize the image to match the target size while preserving aspect ratio + resized_image = common_upscale(image.movedim(-1, 0), target_width, target_height, "lanczos", "disabled") + resized_image = resized_image.movedim(0, -1) # Move channels back to the last dimension + resized_images.append(resized_image) + + # Convert the list of resized images back to a tensor + images = torch.stack(resized_images) + + height, width = target_shape[:2] # Update height and width + + # Initialize an empty grid + grid_height = num_rows * height + grid_width = num_columns * width + + print(f"Grid dimensions before scaling: grid_height={grid_height}, grid_width={grid_width}") + + # Original scale factor calculation remains unchanged + scale_factor = min(max_resolution / grid_height, max_resolution / grid_width, 1.0) + + # Apply scale factor to height and width + scaled_height = height * scale_factor + scaled_width = width * scale_factor + + # Round scaled dimensions to the nearest number divisible by 8 + height = max(1, int(round(scaled_height / 8) * 8)) + width = max(1, int(round(scaled_width / 8) * 8)) + + if abs(scaled_height - height) > 4: + height = max(1, int(round((scaled_height + 4) / 8) * 8)) + if abs(scaled_width - width) > 4: + width = max(1, int(round((scaled_width + 4) / 8) * 8)) + + # Recalculate grid dimensions with adjusted height and width + grid_height = num_rows * height + grid_width = num_columns * width + print(f"Grid dimensions after scaling: grid_height={grid_height}, grid_width={grid_width}") + print(f"Final image dimensions: height={height}, width={width}") + + grid = torch.zeros((grid_height, grid_width, channels), dtype=images.dtype) + + for idx, image in enumerate(images): + resized_image = torch.nn.functional.interpolate(image.unsqueeze(0).permute(0, 3, 1, 2), size=(height, width), mode="bilinear").squeeze().permute(1, 2, 0) + row = idx // num_columns + col = idx % num_columns + grid[row*height:(row+1)*height, col*width:(col+1)*width, :] = resized_image + + return grid.unsqueeze(0), + + +class ImageGridComposite2x2: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "image1": ("IMAGE",), + "image2": ("IMAGE",), + "image3": ("IMAGE",), + "image4": ("IMAGE",), + }} + + RETURN_TYPES = ("IMAGE",) + FUNCTION = "compositegrid" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Concatenates the 4 input images into a 2x2 grid. +""" + + def compositegrid(self, image1, image2, image3, image4): + top_row = torch.cat((image1, image2), dim=2) + bottom_row = torch.cat((image3, image4), dim=2) + grid = torch.cat((top_row, bottom_row), dim=1) + return (grid,) + +class ImageGridComposite3x3: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "image1": ("IMAGE",), + "image2": ("IMAGE",), + "image3": ("IMAGE",), + "image4": ("IMAGE",), + "image5": ("IMAGE",), + "image6": ("IMAGE",), + "image7": ("IMAGE",), + "image8": ("IMAGE",), + "image9": ("IMAGE",), + }} + + RETURN_TYPES = ("IMAGE",) + FUNCTION = "compositegrid" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Concatenates the 9 input images into a 3x3 grid. +""" + + def compositegrid(self, image1, image2, image3, image4, image5, image6, image7, image8, image9): + top_row = torch.cat((image1, image2, image3), dim=2) + mid_row = torch.cat((image4, image5, image6), dim=2) + bottom_row = torch.cat((image7, image8, image9), dim=2) + grid = torch.cat((top_row, mid_row, bottom_row), dim=1) + return (grid,) + +class ImageBatchTestPattern: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "batch_size": ("INT", {"default": 1,"min": 1, "max": 255, "step": 1}), + "start_from": ("INT", {"default": 0,"min": 0, "max": 255, "step": 1}), + "text_x": ("INT", {"default": 256,"min": 0, "max": 4096, "step": 1}), + "text_y": ("INT", {"default": 256,"min": 0, "max": 4096, "step": 1}), + "width": ("INT", {"default": 512,"min": 16, "max": 4096, "step": 1}), + "height": ("INT", {"default": 512,"min": 16, "max": 4096, "step": 1}), + "font": (folder_paths.get_filename_list("kjnodes_fonts"), ), + "font_size": ("INT", {"default": 255,"min": 8, "max": 4096, "step": 1}), + }} + + RETURN_TYPES = ("IMAGE",) + FUNCTION = "generatetestpattern" + CATEGORY = "KJNodes/text" + + def generatetestpattern(self, batch_size, font, font_size, start_from, width, height, text_x, text_y): + out = [] + # Generate the sequential numbers for each image + numbers = np.arange(start_from, start_from + batch_size) + font_path = folder_paths.get_full_path("kjnodes_fonts", font) + + for number in numbers: + # Create a black image with the number as a random color text + image = Image.new("RGB", (width, height), color='black') + draw = ImageDraw.Draw(image) + + # Generate a random color for the text + font_color = (random.randint(0, 255), random.randint(0, 255), random.randint(0, 255)) + + font = ImageFont.truetype(font_path, font_size) + + # Get the size of the text and position it in the center + text = str(number) + + try: + draw.text((text_x, text_y), text, font=font, fill=font_color, features=['-liga']) + except: + draw.text((text_x, text_y), text, font=font, fill=font_color,) + + # Convert the image to a numpy array and normalize the pixel values + image_np = np.array(image).astype(np.float32) / 255.0 + image_tensor = torch.from_numpy(image_np).unsqueeze(0) + out.append(image_tensor) + out_tensor = torch.cat(out, dim=0) + + return (out_tensor,) + +class ImageGrabPIL: + + @classmethod + def IS_CHANGED(cls): + + return + + RETURN_TYPES = ("IMAGE",) + RETURN_NAMES = ("image",) + FUNCTION = "screencap" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Captures an area specified by screen coordinates. +Can be used for realtime diffusion with autoqueue. +""" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "x": ("INT", {"default": 0,"min": 0, "max": 4096, "step": 1}), + "y": ("INT", {"default": 0,"min": 0, "max": 4096, "step": 1}), + "width": ("INT", {"default": 512,"min": 0, "max": 4096, "step": 1}), + "height": ("INT", {"default": 512,"min": 0, "max": 4096, "step": 1}), + "num_frames": ("INT", {"default": 1,"min": 1, "max": 255, "step": 1}), + "delay": ("FLOAT", {"default": 0.1,"min": 0.0, "max": 10.0, "step": 0.01}), + }, + } + + def screencap(self, x, y, width, height, num_frames, delay): + start_time = time.time() + captures = [] + bbox = (x, y, x + width, y + height) + + for _ in range(num_frames): + # Capture screen + screen_capture = ImageGrab.grab(bbox=bbox) + screen_capture_torch = torch.from_numpy(np.array(screen_capture, dtype=np.float32) / 255.0).unsqueeze(0) + captures.append(screen_capture_torch) + + # Wait for a short delay if more than one frame is to be captured + if num_frames > 1: + time.sleep(delay) + + elapsed_time = time.time() - start_time + print(f"screengrab took {elapsed_time} seconds.") + + return (torch.cat(captures, dim=0),) + +class Screencap_mss: + + @classmethod + def IS_CHANGED(s, **kwargs): + return float("NaN") + + RETURN_TYPES = ("IMAGE",) + RETURN_NAMES = ("image",) + FUNCTION = "screencap" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Captures an area specified by screen coordinates. +Can be used for realtime diffusion with autoqueue. +""" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "x": ("INT", {"default": 0,"min": 0, "max": 10000, "step": 1}), + "y": ("INT", {"default": 0,"min": 0, "max": 10000, "step": 1}), + "width": ("INT", {"default": 512,"min": 0, "max": 10000, "step": 1}), + "height": ("INT", {"default": 512,"min": 0, "max": 10000, "step": 1}), + "num_frames": ("INT", {"default": 1,"min": 1, "max": 255, "step": 1}), + "delay": ("FLOAT", {"default": 0.1,"min": 0.0, "max": 10.0, "step": 0.01}), + }, + } + + def screencap(self, x, y, width, height, num_frames, delay): + from mss import mss + captures = [] + with mss() as sct: + bbox = {'top': y, 'left': x, 'width': width, 'height': height} + + for _ in range(num_frames): + sct_img = sct.grab(bbox) + img_np = np.array(sct_img) + img_torch = torch.from_numpy(img_np[..., [2, 1, 0]]).float() / 255.0 + captures.append(img_torch) + + if num_frames > 1: + time.sleep(delay) + + return (torch.stack(captures, 0),) + +class WebcamCaptureCV2: + + @classmethod + def IS_CHANGED(cls): + return + + RETURN_TYPES = ("IMAGE",) + RETURN_NAMES = ("image",) + FUNCTION = "capture" + CATEGORY = "KJNodes/experimental" + DESCRIPTION = """ +Captures a frame from a webcam using CV2. +Can be used for realtime diffusion with autoqueue. +""" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "x": ("INT", {"default": 0,"min": 0, "max": 4096, "step": 1}), + "y": ("INT", {"default": 0,"min": 0, "max": 4096, "step": 1}), + "width": ("INT", {"default": 512,"min": 0, "max": 4096, "step": 1}), + "height": ("INT", {"default": 512,"min": 0, "max": 4096, "step": 1}), + "cam_index": ("INT", {"default": 0,"min": 0, "max": 255, "step": 1}), + "release": ("BOOLEAN", {"default": False}), + }, + } + + def capture(self, x, y, cam_index, width, height, release): + # Check if the camera index has changed or the capture object doesn't exist + if not hasattr(self, "cap") or self.cap is None or self.current_cam_index != cam_index: + if hasattr(self, "cap") and self.cap is not None: + self.cap.release() + self.current_cam_index = cam_index + self.cap = cv2.VideoCapture(cam_index) + try: + self.cap.set(cv2.CAP_PROP_FRAME_WIDTH, width) + self.cap.set(cv2.CAP_PROP_FRAME_HEIGHT, height) + except: + pass + if not self.cap.isOpened(): + raise Exception("Could not open webcam") + + ret, frame = self.cap.read() + if not ret: + raise Exception("Failed to capture image from webcam") + + # Crop the frame to the specified bbox + frame = frame[y:y+height, x:x+width] + img_torch = torch.from_numpy(frame[..., [2, 1, 0]]).float() / 255.0 + + if release: + self.cap.release() + self.cap = None + + return (img_torch.unsqueeze(0),) + +class AddLabel: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "image":("IMAGE",), + "text_x": ("INT", {"default": 10, "min": 0, "max": 4096, "step": 1}), + "text_y": ("INT", {"default": 2, "min": 0, "max": 4096, "step": 1}), + "height": ("INT", {"default": 48, "min": -1, "max": 4096, "step": 1}), + "font_size": ("INT", {"default": 32, "min": 0, "max": 4096, "step": 1}), + "font_color": ("STRING", {"default": "white"}), + "label_color": ("STRING", {"default": "black"}), + "font": (folder_paths.get_filename_list("kjnodes_fonts"), ), + "text": ("STRING", {"default": "Text"}), + "direction": ( + [ 'up', + 'down', + 'left', + 'right', + 'overlay' + ], + { + "default": 'up' + }), + }, + "optional":{ + "caption": ("STRING", {"default": "", "forceInput": True}), + } + } + RETURN_TYPES = ("IMAGE",) + FUNCTION = "addlabel" + CATEGORY = "KJNodes/text" + DESCRIPTION = """ +Creates a new with the given text, and concatenates it to +either above or below the input image. +Note that this changes the input image's height! +Fonts are loaded from this folder: +ComfyUI/custom_nodes/ComfyUI-KJNodes/fonts +""" + + def addlabel(self, image, text_x, text_y, text, height, font_size, font_color, label_color, font, direction, caption=""): + batch_size = image.shape[0] + width = image.shape[2] + + font_path = os.path.join(script_directory, "fonts", "TTNorms-Black.otf") if font == "TTNorms-Black.otf" else folder_paths.get_full_path("kjnodes_fonts", font) + + # Parse colors using helper function + font_color_rgb = string_to_color(font_color) + label_color_rgb = string_to_color(label_color) + + # Convert to tuples for PIL + font_color_tuple = tuple(font_color_rgb[:3]) # RGB only + label_color_tuple = tuple(label_color_rgb[:3]) # RGB only + + def process_image(input_image, caption_text): + font = ImageFont.truetype(font_path, font_size) + lines = [] + for text_line in caption_text.split('\n'): + if text_line.strip() == "": + # Preserve empty lines for multiple newlines + lines.append("") + continue + words = text_line.split() + current_line = [] + for word in words: + if current_line: + test_line = " ".join(current_line + [word]) + else: + test_line = word + try: + test_line_width = font.getbbox(test_line)[2] + except Exception: + test_line_width = font.getsize(test_line)[0] + if test_line_width <= width - 2 * text_x: + current_line.append(word) + else: + lines.append(" ".join(current_line)) + current_line = [word] + if current_line: + lines.append(" ".join(current_line)) + + if direction == 'overlay': + pil_image = Image.fromarray((input_image.cpu().numpy() * 255).astype(np.uint8)) + else: + if height == -1: + # Adjust the image height automatically + margin = 8 + required_height = (text_y + len(lines) * font_size) + margin # Calculate required height + pil_image = Image.new("RGB", (width, required_height), label_color_tuple) + else: + # Initialize with a minimal height + label_image = Image.new("RGB", (width, height), label_color_tuple) + pil_image = label_image + + draw = ImageDraw.Draw(pil_image) + + + y_offset = text_y + for line in lines: + try: + draw.text((text_x, y_offset), line, font=font, fill=font_color_tuple, features=['-liga']) + except: + draw.text((text_x, y_offset), line, font=font, fill=font_color_tuple) + y_offset += font_size + + processed_image = torch.from_numpy(np.array(pil_image).astype(np.float32) / 255.0).unsqueeze(0) + return processed_image + + if caption == "": + processed_images = [process_image(img, text) for img in image] + else: + assert len(caption) == batch_size, f"Number of captions {(len(caption))} does not match number of images" + processed_images = [process_image(img, cap) for img, cap in zip(image, caption)] + processed_batch = torch.cat(processed_images, dim=0) + + # Combine images based on direction + if direction == 'down': + combined_images = torch.cat((image, processed_batch), dim=1) + elif direction == 'up': + combined_images = torch.cat((processed_batch, image), dim=1) + elif direction == 'left': + processed_batch = torch.rot90(processed_batch, 3, (2, 3)).permute(0, 3, 1, 2) + combined_images = torch.cat((processed_batch, image), dim=2) + elif direction == 'right': + processed_batch = torch.rot90(processed_batch, 3, (2, 3)).permute(0, 3, 1, 2) + combined_images = torch.cat((image, processed_batch), dim=2) + else: + combined_images = processed_batch + + return (combined_images,) + +class GetImageSizeAndCount: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "image": ("IMAGE",), + }} + + RETURN_TYPES = ("IMAGE","INT", "INT", "INT",) + RETURN_NAMES = ("image", "width", "height", "count",) + FUNCTION = "getsize" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Returns width, height and batch size of the image, +and passes it through unchanged. + +""" + + def getsize(self, image): + width = image.shape[2] + height = image.shape[1] + count = image.shape[0] + return {"ui": { + "text": [f"{count}x{width}x{height}"]}, + "result": (image, width, height, count) + } + +class GetLatentSizeAndCount: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "latent": ("LATENT",), + }} + + RETURN_TYPES = ("LATENT","INT", "INT", "INT", "INT", "INT") + RETURN_NAMES = ("latent", "batch_size", "channels", "frames", "height", "width") + FUNCTION = "getsize" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Returns latent tensor dimensions, +and passes the latent through unchanged. + +""" + def getsize(self, latent): + if len(latent["samples"].shape) == 5: + B, C, T, H, W = latent["samples"].shape + elif len(latent["samples"].shape) == 4: + B, C, H, W = latent["samples"].shape + T = 0 + else: + raise ValueError("Invalid latent shape") + + return {"ui": { + "text": [f"{B}x{C}x{T}x{H}x{W}"]}, + "result": (latent, B, C, T, H, W) + } + +class ImageBatchRepeatInterleaving: + + RETURN_TYPES = ("IMAGE", "MASK",) + FUNCTION = "repeat" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Repeats each image in a batch by the specified number of times. +Example batch of 5 images: 0, 1 ,2, 3, 4 +with repeats 2 becomes batch of 10 images: 0, 0, 1, 1, 2, 2, 3, 3, 4, 4 +""" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "images": ("IMAGE",), + "repeats": ("INT", {"default": 1, "min": 1, "max": 4096}), + }, + "optional": { + "mask": ("MASK",), + } + } + + def repeat(self, images, repeats, mask=None): + original_count = images.shape[0] + total_count = original_count * repeats + + repeated_images = torch.repeat_interleave(images, repeats=repeats, dim=0) + if mask is not None: + mask = torch.repeat_interleave(mask, repeats=repeats, dim=0) + else: + mask = torch.zeros((total_count, images.shape[1], images.shape[2]), + device=images.device, dtype=images.dtype) + for i in range(original_count): + mask[i * repeats] = 1.0 + + print("mask shape", mask.shape) + return (repeated_images, mask) + +class ImageUpscaleWithModelBatched: + @classmethod + def INPUT_TYPES(s): + return {"required": { "upscale_model": ("UPSCALE_MODEL",), + "images": ("IMAGE",), + "per_batch": ("INT", {"default": 16, "min": 1, "max": 4096, "step": 1}), + }, + "optional": { + "downscale_ratio": ("FLOAT", {"default": 1.0, "min": 0.01, "max": 1.0, "step": 0.01}), + "downscale_method": (["nearest-exact", "bilinear", "area", "bicubic", "lanczos"], {"default": "lanczos"}), + "precision": (["float32", "float16", "bfloat16"], {"default": "float32"}), + }} + RETURN_TYPES = ("IMAGE",) + FUNCTION = "upscale" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Same as ComfyUI native model upscaling node, +but allows setting sub-batches for reduced VRAM usage. +Optionally downscale the result with a ratio. +""" + def upscale(self, upscale_model, images, per_batch, downscale_ratio=1.0, downscale_method="lanczos", precision="float32"): + dtype = torch.float16 if precision == "float16" else torch.bfloat16 if precision == "bfloat16" else torch.float32 + device = model_management.get_torch_device() + upscale_model.to(device, dtype=dtype) + in_img = images.movedim(-1,-3).to(dtype) + + steps = in_img.shape[0] + pbar = ProgressBar(steps) + t = [] + + for start_idx in range(0, in_img.shape[0], per_batch): + sub_images = upscale_model(in_img[start_idx:start_idx+per_batch].to(device)) + t.append(sub_images.cpu()) + # Calculate the number of images processed in this batch + batch_count = sub_images.shape[0] + # Update the progress bar by the number of images processed in this batch + pbar.update(batch_count) + upscale_model.cpu() + + t = torch.cat(t, dim=0).permute(0, 2, 3, 1).cpu().float() + + # Apply downscaling if ratio is less than 1.0 + if downscale_ratio < 1.0: + original_height = t.shape[1] + original_width = t.shape[2] + new_height = int(original_height * downscale_ratio) + new_width = int(original_width * downscale_ratio) + t = t.movedim(-1, 1) + t = common_upscale(t, new_width, new_height, downscale_method, "disabled") + t = t.movedim(1, -1) + + return (t,) + +class ImageNormalize_Neg1_To_1: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "images": ("IMAGE",), + + }} + RETURN_TYPES = ("IMAGE",) + FUNCTION = "normalize" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Normalize the images to be in the range [-1, 1] +""" + + def normalize(self,images): + images = images * 2.0 - 1.0 + return (images,) + +class RemapImageRange: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "image": ("IMAGE",), + "min": ("FLOAT", {"default": 0.0,"min": -10.0, "max": 1.0, "step": 0.01}), + "max": ("FLOAT", {"default": 1.0,"min": 0.0, "max": 10.0, "step": 0.01}), + "clamp": ("BOOLEAN", {"default": True}), + }, + } + + RETURN_TYPES = ("IMAGE",) + FUNCTION = "remap" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Remaps the image values to the specified range. +""" + + def remap(self, image, min, max, clamp): + if image.dtype == torch.float16: + image = image.to(torch.float32) + image = min + image * (max - min) + if clamp: + image = torch.clamp(image, min=0.0, max=1.0) + return (image, ) + +class SplitImageChannels: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "image": ("IMAGE",), + }, + } + + RETURN_TYPES = ("IMAGE", "IMAGE", "IMAGE", "MASK") + RETURN_NAMES = ("red", "green", "blue", "mask") + FUNCTION = "split" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Splits image channels into images where the selected channel +is repeated for all channels, and the alpha as a mask. +""" + + def split(self, image): + red = image[:, :, :, 0:1] # Red channel + green = image[:, :, :, 1:2] # Green channel + blue = image[:, :, :, 2:3] # Blue channel + alpha = image[:, :, :, 3:4] # Alpha channel + alpha = alpha.squeeze(-1) + + # Repeat the selected channel for all channels + red = torch.cat([red, red, red], dim=3) + green = torch.cat([green, green, green], dim=3) + blue = torch.cat([blue, blue, blue], dim=3) + return (red, green, blue, alpha) + +class MergeImageChannels: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "red": ("IMAGE",), + "green": ("IMAGE",), + "blue": ("IMAGE",), + + }, + "optional": { + "alpha": ("MASK", {"default": None}), + }, + } + + RETURN_TYPES = ("IMAGE",) + RETURN_NAMES = ("image",) + FUNCTION = "merge" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Merges channel data into an image. +""" + + def merge(self, red, green, blue, alpha=None): + image = torch.stack([ + red[..., 0, None], # Red channel + green[..., 1, None], # Green channel + blue[..., 2, None] # Blue channel + ], dim=-1) + image = image.squeeze(-2) + if alpha is not None: + image = torch.cat([image, alpha.unsqueeze(-1)], dim=-1) + return (image,) + +class ImagePadForOutpaintMasked: + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "image": ("IMAGE",), + "left": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "top": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "right": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "bottom": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "feathering": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 1}), + }, + "optional": { + "mask": ("MASK",), + } + } + + RETURN_TYPES = ("IMAGE", "MASK") + FUNCTION = "expand_image" + + CATEGORY = "image" + + def expand_image(self, image, left, top, right, bottom, feathering, mask=None): + if mask is not None: + if torch.allclose(mask, torch.zeros_like(mask)): + print("Warning: The incoming mask is fully black. Handling it as None.") + mask = None + B, H, W, C = image.size() + + new_image = torch.ones( + (B, H + top + bottom, W + left + right, C), + dtype=torch.float32, + ) * 0.5 + + new_image[:, top:top + H, left:left + W, :] = image + + if mask is None: + new_mask = torch.ones( + (B, H + top + bottom, W + left + right), + dtype=torch.float32, + ) + + t = torch.zeros( + (B, H, W), + dtype=torch.float32 + ) + else: + # If a mask is provided, pad it to fit the new image size + mask = F.pad(mask, (left, right, top, bottom), mode='constant', value=0) + mask = 1 - mask + t = torch.zeros_like(mask) + + if feathering > 0 and feathering * 2 < H and feathering * 2 < W: + + for i in range(H): + for j in range(W): + dt = i if top != 0 else H + db = H - i if bottom != 0 else H + + dl = j if left != 0 else W + dr = W - j if right != 0 else W + + d = min(dt, db, dl, dr) + + if d >= feathering: + continue + + v = (feathering - d) / feathering + + if mask is None: + t[:, i, j] = v * v + else: + t[:, top + i, left + j] = v * v + + if mask is None: + new_mask[:, top:top + H, left:left + W] = t + return (new_image, new_mask,) + else: + return (new_image, mask,) + +class ImagePadForOutpaintTargetSize: + upscale_methods = ["nearest-exact", "bilinear", "area", "bicubic", "lanczos"] + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "image": ("IMAGE",), + "target_width": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "target_height": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 8}), + "feathering": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 1}), + "upscale_method": (s.upscale_methods,), + }, + "optional": { + "mask": ("MASK",), + } + } + + RETURN_TYPES = ("IMAGE", "MASK") + FUNCTION = "expand_image" + + CATEGORY = "image" + + def expand_image(self, image, target_width, target_height, feathering, upscale_method, mask=None): + B, H, W, C = image.size() + new_height = H + new_width = W + # Calculate the scaling factor while maintaining aspect ratio + scaling_factor = min(target_width / W, target_height / H) + + # Check if the image needs to be downscaled + if scaling_factor < 1: + image = image.movedim(-1,1) + # Calculate the new width and height after downscaling + new_width = int(W * scaling_factor) + new_height = int(H * scaling_factor) + + # Downscale the image + image_scaled = common_upscale(image, new_width, new_height, upscale_method, "disabled").movedim(1,-1) + else: + # If downscaling is not needed, use the original image dimensions + image_scaled = image + + # Ensure mask dimensions match image dimensions + if mask is not None: + mask_scaled = mask.unsqueeze(0) # Add an extra dimension for batch size + mask_scaled = F.interpolate(mask_scaled, size=(new_height, new_width), mode="nearest") + mask_scaled = mask_scaled.squeeze(0) # Remove the extra dimension after interpolation + else: + mask_scaled = None + + # Calculate how much padding is needed to reach the target dimensions + pad_top = max(0, (target_height - new_height) // 2) + pad_bottom = max(0, target_height - new_height - pad_top) + pad_left = max(0, (target_width - new_width) // 2) + pad_right = max(0, target_width - new_width - pad_left) + + # Now call the original expand_image with the calculated padding + return ImagePadForOutpaintMasked.expand_image(self, image_scaled, pad_left, pad_top, pad_right, pad_bottom, feathering, mask_scaled) + +class ImagePrepForICLora: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "reference_image": ("IMAGE",), + "output_width": ("INT", {"default": 1024, "min": 1, "max": 4096, "step": 1}), + "output_height": ("INT", {"default": 1024, "min": 1, "max": 4096, "step": 1}), + "border_width": ("INT", {"default": 0, "min": 0, "max": 4096, "step": 1}), + }, + "optional": { + "latent_image": ("IMAGE",), + "latent_mask": ("MASK",), + "reference_mask": ("MASK",), + } + } + + RETURN_TYPES = ("IMAGE", "MASK") + FUNCTION = "expand_image" + + CATEGORY = "image" + + def expand_image(self, reference_image, output_width, output_height, border_width, latent_image=None, reference_mask=None, latent_mask=None): + + if reference_mask is not None: + if torch.allclose(reference_mask, torch.zeros_like(reference_mask)): + print("Warning: The incoming mask is fully black. Handling it as None.") + reference_mask = None + image = reference_image + if latent_image is not None: + if image.shape[0] != latent_image.shape[0]: + image = image.repeat(latent_image.shape[0], 1, 1, 1) + B, H, W, C = image.size() + + # Handle mask + if reference_mask is not None: + resized_mask = torch.nn.functional.interpolate( + reference_mask.unsqueeze(1), + size=(H, W), + mode='nearest' + ).squeeze(1) + print(resized_mask.shape) + image = image * resized_mask.unsqueeze(-1) + + # Calculate new width maintaining aspect ratio + new_width = int((W / H) * output_height) + + # Resize image to new height while maintaining aspect ratio + resized_image = common_upscale(image.movedim(-1,1), new_width, output_height, "lanczos", "disabled").movedim(1,-1) + + # Create padded image + if latent_image is None: + pad_image = torch.zeros((B, output_height, output_width, C), device=image.device) + else: + resized_latent_image = common_upscale(latent_image.movedim(-1,1), output_width, output_height, "lanczos", "disabled").movedim(1,-1) + pad_image = resized_latent_image + if latent_mask is not None: + resized_latent_mask = torch.nn.functional.interpolate( + latent_mask.unsqueeze(1), + size=(pad_image.shape[1], pad_image.shape[2]), + mode='nearest' + ).squeeze(1) + + if border_width > 0: + border = torch.zeros((B, output_height, border_width, C), device=image.device) + padded_image = torch.cat((resized_image, border, pad_image), dim=2) + if latent_mask is not None: + padded_mask = torch.zeros((B, padded_image.shape[1], padded_image.shape[2]), device=image.device) + padded_mask[:, :, (new_width + border_width):] = resized_latent_mask + else: + padded_mask = torch.ones((B, padded_image.shape[1], padded_image.shape[2]), device=image.device) + padded_mask[:, :, :new_width + border_width] = 0 + else: + padded_image = torch.cat((resized_image, pad_image), dim=2) + if latent_mask is not None: + padded_mask = torch.zeros((B, padded_image.shape[1], padded_image.shape[2]), device=image.device) + padded_mask[:, :, new_width:] = resized_latent_mask + else: + padded_mask = torch.ones((B, padded_image.shape[1], padded_image.shape[2]), device=image.device) + padded_mask[:, :, :new_width] = 0 + + return (padded_image, padded_mask) + + +class ImageAndMaskPreview(SaveImage): + def __init__(self): + self.output_dir = folder_paths.get_temp_directory() + self.type = "temp" + self.prefix_append = "_temp_" + ''.join(random.choice("abcdefghijklmnopqrstupvxyz") for x in range(5)) + self.compress_level = 4 + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "mask_opacity": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01}), + "mask_color": ("STRING", {"default": "255, 255, 255", "tooltip": "RGB (255,255,255) or RGBA (255,255,255,128) or Hex (#RRGGBB / #RRGGBBAA)"}), + "pass_through": ("BOOLEAN", {"default": False}), + }, + "optional": { + "image": ("IMAGE",), + "mask": ("MASK",), + }, + "hidden": {"prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO"}, + } + RETURN_TYPES = ("IMAGE",) + RETURN_NAMES = ("composite",) + FUNCTION = "execute" + CATEGORY = "KJNodes/masking" + DESCRIPTION = """ +Preview an image or a mask, when both inputs are used +composites the mask on top of the image. +with pass_through on the preview is disabled and the +composite is returned from the composite slot instead, +this allows for the preview to be passed for video combine +nodes for example. Supports RGBA for mask_color to adjust transparency per color. +""" + + def execute(self, mask_opacity, mask_color, pass_through, filename_prefix="ComfyUI", image=None, mask=None, prompt=None, extra_pnginfo=None): + if mask is not None and image is None: + preview = mask.reshape((-1, 1, mask.shape[-2], mask.shape[-1])).movedim(1, -1).expand(-1, -1, -1, 3) + elif mask is None and image is not None: + preview = image + elif mask is not None and image is not None: + mask_adjusted = mask * mask_opacity + mask_image = mask.reshape((-1, 1, mask.shape[-2], mask.shape[-1])).movedim(1, -1).expand(-1, -1, -1, 3).clone() + + # Use helper function to parse color string + color_list = string_to_color(mask_color) + + # Apply RGB channels + mask_image[:, :, :, 0] = color_list[0] / 255 # Red channel + mask_image[:, :, :, 1] = color_list[1] / 255 # Green channel + mask_image[:, :, :, 2] = color_list[2] / 255 # Blue channel + + if len(color_list) == 4: # Apply Alpha channel if present + alpha_factor = color_list[3] / 255.0 + mask_adjusted = mask_adjusted * alpha_factor + + destination, source = node_helpers.image_alpha_fix(image, mask_image) + destination = destination.clone().movedim(-1, 1) + preview = composite(destination, source.movedim(-1, 1), 0, 0, mask_adjusted, 1, True).movedim(1, -1) + if pass_through: + return (preview, ) + return(self.save_images(preview, filename_prefix, prompt, extra_pnginfo)) + +def crossfade(images_1, images_2, alpha): + crossfade = (1 - alpha) * images_1 + alpha * images_2 + return crossfade +def ease_in(t): + return t * t +def ease_out(t): + return 1 - (1 - t) * (1 - t) +def ease_in_out(t): + return 3 * t * t - 2 * t * t * t +def bounce(t): + if t < 0.5: + return ease_out(t * 2) * 0.5 + else: + return ease_in((t - 0.5) * 2) * 0.5 + 0.5 +def elastic(t): + return math.sin(13 * math.pi / 2 * t) * math.pow(2, 10 * (t - 1)) +def glitchy(t): + return t + 0.1 * math.sin(40 * t) +def exponential_ease_out(t): + return 1 - (1 - t) ** 4 + +easing_functions = { + "linear": lambda t: t, + "ease_in": ease_in, + "ease_out": ease_out, + "ease_in_out": ease_in_out, + "bounce": bounce, + "elastic": elastic, + "glitchy": glitchy, + "exponential_ease_out": exponential_ease_out, +} + +class CrossFadeImages: + + RETURN_TYPES = ("IMAGE",) + FUNCTION = "crossfadeimages" + CATEGORY = "KJNodes/image" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "images_1": ("IMAGE",), + "images_2": ("IMAGE",), + "interpolation": (["linear", "ease_in", "ease_out", "ease_in_out", "bounce", "elastic", "glitchy", "exponential_ease_out"],), + "transition_start_index": ("INT", {"default": 1,"min": -4096, "max": 4096, "step": 1}), + "transitioning_frames": ("INT", {"default": 1,"min": 0, "max": 4096, "step": 1}), + "start_level": ("FLOAT", {"default": 0.0,"min": 0.0, "max": 1.0, "step": 0.01}), + "end_level": ("FLOAT", {"default": 1.0,"min": 0.0, "max": 1.0, "step": 0.01}), + }, + } + + def crossfadeimages(self, images_1, images_2, transition_start_index, transitioning_frames, interpolation, start_level, end_level): + + crossfade_images = [] + + if transition_start_index < 0: + transition_start_index = len(images_1) + transition_start_index + if transition_start_index < 0: + raise ValueError("Transition start index is out of range for images_1.") + + transitioning_frames = min(transitioning_frames, len(images_1) - transition_start_index, len(images_2)) + + alphas = torch.linspace(start_level, end_level, transitioning_frames) + for i in range(transitioning_frames): + alpha = alphas[i] + image1 = images_1[transition_start_index + i] + image2 = images_2[i] + easing_function = easing_functions.get(interpolation) + alpha = easing_function(alpha) # Apply the easing function to the alpha value + + crossfade_image = crossfade(image1, image2, alpha) + crossfade_images.append(crossfade_image) + + # Convert crossfade_images to tensor + crossfade_images = torch.stack(crossfade_images, dim=0) + + # Append the beginning of images_1 (before the transition) + beginning_images_1 = images_1[:transition_start_index] + crossfade_images = torch.cat([beginning_images_1, crossfade_images], dim=0) + + # Append the remaining frames of images_2 (after the transition) + remaining_images_2 = images_2[transitioning_frames:] + if len(remaining_images_2) > 0: + crossfade_images = torch.cat([crossfade_images, remaining_images_2], dim=0) + + return (crossfade_images, ) + +class CrossFadeImagesMulti: + RETURN_TYPES = ("IMAGE",) + FUNCTION = "crossfadeimages" + CATEGORY = "KJNodes/image" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "inputcount": ("INT", {"default": 2, "min": 2, "max": 1000, "step": 1}), + "image_1": ("IMAGE",), + "interpolation": (["linear", "ease_in", "ease_out", "ease_in_out", "bounce", "elastic", "glitchy", "exponential_ease_out"],), + "transitioning_frames": ("INT", {"default": 1,"min": 0, "max": 4096, "step": 1}), + }, + "optional": { + "image_2": ("IMAGE",), + } + } + + def crossfadeimages(self, inputcount, transitioning_frames, interpolation, **kwargs): + + image_1 = kwargs["image_1"] + first_image_shape = image_1.shape + first_image_device = image_1.device + height = image_1.shape[1] + width = image_1.shape[2] + + easing_function = easing_functions[interpolation] + + for c in range(1, inputcount): + frames = [] + new_image = kwargs.get(f"image_{c + 1}", torch.zeros(first_image_shape)).to(first_image_device) + new_image_height = new_image.shape[1] + new_image_width = new_image.shape[2] + + if new_image_height != height or new_image_width != width: + new_image = common_upscale(new_image.movedim(-1, 1), width, height, "lanczos", "disabled") + new_image = new_image.movedim(1, -1) # Move channels back to the last dimension + + last_frame_image_1 = image_1[-1] + first_frame_image_2 = new_image[0] + + for frame in range(transitioning_frames): + t = frame / (transitioning_frames - 1) + alpha = easing_function(t) + alpha_tensor = torch.tensor(alpha, dtype=last_frame_image_1.dtype, device=last_frame_image_1.device) + frame_image = crossfade(last_frame_image_1, first_frame_image_2, alpha_tensor) + frames.append(frame_image) + + frames = torch.stack(frames) + image_1 = torch.cat((image_1, frames, new_image), dim=0) + + return image_1, + +def transition_images(images_1, images_2, alpha, transition_type, blur_radius, reverse): + width = images_1.shape[1] + height = images_1.shape[0] + + mask = torch.zeros_like(images_1, device=images_1.device) + + alpha = alpha.item() + if reverse: + alpha = 1 - alpha + + #transitions from matteo's essential nodes + if "horizontal slide" in transition_type: + pos = round(width * alpha) + mask[:, :pos, :] = 1.0 + elif "vertical slide" in transition_type: + pos = round(height * alpha) + mask[:pos, :, :] = 1.0 + elif "box" in transition_type: + box_w = round(width * alpha) + box_h = round(height * alpha) + x1 = (width - box_w) // 2 + y1 = (height - box_h) // 2 + x2 = x1 + box_w + y2 = y1 + box_h + mask[y1:y2, x1:x2, :] = 1.0 + elif "circle" in transition_type: + radius = math.ceil(math.sqrt(pow(width, 2) + pow(height, 2)) * alpha / 2) + c_x = width // 2 + c_y = height // 2 + x = torch.arange(0, width, dtype=torch.float32, device="cpu") + y = torch.arange(0, height, dtype=torch.float32, device="cpu") + y, x = torch.meshgrid((y, x), indexing="ij") + circle = ((x - c_x) ** 2 + (y - c_y) ** 2) <= (radius ** 2) + mask[circle] = 1.0 + elif "horizontal door" in transition_type: + bar = math.ceil(height * alpha / 2) + if bar > 0: + mask[:bar, :, :] = 1.0 + mask[-bar:,:, :] = 1.0 + elif "vertical door" in transition_type: + bar = math.ceil(width * alpha / 2) + if bar > 0: + mask[:, :bar,:] = 1.0 + mask[:, -bar:,:] = 1.0 + elif "fade" in transition_type: + mask[:, :, :] = alpha + + mask = gaussian_blur(mask, blur_radius) + + return images_1 * (1 - mask) + images_2 * mask + +def gaussian_blur(mask, blur_radius): + if blur_radius > 0: + kernel_size = int(blur_radius * 2) + 1 + if kernel_size % 2 == 0: + kernel_size += 1 # Ensure kernel size is odd + sigma = blur_radius / 3 + x = torch.arange(-kernel_size // 2 + 1, kernel_size // 2 + 1, dtype=torch.float32) + x = torch.exp(-0.5 * (x / sigma) ** 2) + kernel1d = x / x.sum() + kernel2d = kernel1d[:, None] * kernel1d[None, :] + kernel2d = kernel2d.to(mask.device) + kernel2d = kernel2d.expand(mask.shape[2], 1, kernel2d.shape[0], kernel2d.shape[1]) + mask = mask.permute(2, 0, 1).unsqueeze(0) # Change to [C, H, W] and add batch dimension + mask = F.conv2d(mask, kernel2d, padding=kernel_size // 2, groups=mask.shape[1]) + mask = mask.squeeze(0).permute(1, 2, 0) # Change back to [H, W, C] + return mask + +easing_functions = { + "linear": lambda t: t, + "ease_in": ease_in, + "ease_out": ease_out, + "ease_in_out": ease_in_out, + "bounce": bounce, + "elastic": elastic, + "glitchy": glitchy, + "exponential_ease_out": exponential_ease_out, +} + +class TransitionImagesMulti: + RETURN_TYPES = ("IMAGE",) + FUNCTION = "transition" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Creates transitions between images. +""" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "inputcount": ("INT", {"default": 2, "min": 2, "max": 1000, "step": 1}), + "image_1": ("IMAGE",), + "interpolation": (["linear", "ease_in", "ease_out", "ease_in_out", "bounce", "elastic", "glitchy", "exponential_ease_out"],), + "transition_type": (["horizontal slide", "vertical slide", "box", "circle", "horizontal door", "vertical door", "fade"],), + "transitioning_frames": ("INT", {"default": 2,"min": 2, "max": 4096, "step": 1}), + "blur_radius": ("FLOAT", {"default": 0.0,"min": 0.0, "max": 100.0, "step": 0.1}), + "reverse": ("BOOLEAN", {"default": False}), + "device": (["CPU", "GPU"], {"default": "CPU"}), + }, + "optional": { + "image_2": ("IMAGE",), + } + } + + def transition(self, inputcount, transitioning_frames, transition_type, interpolation, device, blur_radius, reverse, **kwargs): + + gpu = model_management.get_torch_device() + + image_1 = kwargs["image_1"] + height = image_1.shape[1] + width = image_1.shape[2] + first_image_shape = image_1.shape + first_image_device = image_1.device + + easing_function = easing_functions[interpolation] + + for c in range(1, inputcount): + frames = [] + new_image = kwargs.get(f"image_{c + 1}", torch.zeros(first_image_shape)).to(first_image_device) + new_image_height = new_image.shape[1] + new_image_width = new_image.shape[2] + + if new_image_height != height or new_image_width != width: + new_image = common_upscale(new_image.movedim(-1, 1), width, height, "lanczos", "disabled") + new_image = new_image.movedim(1, -1) # Move channels back to the last dimension + + last_frame_image_1 = image_1[-1] + first_frame_image_2 = new_image[0] + if device == "GPU": + last_frame_image_1 = last_frame_image_1.to(gpu) + first_frame_image_2 = first_frame_image_2.to(gpu) + + if reverse: + last_frame_image_1, first_frame_image_2 = first_frame_image_2, last_frame_image_1 + + for frame in range(transitioning_frames): + t = frame / (transitioning_frames - 1) + alpha = easing_function(t) + alpha_tensor = torch.tensor(alpha, dtype=last_frame_image_1.dtype, device=last_frame_image_1.device) + frame_image = transition_images(last_frame_image_1, first_frame_image_2, alpha_tensor, transition_type, blur_radius, reverse) + frames.append(frame_image) + + frames = torch.stack(frames).cpu() + image_1 = torch.cat((image_1, frames, new_image), dim=0) + + return image_1.cpu(), + +class TransitionImagesInBatch: + RETURN_TYPES = ("IMAGE",) + FUNCTION = "transition" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Creates transitions between images in a batch. +""" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "images": ("IMAGE",), + "interpolation": (["linear", "ease_in", "ease_out", "ease_in_out", "bounce", "elastic", "glitchy", "exponential_ease_out"],), + "transition_type": (["horizontal slide", "vertical slide", "box", "circle", "horizontal door", "vertical door", "fade"],), + "transitioning_frames": ("INT", {"default": 1,"min": 0, "max": 4096, "step": 1}), + "blur_radius": ("FLOAT", {"default": 0.0,"min": 0.0, "max": 100.0, "step": 0.1}), + "reverse": ("BOOLEAN", {"default": False}), + "device": (["CPU", "GPU"], {"default": "CPU"}), + }, + } + + #transitions from matteo's essential nodes + def transition(self, images, transitioning_frames, transition_type, interpolation, device, blur_radius, reverse): + if images.shape[0] == 1: + return images, + + gpu = model_management.get_torch_device() + + easing_function = easing_functions[interpolation] + + images_list = [] + pbar = ProgressBar(images.shape[0] - 1) + for i in range(images.shape[0] - 1): + frames = [] + image_1 = images[i] + image_2 = images[i + 1] + + if device == "GPU": + image_1 = image_1.to(gpu) + image_2 = image_2.to(gpu) + + if reverse: + image_1, image_2 = image_2, image_1 + + for frame in range(transitioning_frames): + t = frame / (transitioning_frames - 1) + alpha = easing_function(t) + alpha_tensor = torch.tensor(alpha, dtype=image_1.dtype, device=image_1.device) + frame_image = transition_images(image_1, image_2, alpha_tensor, transition_type, blur_radius, reverse) + frames.append(frame_image) + pbar.update(1) + + frames = torch.stack(frames).cpu() + images_list.append(frames) + images = torch.cat(images_list, dim=0) + + return images.cpu(), + +class ImageBatchJoinWithTransition: + RETURN_TYPES = ("IMAGE",) + FUNCTION = "transition_batches" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Transitions between two batches of images, starting at a specified index in the first batch. +During the transition, frames from both batches are blended frame-by-frame, so the video keeps playing. +""" + + @classmethod + def INPUT_TYPES(cls): + return { + "required": { + "images_1": ("IMAGE",), + "images_2": ("IMAGE",), + "start_index": ("INT", {"default": 0, "min": -10000, "max": 10000, "step": 1}), + "interpolation": (["linear", "ease_in", "ease_out", "ease_in_out", "bounce", "elastic", "glitchy", "exponential_ease_out"],), + "transition_type": (["horizontal slide", "vertical slide", "box", "circle", "horizontal door", "vertical door", "fade"],), + "transitioning_frames": ("INT", {"default": 1, "min": 1, "max": 4096, "step": 1}), + "blur_radius": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 100.0, "step": 0.1}), + "reverse": ("BOOLEAN", {"default": False}), + "device": (["CPU", "GPU"], {"default": "CPU"}), + }, + } + + def transition_batches(self, images_1, images_2, start_index, interpolation, transition_type, transitioning_frames, blur_radius, reverse, device): + if images_1.shape[0] == 0 or images_2.shape[0] == 0: + raise ValueError("Both input batches must have at least one image.") + + if start_index < 0: + start_index = images_1.shape[0] + start_index + if start_index < 0 or start_index > images_1.shape[0]: + raise ValueError("start_index is out of range.") + + gpu = model_management.get_torch_device() + easing_function = easing_functions[interpolation] + out_frames = [] + + # Add images from images_1 up to start_index + if start_index > 0: + out_frames.append(images_1[:start_index]) + + # Determine how many frames we can blend + max_transition = min(transitioning_frames, images_1.shape[0] - start_index, images_2.shape[0]) + + # Blend corresponding frames from both batches + for i in range(max_transition): + img1 = images_1[start_index + i] + img2 = images_2[i] + if device == "GPU": + img1 = img1.to(gpu) + img2 = img2.to(gpu) + if reverse: + img1, img2 = img2, img1 + t = i / (max_transition - 1) if max_transition > 1 else 1.0 + alpha = easing_function(t) + alpha_tensor = torch.tensor(alpha, dtype=img1.dtype, device=img1.device) + frame_image = transition_images(img1, img2, alpha_tensor, transition_type, blur_radius, reverse) + out_frames.append(frame_image.cpu().unsqueeze(0)) + + # Add remaining images from images_2 after transition + if images_2.shape[0] > max_transition: + out_frames.append(images_2[max_transition:]) + + # Concatenate all frames + out = torch.cat(out_frames, dim=0) + return (out.cpu(),) + +class ShuffleImageBatch: + RETURN_TYPES = ("IMAGE",) + FUNCTION = "shuffle" + CATEGORY = "KJNodes/image" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "images": ("IMAGE",), + "seed": ("INT", {"default": 123,"min": 0, "max": 0xffffffffffffffff, "step": 1}), + }, + } + + def shuffle(self, images, seed): + torch.manual_seed(seed) + B, H, W, C = images.shape + indices = torch.randperm(B) + shuffled_images = images[indices] + + return shuffled_images, + +class GetImageRangeFromBatch: + + RETURN_TYPES = ("IMAGE", "MASK", ) + FUNCTION = "imagesfrombatch" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Returns a range of images from a batch. +""" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "start_index": ("INT", {"default": 0,"min": -1, "max": 4096, "step": 1}), + "num_frames": ("INT", {"default": 1,"min": 1, "max": 4096, "step": 1}), + }, + "optional": { + "images": ("IMAGE",), + "masks": ("MASK",), + } + } + + def imagesfrombatch(self, start_index, num_frames, images=None, masks=None): + chosen_images = None + chosen_masks = None + + # Process images if provided + if images is not None: + if start_index == -1: + start_index = max(0, len(images) - num_frames) + if start_index < 0 or start_index >= len(images): + raise ValueError("Start index is out of range") + end_index = min(start_index + num_frames, len(images)) + chosen_images = images[start_index:end_index] + + # Process masks if provided + if masks is not None: + if start_index == -1: + start_index = max(0, len(masks) - num_frames) + if start_index < 0 or start_index >= len(masks): + raise ValueError("Start index is out of range for masks") + end_index = min(start_index + num_frames, len(masks)) + chosen_masks = masks[start_index:end_index] + + return (chosen_images, chosen_masks,) + +class ImageBatchExtendWithOverlap: + + RETURN_TYPES = ("IMAGE", "IMAGE", "IMAGE", ) + RETURN_NAMES = ("source_images", "start_images", "extended_images") + OUTPUT_TOOLTIPS = ( + "The original source images (passthrough)", + "The input images used as the starting point for extension", + "The extended images with overlap, if no new images are provided this will be empty", + ) + FUNCTION = "imagesfrombatch" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Helper node for video generation extension +First input source and overlap amount to get the starting frames for the extension. +Then on another copy of the node provide the newly generated frames and choose how to overlap them. +""" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "source_images": ("IMAGE", {"tooltip": "The source images to extend"}), + "overlap": ("INT", {"default": 13,"min": 1, "max": 4096, "step": 1, "tooltip": "Number of overlapping frames between source and new images"}), + "overlap_side": (["source", "new_images"], {"default": "source", "tooltip": "Which side to overlap on"}), + "overlap_mode": (["cut", "linear_blend", "ease_in_out", "filmic_crossfade", "perceptual_crossfade"], {"default": "linear_blend", "tooltip": "Method to use for overlapping frames"}), + }, + "optional": { + "new_images": ("IMAGE", {"tooltip": "The new images to extend with"}), + } + } + + def imagesfrombatch(self, source_images, overlap, overlap_side, overlap_mode, new_images=None): + if overlap >= len(source_images): + return source_images, source_images, source_images + + if new_images is not None: + if source_images.shape[1:3] != new_images.shape[1:3]: + raise ValueError(f"Source and new images must have the same shape: {source_images.shape[1:3]} vs {new_images.shape[1:3]}") + # Determine where to place the overlap + prefix = source_images[:-overlap] + if overlap_side == "source": + blend_src = source_images[-overlap:] + blend_dst = new_images[:overlap] + elif overlap_side == "new_images": + blend_src = new_images[:overlap] + blend_dst = source_images[-overlap:] + suffix = new_images[overlap:] + + if overlap_mode == "linear_blend": + # Vectorized version - process all frames at once + alpha = torch.linspace(0, 1, overlap + 2, device=blend_src.device, dtype=blend_src.dtype)[1:-1] + alpha = alpha.view(-1, 1, 1, 1) # Shape: [overlap, 1, 1, 1] + blended_images = (1 - alpha) * blend_src + alpha * blend_dst + extended_images = torch.cat((prefix, blended_images, suffix), dim=0) + + elif overlap_mode == "filmic_crossfade": + gamma = 2.2 + alpha = torch.linspace(0, 1, overlap + 2, device=blend_src.device, dtype=blend_src.dtype)[1:-1] + alpha = alpha.view(-1, 1, 1, 1) + linear_src = torch.pow(blend_src, gamma) + linear_dst = torch.pow(blend_dst, gamma) + blended = (1 - alpha) * linear_src + alpha * linear_dst + blended_images = torch.pow(blended, 1.0 / gamma) + extended_images = torch.cat((prefix, blended_images, suffix), dim=0) + + elif overlap_mode == "perceptual_crossfade": + import kornia + alpha = torch.linspace(0, 1, overlap + 2, device=blend_src.device, dtype=blend_src.dtype)[1:-1] + + src_nchw = blend_src.movedim(-1, 1) + dst_nchw = blend_dst.movedim(-1, 1) + lab_src = kornia.color.rgb_to_lab(src_nchw) + lab_dst = kornia.color.rgb_to_lab(dst_nchw) + + # Blend in LAB space + alpha = alpha.view(-1, 1, 1, 1) # [N,1,1,1] for broadcasting + blended_lab = (1 - alpha) * lab_src + alpha * lab_dst + + # Convert back to RGB and reshape + blended_rgb = kornia.color.lab_to_rgb(blended_lab) + blended_images = blended_rgb.movedim(1, -1) # [N,C,H,W] -> [N,H,W,C] + extended_images = torch.cat((prefix, blended_images, suffix), dim=0) + + elif overlap_mode == "ease_in_out": + # Vectorized ease_in_out + t = torch.linspace(0, 1, overlap + 2, device=blend_src.device, dtype=blend_src.dtype)[1:-1] + eased_t = 3 * t * t - 2 * t * t * t # ease_in_out formula + eased_t = eased_t.view(-1, 1, 1, 1) + blended_images = (1 - eased_t) * blend_src + eased_t * blend_dst + extended_images = torch.cat((prefix, blended_images, suffix), dim=0) + + elif overlap_mode == "cut": + extended_images = torch.cat((prefix, suffix), dim=0) + if overlap_side == "new_images": + extended_images = torch.cat((source_images, new_images[overlap:]), dim=0) + elif overlap_side == "source": + extended_images = torch.cat((source_images[:-overlap], new_images), dim=0) + else: + extended_images = torch.zeros((1, 64, 64, 3), device="cpu") + + start_images = source_images[-overlap:] + + return (source_images, start_images, extended_images) + +class GetLatentRangeFromBatch: + + RETURN_TYPES = ("LATENT", ) + FUNCTION = "latentsfrombatch" + CATEGORY = "KJNodes/latents" + DESCRIPTION = """ +Returns a range of latents from a batch. +""" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "latents": ("LATENT",), + "start_index": ("INT", {"default": 0,"min": -1, "max": 4096, "step": 1}), + "num_frames": ("INT", {"default": 1,"min": -1, "max": 4096, "step": 1}), + }, + } + + def latentsfrombatch(self, latents, start_index, num_frames): + chosen_latents = None + samples = latents["samples"] + if len(samples.shape) == 4: + B, C, H, W = samples.shape + num_latents = B + elif len(samples.shape) == 5: + B, C, T, H, W = samples.shape + num_latents = T + + if start_index == -1: + start_index = max(0, num_latents - num_frames) + if start_index < 0 or start_index >= num_latents: + raise ValueError("Start index is out of range") + + end_index = num_latents if num_frames == -1 else min(start_index + num_frames, num_latents) + + if len(samples.shape) == 4: + chosen_latents = samples[start_index:end_index] + elif len(samples.shape) == 5: + chosen_latents = samples[:, :, start_index:end_index] + + return ({"samples": chosen_latents.contiguous(),},) + +class InsertLatentToIndex: + + RETURN_TYPES = ("LATENT", ) + FUNCTION = "insert" + CATEGORY = "KJNodes/latents" + DESCRIPTION = """ +Inserts a latent at the specified index into the original latent batch. +""" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "source": ("LATENT",), + "destination": ("LATENT",), + "index": ("INT", {"default": 0,"min": -1, "max": 4096, "step": 1}), + }, + } + + def insert(self, source, destination, index): + samples_destination = destination["samples"] + samples_source = source["samples"].to(samples_destination) + + if len(samples_source.shape) == 4: + B, C, H, W = samples_source.shape + num_latents = B + elif len(samples_source.shape) == 5: + B, C, T, H, W = samples_source.shape + num_latents = T + + if index >= num_latents or index < 0: + raise ValueError(f"Index {index} out of bounds for tensor with {num_latents} latents") + + if len(samples_source.shape) == 4: + joined_latents = torch.cat([ + samples_destination[:index], + samples_source, + samples_destination[index+1:] + ], dim=0) + else: + joined_latents = torch.cat([ + samples_destination[:, :, :index], + samples_source, + samples_destination[:, :, index+1:] + ], dim=2) + + return ({"samples": joined_latents,},) + +class ImageBatchFilter: + + RETURN_TYPES = ("IMAGE", "STRING",) + RETURN_NAMES = ("images", "removed_indices",) + FUNCTION = "filter" + CATEGORY = "KJNodes/image" + DESCRIPTION = "Removes empty images from a batch" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "images": ("IMAGE",), + "empty_color": ("STRING", {"default": "0, 0, 0"}), + "empty_threshold": ("FLOAT", {"default": 0.01,"min": 0.0, "max": 1.0, "step": 0.01}), + }, + "optional": { + "replacement_image": ("IMAGE",), + } + } + + def filter(self, images, empty_color, empty_threshold, replacement_image=None): + B, H, W, C = images.shape + + input_images = images.clone() + + empty_color_list = [int(color.strip()) for color in empty_color.split(',')] + empty_color_tensor = torch.tensor(empty_color_list, dtype=torch.float32).to(input_images.device) + + color_diff = torch.abs(input_images - empty_color_tensor) + mean_diff = color_diff.mean(dim=(1, 2, 3)) + + empty_indices = mean_diff <= empty_threshold + empty_indices_string = ', '.join([str(i) for i in range(B) if empty_indices[i]]) + + if replacement_image is not None: + B_rep, H_rep, W_rep, C_rep = replacement_image.shape + replacement = replacement_image.clone() + if (H_rep != images.shape[1]) or (W_rep != images.shape[2]) or (C_rep != images.shape[3]): + replacement = common_upscale(replacement.movedim(-1, 1), W, H, "lanczos", "center").movedim(1, -1) + input_images[empty_indices] = replacement[0] + + return (input_images, empty_indices_string,) + else: + non_empty_images = input_images[~empty_indices] + return (non_empty_images, empty_indices_string,) + +class GetImagesFromBatchIndexed: + + RETURN_TYPES = ("IMAGE",) + FUNCTION = "indexedimagesfrombatch" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Selects and returns the images at the specified indices as an image batch. +""" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "images": ("IMAGE",), + "indexes": ("STRING", {"default": "0, 1, 2", "multiline": True}), + }, + } + + def indexedimagesfrombatch(self, images, indexes): + + # Parse the indexes string into a list of integers + index_list = [int(index.strip()) for index in indexes.split(',')] + + # Convert list of indices to a PyTorch tensor + indices_tensor = torch.tensor(index_list, dtype=torch.long) + + # Select the images at the specified indices + chosen_images = images[indices_tensor] + + return (chosen_images,) + +class InsertImagesToBatchIndexed: + + RETURN_TYPES = ("IMAGE",) + FUNCTION = "insertimagesfrombatch" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Inserts images at the specified indices into the original image batch. +""" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "original_images": ("IMAGE",), + "images_to_insert": ("IMAGE",), + "indexes": ("STRING", {"default": "0, 1, 2", "multiline": True}), + }, + "optional": { + "mode": (["replace", "insert"],), + } + } + + def insertimagesfrombatch(self, original_images, images_to_insert, indexes, mode="replace"): + if indexes == "": + return (original_images,) + + input_images = original_images.clone() + + # Parse the indexes string into a list of integers + index_list = [int(index.strip()) for index in indexes.split(',')] + + # Convert list of indices to a PyTorch tensor + indices_tensor = torch.tensor(index_list, dtype=torch.long) + + # Ensure the images_to_insert is a tensor + if not isinstance(images_to_insert, torch.Tensor): + images_to_insert = torch.tensor(images_to_insert) + + if mode == "replace": + # Replace the images at the specified indices + for index, image in zip(indices_tensor, images_to_insert): + input_images[index] = image + else: + # Create a list to hold the new image sequence + new_images = [] + insert_offset = 0 + + for i in range(len(input_images) + len(indices_tensor)): + if insert_offset < len(indices_tensor) and i == indices_tensor[insert_offset]: + # Use modulo to cycle through images_to_insert + new_images.append(images_to_insert[insert_offset % len(images_to_insert)]) + insert_offset += 1 + else: + new_images.append(input_images[i - insert_offset]) + + # Convert the list back to a tensor + input_images = torch.stack(new_images, dim=0) + + return (input_images,) + +class PadImageBatchInterleaved: + + RETURN_TYPES = ("IMAGE", "MASK",) + RETURN_NAMES = ("images", "masks",) + FUNCTION = "pad" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Inserts empty frames between the images in a batch. +""" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "images": ("IMAGE",), + "empty_frames_per_image": ("INT", {"default": 1,"min": 0, "max": 4096, "step": 1}), + "pad_frame_value": ("FLOAT", {"default": 0.0,"min": 0.0, "max": 1.0, "step": 0.01}), + "add_after_last": ("BOOLEAN", {"default": False}), + }, + } + + def pad(self, images, empty_frames_per_image, pad_frame_value, add_after_last): + B, H, W, C = images.shape + + # Handle single frame case specifically + if B == 1: + total_frames = 1 + empty_frames_per_image if add_after_last else 1 + else: + # Original B images + (B-1) sets of empty frames between them + total_frames = B + (B-1) * empty_frames_per_image + # Add additional empty frames after the last image if requested + if add_after_last: + total_frames += empty_frames_per_image + + # Create new tensor with zeros (empty frames) + padded_batch = torch.ones((total_frames, H, W, C), + dtype=images.dtype, + device=images.device) * pad_frame_value + # Create mask tensor (1 for original frames, 0 for empty frames) + mask = torch.zeros((total_frames, H, W), + dtype=images.dtype, + device=images.device) + + # Fill in original images at their new positions + for i in range(B): + if B == 1: + # For single frame, just place it at the beginning + new_pos = 0 + else: + # Each image is separated by empty_frames_per_image blank frames + new_pos = i * (empty_frames_per_image + 1) + + padded_batch[new_pos] = images[i] + mask[new_pos] = 1.0 # Mark this as an original frame + + return (padded_batch, mask) + +class ReplaceImagesInBatch: + + RETURN_TYPES = ("IMAGE", "MASK",) + FUNCTION = "replace" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Replaces the images in a batch, starting from the specified start index, +with the replacement images. +""" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "start_index": ("INT", {"default": 1,"min": 0, "max": 4096, "step": 1}), + }, + "optional": { + "original_images": ("IMAGE",), + "replacement_images": ("IMAGE",), + "original_masks": ("MASK",), + "replacement_masks": ("MASK",), + } + } + + def replace(self, original_images=None, replacement_images=None, start_index=1, original_masks=None, replacement_masks=None): + images = None + masks = None + + if original_images is not None and replacement_images is not None: + if start_index >= len(original_images): + raise ValueError("ReplaceImagesInBatch: Start index is out of range") + end_index = start_index + len(replacement_images) + if end_index > len(original_images): + raise ValueError("ReplaceImagesInBatch: End index is out of range") + + original_images_copy = original_images.clone() + if original_images_copy.shape[2] != replacement_images.shape[2] or original_images_copy.shape[3] != replacement_images.shape[3]: + replacement_images = common_upscale(replacement_images.movedim(-1, 1), original_images_copy.shape[1], original_images_copy.shape[2], "lanczos", "center").movedim(1, -1) + + original_images_copy[start_index:end_index] = replacement_images + images = original_images_copy + else: + images = torch.zeros((1, 64, 64, 3)) + + if original_masks is not None and replacement_masks is not None: + if start_index >= len(original_masks): + raise ValueError("ReplaceImagesInBatch: Start index is out of range") + end_index = start_index + len(replacement_masks) + if end_index > len(original_masks): + raise ValueError("ReplaceImagesInBatch: End index is out of range") + + original_masks_copy = original_masks.clone() + if original_masks_copy.shape[1] != replacement_masks.shape[1] or original_masks_copy.shape[2] != replacement_masks.shape[2]: + replacement_masks = common_upscale(replacement_masks.unsqueeze(1), original_masks_copy.shape[1], original_masks_copy.shape[2], "nearest-exact", "center").squeeze(0) + + original_masks_copy[start_index:end_index] = replacement_masks + masks = original_masks_copy + else: + masks = torch.zeros((1, 64, 64)) + + return (images, masks) + + +class ReverseImageBatch: + + RETURN_TYPES = ("IMAGE",) + FUNCTION = "reverseimagebatch" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Reverses the order of the images in a batch. +""" + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "images": ("IMAGE",), + }, + } + + def reverseimagebatch(self, images): + reversed_images = torch.flip(images, [0]) + return (reversed_images, ) + +class ImageBatchMulti: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "inputcount": ("INT", {"default": 2, "min": 2, "max": 1000, "step": 1}), + "image_1": ("IMAGE", ), + + }, + "optional": { + "image_2": ("IMAGE", ), + } + } + + RETURN_TYPES = ("IMAGE",) + RETURN_NAMES = ("images",) + FUNCTION = "combine" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Creates an image batch from multiple images. +You can set how many inputs the node has, +with the **inputcount** and clicking update. +""" + + def combine(self, inputcount, **kwargs): + from nodes import ImageBatch + image_batch_node = ImageBatch() + image = kwargs["image_1"].cpu() + first_image_shape = image.shape + for c in range(1, inputcount): + new_image = kwargs.get(f"image_{c + 1}", torch.zeros(first_image_shape)).cpu() + image, = image_batch_node.batch(image, new_image) + return (image,) + + +class ImageTensorList: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "image1": ("IMAGE",), + "image2": ("IMAGE",), + }} + + RETURN_TYPES = ("IMAGE",) + FUNCTION = "append" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Creates an image list from the input images. +""" + + def append(self, image1, image2): + image_list = [] + if isinstance(image1, torch.Tensor) and isinstance(image2, torch.Tensor): + image_list = [image1, image2] + elif isinstance(image1, list) and isinstance(image2, torch.Tensor): + image_list = image1 + [image2] + elif isinstance(image1, torch.Tensor) and isinstance(image2, list): + image_list = [image1] + image2 + elif isinstance(image1, list) and isinstance(image2, list): + image_list = image1 + image2 + return image_list, + +class ImageAddMulti: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "inputcount": ("INT", {"default": 2, "min": 2, "max": 1000, "step": 1}), + "image_1": ("IMAGE", ), + "image_2": ("IMAGE", ), + "blending": ( + [ 'add', + 'subtract', + 'multiply', + 'difference', + ], + { + "default": 'add' + }), + "blend_amount": ("FLOAT", {"default": 0.5, "min": 0, "max": 1, "step": 0.01}), + }, + } + + RETURN_TYPES = ("IMAGE",) + RETURN_NAMES = ("images",) + FUNCTION = "add" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Add blends multiple images together. +You can set how many inputs the node has, +with the **inputcount** and clicking update. +""" + + def add(self, inputcount, blending, blend_amount, **kwargs): + image = kwargs["image_1"] + for c in range(1, inputcount): + new_image = kwargs[f"image_{c + 1}"] + if blending == "add": + image = torch.add(image * blend_amount, new_image * blend_amount) + elif blending == "subtract": + image = torch.sub(image * blend_amount, new_image * blend_amount) + elif blending == "multiply": + image = torch.mul(image * blend_amount, new_image * blend_amount) + elif blending == "difference": + image = torch.sub(image, new_image) + return (image,) + +class ImageConcatMulti: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "inputcount": ("INT", {"default": 2, "min": 2, "max": 1000, "step": 1}), + "image_1": ("IMAGE", ), + + "direction": ( + [ 'right', + 'down', + 'left', + 'up', + ], + { + "default": 'right' + }), + "match_image_size": ("BOOLEAN", {"default": False}), + }, + "optional": { + "image_2": ("IMAGE", ), + }, + } + + RETURN_TYPES = ("IMAGE",) + RETURN_NAMES = ("images",) + FUNCTION = "combine" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Creates an image from multiple images. +You can set how many inputs the node has, +with the **inputcount** and clicking update. +""" + + def combine(self, inputcount, direction, match_image_size, **kwargs): + image = kwargs["image_1"] + first_image_shape = None + if first_image_shape is None: + first_image_shape = image.shape + for c in range(1, inputcount): + new_image = kwargs.get(f"image_{c + 1}", torch.zeros(first_image_shape)) + image, = ImageConcanate.concatenate(self, image, new_image, direction, match_image_size, first_image_shape=first_image_shape) + first_image_shape = None + return (image,) + +class PreviewAnimation: + def __init__(self): + self.output_dir = folder_paths.get_temp_directory() + self.type = "temp" + self.prefix_append = "_temp_" + ''.join(random.choice("abcdefghijklmnopqrstupvxyz") for x in range(5)) + self.compress_level = 1 + + methods = {"default": 4, "fastest": 0, "slowest": 6} + @classmethod + def INPUT_TYPES(s): + return {"required": + { + "fps": ("FLOAT", {"default": 8.0, "min": 0.01, "max": 1000.0, "step": 0.01}), + }, + "optional": { + "images": ("IMAGE", ), + "masks": ("MASK", ), + }, + } + + RETURN_TYPES = () + FUNCTION = "preview" + OUTPUT_NODE = True + CATEGORY = "KJNodes/image" + + def preview(self, fps, images=None, masks=None): + filename_prefix = "AnimPreview" + full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir) + results = list() + + pil_images = [] + + if images is not None and masks is not None: + for image in images: + i = 255. * image.cpu().numpy() + img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8)) + pil_images.append(img) + for mask in masks: + if pil_images: + mask_np = mask.cpu().numpy() + mask_np = np.clip(mask_np * 255, 0, 255).astype(np.uint8) # Convert to values between 0 and 255 + mask_img = Image.fromarray(mask_np, mode='L') + img = pil_images.pop(0) # Remove and get the first image + img = img.convert("RGBA") # Convert base image to RGBA + + # Create a new RGBA image based on the grayscale mask + rgba_mask_img = Image.new("RGBA", img.size, (255, 255, 255, 255)) + rgba_mask_img.putalpha(mask_img) # Use the mask image as the alpha channel + + # Composite the RGBA mask onto the base image + composited_img = Image.alpha_composite(img, rgba_mask_img) + pil_images.append(composited_img) # Add the composited image back + + elif images is not None and masks is None: + for image in images: + i = 255. * image.cpu().numpy() + img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8)) + pil_images.append(img) + + elif masks is not None and images is None: + for mask in masks: + mask_np = 255. * mask.cpu().numpy() + mask_img = Image.fromarray(np.clip(mask_np, 0, 255).astype(np.uint8)) + pil_images.append(mask_img) + else: + print("PreviewAnimation: No images or masks provided") + return { "ui": { "images": results, "animated": (None,), "text": "empty" }} + + num_frames = len(pil_images) + + c = len(pil_images) + for i in range(0, c, num_frames): + file = f"{filename}_{counter:05}_.webp" + pil_images[i].save(os.path.join(full_output_folder, file), save_all=True, duration=int(1000.0/fps), append_images=pil_images[i + 1:i + num_frames], lossless=False, quality=50, method=0) + results.append({ + "filename": file, + "subfolder": subfolder, + "type": self.type + }) + counter += 1 + + animated = num_frames != 1 + return { "ui": { "images": results, "animated": (animated,), "text": [f"{num_frames}x{pil_images[0].size[0]}x{pil_images[0].size[1]}"] } } + +class ImageResizeKJ: + upscale_methods = ["nearest-exact", "bilinear", "area", "bicubic", "lanczos"] + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "image": ("IMAGE",), + "width": ("INT", { "default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 1, }), + "height": ("INT", { "default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 1, }), + "upscale_method": (s.upscale_methods,), + "keep_proportion": ("BOOLEAN", { "default": False }), + "divisible_by": ("INT", { "default": 2, "min": 0, "max": 512, "step": 1, }), + }, + "optional" : { + #"width_input": ("INT", { "forceInput": True}), + #"height_input": ("INT", { "forceInput": True}), + "get_image_size": ("IMAGE",), + "crop": (["disabled","center", 0], { "tooltip": "0 will do the default center crop, this is a workaround for the widget order changing with the new frontend, as in old workflows the value of this widget becomes 0 automatically" }), + } + } + + RETURN_TYPES = ("IMAGE", "INT", "INT",) + RETURN_NAMES = ("IMAGE", "width", "height",) + FUNCTION = "resize" + CATEGORY = "KJNodes/image" + DEPRECATED = True + DESCRIPTION = """ +DEPRECATED! + +Due to ComfyUI frontend changes, this node should no longer be used, please check the +v2 of the node. This node is only kept to not completely break older workflows. + +""" + + def resize(self, image, width, height, keep_proportion, upscale_method, divisible_by, + width_input=None, height_input=None, get_image_size=None, crop="disabled"): + B, H, W, C = image.shape + + if width_input: + width = width_input + if height_input: + height = height_input + if get_image_size is not None: + _, height, width, _ = get_image_size.shape + + if keep_proportion and get_image_size is None: + # If one of the dimensions is zero, calculate it to maintain the aspect ratio + if width == 0 and height != 0: + ratio = height / H + width = round(W * ratio) + elif height == 0 and width != 0: + ratio = width / W + height = round(H * ratio) + elif width != 0 and height != 0: + # Scale based on which dimension is smaller in proportion to the desired dimensions + ratio = min(width / W, height / H) + width = round(W * ratio) + height = round(H * ratio) + else: + if width == 0: + width = W + if height == 0: + height = H + + if divisible_by > 1 and get_image_size is None: + width = width - (width % divisible_by) + height = height - (height % divisible_by) + + if crop == 0: #workaround for old workflows + crop = "center" + + image = image.movedim(-1,1) + image = common_upscale(image, width, height, upscale_method, crop) + image = image.movedim(1,-1) + + return(image, image.shape[2], image.shape[1],) + +class ImageResizeKJv2: + upscale_methods = ["nearest-exact", "bilinear", "area", "bicubic", "lanczos"] + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "image": ("IMAGE",), + "width": ("INT", { "default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 1, }), + "height": ("INT", { "default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 1, }), + "upscale_method": (s.upscale_methods,), + "keep_proportion": (["stretch", "resize", "pad", "pad_edge", "pad_edge_pixel", "crop", "pillarbox_blur", "total_pixels"], { "default": False }), + "pad_color": ("STRING", { "default": "0, 0, 0", "tooltip": "Color to use for padding."}), + "crop_position": (["center", "top", "bottom", "left", "right"], { "default": "center" }), + "divisible_by": ("INT", { "default": 2, "min": 0, "max": 512, "step": 1, }), + }, + "optional" : { + "mask": ("MASK",), + "device": (["cpu", "gpu"],), + #"per_batch": ("INT", { "default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 1, "tooltip": "Process images in sub-batches to reduce memory usage. 0 disables sub-batching."}), + }, + "hidden": { + "unique_id": "UNIQUE_ID", + }, + } + + RETURN_TYPES = ("IMAGE", "INT", "INT", "MASK",) + RETURN_NAMES = ("IMAGE", "width", "height", "mask",) + FUNCTION = "resize" + CATEGORY = "KJNodes/image" + DESCRIPTION = """ +Resizes the image to the specified width and height. +Size can be retrieved from the input. + +Keep proportions keeps the aspect ratio of the image, by +highest dimension. +""" + + def resize(self, image, width, height, keep_proportion, upscale_method, divisible_by, pad_color, crop_position, unique_id, device="cpu", mask=None, per_batch=64): + B, H, W, C = image.shape + + if device == "gpu": + if upscale_method == "lanczos": + raise Exception("Lanczos is not supported on the GPU") + device = model_management.get_torch_device() + else: + device = torch.device("cpu") + + pillarbox_blur = keep_proportion == "pillarbox_blur" + + # Initialize padding variables + pad_left = pad_right = pad_top = pad_bottom = 0 + + if keep_proportion in ["resize", "total_pixels"] or keep_proportion.startswith("pad") or pillarbox_blur: + if keep_proportion == "total_pixels": + total_pixels = width * height + aspect_ratio = W / H + new_height = int(math.sqrt(total_pixels / aspect_ratio)) + new_width = int(math.sqrt(total_pixels * aspect_ratio)) + + # If one of the dimensions is zero, calculate it to maintain the aspect ratio + elif width == 0 and height == 0: + new_width = W + new_height = H + elif width == 0 and height != 0: + ratio = height / H + new_width = round(W * ratio) + new_height = height + elif height == 0 and width != 0: + ratio = width / W + new_width = width + new_height = round(H * ratio) + elif width != 0 and height != 0: + ratio = min(width / W, height / H) + new_width = round(W * ratio) + new_height = round(H * ratio) + else: + new_width = width + new_height = height + + if keep_proportion.startswith("pad") or pillarbox_blur: + # Calculate padding based on position + if crop_position == "center": + pad_left = (width - new_width) // 2 + pad_right = width - new_width - pad_left + pad_top = (height - new_height) // 2 + pad_bottom = height - new_height - pad_top + elif crop_position == "top": + pad_left = (width - new_width) // 2 + pad_right = width - new_width - pad_left + pad_top = 0 + pad_bottom = height - new_height + elif crop_position == "bottom": + pad_left = (width - new_width) // 2 + pad_right = width - new_width - pad_left + pad_top = height - new_height + pad_bottom = 0 + elif crop_position == "left": + pad_left = 0 + pad_right = width - new_width + pad_top = (height - new_height) // 2 + pad_bottom = height - new_height - pad_top + elif crop_position == "right": + pad_left = width - new_width + pad_right = 0 + pad_top = (height - new_height) // 2 + pad_bottom = height - new_height - pad_top + + width = new_width + height = new_height + else: + if width == 0: + width = W + if height == 0: + height = H + + if divisible_by > 1: + width = width - (width % divisible_by) + height = height - (height % divisible_by) + + # Preflight estimate (log-only when batching is active) + if per_batch != 0 and B > per_batch: + try: + bytes_per_elem = image.element_size() # typically 4 for float32 + est_total_bytes = B * height * width * C * bytes_per_elem + est_mb = est_total_bytes / (1024 * 1024) + msg = f"Resize v2estimated output ~{est_mb:.2f} MB; batching {per_batch}/{B}" + if unique_id and PromptServer is not None: + try: + PromptServer.instance.send_progress_text(msg, unique_id) + except: + pass + else: + print(f"[ImageResizeKJv2] estimated output ~{est_mb:.2f} MB; batching {per_batch}/{B}") + except: + pass + + def _process_subbatch(in_image, in_mask, pad_left, pad_right, pad_top, pad_bottom): + # Avoid unnecessary clones; only move if needed + out_image = in_image if in_image.device == device else in_image.to(device) + out_mask = None if in_mask is None else (in_mask if in_mask.device == device else in_mask.to(device)) + + # Crop logic + if keep_proportion == "crop": + old_height = out_image.shape[-3] + old_width = out_image.shape[-2] + old_aspect = old_width / old_height + new_aspect = width / height + if old_aspect > new_aspect: + crop_w = round(old_height * new_aspect) + crop_h = old_height + else: + crop_w = old_width + crop_h = round(old_width / new_aspect) + if crop_position == "center": + x = (old_width - crop_w) // 2 + y = (old_height - crop_h) // 2 + elif crop_position == "top": + x = (old_width - crop_w) // 2 + y = 0 + elif crop_position == "bottom": + x = (old_width - crop_w) // 2 + y = old_height - crop_h + elif crop_position == "left": + x = 0 + y = (old_height - crop_h) // 2 + elif crop_position == "right": + x = old_width - crop_w + y = (old_height - crop_h) // 2 + out_image = out_image.narrow(-2, x, crop_w).narrow(-3, y, crop_h) + if out_mask is not None: + out_mask = out_mask.narrow(-1, x, crop_w).narrow(-2, y, crop_h) + + out_image = common_upscale(out_image.movedim(-1,1), width, height, upscale_method, crop="disabled").movedim(1,-1) + if out_mask is not None: + if upscale_method == "lanczos": + out_mask = common_upscale(out_mask.unsqueeze(1).repeat(1, 3, 1, 1), width, height, upscale_method, crop="disabled").movedim(1,-1)[:, :, :, 0] + else: + out_mask = common_upscale(out_mask.unsqueeze(1), width, height, upscale_method, crop="disabled").squeeze(1) + + # Pad logic + if (keep_proportion.startswith("pad") or pillarbox_blur) and (pad_left > 0 or pad_right > 0 or pad_top > 0 or pad_bottom > 0): + padded_width = width + pad_left + pad_right + padded_height = height + pad_top + pad_bottom + if divisible_by > 1: + width_remainder = padded_width % divisible_by + height_remainder = padded_height % divisible_by + if width_remainder > 0: + extra_width = divisible_by - width_remainder + pad_right += extra_width + if height_remainder > 0: + extra_height = divisible_by - height_remainder + pad_bottom += extra_height + + pad_mode = ( + "pillarbox_blur" if pillarbox_blur else + "edge" if keep_proportion == "pad_edge" else + "edge_pixel" if keep_proportion == "pad_edge_pixel" else + "color" + ) + out_image, out_mask = ImagePadKJ.pad(self, out_image, pad_left, pad_right, pad_top, pad_bottom, 0, pad_color, pad_mode, mask=out_mask) + + return out_image, out_mask + + # If batching disabled (per_batch==0) or batch fits, process whole batch + if per_batch == 0 or B <= per_batch: + out_image, out_mask = _process_subbatch(image, mask, pad_left, pad_right, pad_top, pad_bottom) + else: + chunks = [] + mask_chunks = [] if mask is not None else None + total_batches = (B + per_batch - 1) // per_batch + current_batch = 0 + for start_idx in range(0, B, per_batch): + current_batch += 1 + end_idx = min(start_idx + per_batch, B) + sub_img = image[start_idx:end_idx] + sub_mask = mask[start_idx:end_idx] if mask is not None else None + sub_out_img, sub_out_mask = _process_subbatch(sub_img, sub_mask, pad_left, pad_right, pad_top, pad_bottom) + chunks.append(sub_out_img.cpu()) + if mask is not None: + mask_chunks.append(sub_out_mask.cpu() if sub_out_mask is not None else None) + # Per-batch progress update + if unique_id and PromptServer is not None: + try: + PromptServer.instance.send_progress_text( + f"Resize v2batch {current_batch}/{total_batches} · images {end_idx}/{B}", + unique_id + ) + except: + pass + else: + try: + print(f"[ImageResizeKJv2] batch {current_batch}/{total_batches} · images {end_idx}/{B}") + except: + pass + out_image = torch.cat(chunks, dim=0) + if mask is not None and any(m is not None for m in mask_chunks): + out_mask = torch.cat([m for m in mask_chunks if m is not None], dim=0) + else: + out_mask = None + + # Progress UI + if unique_id and PromptServer is not None: + try: + num_elements = out_image.numel() + element_size = out_image.element_size() + memory_size_mb = (num_elements * element_size) / (1024 * 1024) + PromptServer.instance.send_progress_text( + f"Output: {out_image.shape[0]} x {out_image.shape[2]} x {out_image.shape[1]} | {memory_size_mb:.2f}MB", + unique_id + ) + except: + pass + + return (out_image.cpu(), out_image.shape[2], out_image.shape[1], out_mask.cpu() if out_mask is not None else torch.zeros(64,64, device=torch.device("cpu"), dtype=torch.float32)) + +import pathlib +class LoadAndResizeImage: + _color_channels = ["alpha", "red", "green", "blue"] + @classmethod + def INPUT_TYPES(s): + input_dir = folder_paths.get_input_directory() + files = [f.name for f in pathlib.Path(input_dir).iterdir() if f.is_file()] + return {"required": + { + "image": (sorted(files), {"image_upload": True}), + "resize": ("BOOLEAN", { "default": False }), + "width": ("INT", { "default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 8, }), + "height": ("INT", { "default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 8, }), + "repeat": ("INT", { "default": 1, "min": 1, "max": 4096, "step": 1, }), + "keep_proportion": ("BOOLEAN", { "default": False }), + "divisible_by": ("INT", { "default": 2, "min": 0, "max": 512, "step": 1, }), + "mask_channel": (s._color_channels, {"tooltip": "Channel to use for the mask output"}), + "background_color": ("STRING", { "default": "", "tooltip": "Fills the alpha channel with the specified color."}), + }, + } + + CATEGORY = "KJNodes/image" + RETURN_TYPES = ("IMAGE", "MASK", "INT", "INT", "STRING",) + RETURN_NAMES = ("image", "mask", "width", "height","image_path",) + FUNCTION = "load_image" + + def load_image(self, image, resize, width, height, repeat, keep_proportion, divisible_by, mask_channel, background_color): + from PIL import Image, ImageOps, ImageSequence + import numpy as np + import torch + image_path = folder_paths.get_annotated_filepath(image) + + import node_helpers + img = node_helpers.pillow(Image.open, image_path) + img = ImageOps.exif_transpose(img) + + # Process the background_color using the helper function + if background_color: + color_list = string_to_color(background_color) + # Ensure we have RGBA (add alpha if only RGB) + if len(color_list) == 3: + bg_color_rgba = tuple(color_list) + (255,) + else: + bg_color_rgba = tuple(color_list) + else: + bg_color_rgba = None # No background color specified + + output_images = [] + output_masks = [] + w, h = None, None + + excluded_formats = ['MPO'] + + W, H = img.size + if resize: + if keep_proportion: + ratio = min(width / W, height / H) + width = round(W * ratio) + height = round(H * ratio) + else: + if width == 0: + width = W + if height == 0: + height = H + + if divisible_by > 1: + width = width - (width % divisible_by) + height = height - (height % divisible_by) + else: + width, height = W, H + + for frame in ImageSequence.Iterator(img): + frame = node_helpers.pillow(ImageOps.exif_transpose, frame) + + if frame.mode == 'I': + frame = frame.point(lambda i: i * (1 / 255)) + + if frame.mode == 'P': + frame = frame.convert("RGBA") + elif 'A' in frame.getbands(): + frame = frame.convert("RGBA") + + # Extract alpha channel if it exists + if 'A' in frame.getbands() and bg_color_rgba: + alpha_mask = np.array(frame.getchannel('A')).astype(np.float32) / 255.0 + alpha_mask = 1. - torch.from_numpy(alpha_mask) + bg_image = Image.new("RGBA", frame.size, bg_color_rgba) + # Composite the frame onto the background + frame = Image.alpha_composite(bg_image, frame) + else: + alpha_mask = torch.zeros((64, 64), dtype=torch.float32, device="cpu") + + image = frame.convert("RGB") + + if len(output_images) == 0: + w = image.size[0] + h = image.size[1] + + if image.size[0] != w or image.size[1] != h: + continue + if resize: + image = image.resize((width, height), Image.Resampling.BILINEAR) + + image = np.array(image).astype(np.float32) / 255.0 + image = torch.from_numpy(image)[None,] + + c = mask_channel[0].upper() + if c in frame.getbands(): + if resize: + frame = frame.resize((width, height), Image.Resampling.BILINEAR) + mask = np.array(frame.getchannel(c)).astype(np.float32) / 255.0 + mask = torch.from_numpy(mask) + if c == 'A' and bg_color_rgba: + mask = alpha_mask + elif c == 'A': + mask = 1. - mask + else: + mask = torch.zeros((64, 64), dtype=torch.float32, device="cpu") + + output_images.append(image) + output_masks.append(mask.unsqueeze(0)) + + if len(output_images) > 1 and img.format not in excluded_formats: + output_image = torch.cat(output_images, dim=0) + output_mask = torch.cat(output_masks, dim=0) + else: + output_image = output_images[0] + output_mask = output_masks[0] + if repeat > 1: + output_image = output_image.repeat(repeat, 1, 1, 1) + output_mask = output_mask.repeat(repeat, 1, 1) + + return (output_image, output_mask, width, height, image_path) + + + # @classmethod + # def IS_CHANGED(s, image, **kwargs): + # image_path = folder_paths.get_annotated_filepath(image) + # m = hashlib.sha256() + # with open(image_path, 'rb') as f: + # m.update(f.read()) + # return m.digest().hex() + + @classmethod + def VALIDATE_INPUTS(s, image): + if not folder_paths.exists_annotated_filepath(image): + return "Invalid image file: {}".format(image) + + return True + +import hashlib +class LoadImagesFromFolderKJ: + # Dictionary to store folder hashes + folder_hashes = {} + + @classmethod + def IS_CHANGED(cls, folder, **kwargs): + if folder and not os.path.isabs(folder) and args.base_directory: + folder = os.path.join(args.base_directory, folder) + if not folder or not os.path.isdir(folder): + return float("NaN") + + valid_extensions = ['.jpg', '.jpeg', '.png', '.webp', '.tga'] + include_subfolders = kwargs.get('include_subfolders', False) + + file_data = [] + if include_subfolders: + for root, _, files in os.walk(folder): + for file in files: + if any(file.lower().endswith(ext) for ext in valid_extensions): + path = os.path.join(root, file) + try: + mtime = os.path.getmtime(path) + file_data.append((path, mtime)) + except OSError: + pass + else: + for file in sorted(os.listdir(folder)): + if any(file.lower().endswith(ext) for ext in valid_extensions): + path = os.path.join(folder, file) + try: + mtime = os.path.getmtime(path) + file_data.append((path, mtime)) + except OSError: + pass + + file_data.sort() + + combined_hash = hashlib.md5() + combined_hash.update(folder.encode('utf-8')) + combined_hash.update(str(len(file_data)).encode('utf-8')) + + for path, mtime in file_data: + combined_hash.update(f"{path}:{mtime}".encode('utf-8')) + + current_hash = combined_hash.hexdigest() + + old_hash = cls.folder_hashes.get(folder) + cls.folder_hashes[folder] = current_hash + + if old_hash == current_hash: + return old_hash + + return current_hash + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "folder": ("STRING", {"default": ""}), + "width": ("INT", {"default": 1024, "min": -1, "step": 1}), + "height": ("INT", {"default": 1024, "min": -1, "step": 1}), + "keep_aspect_ratio": (["crop", "pad", "stretch",],), + }, + "optional": { + "image_load_cap": ("INT", {"default": 0, "min": 0, "step": 1}), + "start_index": ("INT", {"default": 0, "min": 0, "step": 1}), + "include_subfolders": ("BOOLEAN", {"default": False}), + } + } + + RETURN_TYPES = ("IMAGE", "MASK", "INT", "STRING",) + RETURN_NAMES = ("image", "mask", "count", "image_path",) + FUNCTION = "load_images" + CATEGORY = "KJNodes/image" + DESCRIPTION = """Loads images from a folder into a batch, images are resized and loaded into a batch.""" + + def load_images(self, folder, width, height, image_load_cap, start_index, keep_aspect_ratio, include_subfolders=False): + if folder and not os.path.isabs(folder) and args.base_directory: + folder = os.path.join(args.base_directory, folder) + if not folder or not os.path.isdir(folder): + raise FileNotFoundError(f"Folder '{folder}' cannot be found.") + + valid_extensions = ['.jpg', '.jpeg', '.png', '.webp', '.tga'] + image_paths = [] + if include_subfolders: + for root, _, files in os.walk(folder): + for file in files: + if any(file.lower().endswith(ext) for ext in valid_extensions): + image_paths.append(os.path.join(root, file)) + else: + for file in sorted(os.listdir(folder)): + if any(file.lower().endswith(ext) for ext in valid_extensions): + image_paths.append(os.path.join(folder, file)) + + dir_files = sorted(image_paths) + + if len(dir_files) == 0: + raise FileNotFoundError(f"No files in directory '{folder}'.") + + # start at start_index + dir_files = dir_files[start_index:] + + images = [] + masks = [] + image_path_list = [] + + limit_images = False + if image_load_cap > 0: + limit_images = True + image_count = 0 + + pbar = ProgressBar(len(dir_files)) + + for image_path in dir_files: + if os.path.isdir(image_path): + continue + if limit_images and image_count >= image_load_cap: + break + i = Image.open(image_path) + i = ImageOps.exif_transpose(i) + + # Resize image to maximum dimensions + if width == -1 and height == -1: + width = i.size[0] + height = i.size[1] + if i.size != (width, height): + i = self.resize_with_aspect_ratio(i, width, height, keep_aspect_ratio) + + + image = i.convert("RGB") + image = np.array(image).astype(np.float32) / 255.0 + image = torch.from_numpy(image)[None,] + + if 'A' in i.getbands(): + mask = np.array(i.getchannel('A')).astype(np.float32) / 255.0 + mask = 1. - torch.from_numpy(mask) + if mask.shape != (height, width): + mask = torch.nn.functional.interpolate(mask.unsqueeze(0).unsqueeze(0), + size=(height, width), + mode='bilinear', + align_corners=False).squeeze() + else: + mask = torch.zeros((height, width), dtype=torch.float32, device="cpu") + + images.append(image) + masks.append(mask) + image_path_list.append(image_path) + image_count += 1 + pbar.update(1) + + if len(images) == 1: + return (images[0], masks[0], 1, image_path_list) + + elif len(images) > 1: + image1 = images[0] + mask1 = masks[0].unsqueeze(0) + + for image2 in images[1:]: + image1 = torch.cat((image1, image2), dim=0) + + for mask2 in masks[1:]: + mask1 = torch.cat((mask1, mask2.unsqueeze(0)), dim=0) + + return (image1, mask1, len(images), image_path_list) + def resize_with_aspect_ratio(self, img, width, height, mode): + if mode == "stretch": + return img.resize((width, height), Image.Resampling.LANCZOS) + + img_width, img_height = img.size + aspect_ratio = img_width / img_height + target_ratio = width / height + + if mode == "crop": + # Calculate dimensions for center crop + if aspect_ratio > target_ratio: + # Image is wider - crop width + new_width = int(height * aspect_ratio) + img = img.resize((new_width, height), Image.Resampling.LANCZOS) + left = (new_width - width) // 2 + return img.crop((left, 0, left + width, height)) + else: + # Image is taller - crop height + new_height = int(width / aspect_ratio) + img = img.resize((width, new_height), Image.Resampling.LANCZOS) + top = (new_height - height) // 2 + return img.crop((0, top, width, top + height)) + + elif mode == "pad": + pad_color = self.get_edge_color(img) + # Calculate dimensions for padding + if aspect_ratio > target_ratio: + # Image is wider - pad height + new_height = int(width / aspect_ratio) + img = img.resize((width, new_height), Image.Resampling.LANCZOS) + padding = (height - new_height) // 2 + padded = Image.new('RGBA', (width, height), pad_color) + padded.paste(img, (0, padding)) + return padded + else: + # Image is taller - pad width + new_width = int(height * aspect_ratio) + img = img.resize((new_width, height), Image.Resampling.LANCZOS) + padding = (width - new_width) // 2 + padded = Image.new('RGBA', (width, height), pad_color) + padded.paste(img, (padding, 0)) + return padded + def get_edge_color(self, img): + from PIL import ImageStat + """Sample edges and return dominant color""" + width, height = img.size + img = img.convert('RGBA') + + # Create 1-pixel high/wide images from edges + top = img.crop((0, 0, width, 1)) + bottom = img.crop((0, height-1, width, height)) + left = img.crop((0, 0, 1, height)) + right = img.crop((width-1, 0, width, height)) + + # Combine edges into single image + edges = Image.new('RGBA', (width*2 + height*2, 1)) + edges.paste(top, (0, 0)) + edges.paste(bottom, (width, 0)) + edges.paste(left.resize((height, 1)), (width*2, 0)) + edges.paste(right.resize((height, 1)), (width*2 + height, 0)) + + # Get median color + stat = ImageStat.Stat(edges) + median = tuple(map(int, stat.median)) + return median + +class ImageGridtoBatch: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "image": ("IMAGE", ), + "columns": ("INT", {"default": 3, "min": 1, "max": 8, "tooltip": "The number of columns in the grid."}), + "rows": ("INT", {"default": 0, "min": 1, "max": 8, "tooltip": "The number of rows in the grid. Set to 0 for automatic calculation."}), + } + } + + RETURN_TYPES = ("IMAGE",) + FUNCTION = "decompose" + CATEGORY = "KJNodes/image" + DESCRIPTION = "Converts a grid of images to a batch of images." + + def decompose(self, image, columns, rows): + B, H, W, C = image.shape + print("input size: ", image.shape) + + # Calculate cell width, rounding down + cell_width = W // columns + + if rows == 0: + # If rows is 0, calculate number of full rows + cell_height = H // columns + rows = H // cell_height + else: + # If rows is specified, adjust cell_height + cell_height = H // rows + + # Crop the image to fit full cells + image = image[:, :rows*cell_height, :columns*cell_width, :] + + # Reshape and permute the image to get the grid + image = image.view(B, rows, cell_height, columns, cell_width, C) + image = image.permute(0, 1, 3, 2, 4, 5).contiguous() + image = image.view(B, rows * columns, cell_height, cell_width, C) + + # Reshape to the final batch tensor + img_tensor = image.view(-1, cell_height, cell_width, C) + + return (img_tensor,) + +class SaveImageKJ: + def __init__(self): + self.type = "output" + self.prefix_append = "" + self.compress_level = 4 + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "images": ("IMAGE", {"tooltip": "The images to save."}), + "filename_prefix": ("STRING", {"default": "ComfyUI", "tooltip": "The prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes."}), + "output_folder": ("STRING", {"default": "output", "tooltip": "The folder to save the images to."}), + }, + "optional": { + "caption_file_extension": ("STRING", {"default": ".txt", "tooltip": "The extension for the caption file."}), + "caption": ("STRING", {"forceInput": True, "tooltip": "string to save as .txt file"}), + }, + "hidden": { + "prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO" + }, + } + + RETURN_TYPES = ("STRING",) + RETURN_NAMES = ("filename",) + FUNCTION = "save_images" + + OUTPUT_NODE = True + + CATEGORY = "KJNodes/image" + DESCRIPTION = "Saves the input images to your ComfyUI output directory." + + def save_images(self, images, output_folder, filename_prefix="ComfyUI", prompt=None, extra_pnginfo=None, caption=None, caption_file_extension=".txt"): + filename_prefix += self.prefix_append + + if os.path.isabs(output_folder): + if not os.path.exists(output_folder): + os.makedirs(output_folder, exist_ok=True) + full_output_folder = output_folder + _, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, output_folder, images[0].shape[1], images[0].shape[0]) + else: + self.output_dir = folder_paths.get_output_directory() + full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir, images[0].shape[1], images[0].shape[0]) + + results = list() + for (batch_number, image) in enumerate(images): + i = 255. * image.cpu().numpy() + img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8)) + metadata = None + if not args.disable_metadata: + metadata = PngInfo() + if prompt is not None: + metadata.add_text("prompt", json.dumps(prompt)) + if extra_pnginfo is not None: + for x in extra_pnginfo: + metadata.add_text(x, json.dumps(extra_pnginfo[x])) + + filename_with_batch_num = filename.replace("%batch_num%", str(batch_number)) + base_file_name = f"{filename_with_batch_num}_{counter:05}_" + file = f"{base_file_name}.png" + img.save(os.path.join(full_output_folder, file), pnginfo=metadata, compress_level=self.compress_level) + results.append({ + "filename": file, + "subfolder": subfolder, + "type": self.type + }) + if caption is not None: + txt_file = base_file_name + caption_file_extension + file_path = os.path.join(full_output_folder, txt_file) + with open(file_path, 'w') as f: + f.write(caption) + + counter += 1 + + return file, + +class SaveStringKJ: + def __init__(self): + self.output_dir = folder_paths.get_output_directory() + self.type = "output" + self.prefix_append = "" + self.compress_level = 4 + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "string": ("STRING", {"forceInput": True, "tooltip": "string to save as .txt file"}), + "filename_prefix": ("STRING", {"default": "text", "tooltip": "The prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes."}), + "output_folder": ("STRING", {"default": "output", "tooltip": "The folder to save the images to."}), + }, + "optional": { + "file_extension": ("STRING", {"default": ".txt", "tooltip": "The extension for the caption file."}), + }, + } + + RETURN_TYPES = ("STRING",) + RETURN_NAMES = ("filename",) + FUNCTION = "save_string" + + OUTPUT_NODE = True + + CATEGORY = "KJNodes/misc" + DESCRIPTION = "Saves the input string to your ComfyUI output directory." + + def save_string(self, string, output_folder, filename_prefix="text", file_extension=".txt"): + filename_prefix += self.prefix_append + + full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir) + if output_folder and not os.path.isabs(output_folder) and args.base_directory: + output_folder = os.path.join(args.base_directory, output_folder) + if output_folder != "output": + if not os.path.exists(output_folder): + os.makedirs(output_folder, exist_ok=True) + full_output_folder = output_folder + + base_file_name = f"{filename_prefix}_{counter:05}_" + results = list() + + txt_file = base_file_name + file_extension + file_path = os.path.join(full_output_folder, txt_file) + with open(file_path, 'w') as f: + f.write(string) + + return results, + +to_pil_image = T.ToPILImage() + +class FastPreview: + @classmethod + def INPUT_TYPES(cls): + return { + "required": { + "image": ("IMAGE", ), + "format": (["JPEG", "PNG", "WEBP"], {"default": "JPEG"}), + "quality" : ("INT", {"default": 75, "min": 1, "max": 100, "step": 1}), + }, + } + + RETURN_TYPES = () + FUNCTION = "preview" + CATEGORY = "KJNodes/experimental" + OUTPUT_NODE = True + DESCRIPTION = "Experimental node for faster image previews by displaying through base64 it without saving to disk." + + def preview(self, image, format, quality): + pil_image = to_pil_image(image[0].permute(2, 0, 1)) + + with BytesIO() as buffered: + pil_image.save(buffered, format=format, quality=quality) + img_bytes = buffered.getvalue() + + img_base64 = base64.b64encode(img_bytes).decode('utf-8') + + return { + "ui": {"bg_image": [img_base64]}, + "result": () + } + +class ImageCropByMaskAndResize: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "image": ("IMAGE", ), + "mask": ("MASK", ), + "base_resolution": ("INT", { "default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 8, }), + "padding": ("INT", { "default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 1, }), + "min_crop_resolution": ("INT", { "default": 128, "min": 0, "max": MAX_RESOLUTION, "step": 8, }), + "max_crop_resolution": ("INT", { "default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 8, }), + + }, + } + + RETURN_TYPES = ("IMAGE", "MASK", "BBOX", ) + RETURN_NAMES = ("images", "masks", "bbox",) + FUNCTION = "crop" + CATEGORY = "KJNodes/image" + + def crop_by_mask(self, mask, padding=0, min_crop_resolution=None, max_crop_resolution=None): + iy, ix = (mask == 1).nonzero(as_tuple=True) + h0, w0 = mask.shape + + if iy.numel() == 0: + x_c = w0 / 2.0 + y_c = h0 / 2.0 + width = 0 + height = 0 + else: + x_min = ix.min().item() + x_max = ix.max().item() + y_min = iy.min().item() + y_max = iy.max().item() + + width = x_max - x_min + height = y_max - y_min + + if width > w0 or height > h0: + raise Exception("Masked area out of bounds") + + x_c = (x_min + x_max) / 2.0 + y_c = (y_min + y_max) / 2.0 + + if min_crop_resolution: + width = max(width, min_crop_resolution) + height = max(height, min_crop_resolution) + + if max_crop_resolution: + width = min(width, max_crop_resolution) + height = min(height, max_crop_resolution) + + if w0 <= width: + x0 = 0 + w = w0 + else: + x0 = max(0, x_c - width / 2 - padding) + w = width + 2 * padding + if x0 + w > w0: + x0 = w0 - w + + if h0 <= height: + y0 = 0 + h = h0 + else: + y0 = max(0, y_c - height / 2 - padding) + h = height + 2 * padding + if y0 + h > h0: + y0 = h0 - h + + return (int(x0), int(y0), int(w), int(h)) + + def crop(self, image, mask, base_resolution, padding=0, min_crop_resolution=128, max_crop_resolution=512): + mask = mask.round() + image_list = [] + mask_list = [] + bbox_list = [] + + # First, collect all bounding boxes + bbox_params = [] + aspect_ratios = [] + for i in range(image.shape[0]): + x0, y0, w, h = self.crop_by_mask(mask[i], padding, min_crop_resolution, max_crop_resolution) + bbox_params.append((x0, y0, w, h)) + aspect_ratios.append(w / h) + + # Find maximum width and height + max_w = max([w for x0, y0, w, h in bbox_params]) + max_h = max([h for x0, y0, w, h in bbox_params]) + max_aspect_ratio = max(aspect_ratios) + + # Ensure dimensions are divisible by 16 + max_w = (max_w + 15) // 16 * 16 + max_h = (max_h + 15) // 16 * 16 + # Calculate common target dimensions + if max_aspect_ratio > 1: + target_width = base_resolution + target_height = int(base_resolution / max_aspect_ratio) + else: + target_height = base_resolution + target_width = int(base_resolution * max_aspect_ratio) + + for i in range(image.shape[0]): + x0, y0, w, h = bbox_params[i] + + # Adjust cropping to use maximum width and height + x_center = x0 + w / 2 + y_center = y0 + h / 2 + + x0_new = int(max(0, x_center - max_w / 2)) + y0_new = int(max(0, y_center - max_h / 2)) + x1_new = int(min(x0_new + max_w, image.shape[2])) + y1_new = int(min(y0_new + max_h, image.shape[1])) + x0_new = x1_new - max_w + y0_new = y1_new - max_h + + cropped_image = image[i][y0_new:y1_new, x0_new:x1_new, :] + cropped_mask = mask[i][y0_new:y1_new, x0_new:x1_new] + + # Ensure dimensions are divisible by 16 + target_width = (target_width + 15) // 16 * 16 + target_height = (target_height + 15) // 16 * 16 + + cropped_image = cropped_image.unsqueeze(0).movedim(-1, 1) # Move C to the second position (B, C, H, W) + cropped_image = common_upscale(cropped_image, target_width, target_height, "lanczos", "disabled") + cropped_image = cropped_image.movedim(1, -1).squeeze(0) + + cropped_mask = cropped_mask.unsqueeze(0).unsqueeze(0) + cropped_mask = common_upscale(cropped_mask, target_width, target_height, 'bilinear', "disabled") + cropped_mask = cropped_mask.squeeze(0).squeeze(0) + + image_list.append(cropped_image) + mask_list.append(cropped_mask) + bbox_list.append((x0_new, y0_new, x1_new, y1_new)) + + + return (torch.stack(image_list), torch.stack(mask_list), bbox_list) + +class ImageCropByMask: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "image": ("IMAGE", ), + "mask": ("MASK", ), + }, + } + + RETURN_TYPES = ("IMAGE", ) + RETURN_NAMES = ("image", ) + FUNCTION = "crop" + CATEGORY = "KJNodes/image" + DESCRIPTION = "Crops the input images based on the provided mask." + + def crop(self, image, mask): + B, H, W, C = image.shape + mask = mask.round() + + # Find bounding box for each batch + crops = [] + + for b in range(B): + # Get coordinates of non-zero elements + rows = torch.any(mask[min(b, mask.shape[0]-1)] > 0, dim=1) + cols = torch.any(mask[min(b, mask.shape[0]-1)] > 0, dim=0) + + # Find boundaries + y_min, y_max = torch.where(rows)[0][[0, -1]] + x_min, x_max = torch.where(cols)[0][[0, -1]] + + # Crop image and mask + crop = image[b:b+1, y_min:y_max+1, x_min:x_max+1, :] + crops.append(crop) + + # Stack results back together + cropped_images = torch.cat(crops, dim=0) + + return (cropped_images, ) + + + +class ImageUncropByMask: + + @classmethod + def INPUT_TYPES(s): + return {"required": + { + "destination": ("IMAGE",), + "source": ("IMAGE",), + "mask": ("MASK",), + "bbox": ("BBOX",), + }, + } + + CATEGORY = "KJNodes/image" + RETURN_TYPES = ("IMAGE",) + RETURN_NAMES = ("image",) + FUNCTION = "uncrop" + + def uncrop(self, destination, source, mask, bbox=None): + + output_list = [] + + B, H, W, C = destination.shape + + for i in range(source.shape[0]): + x0, y0, x1, y1 = bbox[i] + bbox_height = y1 - y0 + bbox_width = x1 - x0 + + # Resize source image to match the bounding box dimensions + #resized_source = F.interpolate(source[i].unsqueeze(0).movedim(-1, 1), size=(bbox_height, bbox_width), mode='bilinear', align_corners=False) + resized_source = common_upscale(source[i].unsqueeze(0).movedim(-1, 1), bbox_width, bbox_height, "lanczos", "disabled") + resized_source = resized_source.movedim(1, -1).squeeze(0) + + # Resize mask to match the bounding box dimensions + resized_mask = common_upscale(mask[i].unsqueeze(0).unsqueeze(0), bbox_width, bbox_height, "bilinear", "disabled") + resized_mask = resized_mask.squeeze(0).squeeze(0) + + # Calculate padding values + pad_left = x0 + pad_right = W - x1 + pad_top = y0 + pad_bottom = H - y1 + + # Pad the resized source image and mask to fit the destination dimensions + padded_source = F.pad(resized_source, pad=(0, 0, pad_left, pad_right, pad_top, pad_bottom), mode='constant', value=0) + padded_mask = F.pad(resized_mask, pad=(pad_left, pad_right, pad_top, pad_bottom), mode='constant', value=0) + + # Ensure the padded mask has the correct shape + padded_mask = padded_mask.unsqueeze(2).expand(-1, -1, destination[i].shape[2]) + # Ensure the padded source has the correct shape + padded_source = padded_source.unsqueeze(2).expand(-1, -1, -1, destination[i].shape[2]).squeeze(2) + + # Combine the destination and padded source images using the mask + result = destination[i] * (1.0 - padded_mask) + padded_source * padded_mask + + output_list.append(result) + + + return (torch.stack(output_list),) + +class ImageCropByMaskBatch: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "image": ("IMAGE", ), + "masks": ("MASK", ), + "width": ("INT", {"default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 8, }), + "height": ("INT", {"default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 8, }), + "padding": ("INT", {"default": 0, "min": 0, "max": 4096, "step": 1, }), + "preserve_size": ("BOOLEAN", {"default": False}), + "bg_color": ("STRING", {"default": "0, 0, 0", "tooltip": "Color as RGB values in range 0-255 or 0.0-1.0, or color name or hex code"}), + } + } + + RETURN_TYPES = ("IMAGE", "MASK", ) + RETURN_NAMES = ("images", "masks",) + FUNCTION = "crop" + CATEGORY = "KJNodes/image" + DESCRIPTION = "Crops the input images based on the provided masks." + + def crop(self, image, masks, width, height, bg_color, padding, preserve_size): + B, H, W, C = image.shape + BM, HM, WM = masks.shape + mask_count = BM + if HM != H or WM != W: + masks = F.interpolate(masks.unsqueeze(1), size=(H, W), mode='nearest-exact').squeeze(1) + print(masks.shape) + output_images = [] + output_masks = [] + + # Parse background color using helper function + color_list = string_to_color(bg_color) + bg_color = [x / 255.0 for x in color_list] + + # For each mask + for i in range(mask_count): + curr_mask = masks[i] + + # Find bounds + y_indices, x_indices = torch.nonzero(curr_mask, as_tuple=True) + if len(y_indices) == 0 or len(x_indices) == 0: + continue + + # Get exact bounds with padding + min_y = max(0, y_indices.min().item() - padding) + max_y = min(H, y_indices.max().item() + 1 + padding) + min_x = max(0, x_indices.min().item() - padding) + max_x = min(W, x_indices.max().item() + 1 + padding) + + # Ensure mask has correct shape for multiplication + curr_mask = curr_mask.unsqueeze(-1).expand(-1, -1, C) + + # Crop image and mask together + cropped_img = image[0, min_y:max_y, min_x:max_x, :] + cropped_mask = curr_mask[min_y:max_y, min_x:max_x, :] + + crop_h, crop_w = cropped_img.shape[0:2] + new_w = crop_w + new_h = crop_h + + if not preserve_size or crop_w > width or crop_h > height: + scale = min(width/crop_w, height/crop_h) + new_w = int(crop_w * scale) + new_h = int(crop_h * scale) + + # Resize RGB + resized_img = common_upscale(cropped_img.permute(2,0,1).unsqueeze(0), new_w, new_h, "lanczos", "disabled").squeeze(0).permute(1,2,0) + resized_mask = torch.nn.functional.interpolate( + cropped_mask.permute(2,0,1).unsqueeze(0), + size=(new_h, new_w), + mode='nearest' + ).squeeze(0).permute(1,2,0) + else: + resized_img = cropped_img + resized_mask = cropped_mask + + # Create empty tensors + new_img = torch.zeros((height, width, 3), dtype=image.dtype) + new_mask = torch.zeros((height, width), dtype=image.dtype) + + # Pad both + pad_x = (width - new_w) // 2 + pad_y = (height - new_h) // 2 + new_img[pad_y:pad_y+new_h, pad_x:pad_x+new_w, :] = resized_img + if len(resized_mask.shape) == 3: + resized_mask = resized_mask[:,:,0] # Take first channel if 3D + new_mask[pad_y:pad_y+new_h, pad_x:pad_x+new_w] = resized_mask + + output_images.append(new_img) + output_masks.append(new_mask) + + if not output_images: + return (torch.zeros((0, height, width, 3), dtype=image.dtype),) + + out_rgb = torch.stack(output_images, dim=0) + out_masks = torch.stack(output_masks, dim=0) + + # Apply mask to RGB + mask_expanded = out_masks.unsqueeze(-1).expand(-1, -1, -1, 3) + background_color = torch.tensor(bg_color, dtype=torch.float32, device=image.device) + out_rgb = out_rgb * mask_expanded + background_color * (1 - mask_expanded) + + return (out_rgb, out_masks) + +class ImagePadKJ: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "image": ("IMAGE", ), + "left": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 1, }), + "right": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 1, }), + "top": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 1, }), + "bottom": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 1, }), + "extra_padding": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 1, }), + "pad_mode": (["edge", "edge_pixel", "color", "pillarbox_blur"],), + "color": ("STRING", {"default": "0, 0, 0", "tooltip": "Color as RGB values in range 0-255 or 0.0-1.0, or color name or hex code"}), + }, + "optional": { + "mask": ("MASK", ), + "target_width": ("INT", {"default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 1, "forceInput": True}), + "target_height": ("INT", {"default": 512, "min": 0, "max": MAX_RESOLUTION, "step": 1, "forceInput": True}), + } + } + + RETURN_TYPES = ("IMAGE", "MASK", ) + RETURN_NAMES = ("images", "masks",) + FUNCTION = "pad" + CATEGORY = "KJNodes/image" + DESCRIPTION = "Pad the input image and optionally mask with the specified padding." + + def pad(self, image, left, right, top, bottom, extra_padding, color, pad_mode, mask=None, target_width=None, target_height=None): + B, H, W, C = image.shape + # Resize masks to image dimensions if necessary + if mask is not None: + BM, HM, WM = mask.shape + if HM != H or WM != W: + mask = F.interpolate(mask.unsqueeze(1), size=(H, W), mode='nearest-exact').squeeze(1) + + # Parse background color using helper function + color_list = string_to_color(color) + bg_color = [x / 255.0 for x in color_list] + if len(bg_color) == 1: + bg_color = bg_color * 3 # Grayscale to RGB + bg_color = torch.tensor(bg_color, dtype=image.dtype, device=image.device) + + # Calculate padding sizes with extra padding + if target_width is not None and target_height is not None: + if extra_padding > 0: + image = common_upscale(image.movedim(-1, 1), W - extra_padding, H - extra_padding, "lanczos", "disabled").movedim(1, -1) + B, H, W, C = image.shape + + padded_width = target_width + padded_height = target_height + pad_left = (padded_width - W) // 2 + pad_right = padded_width - W - pad_left + pad_top = (padded_height - H) // 2 + pad_bottom = padded_height - H - pad_top + else: + pad_left = left + extra_padding + pad_right = right + extra_padding + pad_top = top + extra_padding + pad_bottom = bottom + extra_padding + + padded_width = W + pad_left + pad_right + padded_height = H + pad_top + pad_bottom + + # Pillarbox blur mode + if pad_mode == "pillarbox_blur": + def _gaussian_blur_nchw(img_nchw, sigma_px): + if sigma_px <= 0: + return img_nchw + radius = max(1, int(3.0 * float(sigma_px))) + k = 2 * radius + 1 + x = torch.arange(-radius, radius + 1, device=img_nchw.device, dtype=img_nchw.dtype) + k1 = torch.exp(-(x * x) / (2.0 * float(sigma_px) * float(sigma_px))) + k1 = k1 / k1.sum() + kx = k1.view(1, 1, 1, k) + ky = k1.view(1, 1, k, 1) + c = img_nchw.shape[1] + kx = kx.repeat(c, 1, 1, 1) + ky = ky.repeat(c, 1, 1, 1) + img_nchw = F.conv2d(img_nchw, kx, padding=(0, radius), groups=c) + img_nchw = F.conv2d(img_nchw, ky, padding=(radius, 0), groups=c) + return img_nchw + + out_image = torch.zeros((B, padded_height, padded_width, C), dtype=image.dtype, device=image.device) + for b in range(B): + scale_fill = max(padded_width / float(W), padded_height / float(H)) if (W > 0 and H > 0) else 1.0 + bg_w = max(1, int(round(W * scale_fill))) + bg_h = max(1, int(round(H * scale_fill))) + src_b = image[b].movedim(-1, 0).unsqueeze(0) + bg = common_upscale(src_b, bg_w, bg_h, "bilinear", crop="disabled") + y0 = max(0, (bg_h - padded_height) // 2) + x0 = max(0, (bg_w - padded_width) // 2) + y1 = min(bg_h, y0 + padded_height) + x1 = min(bg_w, x0 + padded_width) + bg = bg[:, :, y0:y1, x0:x1] + if bg.shape[2] != padded_height or bg.shape[3] != padded_width: + pad_h = padded_height - bg.shape[2] + pad_w = padded_width - bg.shape[3] + pad_top_fix = max(0, pad_h // 2) + pad_bottom_fix = max(0, pad_h - pad_top_fix) + pad_left_fix = max(0, pad_w // 2) + pad_right_fix = max(0, pad_w - pad_left_fix) + bg = F.pad(bg, (pad_left_fix, pad_right_fix, pad_top_fix, pad_bottom_fix), mode="replicate") + sigma = max(1.0, 0.006 * float(min(padded_height, padded_width))) + bg = _gaussian_blur_nchw(bg, sigma_px=sigma) + if C >= 3: + r, g, bch = bg[:, 0:1], bg[:, 1:2], bg[:, 2:3] + luma = 0.2126 * r + 0.7152 * g + 0.0722 * bch + gray = torch.cat([luma, luma, luma], dim=1) + desat = 0.20 + rgb = torch.cat([r, g, bch], dim=1) + rgb = rgb * (1.0 - desat) + gray * desat + bg[:, 0:3, :, :] = rgb + dim = 0.35 + bg = torch.clamp(bg * dim, 0.0, 1.0) + out_image[b] = bg.squeeze(0).movedim(0, -1) + out_image[:, pad_top:pad_top+H, pad_left:pad_left+W, :] = image + # Mask handling for pillarbox_blur + if mask is not None: + fg_mask = mask + out_masks = torch.ones((B, padded_height, padded_width), dtype=image.dtype, device=image.device) + out_masks[:, pad_top:pad_top+H, pad_left:pad_left+W] = fg_mask + else: + out_masks = torch.ones((B, padded_height, padded_width), dtype=image.dtype, device=image.device) + out_masks[:, pad_top:pad_top+H, pad_left:pad_left+W] = 0.0 + return (out_image, out_masks) + + # Standard pad logic (edge/color) + out_image = torch.zeros((B, padded_height, padded_width, C), dtype=image.dtype, device=image.device) + for b in range(B): + if pad_mode == "edge": + # Pad with edge color (mean) + top_edge = image[b, 0, :, :] + bottom_edge = image[b, H-1, :, :] + left_edge = image[b, :, 0, :] + right_edge = image[b, :, W-1, :] + out_image[b, :pad_top, :, :] = top_edge.mean(dim=0) + out_image[b, pad_top+H:, :, :] = bottom_edge.mean(dim=0) + out_image[b, :, :pad_left, :] = left_edge.mean(dim=0) + out_image[b, :, pad_left+W:, :] = right_edge.mean(dim=0) + out_image[b, pad_top:pad_top+H, pad_left:pad_left+W, :] = image[b] + elif pad_mode == "edge_pixel": + # Pad with exact edge pixel values + for y in range(pad_top): + out_image[b, y, pad_left:pad_left+W, :] = image[b, 0, :, :] + for y in range(pad_top+H, padded_height): + out_image[b, y, pad_left:pad_left+W, :] = image[b, H-1, :, :] + for x in range(pad_left): + out_image[b, pad_top:pad_top+H, x, :] = image[b, :, 0, :] + for x in range(pad_left+W, padded_width): + out_image[b, pad_top:pad_top+H, x, :] = image[b, :, W-1, :] + out_image[b, :pad_top, :pad_left, :] = image[b, 0, 0, :] + out_image[b, :pad_top, pad_left+W:, :] = image[b, 0, W-1, :] + out_image[b, pad_top+H:, :pad_left, :] = image[b, H-1, 0, :] + out_image[b, pad_top+H:, pad_left+W:, :] = image[b, H-1, W-1, :] + out_image[b, pad_top:pad_top+H, pad_left:pad_left+W, :] = image[b] + else: + # Pad with specified background color + out_image[b, :, :, :] = bg_color.unsqueeze(0).unsqueeze(0) + out_image[b, pad_top:pad_top+H, pad_left:pad_left+W, :] = image[b] + + if mask is not None: + out_masks = torch.nn.functional.pad( + mask, + (pad_left, pad_right, pad_top, pad_bottom), + mode='replicate' + ) + else: + out_masks = torch.ones((B, padded_height, padded_width), dtype=image.dtype, device=image.device) + for m in range(B): + out_masks[m, pad_top:pad_top+H, pad_left:pad_left+W] = 0.0 + + return (out_image, out_masks) + +# extends https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite +class LoadVideosFromFolder: + @classmethod + def __init__(cls): + try: + cls.vhs_nodes = importlib.import_module("ComfyUI-VideoHelperSuite.videohelpersuite") + except ImportError: + try: + cls.vhs_nodes = importlib.import_module("comfyui-videohelpersuite.videohelpersuite") + except ImportError: + # Fallback to sys.modules search for Windows compatibility + import sys + vhs_module = None + for module_name in sys.modules: + if 'videohelpersuite' in module_name and 'videohelpersuite' in sys.modules[module_name].__dict__: + vhs_module = sys.modules[module_name] + break + + if vhs_module is None: + # Try direct access to the videohelpersuite submodule + for module_name in sys.modules: + if module_name.endswith('videohelpersuite'): + vhs_module = sys.modules[module_name] + break + + if vhs_module is not None: + cls.vhs_nodes = vhs_module + else: + raise ImportError("This node requires ComfyUI-VideoHelperSuite to be installed.") + + except ImportError: + raise ImportError("This node requires ComfyUI-VideoHelperSuite to be installed.") + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "video": ("STRING", {"default": "X://insert/path/"},), + "force_rate": ("FLOAT", {"default": 0, "min": 0, "max": 60, "step": 1, "disable": 0}), + "custom_width": ("INT", {"default": 0, "min": 0, "max": 4096, 'disable': 0}), + "custom_height": ("INT", {"default": 0, "min": 0, "max": 4096, 'disable': 0}), + "frame_load_cap": ("INT", {"default": 0, "min": 0, "max": 10000, "step": 1, "disable": 0}), + "skip_first_frames": ("INT", {"default": 0, "min": 0, "max": 10000, "step": 1}), + "select_every_nth": ("INT", {"default": 1, "min": 1, "max": 1000, "step": 1}), + "output_type": (["batch", "grid"], {"default": "batch"}), + "grid_max_columns": ("INT", {"default": 4, "min": 1, "max": 16, "step": 1, "disable": 1}), + "add_label": ( "BOOLEAN", {"default": False} ), + }, + "hidden": { + "force_size": "STRING", + "unique_id": "UNIQUE_ID" + }, + } + + CATEGORY = "KJNodes/misc" + + RETURN_TYPES = ("IMAGE", ) + RETURN_NAMES = ("IMAGE", ) + + FUNCTION = "load_video" + + def load_video(self, output_type, grid_max_columns, add_label=False, **kwargs): + if kwargs.get('video') and not os.path.isabs(kwargs['video']) and args.base_directory: + kwargs['video'] = os.path.join(args.base_directory, kwargs['video']) + + if self.vhs_nodes is None: + raise ImportError("This node requires ComfyUI-VideoHelperSuite to be installed.") + videos_list = [] + filenames = [] + for f in sorted(os.listdir(kwargs['video'])): + if os.path.isfile(os.path.join(kwargs['video'], f)): + file_parts = f.split('.') + if len(file_parts) > 1 and (file_parts[-1].lower() in ['webm', 'mp4', 'mkv', 'gif', 'mov']): + videos_list.append(os.path.join(kwargs['video'], f)) + filenames.append(f) + print(videos_list) + kwargs.pop('video') + loaded_videos = [] + for idx, video in enumerate(videos_list): + video_tensor = self.vhs_nodes.load_video_nodes.load_video(video=video, **kwargs)[0] + if add_label: + # Add filename label above video (without extension) + if video_tensor.dim() == 4: + _, h, w, c = video_tensor.shape + else: + h, w, c = video_tensor.shape + # Remove extension from filename + label_text = filenames[idx].rsplit('.', 1)[0] + font_size = max(16, w // 20) + try: + font = ImageFont.truetype("arial.ttf", font_size) + except: + font = ImageFont.load_default() + dummy_img = Image.new("RGB", (w, 10), (0,0,0)) + draw = ImageDraw.Draw(dummy_img) + text_bbox = draw.textbbox((0,0), label_text, font=font) + extra_padding = max(12, font_size // 2) # More padding under the font + label_height = text_bbox[3] - text_bbox[1] + extra_padding + label_img = Image.new("RGB", (w, label_height), (0,0,0)) + draw = ImageDraw.Draw(label_img) + draw.text((w//2 - (text_bbox[2]-text_bbox[0])//2, 4), label_text, font=font, fill=(255,255,255)) + label_np = np.asarray(label_img).astype(np.float32) / 255.0 + label_tensor = torch.from_numpy(label_np) + if c == 1: + label_tensor = label_tensor.mean(dim=2, keepdim=True) + elif c == 4: + alpha = torch.ones((label_height, w, 1), dtype=label_tensor.dtype) + label_tensor = torch.cat([label_tensor, alpha], dim=2) + if video_tensor.dim() == 4: + label_tensor = label_tensor.unsqueeze(0).expand(video_tensor.shape[0], -1, -1, -1) + video_tensor = torch.cat([label_tensor, video_tensor], dim=1) + else: + video_tensor = torch.cat([label_tensor, video_tensor], dim=0) + loaded_videos.append(video_tensor) + if output_type == "batch": + out_tensor = torch.cat(loaded_videos) + elif output_type == "grid": + rows = (len(loaded_videos) + grid_max_columns - 1) // grid_max_columns + # Pad the last row if needed + total_slots = rows * grid_max_columns + while len(loaded_videos) < total_slots: + loaded_videos.append(torch.zeros_like(loaded_videos[0])) + # Create grid by rows + row_tensors = [] + for row_idx in range(rows): + start_idx = row_idx * grid_max_columns + end_idx = start_idx + grid_max_columns + row_videos = loaded_videos[start_idx:end_idx] + # Pad all videos in this row to the same height + heights = [v.shape[1] for v in row_videos] + max_height = max(heights) + padded_row_videos = [] + for v in row_videos: + pad_height = max_height - v.shape[1] + if pad_height > 0: + # Pad (frames, H, W, C) or (H, W, C) + if v.dim() == 4: + pad = (0,0, 0,0, 0,pad_height, 0,0) # (C,W,H,F) + v = torch.nn.functional.pad(v, (0,0,0,0,0,pad_height,0,0)) + else: + v = torch.nn.functional.pad(v, (0,0,0,0,pad_height,0)) + padded_row_videos.append(v) + row_tensor = torch.cat(padded_row_videos, dim=2) # Concatenate horizontally + row_tensors.append(row_tensor) + out_tensor = torch.cat(row_tensors, dim=1) # Concatenate rows vertically + print(out_tensor.shape) + return out_tensor, + + @classmethod + def IS_CHANGED(s, video, **kwargs): + if s.vhs_nodes is not None: + return s.vhs_nodes.utils.hash_path(video) + return None diff --git a/docs/hel-892/concat-reference/kj__web__js__jsnodes.js b/docs/hel-892/concat-reference/kj__web__js__jsnodes.js new file mode 100644 index 00000000..6ab10760 --- /dev/null +++ b/docs/hel-892/concat-reference/kj__web__js__jsnodes.js @@ -0,0 +1,416 @@ +const { app } = window.comfyAPI.app; +const { applyTextReplacements } = window.comfyAPI.utils; + +app.registerExtension({ + name: "KJNodes.jsnodes", + async beforeRegisterNodeDef(nodeType, nodeData, app) { + if(!nodeData?.category?.startsWith("KJNodes")) { + return; + } + switch (nodeData.name) { + case "ConditioningMultiCombine": + nodeType.prototype.onNodeCreated = function () { + this._type = "CONDITIONING" + this.inputs_offset = nodeData.name.includes("selective")?1:0 + this.addWidget("button", "Update inputs", null, () => { + if (!this.inputs) { + this.inputs = []; + } + const target_number_of_inputs = this.widgets.find(w => w.name === "inputcount")["value"]; + const num_inputs = this.inputs.filter(input => input.type === this._type).length + if(target_number_of_inputs===num_inputs)return; // already set, do nothing + + if(target_number_of_inputs < num_inputs){ + const inputs_to_remove = num_inputs - target_number_of_inputs; + for(let i = 0; i < inputs_to_remove; i++) { + this.removeInput(this.inputs.length - 1); + } + } + else{ + for(let i = num_inputs+1; i <= target_number_of_inputs; ++i) + this.addInput(`conditioning_${i}`, this._type) + } + }); + } + break; + case "ImageBatchMulti": + case "ImageAddMulti": + case "ImageConcatMulti": + case "CrossFadeImagesMulti": + case "TransitionImagesMulti": + nodeType.prototype.onNodeCreated = function () { + this._type = "IMAGE" + this.addWidget("button", "Update inputs", null, () => { + if (!this.inputs) { + this.inputs = []; + } + const target_number_of_inputs = this.widgets.find(w => w.name === "inputcount")["value"]; + const num_inputs = this.inputs.filter(input => input.type === this._type).length + if(target_number_of_inputs===num_inputs)return; // already set, do nothing + + if(target_number_of_inputs < num_inputs){ + const inputs_to_remove = num_inputs - target_number_of_inputs; + for(let i = 0; i < inputs_to_remove; i++) { + this.removeInput(this.inputs.length - 1); + } + } + else{ + for(let i = num_inputs+1; i <= target_number_of_inputs; ++i) + this.addInput(`image_${i}`, this._type, {shape: 7}); + } + + }); + } + break; + case "MaskBatchMulti": + nodeType.prototype.onNodeCreated = function () { + this._type = "MASK" + this.addWidget("button", "Update inputs", null, () => { + if (!this.inputs) { + this.inputs = []; + } + const target_number_of_inputs = this.widgets.find(w => w.name === "inputcount")["value"]; + const num_inputs = this.inputs.filter(input => input.type === this._type).length + if(target_number_of_inputs===num_inputs)return; // already set, do nothing + + if(target_number_of_inputs < num_inputs){ + const inputs_to_remove = num_inputs - target_number_of_inputs; + for(let i = 0; i < inputs_to_remove; i++) { + this.removeInput(this.inputs.length - 1); + } + } + else{ + for(let i = num_inputs+1; i <= target_number_of_inputs; ++i) + this.addInput(`mask_${i}`, this._type) + } + }); + } + break; + + case "FluxBlockLoraSelect": + case "HunyuanVideoBlockLoraSelect": + case "Wan21BlockLoraSelect": + case "LTX2BlockLoraSelect": + nodeType.prototype.onNodeCreated = function () { + this.addWidget("button", "Set all", null, () => { + const userInput = prompt("Enter the values to set for widgets (e.g., s0,1,2-7=2.0, d0,1,2-7=2.0, or 1.0):", ""); + if (userInput) { + const regex = /([sd])?(\d+(?:,\d+|-?\d+)*?)?=(\d+(\.\d+)?)/; + const match = userInput.match(regex); + if (match) { + const type = match[1]; + const indicesPart = match[2]; + const value = parseFloat(match[3]); + + let targetWidgets = []; + if (type === 's') { + targetWidgets = this.widgets.filter(widget => widget.name.includes("single")); + } else if (type === 'd') { + targetWidgets = this.widgets.filter(widget => widget.name.includes("double")); + } else { + targetWidgets = this.widgets; // No type specified, all widgets + } + + if (indicesPart) { + const indices = indicesPart.split(',').flatMap(part => { + if (part.includes('-')) { + const [start, end] = part.split('-').map(Number); + return Array.from({ length: end - start + 1 }, (_, i) => start + i); + } + return Number(part); + }); + + for (const index of indices) { + if (index < targetWidgets.length) { + targetWidgets[index].value = value; + } + } + } else { + // No indices provided, set value for all target widgets + for (const widget of targetWidgets) { + widget.value = value; + } + } + } else if (!isNaN(parseFloat(userInput))) { + // Single value provided, set it for all widgets + const value = parseFloat(userInput); + for (const widget of this.widgets) { + widget.value = value; + } + } else { + alert("Invalid input format. Please use the format s0,1,2-7=2.0, d0,1,2-7=2.0, or 1.0"); + } + } else { + alert("Invalid input. Please enter a value."); + } + }); + }; + break; + + case "GetMaskSizeAndCount": + const onGetMaskSizeConnectInput = nodeType.prototype.onConnectInput; + nodeType.prototype.onConnectInput = function (targetSlot, type, output, originNode, originSlot) { + const v = onGetMaskSizeConnectInput? onGetMaskSizeConnectInput.apply(this, arguments): undefined + this.outputs[1]["label"] = "width" + this.outputs[2]["label"] = "height" + this.outputs[3]["label"] = "count" + return v; + } + const onGetMaskSizeExecuted = nodeType.prototype.onAfterExecuteNode; + nodeType.prototype.onExecuted = function(message) { + const r = onGetMaskSizeExecuted? onGetMaskSizeExecuted.apply(this,arguments): undefined + let values = message["text"].toString().split('x').map(Number); + this.outputs[1]["label"] = values[1] + " width" + this.outputs[2]["label"] = values[2] + " height" + this.outputs[3]["label"] = values[0] + " count" + return r + } + break; + + case "GetImageSizeAndCount": + const onGetImageSizeConnectInput = nodeType.prototype.onConnectInput; + nodeType.prototype.onConnectInput = function (targetSlot, type, output, originNode, originSlot) { + console.log(this) + const v = onGetImageSizeConnectInput? onGetImageSizeConnectInput.apply(this, arguments): undefined + //console.log(this) + this.outputs[1]["label"] = "width" + this.outputs[2]["label"] = "height" + this.outputs[3]["label"] = "count" + return v; + } + //const onGetImageSizeExecuted = nodeType.prototype.onExecuted; + const onGetImageSizeExecuted = nodeType.prototype.onAfterExecuteNode; + nodeType.prototype.onExecuted = function(message) { + console.log(this) + const r = onGetImageSizeExecuted? onGetImageSizeExecuted.apply(this,arguments): undefined + let values = message["text"].toString().split('x').map(Number); + console.log(values) + this.outputs[1]["label"] = values[1] + " width" + this.outputs[2]["label"] = values[2] + " height" + this.outputs[3]["label"] = values[0] + " count" + return r + } + break; + + case "GetLatentSizeAndCount": + const onGetLatentConnectInput = nodeType.prototype.onConnectInput; + nodeType.prototype.onConnectInput = function (targetSlot, type, output, originNode, originSlot) { + console.log(this) + const v = onGetLatentConnectInput? onGetLatentConnectInput.apply(this, arguments): undefined + //console.log(this) + this.outputs[1]["label"] = "batch_size" + this.outputs[2]["label"] = "channels" + this.outputs[3]["label"] = "frames" + this.outputs[4]["label"] = "height" + this.outputs[5]["label"] = "width" + return v; + } + //const onGetImageSizeExecuted = nodeType.prototype.onExecuted; + const onGetLatentSizeExecuted = nodeType.prototype.onAfterExecuteNode; + nodeType.prototype.onExecuted = function(message) { + console.log(this) + const r = onGetLatentSizeExecuted? onGetLatentSizeExecuted.apply(this,arguments): undefined + let values = message["text"].toString().split('x').map(Number); + console.log(values) + this.outputs[1]["label"] = values[0] + " batch" + this.outputs[2]["label"] = values[1] + " channels" + this.outputs[3]["label"] = values[2] + " frames" + this.outputs[4]["label"] = values[3] + " height" + this.outputs[5]["label"] = values[4] + " width" + return r + } + break; + + case "PreviewAnimation": + const onPreviewAnimationConnectInput = nodeType.prototype.onConnectInput; + nodeType.prototype.onConnectInput = function (targetSlot, type, output, originNode, originSlot) { + const v = onPreviewAnimationConnectInput? onPreviewAnimationConnectInput.apply(this, arguments): undefined + this.title = "Preview Animation" + return v; + } + const onPreviewAnimationExecuted = nodeType.prototype.onAfterExecuteNode; + nodeType.prototype.onExecuted = function(message) { + const r = onPreviewAnimationExecuted? onPreviewAnimationExecuted.apply(this,arguments): undefined + let values = message["text"].toString(); + this.title = "Preview Animation " + values + return r + } + break; + + case "VRAM_Debug": + const onVRAM_DebugConnectInput = nodeType.prototype.onConnectInput; + nodeType.prototype.onConnectInput = function (targetSlot, type, output, originNode, originSlot) { + const v = onVRAM_DebugConnectInput? onVRAM_DebugConnectInput.apply(this, arguments): undefined + this.outputs[3]["label"] = "freemem_before" + this.outputs[4]["label"] = "freemem_after" + return v; + } + const onVRAM_DebugExecuted = nodeType.prototype.onAfterExecuteNode; + nodeType.prototype.onExecuted = function(message) { + const r = onVRAM_DebugExecuted? onVRAM_DebugExecuted.apply(this,arguments): undefined + let values = message["text"].toString().split('x'); + this.outputs[3]["label"] = values[0] + " freemem_before" + this.outputs[4]["label"] = values[1] + " freemem_after" + return r + } + break; + + case "JoinStringMulti": + const originalOnNodeCreated = nodeType.prototype.onNodeCreated || function() {}; + nodeType.prototype.onNodeCreated = function () { + originalOnNodeCreated.apply(this, arguments); + + this._type = "STRING"; + this.addWidget("button", "Update inputs", null, () => { + if (!this.inputs) { + this.inputs = []; + } + const target_number_of_inputs = this.widgets.find(w => w.name === "inputcount")["value"]; + const num_inputs = this.inputs.filter(input => input.name && input.name.toLowerCase().includes("string_")).length + if (target_number_of_inputs === num_inputs) return; // already set, do nothing + + if(target_number_of_inputs < num_inputs){ + const inputs_to_remove = num_inputs - target_number_of_inputs; + for(let i = 0; i < inputs_to_remove; i++) { + this.removeInput(this.inputs.length - 1); + } + } + else{ + for(let i = num_inputs+1; i <= target_number_of_inputs; ++i) + this.addInput(`string_${i}`, this._type, {shape: 7}); + } + }); + } + break; + case "SoundReactive": + nodeType.prototype.onNodeCreated = function () { + let audioContext; + let microphoneStream; + let animationFrameId; + let analyser; + let dataArray; + let startRangeHz; + let endRangeHz; + let smoothingFactor = 0.5; + let smoothedSoundLevel = 0; + + // Function to update the widget value in real-time + const updateWidgetValueInRealTime = () => { + // Ensure analyser and dataArray are defined before using them + if (analyser && dataArray) { + analyser.getByteFrequencyData(dataArray); + + const startRangeHzWidget = this.widgets.find(w => w.name === "start_range_hz"); + if (startRangeHzWidget) startRangeHz = startRangeHzWidget.value; + const endRangeHzWidget = this.widgets.find(w => w.name === "end_range_hz"); + if (endRangeHzWidget) endRangeHz = endRangeHzWidget.value; + const smoothingFactorWidget = this.widgets.find(w => w.name === "smoothing_factor"); + if (smoothingFactorWidget) smoothingFactor = smoothingFactorWidget.value; + + // Calculate frequency bin width (frequency resolution) + const frequencyBinWidth = audioContext.sampleRate / analyser.fftSize; + // Convert the widget values from Hz to indices + const startRangeIndex = Math.floor(startRangeHz / frequencyBinWidth); + const endRangeIndex = Math.floor(endRangeHz / frequencyBinWidth); + + // Function to calculate the average value for a frequency range + const calculateAverage = (start, end) => { + const sum = dataArray.slice(start, end).reduce((acc, val) => acc + val, 0); + const average = sum / (end - start); + + // Apply exponential moving average smoothing + smoothedSoundLevel = (average * (1 - smoothingFactor)) + (smoothedSoundLevel * smoothingFactor); + return smoothedSoundLevel; + }; + // Calculate the average levels for each frequency range + const soundLevel = calculateAverage(startRangeIndex, endRangeIndex); + + // Update the widget values + + const lowLevelWidget = this.widgets.find(w => w.name === "sound_level"); + if (lowLevelWidget) lowLevelWidget.value = soundLevel; + + animationFrameId = requestAnimationFrame(updateWidgetValueInRealTime); + } + }; + + // Function to start capturing audio from the microphone + const startMicrophoneCapture = () => { + // Only create the audio context and analyser once + if (!audioContext) { + audioContext = new (window.AudioContext || window.webkitAudioContext)(); + // Access the sample rate of the audio context + console.log(`Sample rate: ${audioContext.sampleRate}Hz`); + analyser = audioContext.createAnalyser(); + analyser.fftSize = 2048; + dataArray = new Uint8Array(analyser.frequencyBinCount); + // Get the range values from widgets (assumed to be in Hz) + const lowRangeWidget = this.widgets.find(w => w.name === "low_range_hz"); + if (lowRangeWidget) startRangeHz = lowRangeWidget.value; + + const midRangeWidget = this.widgets.find(w => w.name === "mid_range_hz"); + if (midRangeWidget) endRangeHz = midRangeWidget.value; + } + + navigator.mediaDevices.getUserMedia({ audio: true }).then(stream => { + microphoneStream = stream; + const microphone = audioContext.createMediaStreamSource(stream); + microphone.connect(analyser); + updateWidgetValueInRealTime(); + }).catch(error => { + console.error('Access to microphone was denied or an error occurred:', error); + }); + }; + + // Function to stop capturing audio from the microphone + const stopMicrophoneCapture = () => { + if (animationFrameId) { + cancelAnimationFrame(animationFrameId); + } + if (microphoneStream) { + microphoneStream.getTracks().forEach(track => track.stop()); + } + if (audioContext) { + audioContext.close(); + // Reset audioContext to ensure it can be created again when starting + audioContext = null; + } + }; + + // Add start button + this.addWidget("button", "Start mic capture", null, startMicrophoneCapture); + + // Add stop button + this.addWidget("button", "Stop mic capture", null, stopMicrophoneCapture); + }; + break; + case "SaveImageKJ": + const onNodeCreated = nodeType.prototype.onNodeCreated; + nodeType.prototype.onNodeCreated = function() { + const r = onNodeCreated ? onNodeCreated.apply(this, arguments) : void 0; + const widget = this.widgets.find((w) => w.name === "filename_prefix"); + widget.serializeValue = () => { + return applyTextReplacements(app, widget.value); + }; + return r; + }; + break; + + } + + }, + async setup() { + // to keep Set/Get node virtual connections visible when offscreen + const originalComputeVisibleNodes = LGraphCanvas.prototype.computeVisibleNodes; + LGraphCanvas.prototype.computeVisibleNodes = function () { + const visibleNodesSet = new Set(originalComputeVisibleNodes.apply(this, arguments)); + for (const node of this.graph._nodes) { + if ((node.type === "SetNode" || node.type === "GetNode") && node.drawConnection) { + visibleNodesSet.add(node); + } + } + return Array.from(visibleNodesSet); + }; + + } +}); \ No newline at end of file diff --git a/docs/hel-892/concat-reference/sources.json b/docs/hel-892/concat-reference/sources.json new file mode 100644 index 00000000..c5e57782 --- /dev/null +++ b/docs/hel-892/concat-reference/sources.json @@ -0,0 +1,106 @@ +{ + "sources": [ + { + "id": "kj", + "file": "__init__.py", + "local_file": "kj____init__.py", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/__init__.py", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "0bc84dab300c15d8421161a97a7e03ddf041b40f9b17377b2450a6075a544cc2" + }, + { + "id": "kj", + "file": "nodes/image_nodes.py", + "local_file": "kj__nodes__image_nodes.py", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb" + }, + { + "id": "kj", + "file": "web/js/jsnodes.js", + "local_file": "kj__web__js__jsnodes.js", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/web/js/jsnodes.js", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "0de818b79c5adf96f0d3a62d11cadfb8e4b8f56ed47ef0b2434935b3ee95af23" + }, + { + "id": "kj", + "file": "LICENSE", + "local_file": "kj__LICENSE", + "url": "https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/LICENSE", + "commit": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", + "sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986" + }, + { + "id": "core", + "file": "nodes.py", + "local_file": "core__nodes.py", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "sha256": "427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38" + }, + { + "id": "core", + "file": "LICENSE", + "local_file": "core__LICENSE", + "url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/LICENSE", + "commit": "cb459573c8fa025bbf9ecf312f6af376d659f567", + "sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986" + }, + { + "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": "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" + } + ] +} diff --git a/docs/hel-892/concat-reference/vhs__LICENSE b/docs/hel-892/concat-reference/vhs__LICENSE new file mode 100644 index 00000000..f288702d --- /dev/null +++ b/docs/hel-892/concat-reference/vhs__LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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. + + + Copyright (C) + + 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 . + +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: + + Copyright (C) + 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 +. + + 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 +. diff --git a/docs/hel-892/concat-reference/vhs__video_formats__h264-mp4.json b/docs/hel-892/concat-reference/vhs__video_formats__h264-mp4.json new file mode 100644 index 00000000..89d290c9 --- /dev/null +++ b/docs/hel-892/concat-reference/vhs__video_formats__h264-mp4.json @@ -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" +} diff --git a/docs/hel-892/concat-reference/vhs__videohelpersuite__load_video_nodes.py b/docs/hel-892/concat-reference/vhs__videohelpersuite__load_video_nodes.py new file mode 100644 index 00000000..b23e40f5 --- /dev/null +++ b/docs/hel-892/concat-reference/vhs__videohelpersuite__load_video_nodes.py @@ -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) diff --git a/docs/hel-892/concat-reference/vhs__videohelpersuite__nodes.py b/docs/hel-892/concat-reference/vhs__videohelpersuite__nodes.py new file mode 100644 index 00000000..f40461e7 --- /dev/null +++ b/docs/hel-892/concat-reference/vhs__videohelpersuite__nodes.py @@ -0,0 +1,1111 @@ +import os +import sys +import json +import subprocess +import numpy as np +import re +import datetime +from typing import List +import torch +from PIL import Image, ExifTags +from PIL.PngImagePlugin import PngInfo +from pathlib import Path +from string import Template +import itertools +import functools + +import folder_paths +from .logger import logger +from .image_latent_nodes import * +from .load_video_nodes import LoadVideoUpload, LoadVideoPath, LoadVideoFFmpegUpload, LoadVideoFFmpegPath, LoadImagePath +from .load_images_nodes import LoadImagesFromDirectoryUpload, LoadImagesFromDirectoryPath +from .batched_nodes import VAEEncodeBatched, VAEDecodeBatched +from .utils import ffmpeg_path, get_audio, hash_path, validate_path, requeue_workflow, \ + gifski_path, calculate_file_hash, strip_path, try_download_video, is_url, \ + imageOrLatent, BIGMAX, merge_filter_args, ENCODE_ARGS, floatOrInt, cached, \ + ContainsAll +from comfy.utils import ProgressBar + +if 'VHS_video_formats' not in folder_paths.folder_names_and_paths: + folder_paths.folder_names_and_paths["VHS_video_formats"] = ((),{".json"}) +if len(folder_paths.folder_names_and_paths['VHS_video_formats'][1]) == 0: + folder_paths.folder_names_and_paths["VHS_video_formats"][1].add(".json") +audio_extensions = ['mp3', 'mp4', 'wav', 'ogg'] + +def flatten_list(l): + ret = [] + for e in l: + if isinstance(e, list): + ret.extend(e) + else: + ret.append(e) + return ret + +def iterate_format(video_format, for_widgets=True): + """Provides an iterator over widgets, or arguments""" + def indirector(cont, index): + if isinstance(cont[index], list) and (not for_widgets + or len(cont[index])> 1 and not isinstance(cont[index][1], dict)): + inp = yield cont[index] + if inp is not None: + cont[index] = inp + yield + for k in video_format: + if k == "extra_widgets": + if for_widgets: + yield from video_format["extra_widgets"] + elif k.endswith("_pass"): + for i in range(len(video_format[k])): + yield from indirector(video_format[k], i) + if not for_widgets: + video_format[k] = flatten_list(video_format[k]) + else: + yield from indirector(video_format, k) + +base_formats_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "video_formats") +@cached(5) +def get_video_formats(): + format_files = {} + for format_name in folder_paths.get_filename_list("VHS_video_formats"): + format_files[format_name] = folder_paths.get_full_path("VHS_video_formats", format_name) + for item in os.scandir(base_formats_dir): + if not item.is_file() or not item.name.endswith('.json'): + continue + format_files[item.name[:-5]] = item.path + formats = [] + format_widgets = {} + for format_name, path in format_files.items(): + with open(path, 'r') as stream: + video_format = json.load(stream) + if "gifski_pass" in video_format and gifski_path is None: + #Skip format + continue + widgets = list(iterate_format(video_format)) + formats.append("video/" + format_name) + if (len(widgets) > 0): + format_widgets["video/"+ format_name] = widgets + return formats, format_widgets + +def apply_format_widgets(format_name, kwargs): + if os.path.exists(os.path.join(base_formats_dir, format_name + ".json")): + video_format_path = os.path.join(base_formats_dir, format_name + ".json") + else: + video_format_path = folder_paths.get_full_path("VHS_video_formats", format_name) + with open(video_format_path, 'r') as stream: + video_format = json.load(stream) + for w in iterate_format(video_format): + if w[0] not in kwargs: + if len(w) > 2 and 'default' in w[2]: + default = w[2]['default'] + else: + if type(w[1]) is list: + default = w[1][0] + else: + #NOTE: This doesn't respect max/min, but should be good enough as a fallback to a fallback to a fallback + default = {"BOOLEAN": False, "INT": 0, "FLOAT": 0, "STRING": ""}[w[1]] + kwargs[w[0]] = default + logger.warn(f"Missing input for {w[0][0]} has been set to {default}") + wit = iterate_format(video_format, False) + for w in wit: + while isinstance(w, list): + if len(w) == 1: + #TODO: mapping=kwargs should be safer, but results in key errors, investigate why + w = [Template(x).substitute(**kwargs) for x in w[0]] + break + elif isinstance(w[1], dict): + w = w[1][str(kwargs[w[0]])] + elif len(w) > 3: + w = Template(w[3]).substitute(val=kwargs[w[0]]) + else: + w = str(kwargs[w[0]]) + wit.send(w) + return video_format + +def tensor_to_int(tensor, bits): + tensor = tensor.cpu().numpy() * (2**bits-1) + 0.5 + return np.clip(tensor, 0, (2**bits-1)) +def tensor_to_shorts(tensor): + return tensor_to_int(tensor, 16).astype(np.uint16) +def tensor_to_bytes(tensor): + return tensor_to_int(tensor, 8).astype(np.uint8) + +def ffmpeg_process(args, video_format, video_metadata, file_path, env): + + res = None + frame_data = yield + total_frames_output = 0 + if video_format.get('save_metadata', 'False') != 'False': + os.makedirs(folder_paths.get_temp_directory(), exist_ok=True) + metadata = json.dumps(video_metadata) + metadata_path = os.path.join(folder_paths.get_temp_directory(), "metadata.txt") + #metadata from file should escape = ; # \ and newline + metadata = metadata.replace("\\","\\\\") + metadata = metadata.replace(";","\\;") + metadata = metadata.replace("#","\\#") + metadata = metadata.replace("=","\\=") + metadata = metadata.replace("\n","\\\n") + metadata = "comment=" + metadata + with open(metadata_path, "w") as f: + f.write(";FFMETADATA1\n") + f.write(metadata) + m_args = args[:1] + ["-i", metadata_path] + args[1:] + ["-metadata", "creation_time=now"] + with subprocess.Popen(m_args + [file_path], stderr=subprocess.PIPE, + stdin=subprocess.PIPE, env=env) as proc: + try: + while frame_data is not None: + proc.stdin.write(frame_data) + #TODO: skip flush for increased speed + frame_data = yield + total_frames_output+=1 + proc.stdin.flush() + proc.stdin.close() + res = proc.stderr.read() + except BrokenPipeError as e: + err = proc.stderr.read() + #Check if output file exists. If it does, the re-execution + #will also fail. This obscures the cause of the error + #and seems to never occur concurrent to the metadata issue + if os.path.exists(file_path): + raise Exception("An error occurred in the ffmpeg subprocess:\n" \ + + err.decode(*ENCODE_ARGS)) + #Res was not set + print(err.decode(*ENCODE_ARGS), end="", file=sys.stderr) + logger.warn("An error occurred when saving with metadata") + if res != b'': + with subprocess.Popen(args + [file_path], stderr=subprocess.PIPE, + stdin=subprocess.PIPE, env=env) as proc: + try: + while frame_data is not None: + proc.stdin.write(frame_data) + frame_data = yield + total_frames_output+=1 + proc.stdin.flush() + proc.stdin.close() + res = proc.stderr.read() + except BrokenPipeError as e: + res = proc.stderr.read() + raise Exception("An error occurred in the ffmpeg subprocess:\n" \ + + res.decode(*ENCODE_ARGS)) + yield total_frames_output + if len(res) > 0: + print(res.decode(*ENCODE_ARGS), end="", file=sys.stderr) + +def gifski_process(args, dimensions, frame_rate, video_format, file_path, env): + frame_data = yield + with subprocess.Popen(args + video_format['main_pass'] + ['-f', 'yuv4mpegpipe', '-'], + stderr=subprocess.PIPE, stdin=subprocess.PIPE, + stdout=subprocess.PIPE, env=env) as procff: + with subprocess.Popen([gifski_path] + video_format['gifski_pass'] + + ['-W', f'{dimensions[0]}', '-H', f'{dimensions[1]}'] + + ['-r', f'{frame_rate}'] + + ['-q', '-o', file_path, '-'], stderr=subprocess.PIPE, + stdin=procff.stdout, stdout=subprocess.PIPE, + env=env) as procgs: + try: + while frame_data is not None: + procff.stdin.write(frame_data) + frame_data = yield + procff.stdin.flush() + procff.stdin.close() + resff = procff.stderr.read() + resgs = procgs.stderr.read() + outgs = procgs.stdout.read() + except BrokenPipeError as e: + procff.stdin.close() + resff = procff.stderr.read() + resgs = procgs.stderr.read() + raise Exception("An error occurred while creating gifski output\n" \ + + "Make sure you are using gifski --version >=1.32.0\nffmpeg: " \ + + resff.decode(*ENCODE_ARGS) + '\ngifski: ' + resgs.decode(*ENCODE_ARGS)) + if len(resff) > 0: + print(resff.decode(*ENCODE_ARGS), end="", file=sys.stderr) + if len(resgs) > 0: + print(resgs.decode(*ENCODE_ARGS), end="", file=sys.stderr) + #should always be empty as the quiet flag is passed + if len(outgs) > 0: + print(outgs.decode(*ENCODE_ARGS)) + +def to_pingpong(inp): + if not hasattr(inp, "__getitem__"): + inp = list(inp) + yield from inp + for i in range(len(inp)-2,0,-1): + yield inp[i] + +class VideoCombine: + @classmethod + def INPUT_TYPES(s): + ffmpeg_formats, format_widgets = get_video_formats() + format_widgets["image/webp"] = [['lossless', "BOOLEAN", {'default': True}]] + return { + "required": { + "images": (imageOrLatent,), + "frame_rate": ( + floatOrInt, + {"default": 8, "min": 1, "step": 1}, + ), + "loop_count": ("INT", {"default": 0, "min": 0, "max": 100, "step": 1}), + "filename_prefix": ("STRING", {"default": "AnimateDiff"}), + "format": (["image/gif", "image/webp"] + ffmpeg_formats, {'formats': format_widgets}), + "pingpong": ("BOOLEAN", {"default": False}), + "save_output": ("BOOLEAN", {"default": True}), + }, + "optional": { + "audio": ("AUDIO",), + "meta_batch": ("VHS_BatchManager",), + "vae": ("VAE",), + }, + "hidden": ContainsAll({ + "prompt": "PROMPT", + "extra_pnginfo": "EXTRA_PNGINFO", + "unique_id": "UNIQUE_ID" + }), + } + + RETURN_TYPES = ("VHS_FILENAMES",) + RETURN_NAMES = ("Filenames",) + OUTPUT_NODE = True + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢" + FUNCTION = "combine_video" + + def combine_video( + self, + frame_rate: int, + loop_count: int, + images=None, + latents=None, + filename_prefix="AnimateDiff", + format="image/gif", + pingpong=False, + save_output=True, + prompt=None, + extra_pnginfo=None, + audio=None, + unique_id=None, + manual_format_widgets=None, + meta_batch=None, + vae=None, + **kwargs + ): + if latents is not None: + images = latents + if images is None: + return ((save_output, []),) + if vae is not None: + if isinstance(images, dict): + images = images['samples'] + else: + vae = None + + if isinstance(images, torch.Tensor) and images.size(0) == 0: + return ((save_output, []),) + num_frames = len(images) + pbar = ProgressBar(num_frames) + if vae is not None: + downscale_ratio = getattr(vae, "downscale_ratio", 8) + width = images.size(-1)*downscale_ratio + height = images.size(-2)*downscale_ratio + frames_per_batch = (1920 * 1080 * 16) // (width * height) or 1 + #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_encode(images, vae, frames_per_batch): + for batch in batched(iter(images), frames_per_batch): + image_batch = torch.from_numpy(np.array(batch)) + yield from vae.decode(image_batch) + images = batched_encode(images, vae, frames_per_batch) + first_image = next(images) + #repush first_image + images = itertools.chain([first_image], images) + #A single image has 3 dimensions. Discard higher dimensions + while len(first_image.shape) > 3: + first_image = first_image[0] + else: + first_image = images[0] + images = iter(images) + # get output information + output_dir = ( + folder_paths.get_output_directory() + if save_output + else folder_paths.get_temp_directory() + ) + ( + full_output_folder, + filename, + _, + subfolder, + _, + ) = folder_paths.get_save_image_path(filename_prefix, output_dir) + output_files = [] + + metadata = PngInfo() + video_metadata = {} + if prompt is not None: + metadata.add_text("prompt", json.dumps(prompt)) + video_metadata["prompt"] = json.dumps(prompt) + if extra_pnginfo is not None: + for x in extra_pnginfo: + metadata.add_text(x, json.dumps(extra_pnginfo[x])) + video_metadata[x] = extra_pnginfo[x] + extra_options = extra_pnginfo.get('workflow', {}).get('extra', {}) + else: + extra_options = {} + metadata.add_text("CreationTime", datetime.datetime.now().isoformat(" ")[:19]) + + if meta_batch is not None and unique_id in meta_batch.outputs: + (counter, output_process) = meta_batch.outputs[unique_id] + else: + # comfy counter workaround + max_counter = 0 + + # Loop through the existing files + matcher = re.compile(f"{re.escape(filename)}_(\\d+)\\D*\\..+", re.IGNORECASE) + for existing_file in os.listdir(full_output_folder): + # Check if the file matches the expected format + match = matcher.fullmatch(existing_file) + if match: + # Extract the numeric portion of the filename + file_counter = int(match.group(1)) + # Update the maximum counter value if necessary + if file_counter > max_counter: + max_counter = file_counter + + # Increment the counter by 1 to get the next available value + counter = max_counter + 1 + output_process = None + + # save first frame as png to keep metadata + first_image_file = f"{filename}_{counter:05}.png" + file_path = os.path.join(full_output_folder, first_image_file) + if extra_options.get('VHS_MetadataImage', True) != False: + Image.fromarray(tensor_to_bytes(first_image)).save( + file_path, + pnginfo=metadata, + compress_level=4, + ) + output_files.append(file_path) + + format_type, format_ext = format.split("/") + if format_type == "image": + if meta_batch is not None: + raise Exception("Pillow('image/') formats are not compatible with batched output") + image_kwargs = {} + if format_ext == "gif": + image_kwargs['disposal'] = 2 + if format_ext == "webp": + #Save timestamp information + exif = Image.Exif() + exif[ExifTags.IFD.Exif] = {36867: datetime.datetime.now().isoformat(" ")[:19]} + image_kwargs['exif'] = exif + image_kwargs['lossless'] = kwargs.get("lossless", True) + file = f"{filename}_{counter:05}.{format_ext}" + file_path = os.path.join(full_output_folder, file) + if pingpong: + images = to_pingpong(images) + def frames_gen(images): + for i in images: + pbar.update(1) + yield Image.fromarray(tensor_to_bytes(i)) + frames = frames_gen(images) + # Use pillow directly to save an animated image + next(frames).save( + file_path, + format=format_ext.upper(), + save_all=True, + append_images=frames, + duration=round(1000 / frame_rate), + loop=loop_count, + compress_level=4, + **image_kwargs + ) + output_files.append(file_path) + else: + # Use ffmpeg to save a video + if ffmpeg_path is None: + raise ProcessLookupError(f"ffmpeg is required for video outputs and could not be found.\nIn order to use video outputs, you must either:\n- Install imageio-ffmpeg with pip,\n- Place a ffmpeg executable in {os.path.abspath('')}, or\n- Install ffmpeg and add it to the system path.") + + if manual_format_widgets is not None: + logger.warn("Format args can now be passed directly. The manual_format_widgets argument is now deprecated") + kwargs.update(manual_format_widgets) + + has_alpha = first_image.shape[-1] == 4 + kwargs["has_alpha"] = has_alpha + video_format = apply_format_widgets(format_ext, kwargs) + dim_alignment = video_format.get("dim_alignment", 2) + if (first_image.shape[1] % dim_alignment) or (first_image.shape[0] % dim_alignment): + #output frames must be padded + to_pad = (-first_image.shape[1] % dim_alignment, + -first_image.shape[0] % dim_alignment) + padding = (to_pad[0]//2, to_pad[0] - to_pad[0]//2, + to_pad[1]//2, to_pad[1] - to_pad[1]//2) + padfunc = torch.nn.ReplicationPad2d(padding) + def pad(image): + image = image.permute((2,0,1))#HWC to CHW + padded = padfunc(image.to(dtype=torch.float32)) + return padded.permute((1,2,0)) + images = map(pad, images) + dimensions = (-first_image.shape[1] % dim_alignment + first_image.shape[1], + -first_image.shape[0] % dim_alignment + first_image.shape[0]) + logger.warn("Output images were not of valid resolution and have had padding applied") + else: + dimensions = (first_image.shape[1], first_image.shape[0]) + if pingpong: + if meta_batch is not None: + logger.error("pingpong is incompatible with batched output") + images = to_pingpong(images) + if num_frames > 2: + num_frames += num_frames -2 + pbar.total = num_frames + if loop_count > 0: + loop_args = ["-vf", "loop=loop=" + str(loop_count)+":size=" + str(num_frames)] + else: + loop_args = [] + if video_format.get('input_color_depth', '8bit') == '16bit': + images = map(tensor_to_shorts, images) + if has_alpha: + i_pix_fmt = 'rgba64' + else: + i_pix_fmt = 'rgb48' + else: + images = map(tensor_to_bytes, images) + if has_alpha: + i_pix_fmt = 'rgba' + else: + i_pix_fmt = 'rgb24' + file = f"{filename}_{counter:05}.{video_format['extension']}" + file_path = os.path.join(full_output_folder, file) + bitrate_arg = [] + bitrate = video_format.get('bitrate') + if bitrate is not None: + bitrate_arg = ["-b:v", str(bitrate) + "M" if video_format.get('megabit') == 'True' else str(bitrate) + "K"] + args = [ffmpeg_path, "-v", "error", "-f", "rawvideo", "-pix_fmt", i_pix_fmt, + # The image data is in an undefined generic RGB color space, which in practice means sRGB. + # sRGB has the same primaries and matrix as BT.709, but a different transfer function (gamma), + # called by the sRGB standard name IEC 61966-2-1. However, video hosting platforms like YouTube + # standardize on full BT.709 and will convert the colors accordingly. This last minute change + # in colors can be confusing to users. We can counter it by lying about the transfer function + # on a per format basis, i.e. for video we will lie to FFmpeg that it is already BT.709. Also, + # because the input data is in RGB (not YUV) it is more efficient (fewer scale filter invocations) + # to specify the input color space as RGB and then later, if the format actually wants YUV, + # to convert it to BT.709 YUV via FFmpeg's -vf "scale=out_color_matrix=bt709". + "-color_range", "pc", "-colorspace", "rgb", "-color_primaries", "bt709", + "-color_trc", video_format.get("fake_trc", "iec61966-2-1"), + "-s", f"{dimensions[0]}x{dimensions[1]}", "-r", str(frame_rate), "-i", "-"] \ + + loop_args + + images = map(lambda x: x.tobytes(), images) + env=os.environ.copy() + if "environment" in video_format: + env.update(video_format["environment"]) + + if "pre_pass" in video_format: + if meta_batch is not None: + #Performing a prepass requires keeping access to all frames. + #Potential solutions include keeping just output frames in + #memory or using 3 passes with intermediate file, but + #very long gifs probably shouldn't be encouraged + raise Exception("Formats which require a pre_pass are incompatible with Batch Manager.") + images = [b''.join(images)] + os.makedirs(folder_paths.get_temp_directory(), exist_ok=True) + in_args_len = args.index("-i") + 2 # The index after ["-i", "-"] + pre_pass_args = args[:in_args_len] + video_format['pre_pass'] + merge_filter_args(pre_pass_args) + try: + subprocess.run(pre_pass_args, input=images[0], env=env, + capture_output=True, check=True) + except subprocess.CalledProcessError as e: + raise Exception("An error occurred in the ffmpeg prepass:\n" \ + + e.stderr.decode(*ENCODE_ARGS)) + if "inputs_main_pass" in video_format: + in_args_len = args.index("-i") + 2 # The index after ["-i", "-"] + args = args[:in_args_len] + video_format['inputs_main_pass'] + args[in_args_len:] + + if output_process is None: + if 'gifski_pass' in video_format: + format = 'image/gif' + output_process = gifski_process(args, dimensions, frame_rate, video_format, file_path, env) + audio = None + else: + args += video_format['main_pass'] + bitrate_arg + merge_filter_args(args) + output_process = ffmpeg_process(args, video_format, video_metadata, file_path, env) + #Proceed to first yield + output_process.send(None) + if meta_batch is not None: + meta_batch.outputs[unique_id] = (counter, output_process) + + for image in images: + pbar.update(1) + output_process.send(image) + if meta_batch is not None: + requeue_workflow((meta_batch.unique_id, not meta_batch.has_closed_inputs)) + if meta_batch is None or meta_batch.has_closed_inputs: + #Close pipe and wait for termination. + try: + total_frames_output = output_process.send(None) + output_process.send(None) + except StopIteration: + pass + if meta_batch is not None: + meta_batch.outputs.pop(unique_id) + if len(meta_batch.outputs) == 0: + meta_batch.reset() + else: + #batch is unfinished + #TODO: Check if empty output breaks other custom nodes + return {"ui": {"unfinished_batch": [True]}, "result": ((save_output, []),)} + + output_files.append(file_path) + + + a_waveform = None + if audio is not None: + try: + #safely check if audio produced by VHS_LoadVideo actually exists + a_waveform = audio['waveform'] + except: + pass + if a_waveform is not None: + # Create audio file if input was provided + output_file_with_audio = f"{filename}_{counter:05}-audio.{video_format['extension']}" + output_file_with_audio_path = os.path.join(full_output_folder, output_file_with_audio) + if "audio_pass" not in video_format: + logger.warn("Selected video format does not have explicit audio support") + video_format["audio_pass"] = ["-c:a", "libopus"] + + + # FFmpeg command with audio re-encoding + #TODO: expose audio quality options if format widgets makes it in + #Reconsider forcing apad/shortest + channels = audio['waveform'].size(1) + min_audio_dur = total_frames_output / frame_rate + 1 + if video_format.get('trim_to_audio', 'False') != 'False': + apad = [] + else: + apad = ["-af", "apad=whole_dur="+str(min_audio_dur)] + mux_args = [ffmpeg_path, "-v", "error", "-n", "-i", file_path, + "-ar", str(audio['sample_rate']), "-ac", str(channels), + "-f", "f32le", "-i", "-", "-c:v", "copy"] \ + + video_format["audio_pass"] \ + + apad + ["-shortest", output_file_with_audio_path] + + audio_data = audio['waveform'].squeeze(0).transpose(0,1) \ + .numpy().tobytes() + merge_filter_args(mux_args, '-af') + try: + res = subprocess.run(mux_args, input=audio_data, + env=env, capture_output=True, check=True) + except subprocess.CalledProcessError as e: + raise Exception("An error occured in the ffmpeg subprocess:\n" \ + + e.stderr.decode(*ENCODE_ARGS)) + if res.stderr: + print(res.stderr.decode(*ENCODE_ARGS), end="", file=sys.stderr) + output_files.append(output_file_with_audio_path) + #Return this file with audio to the webui. + #It will be muted unless opened or saved with right click + file = output_file_with_audio + if extra_options.get('VHS_KeepIntermediate', True) == False: + for intermediate in output_files[1:-1]: + if os.path.exists(intermediate): + os.remove(intermediate) + preview = { + "filename": file, + "subfolder": subfolder, + "type": "output" if save_output else "temp", + "format": format, + "frame_rate": frame_rate, + "workflow": first_image_file, + "fullpath": output_files[-1], + } + if num_frames == 1 and 'png' in format and '%03d' in file: + preview['format'] = 'image/png' + preview['filename'] = file.replace('%03d', '001') + return {"ui": {"gifs": [preview]}, "result": ((save_output, output_files),)} + +class LoadAudio: + @classmethod + def INPUT_TYPES(s): + #Hide ffmpeg formats if ffmpeg isn't available + return { + "required": { + "audio_file": ("STRING", {"default": "input/", "vhs_path_extensions": ['wav','mp3','ogg','m4a','flac']}), + }, + "optional" : { + "seek_seconds": ("FLOAT", {"default": 0, "min": 0, "widgetType": "VHSTIMESTAMP"}), + "duration": ("FLOAT" , {"default": 0, "min": 0, "max": 10000000, "step": 0.01, "widgetType": "VHSTIMESTAMP"}), + } + } + + RETURN_TYPES = ("AUDIO", "FLOAT") + RETURN_NAMES = ("audio", "duration") + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢/audio" + FUNCTION = "load_audio" + def load_audio(self, audio_file, seek_seconds=0, duration=0): + audio_file = strip_path(audio_file) + if audio_file is None or validate_path(audio_file) != True: + raise Exception("audio_file is not a valid path: " + audio_file) + if is_url(audio_file): + audio_file = try_download_video(audio_file) or audio_file + #Eagerly fetch the audio since the user must be using it if the + #node executes, unlike Load Video + audio = get_audio(audio_file, start_time=seek_seconds, duration=duration) + loaded_duration = audio['waveform'].size(2)/audio['sample_rate'] + return (audio, loaded_duration) + + @classmethod + def IS_CHANGED(s, audio_file, **kwargs): + return hash_path(audio_file) + + @classmethod + def VALIDATE_INPUTS(s, audio_file, **kwargs): + return validate_path(audio_file, allow_none=True) + +class LoadAudioUpload: + @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] in audio_extensions): + files.append(f) + return {"required": { + "audio": (sorted(files),),}, + "optional": { + "start_time": ("FLOAT" , {"default": 0, "min": 0, "max": 10000000, "step": 0.01, "widgetType": "VHSTIMESTAMP"}), + "duration": ("FLOAT" , {"default": 0, "min": 0, "max": 10000000, "step": 0.01, "widgetType": "VHSTIMESTAMP"}), + }, + } + + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢/audio" + + RETURN_TYPES = ("AUDIO", "FLOAT") + RETURN_NAMES = ("audio", "duration") + FUNCTION = "load_audio" + + def load_audio(self, start_time=0, duration=0, **kwargs): + audio_file = folder_paths.get_annotated_filepath(strip_path(kwargs['audio'])) + if audio_file is None or validate_path(audio_file) != True: + raise Exception("audio_file is not a valid path: " + audio_file) + + audio = get_audio(audio_file, start_time, duration) + loaded_duration = audio['waveform'].size(2)/audio['sample_rate'] + return (audio, loaded_duration) + + @classmethod + def IS_CHANGED(s, audio, **kwargs): + audio_file = folder_paths.get_annotated_filepath(strip_path(audio)) + return hash_path(audio_file) + + @classmethod + def VALIDATE_INPUTS(s, audio, **kwargs): + audio_file = folder_paths.get_annotated_filepath(strip_path(audio)) + return validate_path(audio_file, allow_none=True) +class AudioToVHSAudio: + """Legacy method for external nodes that utilized VHS_AUDIO, + VHS_AUDIO is deprecated as a format and should no longer be used""" + @classmethod + def INPUT_TYPES(s): + return {"required": {"audio": ("AUDIO",)}} + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢/audio" + + RETURN_TYPES = ("VHS_AUDIO", ) + RETURN_NAMES = ("vhs_audio",) + FUNCTION = "convert_audio" + + def convert_audio(self, audio): + ar = str(audio['sample_rate']) + ac = str(audio['waveform'].size(1)) + mux_args = [ffmpeg_path, "-f", "f32le", "-ar", ar, "-ac", ac, + "-i", "-", "-f", "wav", "-"] + + audio_data = audio['waveform'].squeeze(0).transpose(0,1) \ + .numpy().tobytes() + try: + res = subprocess.run(mux_args, input=audio_data, + capture_output=True, check=True) + except subprocess.CalledProcessError as e: + raise Exception("An error occured in the ffmpeg subprocess:\n" \ + + e.stderr.decode(*ENCODE_ARGS)) + if res.stderr: + print(res.stderr.decode(*ENCODE_ARGS), end="", file=sys.stderr) + return (lambda: res.stdout,) + +class VHSAudioToAudio: + """Legacy method for external nodes that utilized VHS_AUDIO, + VHS_AUDIO is deprecated as a format and should no longer be used""" + @classmethod + def INPUT_TYPES(s): + return {"required": {"vhs_audio": ("VHS_AUDIO",)}} + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢/audio" + + RETURN_TYPES = ("AUDIO", ) + RETURN_NAMES = ("audio",) + FUNCTION = "convert_audio" + + def convert_audio(self, vhs_audio): + if not vhs_audio or not vhs_audio(): + raise Exception("audio input is not valid") + args = [ffmpeg_path, "-i", '-'] + try: + res = subprocess.run(args + ["-f", "f32le", "-"], input=vhs_audio(), + capture_output=True, check=True) + audio = torch.frombuffer(bytearray(res.stdout), dtype=torch.float32) + except subprocess.CalledProcessError as e: + raise Exception("An error occured in the ffmpeg subprocess:\n" \ + + e.stderr.decode(*ENCODE_ARGS)) + match = re.search(', (\\d+) Hz, (\\w+), ',res.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 PruneOutputs: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "filenames": ("VHS_FILENAMES",), + "options": (["Intermediate", "Intermediate and Utility"],) + } + } + + RETURN_TYPES = () + OUTPUT_NODE = True + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢" + FUNCTION = "prune_outputs" + + def prune_outputs(self, filenames, options): + if len(filenames[1]) == 0: + return () + assert(len(filenames[1]) <= 3 and len(filenames[1]) >= 2) + delete_list = [] + if options in ["Intermediate", "Intermediate and Utility", "All"]: + delete_list += filenames[1][1:-1] + if options in ["Intermediate and Utility", "All"]: + delete_list.append(filenames[1][0]) + if options in ["All"]: + delete_list.append(filenames[1][-1]) + + output_dirs = [folder_paths.get_output_directory(), + folder_paths.get_temp_directory()] + for file in delete_list: + #Check that path is actually an output directory + if (os.path.commonpath([output_dirs[0], file]) != output_dirs[0]) \ + and (os.path.commonpath([output_dirs[1], file]) != output_dirs[1]): + raise Exception("Tried to prune output from invalid directory: " + file) + if os.path.exists(file): + os.remove(file) + return () + +class BatchManager: + def __init__(self, frames_per_batch=-1): + self.frames_per_batch = frames_per_batch + self.inputs = {} + self.outputs = {} + self.unique_id = None + self.has_closed_inputs = False + self.total_frames = float('inf') + def reset(self): + self.close_inputs() + for key in self.outputs: + if getattr(self.outputs[key][-1], "gi_suspended", False): + try: + self.outputs[key][-1].send(None) + except StopIteration: + pass + self.__init__(self.frames_per_batch) + def has_open_inputs(self): + return len(self.inputs) > 0 + def close_inputs(self): + for key in self.inputs: + if getattr(self.inputs[key][-1], "gi_suspended", False): + try: + self.inputs[key][-1].send(1) + except StopIteration: + pass + self.inputs = {} + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "frames_per_batch": ("INT", {"default": 16, "min": 1, "max": BIGMAX, "step": 1}) + }, + "hidden": { + "prompt": "PROMPT", + "unique_id": "UNIQUE_ID" + }, + } + + RETURN_TYPES = ("VHS_BatchManager",) + RETURN_NAMES = ("meta_batch",) + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢" + FUNCTION = "update_batch" + + def update_batch(self, frames_per_batch, prompt=None, unique_id=None): + if unique_id is not None and prompt is not None: + requeue = prompt[unique_id]['inputs'].get('requeue', 0) + else: + requeue = 0 + if requeue == 0: + self.reset() + self.frames_per_batch = frames_per_batch + self.unique_id = unique_id + else: + num_batches = (self.total_frames+self.frames_per_batch-1)//frames_per_batch + print(f'Meta-Batch {requeue}/{num_batches}') + #onExecuted seems to not be called unless some message is sent + return (self,) + + +class VideoInfo: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "video_info": ("VHS_VIDEOINFO",), + } + } + + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢" + + RETURN_TYPES = ("FLOAT","INT", "FLOAT", "INT", "INT", "FLOAT","INT", "FLOAT", "INT", "INT") + RETURN_NAMES = ( + "source_fps🟨", + "source_frame_count🟨", + "source_duration🟨", + "source_width🟨", + "source_height🟨", + "loaded_fps🟦", + "loaded_frame_count🟦", + "loaded_duration🟦", + "loaded_width🟦", + "loaded_height🟦", + ) + FUNCTION = "get_video_info" + + def get_video_info(self, video_info): + keys = ["fps", "frame_count", "duration", "width", "height"] + + source_info = [] + loaded_info = [] + + for key in keys: + source_info.append(video_info[f"source_{key}"]) + loaded_info.append(video_info[f"loaded_{key}"]) + + return (*source_info, *loaded_info) + + +class VideoInfoSource: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "video_info": ("VHS_VIDEOINFO",), + } + } + + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢" + + RETURN_TYPES = ("FLOAT","INT", "FLOAT", "INT", "INT",) + RETURN_NAMES = ( + "fps🟨", + "frame_count🟨", + "duration🟨", + "width🟨", + "height🟨", + ) + FUNCTION = "get_video_info" + + def get_video_info(self, video_info): + keys = ["fps", "frame_count", "duration", "width", "height"] + + source_info = [] + + for key in keys: + source_info.append(video_info[f"source_{key}"]) + + return (*source_info,) + + +class VideoInfoLoaded: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "video_info": ("VHS_VIDEOINFO",), + } + } + + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢" + + RETURN_TYPES = ("FLOAT","INT", "FLOAT", "INT", "INT",) + RETURN_NAMES = ( + "fps🟦", + "frame_count🟦", + "duration🟦", + "width🟦", + "height🟦", + ) + FUNCTION = "get_video_info" + + def get_video_info(self, video_info): + keys = ["fps", "frame_count", "duration", "width", "height"] + + loaded_info = [] + + for key in keys: + loaded_info.append(video_info[f"loaded_{key}"]) + + return (*loaded_info,) + +class SelectFilename: + @classmethod + def INPUT_TYPES(s): + return {"required": {"filenames": ("VHS_FILENAMES",), "index": ("INT", {"default": -1, "step": 1, "min": -1})}} + RETURN_TYPES = ("STRING",) + RETURN_NAMES =("Filename",) + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢" + FUNCTION = "select_filename" + + def select_filename(self, filenames, index): + return (filenames[1][index],) +class Unbatch: + class Any(str): + def __ne__(self, other): + return False + @classmethod + def INPUT_TYPES(s): + return {"required": {"batched": ("*",)}} + RETURN_TYPES = (Any('*'),) + INPUT_IS_LIST = True + RETURN_NAMES =("unbatched",) + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢" + FUNCTION = "unbatch" + def unbatch(self, batched): + if isinstance(batched[0], torch.Tensor): + return (torch.cat(batched),) + if isinstance(batched[0], dict): + out = batched[0].copy() + if 'samples' in out: + out['samples'] = torch.cat([x['samples'] for x in batched]) + if 'waveform' in out: + out['waveform'] = torch.cat([x['waveform'] for x in batched]) + out.pop('batch_index', None) + return (out,) + return (functools.reduce(lambda x,y: x+y, batched),) + @classmethod + def VALIDATE_INPUTS(cls, input_types): + return True +class SelectLatest: + @classmethod + def INPUT_TYPES(s): + return {"required": {"filename_prefix": ("STRING", {'default': 'output/AnimateDiff', 'vhs_path_extensions': []}), + "filename_postfix": ("STRING", {"placeholder": ".webm"})}} + RETURN_TYPES = ("STRING",) + RETURN_NAMES =("Filename",) + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢" + FUNCTION = "select_latest" + EXPERIMENTAL = True + + def select_latest(self, filename_prefix, filename_postfix): + assert False, "Not Reachable" + +NODE_CLASS_MAPPINGS = { + "VHS_VideoCombine": VideoCombine, + "VHS_LoadVideo": LoadVideoUpload, + "VHS_LoadVideoPath": LoadVideoPath, + "VHS_LoadVideoFFmpeg": LoadVideoFFmpegUpload, + "VHS_LoadVideoFFmpegPath": LoadVideoFFmpegPath, + "VHS_LoadImagePath": LoadImagePath, + "VHS_LoadImages": LoadImagesFromDirectoryUpload, + "VHS_LoadImagesPath": LoadImagesFromDirectoryPath, + "VHS_LoadAudio": LoadAudio, + "VHS_LoadAudioUpload": LoadAudioUpload, + "VHS_AudioToVHSAudio": AudioToVHSAudio, + "VHS_VHSAudioToAudio": VHSAudioToAudio, + "VHS_PruneOutputs": PruneOutputs, + "VHS_BatchManager": BatchManager, + "VHS_VideoInfo": VideoInfo, + "VHS_VideoInfoSource": VideoInfoSource, + "VHS_VideoInfoLoaded": VideoInfoLoaded, + "VHS_SelectFilename": SelectFilename, + # Batched Nodes + "VHS_VAEEncodeBatched": VAEEncodeBatched, + "VHS_VAEDecodeBatched": VAEDecodeBatched, + # Latent and Image nodes + "VHS_SplitLatents": SplitLatents, + "VHS_SplitImages": SplitImages, + "VHS_SplitMasks": SplitMasks, + "VHS_MergeLatents": MergeLatents, + "VHS_MergeImages": MergeImages, + "VHS_MergeMasks": MergeMasks, + "VHS_GetLatentCount": GetLatentCount, + "VHS_GetImageCount": GetImageCount, + "VHS_GetMaskCount": GetMaskCount, + "VHS_DuplicateLatents": RepeatLatents, + "VHS_DuplicateImages": RepeatImages, + "VHS_DuplicateMasks": RepeatMasks, + "VHS_SelectEveryNthLatent": SelectEveryNthLatent, + "VHS_SelectEveryNthImage": SelectEveryNthImage, + "VHS_SelectEveryNthMask": SelectEveryNthMask, + "VHS_SelectLatents": SelectLatents, + "VHS_SelectImages": SelectImages, + "VHS_SelectMasks": SelectMasks, + "VHS_Unbatch": Unbatch, + "VHS_SelectLatest": SelectLatest, +} +NODE_DISPLAY_NAME_MAPPINGS = { + "VHS_VideoCombine": "Video Combine 🎥🅥🅗🅢", + "VHS_LoadVideo": "Load Video (Upload) 🎥🅥🅗🅢", + "VHS_LoadVideoPath": "Load Video (Path) 🎥🅥🅗🅢", + "VHS_LoadVideoFFmpeg": "Load Video FFmpeg (Upload) 🎥🅥🅗🅢", + "VHS_LoadVideoFFmpegPath": "Load Video FFmpeg (Path) 🎥🅥🅗🅢", + "VHS_LoadImagePath": "Load Image (Path) 🎥🅥🅗🅢", + "VHS_LoadImages": "Load Images (Upload) 🎥🅥🅗🅢", + "VHS_LoadImagesPath": "Load Images (Path) 🎥🅥🅗🅢", + "VHS_LoadAudio": "Load Audio (Path)🎥🅥🅗🅢", + "VHS_LoadAudioUpload": "Load Audio (Upload)🎥🅥🅗🅢", + "VHS_AudioToVHSAudio": "Audio to legacy VHS_AUDIO🎥🅥🅗🅢", + "VHS_VHSAudioToAudio": "Legacy VHS_AUDIO to Audio🎥🅥🅗🅢", + "VHS_PruneOutputs": "Prune Outputs 🎥🅥🅗🅢", + "VHS_BatchManager": "Meta Batch Manager 🎥🅥🅗🅢", + "VHS_VideoInfo": "Video Info 🎥🅥🅗🅢", + "VHS_VideoInfoSource": "Video Info (Source) 🎥🅥🅗🅢", + "VHS_VideoInfoLoaded": "Video Info (Loaded) 🎥🅥🅗🅢", + "VHS_SelectFilename": "Select Filename 🎥🅥🅗🅢", + # Batched Nodes + "VHS_VAEEncodeBatched": "VAE Encode Batched 🎥🅥🅗🅢", + "VHS_VAEDecodeBatched": "VAE Decode Batched 🎥🅥🅗🅢", + # Latent and Image nodes + "VHS_SplitLatents": "Split Latents 🎥🅥🅗🅢", + "VHS_SplitImages": "Split Images 🎥🅥🅗🅢", + "VHS_SplitMasks": "Split Masks 🎥🅥🅗🅢", + "VHS_MergeLatents": "Merge Latents 🎥🅥🅗🅢", + "VHS_MergeImages": "Merge Images 🎥🅥🅗🅢", + "VHS_MergeMasks": "Merge Masks 🎥🅥🅗🅢", + "VHS_GetLatentCount": "Get Latent Count 🎥🅥🅗🅢", + "VHS_GetImageCount": "Get Image Count 🎥🅥🅗🅢", + "VHS_GetMaskCount": "Get Mask Count 🎥🅥🅗🅢", + "VHS_DuplicateLatents": "Repeat Latents 🎥🅥🅗🅢", + "VHS_DuplicateImages": "Repeat Images 🎥🅥🅗🅢", + "VHS_DuplicateMasks": "Repeat Masks 🎥🅥🅗🅢", + "VHS_SelectEveryNthLatent": "Select Every Nth Latent 🎥🅥🅗🅢", + "VHS_SelectEveryNthImage": "Select Every Nth Image 🎥🅥🅗🅢", + "VHS_SelectEveryNthMask": "Select Every Nth Mask 🎥🅥🅗🅢", + "VHS_SelectLatents": "Select Latents 🎥🅥🅗🅢", + "VHS_SelectImages": "Select Images 🎥🅥🅗🅢", + "VHS_SelectMasks": "Select Masks 🎥🅥🅗🅢", + "VHS_Unbatch": "Unbatch 🎥🅥🅗🅢", + "VHS_SelectLatest": "Select Latest 🎥🅥🅗🅢", +} diff --git a/docs/hel-892/concat-reference/vhs__videohelpersuite__utils.py b/docs/hel-892/concat-reference/vhs__videohelpersuite__utils.py new file mode 100644 index 00000000..5b35ad47 --- /dev/null +++ b/docs/hel-892/concat-reference/vhs__videohelpersuite__utils.py @@ -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 diff --git a/docs/hel-892/concat-reference/vhs__web__js__VHS.core.js b/docs/hel-892/concat-reference/vhs__web__js__VHS.core.js new file mode 100644 index 00000000..3f9dabc7 --- /dev/null +++ b/docs/hel-892/concat-reference/vhs__web__js__VHS.core.js @@ -0,0 +1,2562 @@ +import { app } from '../../../scripts/app.js' +import { api } from '../../../scripts/api.js' +import { setWidgetConfig } from '../../../extensions/core/widgetInputs.js' +import { applyTextReplacements } from "../../../scripts/utils.js"; + +function chainCallback(object, property, callback) { + if (object == undefined) { + //This should not happen. + console.error("Tried to add callback to non-existant object") + return; + } + if (property in object && object[property]) { + const callback_orig = object[property] + object[property] = function () { + const r = callback_orig.apply(this, arguments); + return callback.apply(this, arguments) ?? r + }; + } else { + object[property] = callback; + } +} + +function getNodeById(id, graph=app.graph) { + let cg = graph + let node = undefined + for (let sid of (''+id).split(':')) { + node = cg?.getNodeById?.(sid) + cg = node?.subgraph + } + return node +} + +const convDict = { + VHS_LoadImages : ["directory", null, "image_load_cap", "skip_first_images", "select_every_nth"], + VHS_LoadImagesPath : ["directory", "image_load_cap", "skip_first_images", "select_every_nth"], + VHS_VideoCombine : ["frame_rate", "loop_count", "filename_prefix", "format", "pingpong", "save_image"], + VHS_LoadVideo : ["video", "force_rate", "force_size", "frame_load_cap", "skip_first_frames", "select_every_nth"], + VHS_LoadVideoPath : ["video", "force_rate", "force_size", "frame_load_cap", "skip_first_frames", "select_every_nth"], +}; +const renameDict = {VHS_VideoCombine : {save_output : "save_image"}} +function useKVState(nodeType) { + chainCallback(nodeType.prototype, "onNodeCreated", function () { + chainCallback(this, "onConfigure", function(info) { + if (!this.widgets) { + //Node has no widgets, there is nothing to restore + return + } + if (typeof(info.widgets_values) != "object") { + //widgets_values is in some unknown inactionable format + return + } + let widgetDict = info.widgets_values + if (info.widgets_values.length) { + //widgets_values is in the old list format + if (this.type in convDict) { + //widget does not have a conversion format provided + let convList = convDict[this.type]; + if(info.widgets_values.length >= convList.length) { + //has all required fields + widgetDict = {} + for (let i = 0; i < convList.length; i++) { + if(!convList[i]) { + //Element should not be processed (upload button on load image sequence) + continue + } + widgetDict[convList[i]] = info.widgets_values[i]; + } + } else { + //widgets_values is missing elements marked as required + //let it fall through to failure state + } + } + } + if ('force_size' in widgetDict) { + //force size has been phased out, Migrate state + if (widgetDict.force_size.includes?.('x')) { + let sizes = widgetDict.force_size.split('x') + if (sizes[0] != '?') { + widgetDict.custom_width = parseInt(sizes[0]) + } else { + widgetDict.custom_width = 0 + } + if (sizes[1] != '?') { + widgetDict.custom_height = parseInt(sizes[1]) + } else { + widgetDict.custom_height = 0 + } + } else { + if (['Disabled', 'Custom Height'].includes(widgetDict.force_size)) { + widgetDict.custom_width = 0 + } + if (['Disabled', 'Custom Width'].includes(widgetDict.force_size)) { + widgetDict.custom_height = 0 + } + } + } + if (widgetDict.videopreview?.params?.force_size) { + delete widgetDict.videopreview.params.force_size + } + let inputs = {} + for (let i of this.inputs) { + inputs[i.name] = i + } + if (widgetDict.length == undefined) { + for (let w of this.widgets) { + if (w.type =="button") { + continue + } + if (w.name in widgetDict) { + w.value = widgetDict[w.name]; + w.callback?.(w.value) + } else { + //Check for a legacy name that needs migrating + if (this.type in renameDict && w.name in renameDict[this.type]) { + if (renameDict[this.type][w.name] in widgetDict) { + w.value = widgetDict[renameDict[this.type][w.name]] + w.callback?.(w.value) + continue + } + } + //attempt to restore default value + let inputs = LiteGraph.getNodeType(this.type).nodeData.input; + let initialValue = null; + if (inputs?.required?.hasOwnProperty(w.name)) { + if (inputs.required[w.name][1]?.hasOwnProperty("default")) { + initialValue = inputs.required[w.name][1].default; + } else if (inputs.required[w.name][0].length) { + initialValue = inputs.required[w.name][0][0]; + } + } else if (inputs?.optional?.hasOwnProperty(w.name)) { + if (inputs.optional[w.name][1]?.hasOwnProperty("default")) { + initialValue = inputs.optional[w.name][1].default; + } else if (inputs.optional[w.name][0].length) { + initialValue = inputs.optional[w.name][0][0]; + } + } + if (initialValue) { + w.value = initialValue; + w.callback?.(w.value) + } + } + if (w.name in inputs && w.config) { + setWidgetConfig(inputs[w.name], w.config) + } + } + } else { + //Saved data was not a map made by this method + //and a conversion dict for it does not exist + //It's likely an array and that has been blindly applied + if (info?.widgets_values?.length != this.widgets.length) { + //Widget could not have restored properly + //Note if multiple node loads fail, only the latest error dialog displays + app.ui.dialog.show("Failed to restore node: " + this.title + "\nPlease remove and re-add it.") + this.bgcolor = "#C00" + } + } + }); + chainCallback(this, "onSerialize", function(info) { + info.widgets_values = {}; + if (!this.widgets) { + //object has no widgets, there is nothing to store + return; + } + for (let w of this.widgets) { + info.widgets_values[w.name] = w.value; + } + }); + }) +} +var helpDOM; +if (!app.helpDOM) { + helpDOM = document.createElement("div"); + app.VHSHelp = helpDOM +} +function initHelpDOM() { + let parentDOM = document.createElement("div"); + parentDOM.className = "VHS_floatinghelp" + document.body.appendChild(parentDOM) + parentDOM.appendChild(helpDOM) + helpDOM.className = "litegraph"; + let scrollbarStyle = document.createElement('style'); + scrollbarStyle.innerHTML = ` + .VHS_floatinghelp { + scrollbar-width: 6px; + scrollbar-color: #0003 #0000; + &::-webkit-scrollbar { + background: transparent; + width: 6px; + } + &::-webkit-scrollbar-thumb { + background: #0005; + border-radius: 20px + } + &::-webkit-scrollbar-button { + display: none; + } + } + .VHS_loopedvideo::-webkit-media-controls-mute-button { + display:none; + } + .VHS_loopedvideo::-webkit-media-controls-fullscreen-button { + display:none; + } + ` + scrollbarStyle.id = 'scroll-properties' + parentDOM.appendChild(scrollbarStyle) + chainCallback(app.canvas, "onDrawForeground", function (ctx, visible_rect){ + let n = helpDOM.node + if (!n || !n?.graph) { + parentDOM.style['left'] = '-5000px' + return + } + //draw : function(ctx, node, widgetWidth, widgetY, height) { + //update widget position, even if off screen + const transform = ctx.getTransform(); + const scale = app.canvas.ds.scale;//gets the litegraph zoom + //calculate coordinates with account for browser zoom + const bcr = app.canvas.canvas.getBoundingClientRect() + const x = transform.e*scale/transform.a + bcr.x; + const y = transform.f*scale/transform.a + bcr.y; + //TODO: text reflows at low zoom. investigate alternatives + Object.assign(parentDOM.style, { + left: (x+(n.pos[0] + n.size[0]+15)*scale) + "px", + top: (y+(n.pos[1]-LiteGraph.NODE_TITLE_HEIGHT)*scale) + "px", + width: "400px", + minHeight: "100px", + maxHeight: "600px", + overflowY: 'scroll', + transformOrigin: '0 0', + transform: 'scale(' + scale + ',' + scale +')', + fontSize: '18px', + backgroundColor: LiteGraph.NODE_DEFAULT_BGCOLOR, + boxShadow: '0 0 10px black', + borderRadius: '4px', + padding: '3px', + zIndex: 3, + position: "absolute", + display: 'inline', + }); + }); + function setCollapse(el, doCollapse) { + if (doCollapse) { + el.children[0].children[0].innerHTML = '+' + Object.assign(el.children[1].style, { + color: '#CCC', + overflowX: 'hidden', + width: '0px', + minWidth: 'calc(100% - 20px)', + textOverflow: 'ellipsis', + whiteSpace: 'nowrap', + }) + for (let child of el.children[1].children) { + if (child.style.display != 'none'){ + child.origDisplay = child.style.display + } + child.style.display = 'none' + } + } else { + el.children[0].children[0].innerHTML = '-' + Object.assign(el.children[1].style, { + color: '', + overflowX: '', + width: '100%', + minWidth: '', + textOverflow: '', + whiteSpace: '', + }) + for (let child of el.children[1].children) { + child.style.display = child.origDisplay + } + } + } + helpDOM.collapseOnClick = function() { + let doCollapse = this.children[0].innerHTML == '-' + setCollapse(this.parentElement, doCollapse) + } + helpDOM.selectHelp = function(name, value) { + //attempt to navigate to name in help + function collapseUnlessMatch(items,t) { + var match = items.querySelector('[vhs_title="' + t + '"]') + if (!match) { + for (let i of items.children) { + if (i.innerHTML.slice(0,t.length+5).includes(t)) { + match = i + break + } + } + } + if (!match) { + return null + } + //For longer documentation items with fewer collapsable elements, + //scroll to make sure the entirety of the selected item is visible + //This has the unfortunate side effect of trying to scroll the main + //window if the documentation windows is forcibly offscreen, + //but it's easy to simply scroll the main window back and seems to + //have no visual side effects + match.scrollIntoView(false) + window.scrollTo(0,0) + for (let i of items.querySelectorAll('.VHS_collapse')) { + if (i.contains(match)) { + setCollapse(i, false) + } else { + setCollapse(i, true) + } + } + return match + } + let target = collapseUnlessMatch(helpDOM, name) + if (target && value) { + collapseUnlessMatch(target, value) + } + } + let titleContext = document.createElement("canvas").getContext("2d") + titleContext.font = app.canvas.title_text_font; + helpDOM.calculateTitleLength = function(text) { + return titleContext.measureText(text).width + } + helpDOM.addHelp = function(node, nodeType, description) { + if (!description) { + return + } + //Pad computed size for the clickable question mark + let originalComputeSize = node.computeSize + node.computeSize = function() { + let size = originalComputeSize.apply(this, arguments) + if (!this.title) { + return size + } + let title_width = helpDOM.calculateTitleLength(this.title) + size[0] = Math.max(size[0], title_width + LiteGraph.NODE_TITLE_HEIGHT*2) + return size + } + + node.description = description + chainCallback(node, "onDrawForeground", function (ctx) { + if (this?.flags?.collapsed) { + return + } + //draw question mark + ctx.save() + ctx.font = 'bold 20px Arial' + ctx.fillText("?", this.size[0]-17, -8) + ctx.restore() + }) + chainCallback(node, "onMouseDown", function (e, pos, canvas) { + if (this?.flags?.collapsed) { + return + } + //On click would be preferred, but this'll be good enough + if (pos[1] < 0 && pos[0] + LiteGraph.NODE_TITLE_HEIGHT > this.size[0]) { + //corner question mark clicked + if (helpDOM.node == this) { + helpDOM.node = undefined + } else { + helpDOM.node = this; + helpDOM.innerHTML = this.description || "no help provided " + for (let e of helpDOM.querySelectorAll('.VHS_collapse')) { + e.children[0].onclick = helpDOM.collapseOnClick + e.children[0].style.cursor = 'pointer' + } + for (let e of helpDOM.querySelectorAll('.VHS_precollapse')) { + setCollapse(e, true) + } + for (let e of helpDOM.querySelectorAll('.VHS_loopedvideo')) { + e?.play() + } + helpDOM.parentElement.scrollTo(0,0) + } + return true + } + }) + let timeout = null + chainCallback(node, "onMouseMove", function (e, pos, canvas) { + if (timeout) { + clearTimeout(timeout) + timeout = null + } + if (helpDOM.node != this) { + return + } + timeout = setTimeout(() => { + let n = this + if (pos[0] > 0 && pos[0] < n.size[0] + && pos[1] > 0 && pos[1] < n.size[1]) { + //TODO: provide help specific to element clicked + let inputRows = Math.max(n.inputs?.length || 0, n.outputs?.length || 0) + if (pos[1] < LiteGraph.NODE_SLOT_HEIGHT * inputRows) { + let row = Math.floor((pos[1] - 7) / LiteGraph.NODE_SLOT_HEIGHT) + if (pos[0] < n.size[0]/2) { + if (row < n.inputs.length) { + helpDOM.selectHelp(n.inputs[row].name) + } + } else { + if (row < n.outputs.length) { + helpDOM.selectHelp(n.outputs[row].name) + } + } + } else { + //probably widget, but widgets have variable height. + let basey = LiteGraph.NODE_SLOT_HEIGHT * inputRows + 6 + for (let w of n.widgets) { + if (w.y) { + basey = w.y + } + let wheight = LiteGraph.NODE_WIDGET_HEIGHT+4 + if (w.computeSize) { + wheight = w.computeSize(n.size[0])[1] + } + if (pos[1] < basey + wheight) { + helpDOM.selectHelp(w.name, w.value) + break + } + basey += wheight + } + } + } + }, 500) + }) + chainCallback(node, "onMouseLeave", function (e, pos, canvas) { + if (timeout) { + clearTimeout(timeout) + timeout = null + } + }); + } +} + +function fitHeight(node) { + node.setSize([node.size[0], node.computeSize([node.size[0], node.size[1]])[1]]) + node?.graph?.setDirtyCanvas(true); +} +function startDraggingItems(node, pointer) { + app.canvas.emitBeforeChange() + app.canvas.graph?.beforeChange() + // Ensure that dragging is properly cleaned up, on success or failure. + pointer.finally = () => { + app.canvas.isDragging = false + app.canvas.graph?.afterChange() + app.canvas.emitAfterChange() + } + app.canvas.processSelect(node, pointer.eDown, true) + app.canvas.isDragging = true +} +function processDraggedItems(e) { + if (e.shiftKey || LiteGraph.alwaysSnapToGrid) + app.canvas?.graph?.snapToGrid(app.canvas.selectedItems) + app.canvas.dirty_canvas = true + app.canvas.dirty_bgcanvas = true + app.canvas.onNodeMoved?.(findFirstNode(app.canvas.selectedItems)) +} +function allowDragFromWidget(widget) { + widget.onPointerDown = function(pointer, node) { + pointer.onDragStart = () => startDraggingItems(node, pointer) + pointer.onDragEnd = processDraggedItems + app.canvas.dirty_canvas = true + return true + } +} + +//Cloud specific auth code. Short circuits if not on cloud +async function getAuthHeader() { + try { + const authStore = await api.getAuthStore() + return authStore ? await authStore.getAuthHeader() : null + } catch (error) { + console.warn('Failed to get auth header:', error) + return null + } +} + +async function uploadFile(file, progressCallback) { + try { + // Wrap file in formdata so it includes filename + const body = new FormData(); + const i = file.webkitRelativePath.lastIndexOf('/'); + const subfolder = file.webkitRelativePath.slice(0,i+1) + const new_file = new File([file], file.name, { + type: file.type, + lastModified: file.lastModified, + }); + body.append("image", new_file); + if (i > 0) { + body.append("subfolder", subfolder); + } + const url = api.apiURL("/upload/image") + const resp = await new Promise((resolve) => { + let req = new XMLHttpRequest() + req.upload.onprogress = (e) => progressCallback?.(e.loaded/e.total) + req.onload = () => resolve(req) + req.open('post', url, true) + getAuthHeader().then((headers) => { + headers ??= {} + for (const key in headers) + req.setRequestHeader(key, headers[key]) + req.send(body) + }) + }) + + if (resp.status !== 200) { + alert(resp.status + " - " + resp.statusText); + } + return resp + } catch (error) { + alert(error); + } +} + +function addVAEOutputToggle(nodeType, nodeData) { + chainCallback(nodeType.prototype, "onNodeCreated", function() { + this.reject_ue_connection = (input) => input?.name == "vae" + }) + chainCallback(nodeType.prototype, "onConnectionsChange", function(contype, slot, iscon, linfo) { + let slotType = this.inputs[slot]?.type + if (contype == LiteGraph.INPUT && slotType == "VAE") { + if (iscon && linfo) { + if (this.linkTimeout) { + clearTimeout(this.linkTimeout) + this.linkTimeout = false + } else if (this.outputs[0].type == "IMAGE") { + this.linkTimeout = setTimeout(() => { + if (this.outputs[0].type != "IMAGE") { + return + } + this.linkTimeout = false + this.disconnectOutput(0); + }, 50) + } + this.outputs[0].name = 'LATENT'; + this.outputs[0].type = 'LATENT'; + } else{ + if (this.outputs[0].type == "LATENT") { + this.linkTimeout = setTimeout(() => { + this.linkTimeout = false + this.disconnectOutput(0); + }, 50) + } + this.outputs[0].name = "IMAGE"; + this.outputs[0].type = "IMAGE"; + } + } + }); +} +function addVAEInputToggle(nodeType, nodeData) { + chainCallback(nodeType.prototype, "onNodeCreated", function() { + this.reject_ue_connection = (input) => input?.name == "vae" + }) + chainCallback(nodeType.prototype, "onConnectionsChange", function(contype, slot, iscon, linf) { + if (contype == LiteGraph.INPUT && slot == 3 && this.inputs[3].type == "VAE") { + if (iscon && linf) { + if (this.linkTimeout) { + clearTimeout(this.linkTimeout) + this.linkTimeout = false + } else if (this.inputs[0].type == "IMAGE") { + this.linkTimeout = setTimeout(() => { + //workaround for out of order loading + if (this.inputs[0].type != "IMAGE") { + return + } + this.linkTimeout = false + this.disconnectInput(0); + }, 50) + } + this.inputs[0].type = 'LATENT'; + } else { + if (this.inputs[0].type == "LATENT") { + this.linkTimeout = setTimeout(() => { + this.linkTimeout = false + this.disconnectInput(0); + }, 50) + } + this.inputs[0].type = "IMAGE"; + } + } + }); +} +function cloneType(nodeType, nodeData) { + chainCallback(nodeType.prototype, "onNodeCreated", function() { + this.changeOutputType = function (new_type) { + this.linkTimeout = setTimeout(() => { + this.linkTimeout = false + if (this.outputs[0].type != new_type) { + this.outputs[0].type = new_type + //check and potentially remove links + if (!this.outputs[0].links) { + return + } + let removed_links = [] + for (let link_id of this.outputs[0].links) { + let link = app.graph.links[link_id] + if (!link) + debugger + let target_node = app.graph.getNodeById(link.target_id) + let target_input = target_node.inputs[link.target_slot] + let keep = LiteGraph.isValidConnection(new_type, target_input.type) + if (!keep) { + link.disconnect(app.graph, 'input') + removed_links.push(link_id) + } + target_node.onConnectionsChange?.(LiteGraph.INPUT, + link.target_slot, keep, link, target_input) + } + this.outputs[0].links = this.outputs[0].links + .filter((v) => !removed_links.includes(v)) + } + }, 50) + } + this.changeOutputType("VHS_DUMMY_NONE") + }); + chainCallback(nodeType.prototype, "onConnectionsChange", function(contype, slot, iscon, linf) { + if (contype == LiteGraph.INPUT && slot == 0) { + let new_type = "VHS_DUMMY_NONE" + if (iscon && linf) { + new_type = app.graph.getNodeById(linf.origin_id).outputs[linf.origin_slot].type + } + if (this.linkTimeout) { + clearTimeout(this.linkTimeout) + } + this.changeOutputType(new_type) + } + }); +} + +function addDateFormatting(nodeType, field, timestamp_widget = false) { + chainCallback(nodeType.prototype, "onNodeCreated", function() { + const widget = this.widgets.find((w) => w.name === field); + widget.serializeValue = () => { + return applyTextReplacements(app, widget.value); + }; + }); +} +function addTimestampWidget(nodeType, nodeData, targetWidget) { + const newWidgets = {}; + for (let key in nodeData.input.required) { + if (key == targetWidget) { + //TODO: account for duplicate entries? + newWidgets["timestamp_directory"] = ["BOOLEAN", {"default": true}] + } + newWidgets[key] = nodeData.input.required[key]; + } + nodeDta.input.required = newWidgets; + chainCallback(nodeType.prototype, "onNodeCreated", function () { + const directoryWidget = this.widgets.find((w) => w.name === "directory_name"); + const timestampWidget = this.widgets.find((w) => w.name === "timestamp_directory"); + directoryWidget.serializeValue = () => { + if (timestampWidget.value) { + //ignore actual value and return timestamp + return formatDate("yyyy-MM-ddThh:mm:ss", new Date()); + } + return directoryWidget.value + }; + timestampWidget._value = value; + Object.definteProperty(timestampWidget, "value", { + set : function(value) { + this._value = value; + directoryWidget.disabled = value; + }, + get : function() { + return this._value; + } + }); + }); +} +function initializeLoadFormat(nodeType, nodeData) { + if (!nodeData?.input?.optional?.format) { + return + } + chainCallback(nodeType.prototype, "onNodeCreated", function() { + let node = this + let formatWidget = this.widgets.find((w) => w.name === "format") + formatWidget.options.formats = nodeData.input.optional.format[1].formats + let base = {} + for (let widget of this.widgets) { + if (['force_rate', 'custom_width', 'custom_height', + 'frame_load_cap'].includes(widget.name)) { + //TODO: filter these options? + base[widget.name] = widget.options + } + } + chainCallback(formatWidget, "callback", function(value) { + let format = this.options.formats[value] + if (!format) { + return + } + if ('target_rate' in format) { + format.force_rate = {'reset': format.target_rate} + } + if ('dim' in format) { + format.custom_width = {'step': format.dim[0], 'mod': format.dim[1]} + format.custom_height = {'step': format.dim[0], 'mod': format.dim[1]} + if (format.dim[2]) { + format.custom_width.reset = format.dim[2] + } + if (format.dim[3]) { + format.custom_height.reset = format.dim[3] + } + } + if ('frames' in format) { + format.frame_load_cap = {'step': format.frames[0], 'mod': format.frames[1]} + } + for (let widget of node.widgets) { + if (widget.name in base) { + let wasDefault = widget.options?.reset == widget.value + widget.options = Object.assign({}, base[widget.name], format[widget.name]) + if (wasDefault && widget.options.reset != undefined) { + widget.value = widget.options.reset + } + widget.callback(widget.value) + } + } + + }); + let capWidget = this.widgets.find((w) => w.name === "frame_load_cap") + capWidget.annotation = (value, width) => { + let max_frames = this.video_query?.loaded?.frames + if (!max_frames || value && value < max_frames) { + return + } + let format = formatWidget.options.formats[formatWidget.value] + const div = format?.frames?.[0] ?? 1 + const mod = format?.frames?.[1] ?? 0 + let loadable_frames = max_frames + if ((max_frames % div) != mod) { + loadable_frames = ((max_frames - mod)/div|0) * div + mod + } + return loadable_frames + "\u21FD" + } + let rateWidget = this.widgets.find((w) => w.name === "force_rate") + rateWidget.annotation = (value, width) => { + if (value == 0 && this.video_query?.source?.fps != undefined) { + return roundToPrecision(this.video_query.source.fps, 2) + "\u21FD" + } + } + }); +} + +function addUploadWidget(nodeType, nodeData, widgetName, type="video") { + let accept = {'video': ["video/webm","video/mp4","video/x-matroska","image/gif"], + 'audio': ["audio/mpeg","audio/wav","audio/x-wav","audio/ogg"]} + chainCallback(nodeType.prototype, "onNodeCreated", function() { + const node = this + const pathWidget = this.widgets.find((w) => w.name === widgetName); + const fileInput = document.createElement("input"); + chainCallback(this, "onRemoved", () => { + fileInput?.remove(); + }); + if (type == "folder") { + Object.assign(fileInput, { + type: "file", + style: "display: none", + webkitdirectory: true, + onchange: async () => { + const directory = fileInput.files[0].webkitRelativePath; + const i = directory.lastIndexOf('/'); + if (i <= 0) { + throw "No directory found"; + } + const path = directory.slice(0,directory.lastIndexOf('/')) + if (pathWidget.options.values.includes(path)) { + alert("A folder of the same name already exists"); + return; + } + let successes = 0; + const onProg = (p) => this.progress = (successes + p) / fileInput.files.length + for(const file of fileInput.files) { + if ((await uploadFile(file, onProg)).status == 200) { + successes++; + } else { + this.progress = undefined + //Upload failed, but some prior uploads may have succeeded + //Stop future uploads to prevent cascading failures + //and only add to list if an upload has succeeded + if (successes > 0) { + break + } else { + return; + } + } + } + this.progress = undefined + pathWidget.options.values.push(path); + pathWidget.value = path; + if (pathWidget.callback) { + pathWidget.callback(path) + } + }, + }); + } else { + let accept = {'video': ["video/webm","video/mp4","video/x-matroska","image/gif"], + 'audio': ["audio/mpeg","audio/wav","audio/x-wav","audio/ogg"]}[type] + async function doUpload(file) { + let resp = await uploadFile(file, (p) => node.progress = p) + node.progress = undefined + if (resp.status != 200) { + return false + } + const filename = JSON.parse(resp.responseText).name; + pathWidget.options.values.push(filename); + pathWidget.value = filename; + if (pathWidget.callback) { + pathWidget.callback(filename) + } + return true + } + Object.assign(fileInput, { + type: "file", + accept: accept.join(','), + style: "display: none", + onchange: async () => { + if (fileInput.files.length) { + return await doUpload(fileInput.files[0]) + } + }, + }); + this.onDragOver = (e) => !!e?.dataTransfer?.types?.includes?.('Files') + this.onDragDrop = async function(e) { + if (!e?.dataTransfer?.types?.includes?.('Files')) { + return false + } + //TODO: Allow dragging multiple files at once? + const item = e.dataTransfer?.files?.[0] + if (accept.includes(item?.type)) { + return await doUpload(item) + } + return false + } + } + document.body.append(fileInput); + let uploadWidget = this.addWidget("button", "choose " + type + " to upload", "image", () => { + //clear the active click event + app.canvas.node_widget = null + + fileInput.click(); + }); + uploadWidget.options.serialize = false; + + + }); +} +function addAudioPreview(nodeType, isInput=true) { + chainCallback(nodeType.prototype, "onNodeCreated", function() { + var element = document.createElement("audio"); + element.controls = true + const previewNode = this; + var previewWidget = this.addDOMWidget("audiopreview", "preview", element, { + serialize: false, + hideOnZoom: true, + getValue() { + return element.value; + }, + setValue(v) { + element.value = v; + }, + }); + previewWidget.computeSize = function(width) { + return [width, 50]; + } + var timeout = null; + this.updateParameters = (params, force_update) => { + if (!previewWidget.value.params) { + if(typeof(previewWidget.value) != 'object') { + previewWidget.value = {} + } + previewWidget.value.params = {} + } + Object.assign(previewWidget.value.params, params) + if (!force_update && + app.ui.settings.getSettingValue("VHS.AdvancedPreviews") == 'Never') { + return; + } + if (timeout) { + clearTimeout(timeout); + } + if (force_update) { + previewWidget.updateSource(); + } else { + timeout = setTimeout(() => previewWidget.updateSource(),100); + } + }; + previewWidget.updateSource = function () { + if (this.value.params == undefined) { + return; + } + let params = {} + let advp = app.ui.settings.getSettingValue("VHS.AdvancedPreviews") + if (advp == 'Never') { + advp = false + } else if (advp == 'Input Only') { + advp = isInput + } else { + advp = true + } + Object.assign(params, this.value.params);//shallow copy + params.timestamp = Date.now() + if (!advp) { + element.src = api.apiURL('/view?' + new URLSearchParams(params)); + } else { + params.deadline = app.ui.settings.getSettingValue("VHS.AdvancedPreviewsDeadline") + element.src = api.apiURL('/vhs/viewaudio?' + new URLSearchParams(params)); + } + } + previewWidget.callback = previewWidget.updateSource + + + //setup widget tracking + function update(key) { + return function(value) { + let params = {} + params[key] = this.value + previewNode?.updateParameters(params) + } + } + let widgetMap = { 'seek_seconds': 'start_time', 'duration': 'duration', + 'start_time': 'start_time' } + for (let widget of this.widgets) { + if (widget.name in widgetMap) { + if (typeof(widgetMap[widget.name]) == 'function') { + chainCallback(widget, "callback", widgetMap[widget.name]); + } else { + chainCallback(widget, "callback", update(widgetMap[widget.name])) + } + } + if (widget.type != "button") { + widget.callback?.(widget.value) + } + } + }); +} + +function addVideoPreview(nodeType, isInput=true) { + chainCallback(nodeType.prototype, "onNodeCreated", function() { + var element = document.createElement("div"); + const previewNode = this; + var previewWidget = this.addDOMWidget("videopreview", "preview", element, { + serialize: false, + hideOnZoom: false, + getValue() { + return element.value; + }, + setValue(v) { + element.value = v; + }, + }); + allowDragFromWidget(previewWidget) + previewWidget.computeSize = function(width) { + if (this.aspectRatio && !this.parentEl.hidden) { + let height = (previewNode.size[0]-20)/ this.aspectRatio + 10; + if (!(height > 0)) { + height = 0; + } + this.computedHeight = height + 10; + return [width, height]; + } + return [width, -4];//no loaded src, widget should not display + } + element.addEventListener('contextmenu', (e) => { + e.preventDefault() + return app.canvas._mousedown_callback(e) + }, true); + element.addEventListener('pointerdown', (e) => { + e.preventDefault() + return app.canvas._mousedown_callback(e) + }, true); + element.addEventListener('mousewheel', (e) => { + e.preventDefault() + return app.canvas._mousewheel_callback(e) + }, true); + element.addEventListener('pointermove', (e) => { + e.preventDefault() + return app.canvas._mousemove_callback(e) + }, true); + element.addEventListener('pointerup', (e) => { + e.preventDefault() + return app.canvas._mouseup_callback(e) + }, true); + element.addEventListener('dragover', (e) => { + //A little hacky, but allows drag events onto the preview itself + e.preventDefault(); + e.dataTransfer.dropEffect = "copy"; + app.dragOverNode = this + }) + previewWidget.value = {hidden: false, paused: false, params: {}, + muted: app.ui.settings.getSettingValue("VHS.DefaultMute")} + previewWidget.parentEl = document.createElement("div"); + previewWidget.parentEl.className = "vhs_preview"; + previewWidget.parentEl.style['width'] = "100%" + element.appendChild(previewWidget.parentEl); + previewWidget.videoEl = document.createElement("video"); + previewWidget.videoEl.controls = false; + previewWidget.videoEl.loop = true; + previewWidget.videoEl.muted = true; + previewWidget.videoEl.style['width'] = "100%" + previewWidget.videoEl.addEventListener("loadedmetadata", () => { + + previewWidget.aspectRatio = previewWidget.videoEl.videoWidth / previewWidget.videoEl.videoHeight; + fitHeight(this); + }); + previewWidget.videoEl.addEventListener("error", () => { + //TODO: consider a way to properly notify the user why a preview isn't shown. + previewWidget.parentEl.hidden = true; + fitHeight(this); + }); + previewWidget.videoEl.onmouseenter = () => { + previewWidget.videoEl.muted = previewWidget.value.muted + }; + previewWidget.videoEl.onmouseleave = () => { + previewWidget.videoEl.muted = true; + }; + + previewWidget.imgEl = document.createElement("img"); + previewWidget.imgEl.style['width'] = "100%" + previewWidget.imgEl.hidden = true; + previewWidget.imgEl.onload = () => { + previewWidget.aspectRatio = previewWidget.imgEl.naturalWidth / previewWidget.imgEl.naturalHeight; + fitHeight(this); + }; + previewWidget.parentEl.appendChild(previewWidget.videoEl) + previewWidget.parentEl.appendChild(previewWidget.imgEl) + var timeout = null; + this.updateParameters = (params, force_update) => { + if (!previewWidget.value.params) { + if(typeof(previewWidget.value) != 'object') { + previewWidget.value = {hidden: false, paused: false} + } + previewWidget.value.params = {} + } + if (!Object.entries(params).some(([k,v]) => previewWidget.value.params[k] !== v)) { + return + } + Object.assign(previewWidget.value.params, params) + if (!force_update && + app.ui.settings.getSettingValue("VHS.AdvancedPreviews") == 'Never') { + return; + } + if (timeout) { + clearTimeout(timeout); + } + if (force_update) { + previewWidget.updateSource(); + } else { + timeout = setTimeout(() => previewWidget.updateSource(),100); + } + }; + previewWidget.updateSource = function () { + if (this.value.params == undefined) { + return; + } + let params = {} + let advp = app.ui.settings.getSettingValue("VHS.AdvancedPreviews") + if (advp == 'Never') { + advp = false + } else if (advp == 'Input Only') { + advp = isInput + } else { + advp = true + } + Object.assign(params, this.value.params);//shallow copy + params.timestamp = Date.now() + this.parentEl.hidden = this.value.hidden; + if (params.format?.split('/')[0] == 'video' + || advp && (params.format?.split('/')[1] == 'gif') + || params.format == 'folder') { + + this.videoEl.autoplay = !this.value.paused && !this.value.hidden; + if (!advp) { + this.videoEl.src = api.apiURL('/view?' + new URLSearchParams(params)); + } else { + let target_width = (previewNode.size[0]-20)*2 || 256; + let minWidth = app.ui.settings.getSettingValue("VHS.AdvancedPreviewsMinWidth") + if (target_width < minWidth) { + target_width = minWidth + } + if (!params.custom_width || !params.custom_height) { + params.force_size = target_width+"x?" + } else { + let ar = params.custom_width/params.custom_height + params.force_size = target_width+"x"+(target_width/ar) + } + params.deadline = app.ui.settings.getSettingValue("VHS.AdvancedPreviewsDeadline") + this.videoEl.src = api.apiURL('/vhs/viewvideo?' + new URLSearchParams(params)); + } + this.videoEl.hidden = false; + this.imgEl.hidden = true; + } else if (params.format?.split('/')[0] == 'image'){ + //Is animated image + this.imgEl.src = api.apiURL('/view?' + new URLSearchParams(params)); + this.videoEl.hidden = true; + this.imgEl.hidden = false; + } + delete previewNode.video_query + const doQuery = async () => { + if (!previewWidget?.value?.params?.filename) { + return + } + let qurl = api.apiURL('/vhs/queryvideo?' + new URLSearchParams(previewWidget.value.params)) + let query = undefined + try { + let query_res = await fetch(qurl) + query = await query_res.json() + } catch(e) { + return + } + previewNode.video_query = query + } + doQuery() + } + previewWidget.callback = previewWidget.updateSource + previewWidget.parentEl.appendChild(previewWidget.videoEl) + previewWidget.parentEl.appendChild(previewWidget.imgEl) + }); +} +let copiedPath = undefined +function addPreviewOptions(nodeType) { + chainCallback(nodeType.prototype, "getExtraMenuOptions", function(_, options) { + // The intended way of appending options is returning a list of extra options, + // but this isn't used in widgetInputs.js and would require + // less generalization of chainCallback + let optNew = [] + const previewWidget = this.widgets.find((w) => w.name === "videopreview"); + + let url = null + if (previewWidget.videoEl?.hidden == false && previewWidget.videoEl.src) { + if (['input', 'output', 'temp'].includes(previewWidget.value.params.type)) { + //Use full quality video + url = api.apiURL('/view?' + new URLSearchParams(previewWidget.value.params)); + //Workaround for 16bit png: Just do first frame + url = url.replace('%2503d', '001') + } + } else if (previewWidget.imgEl?.hidden == false && previewWidget.imgEl.src) { + url = previewWidget.imgEl.src; + url = new URL(url); + } + if (this.video_query?.source) { + let info_string = this.video_query.source.size.join('x') + + '@' + this.video_query.source.fps + 'fps ' + + this.video_query.source.frames + 'frames' + optNew.push({content: info_string, disabled: true}) + } + if (url) { + optNew.push( + { + content: "Open preview", + callback: () => { + window.open(url, "_blank") + }, + }, + { + content: "Save preview", + callback: () => { + const a = document.createElement("a"); + a.href = url; + a.setAttribute("download", previewWidget.value.params.filename); + document.body.append(a); + a.click(); + requestAnimationFrame(() => a.remove()); + }, + } + ); + if (previewWidget.value.params.fullpath) { + copiedPath = previewWidget.value.params.fullpath + const blob = new Blob([previewWidget.value.params.fullpath], + { type: 'text/plain'}) + optNew.push({ + content: "Copy output filepath", + callback: async () => { + await navigator.clipboard.write([ + new ClipboardItem({ + 'text/plain': blob + })])} + }); + } + if (previewWidget.value.params.workflow) { + let wParams = {...previewWidget.value.params, + filename: previewWidget.value.params.workflow} + let wUrl = api.apiURL('/view?' + new URLSearchParams(wParams)); + optNew.push({ + content: "Save workflow image", + callback: () => { + const a = document.createElement("a"); + a.href = wUrl; + a.setAttribute("download", previewWidget.value.params.workflow); + document.body.append(a); + a.click(); + requestAnimationFrame(() => a.remove()); + } + }); + } + } + const PauseDesc = (previewWidget.value.paused ? "Resume" : "Pause") + " preview"; + if(previewWidget.videoEl.hidden == false) { + optNew.push({content: PauseDesc, callback: () => { + //animated images can't be paused and are more likely to cause performance issues. + //changing src to a single keyframe is possible, + //For now, the option is disabled if an animated image is being displayed + if(previewWidget.value.paused) { + previewWidget.videoEl?.play(); + } else { + previewWidget.videoEl?.pause(); + } + previewWidget.value.paused = !previewWidget.value.paused; + }}); + } + //TODO: Consider hiding elements if no video preview is available yet. + //It would reduce confusion at the cost of functionality + //(if a video preview lags the computer, the user should be able to hide in advance) + const visDesc = (previewWidget.value.hidden ? "Show" : "Hide") + " preview"; + optNew.push({content: visDesc, callback: () => { + if (!previewWidget.videoEl.hidden && !previewWidget.value.hidden) { + previewWidget.videoEl.pause(); + } else if (previewWidget.value.hidden && !previewWidget.videoEl.hidden && !previewWidget.value.paused) { + previewWidget.videoEl.play(); + } + previewWidget.value.hidden = !previewWidget.value.hidden; + previewWidget.parentEl.hidden = previewWidget.value.hidden; + fitHeight(this); + + }}); + optNew.push({content: "Sync preview", callback: () => { + //TODO: address case where videos have varying length + //Consider a system of sync groups which are opt-in? + for (let p of document.getElementsByClassName("vhs_preview")) { + for (let child of p.children) { + if (child.tagName == "VIDEO") { + child.currentTime=0; + } else if (child.tagName == "IMG") { + child.src = child.src; + } + } + } + }}); + const muteDesc = (previewWidget.value.muted ? "Unmute" : "Mute") + " Preview" + optNew.push({content: muteDesc, callback: () => { + previewWidget.value.muted = !previewWidget.value.muted + }}) + if(options.length > 0 && options[0] != null && optNew.length > 0) { + optNew.push(null); + } + options.unshift(...optNew); + }); +} +function addFormatWidgets(nodeType, nodeData) { + chainCallback(nodeType.prototype, "onNodeCreated", function() { + var formatWidget = null; + var formatWidgetIndex = -1; + for(let i = 0; i < this.widgets.length; i++) { + if (this.widgets[i].name === "format"){ + formatWidget = this.widgets[i]; + formatWidgetIndex = i+1; + break + } + } + let formatWidgetsCount = 0; + chainCallback(formatWidget, "callback", (value) => { + const formats = (LiteGraph.registered_node_types[this.type] + ?.nodeData?.input?.required?.format?.[1]?.formats) + let newWidgets = []; + if (formats?.[value]) { + let formatWidgets = formats[value] + for (let wDef of formatWidgets) { + let type = wDef[2]?.widgetType ?? wDef[1] + if (Array.isArray(type)) { + type = "COMBO" + } + app.widgets[type](this, wDef[0], wDef.slice(1), app) + let w = this.widgets.pop() + w.config = wDef.slice(1) + newWidgets.push(w) + } + } + let removed = this.widgets.splice(formatWidgetIndex, + formatWidgetsCount, ...newWidgets); + let newNames = new Set(newWidgets.map((w) => w.name)) + for (let w of removed) { + w?.onRemove?.() + if (w.name in newNames) { + continue + } + //I do not like the performance of this, but it's safe + let slot = this.inputs.findIndex((i) => i.name == w.name) + if (slot >= 0) { + this.removeInput(slot) + } + } + for (let w of newWidgets) { + let existingInput = this.inputs.find((i) => i.name == w.name) + if (existingInput) { + setWidgetConfig(existingInput, w.config) + //TODO: Consider forcing disconnection if props change? + } else { + //NOTE: config is applied in wrapped addInput call + this.addInput(w.name, w.config[0], {widget: {name: w.name}}) + } + } + fitHeight(this); + formatWidgetsCount = newWidgets.length; + }); + }); +} +function addLoadCommon(nodeType, nodeData) { + addVideoPreview(nodeType); + initializeLoadFormat(nodeType, nodeData) + addPreviewOptions(nodeType); + chainCallback(nodeType.prototype, "onNodeCreated", function() { + //widget.callback adds unused arguements which need culling + const node = this + function update(key) { + return function(value) { + let params = {} + params[key] = this.value + node?.updateParameters(params) + } + } + let prior_ar = -2 + const widthWidget = this.widgets.find((w) => w.name === "custom_width"); + const heightWidget = this.widgets.find((w) => w.name === "custom_height"); + function updateAR(value) { + let new_ar = -1 + if (widthWidget.value & heightWidget.value) { + new_ar = widthWidget.value / heightWidget.value + } + if (new_ar != prior_ar) { + node?.updateParameters({'custom_width': widthWidget.value, + 'custom_height': heightWidget.value}) + prior_ar = new_ar + } + } + const offsetWidget = this.widgets.find((w) => w.name === "start_time"); + if (offsetWidget) { + Object.defineProperty(offsetWidget.options, "step", { + set : (value) => {}, + get : () => { + return 1 / (this.video_query?.loaded?.fps ?? 1) + } + }) + } + let widgetMap = {'frame_load_cap': 'frame_load_cap', + 'skip_first_frames': 'skip_first_frames', 'select_every_nth': 'select_every_nth', + 'start_time': 'start_time', 'force_rate': 'force_rate', + 'custom_width': updateAR, 'custom_height': updateAR, + 'image_load_cap': 'image_load_cap', 'skip_first_images': 'skip_first_images' + } + for (let widget of this.widgets) { + if (widget.name in widgetMap) { + if (typeof(widgetMap[widget.name]) == 'function') { + chainCallback(widget, "callback", widgetMap[widget.name]); + } else { + chainCallback(widget, "callback", update(widgetMap[widget.name])) + } + } + if (widget.type != "button") { + widget.callback?.(widget.value) + } + } + }); +} + +function path_stem(path) { + let i = path.lastIndexOf("/"); + if (i >= 0) { + return [path.slice(0,i+1),path.slice(i+1)]; + } + return ["",path]; +} +function searchBox(event, [x,y], node) { + //Ensure only one dialogue shows at a time + if (this.prompt) + return; + this.prompt = true; + + let pathWidget = this; + let dialog = document.createElement("div"); + dialog.className = "litegraph litesearchbox graphdialog rounded" + dialog.innerHTML = 'Path
' + dialog.close = () => { + dialog.remove(); + } + document.body.append(dialog); + if (app.canvas.ds.scale > 1) { + dialog.style.transform = "scale(" + app.canvas.ds.scale + ")"; + } + var name_element = dialog.querySelector(".name"); + var input = dialog.querySelector(".value"); + var options_element = dialog.querySelector(".helper"); + input.value = pathWidget.value; + + var timeout = null; + let last_path = null; + let extensions = pathWidget.options.vhs_path_extensions + + input.addEventListener("keydown", (e) => { + dialog.is_modified = true; + if (e.keyCode == 27) { + //ESC + dialog.close(); + } else if (e.keyCode == 13 && e.target.localName != "textarea") { + pathWidget.value = input.value; + if (pathWidget.callback) { + pathWidget.callback(pathWidget.value); + } + dialog.close(); + } else { + if (e.keyCode == 9) { + //TAB + input.value = last_path + options_element.firstChild.innerText; + e.preventDefault(); + e.stopPropagation(); + } else if (e.ctrlKey && (e.keyCode == 87 || e.keyCode == 66)) { + //Ctrl+w or Ctrl+b + //most browsers won't support, but it's good QOL for those that do + input.value = path_stem(input.value.slice(0,-1))[0] + e.preventDefault(); + e.stopPropagation(); + } else if (e.ctrlKey && e.keyCode == 71) { + //Ctrl+g + //Temporarily disables extension filtering to show all files + e.preventDefault(); + e.stopPropagation(); + extensions = undefined + last_path = null; + } + if (timeout) { + clearTimeout(timeout); + } + timeout = setTimeout(updateOptions, 10); + return; + } + this.prompt=false; + e.preventDefault(); + e.stopPropagation(); + }); + + var button = dialog.querySelector("button"); + button.addEventListener("click", (e) => { + pathWidget.value = input.value; + if (pathWidget.callback) { + pathWidget.callback(pathWidget.value); + } + //unsure why dirty is set here, but not on enter-key above + node.graph.setDirtyCanvas(true); + dialog.close(); + this.prompt = false; + }); + var rect = app.canvas.canvas.getBoundingClientRect(); + var offsetx = -20; + var offsety = -20; + if (rect) { + offsetx -= rect.left; + offsety -= rect.top; + } + + if (event) { + dialog.style.left = event.clientX + offsetx + "px"; + dialog.style.top = event.clientY + offsety + "px"; + } else { + dialog.style.left = canvas.width * 0.5 + offsetx + "px"; + dialog.style.top = canvas.height * 0.5 + offsety + "px"; + } + //Search code + let options = [] + function addResult(name, isDir) { + let el = document.createElement("div"); + el.innerText = name; + el.className = "litegraph lite-search-item"; + if (isDir) { + el.className += " is-dir"; + el.addEventListener("click", (e) => { + input.value = last_path+name + if (timeout) { + clearTimeout(timeout); + } + timeout = setTimeout(updateOptions, 10); + }); + } else { + el.addEventListener("click", (e) => { + pathWidget.value = last_path+name; + if (pathWidget.callback) { + pathWidget.callback(pathWidget.value); + } + dialog.close(); + pathWidget.prompt = false; + }); + } + options_element.appendChild(el); + } + async function updateOptions() { + timeout = null; + let [path, remainder] = path_stem(input.value); + if (last_path != path) { + //fetch options. Must block execution here, so update should be async? + let params = {path : path} + if (extensions) { + params.extensions = extensions + } + let optionsURL = api.apiURL('/vhs/getpath?' + new URLSearchParams(params)); + try { + let resp = await fetch(optionsURL); + options = await resp.json(); + options = options.map((o) => o.replace('.','\0')) + options = options.sort() + options = options.map((o) => o.replace('\0','.')) + } catch(e) { + options = [] + } + last_path = path; + } + options_element.innerHTML = ''; + //filter options based on remainder + for (let option of options) { + if (option.startsWith(remainder)) { + let isDir = option.endsWith('/') + addResult(option, isDir); + } + } + } + + setTimeout(async function() { + input.focus(); + await updateOptions(); + }, 10); + + return dialog; +} +function button_action(widget) { + if ( + widget.options?.reset == undefined && + widget.options?.disable == undefined + ) { + return 'None' + } + if ( + widget.options.reset != undefined && + widget.value != widget.options.reset + ) { + return 'Reset' + } + if ( + widget.options.disable != undefined && + widget.value != widget.options.disable + ) { + return 'Disable' + } + if (widget.options.reset != undefined) { + return 'No Reset' + } + return 'No Disable' +} +function fitText(ctx, text, maxLength) { + if (maxLength <= 0) { + return ['', 0] + } + let fullLength = ctx.measureText(text).width + if (fullLength < maxLength) { + return [text, fullLength] + } + //determine approx safe cutoff + let cutoff = maxLength / fullLength * text.length | 0 + let shortened = text.slice(0, Math.max(0, cutoff - 2)) + '…' + return [shortened, ctx.measureText(shortened).width] +} +function fitPath(ctx, path, maxLength) { + let fullLength = ctx.measureText(path).width + if (fullLength < maxLength) { + return [path, fullLength] + } + //determine approx safe cutoff + let len = (maxLength / fullLength * path.length | 0) - 1 + + let displayPath = '' + let filename = path_stem(path)[1] + if (filename.length > len-2) { + //may all fit, but can't squeeze more info + displayPath = filename.substr(0,len); + } else { + //TODO: find solution for windows, path[1] == ':'? + let isAbs = path[0] == '/'; + let partial = path.substr(path.length - (isAbs ? len-2:len-1)) + let cutoff = partial.indexOf('/'); + if (cutoff < 0) { + //Can occur, but there isn't a nicer way to format + displayPath = path.substr(path.length-len); + } else { + displayPath = (isAbs ? '/…':'…') + partial.substr(cutoff); + } + } + return [displayPath, ctx.measureText(displayPath).width] +} +function roundToPrecision(num, precision) { + let strnum = Number(num).toFixed(precision) + let deci = strnum.indexOf('.') + if (deci > 0) { + let i = strnum.length - 1 + while (i > deci && strnum[i] == '0') { + i-- + } + if (i == deci) { + i-- + } + return strnum.slice(0, i+1) + } + return strnum +} +function inner_value_change(widget, value, node, pos) { + widget.value = value + if (widget.options?.property && widget.options.property in node.properties) { + node.setProperty(widget.options.property, value) + } + if (widget.callback) { + widget.callback(widget.value, app.canvas, node, event) + } +} +function drawAnnotated(ctx, node, widget_width, y, H) { + const litegraph_base = LiteGraph + const show_text = app.canvas.ds.scale >= (app.canvas.low_quality_zoom_threshold ?? 0.5) + const margin = 15 + ctx.strokeStyle = litegraph_base.WIDGET_OUTLINE_COLOR + ctx.fillStyle = litegraph_base.WIDGET_BGCOLOR + ctx.beginPath() + if (show_text) + ctx.roundRect(margin, y, widget_width - margin * 2, H, [H * 0.5]) + else ctx.rect(margin, y, widget_width - margin * 2, H) + ctx.fill() + if (show_text) { + if (!this.disabled) ctx.stroke() + const button = button_action(this) + if (button != 'None') { + ctx.save() + if (button.startsWith('No ')) { + ctx.fillStyle = litegraph_base.WIDGET_OUTLINE_COLOR + ctx.strokeStyle = litegraph_base.WIDGET_OUTLINE_COLOR + } else { + ctx.fillStyle = litegraph_base.WIDGET_TEXT_COLOR + ctx.strokeStyle = litegraph_base.WIDGET_TEXT_COLOR + } + ctx.beginPath() + if (button.endsWith('Reset')) { + ctx.arc(widget_width - margin - 26, y + H/2, 4, Math.PI*3/2, Math.PI) + ctx.stroke() + ctx.beginPath() + ctx.moveTo(widget_width - margin - 26, y + H/2 - 1.5) + ctx.lineTo(widget_width - margin - 26, y + H/2 - 6.5) + ctx.lineTo(widget_width - margin - 30, y + H/2 - 3.5) + ctx.fill() + } else { + ctx.arc(widget_width - margin - 26, y + H/2, 4, Math.PI*2/3, Math.PI*8/3) + ctx.moveTo(widget_width - margin - 26 - 8 ** .5, y + H/2 + 8 ** .5) + ctx.lineTo(widget_width - margin - 26 + 8 ** .5, y + H/2 - 8 ** .5) + ctx.stroke() + } + ctx.restore() + } + ctx.fillStyle = litegraph_base.WIDGET_TEXT_COLOR + if (!this.disabled) { + ctx.beginPath() + ctx.moveTo(margin + 16, y + 5) + ctx.lineTo(margin + 6, y + H * 0.5) + ctx.lineTo(margin + 16, y + H - 5) + ctx.fill() + ctx.beginPath() + ctx.moveTo(widget_width - margin - 16, y + 5) + ctx.lineTo(widget_width - margin - 6, y + H * 0.5) + ctx.lineTo(widget_width - margin - 16, y + H - 5) + ctx.fill() + } + let freeWidth = widget_width - (40 + margin * 2 + 20) + let [valueText, valueWidth] = fitText(ctx, (this.displayValue?.() ?? ""), freeWidth) + freeWidth -= valueWidth + + ctx.textAlign = 'left' + ctx.fillStyle = litegraph_base.WIDGET_SECONDARY_TEXT_COLOR + if (freeWidth > 20) { + let [name, nameWidth] = fitText(ctx, this.label || this.name, freeWidth) + freeWidth -= nameWidth + ctx.fillText(name, margin * 2 + 5, y + H * 0.7) + } + + let value_offset = margin * 2 + 20 + ctx.textAlign = 'right' + if (this.options.unit) { + ctx.fillStyle = litegraph_base.WIDGET_OUTLINE_COLOR + let [unitText, unitWidth] = fitText(ctx, this.options.unit, freeWidth) + if (unitText == this.options.unit) { + ctx.fillText(this.options.unit, widget_width - value_offset, y + H * 0.7) + value_offset += unitWidth + freeWidth -= unitWidth + } + } + ctx.fillStyle = litegraph_base.WIDGET_TEXT_COLOR + ctx.fillText(valueText, widget_width - value_offset, y + H * 0.7) + ctx.fillStyle = litegraph_base.WIDGET_SECONDARY_TEXT_COLOR + + + let annotation = '' + if (this.annotation) { + annotation = this.annotation(this.value, freeWidth) + } else if ( + this.options.annotation && + this.value in this.options.annotation + ) { + annotation = this.options.annotation[this.value] + } + if (annotation) { + ctx.fillStyle = litegraph_base.WIDGET_OUTLINE_COLOR + let [annoDisplay, annoWidth] = fitText(ctx, annotation, freeWidth) + ctx.fillText( + annoDisplay, + widget_width - 5 - valueWidth - value_offset, + y + H * 0.7 + ) + } + } +} +function mouseAnnotated(event, [x, y], node) { + //NOTE: Mouse actions contain no history element. + //This can cause overlapping actions since each triggers on different event type (down/move/up) + //TODO: Consider further rework + const widget_width = this.width || node.size[0] + const old_value = this.value + const margin = 15 + let isButton = 0 + if (x > margin + 6 && x < margin + 16) { + isButton = -1 + } else if (x > widget_width - margin - 16 & x < widget_width - margin - 6) { + isButton = 1 + } else if (x > widget_width - margin - 34 && x < widget_width - margin - 18) { + isButton = 2 + } + var allow_scroll = true + if (allow_scroll && event.type == 'pointermove') { + if (event.deltaX) + this.value += event.deltaX * (this.options.step || 1) + if (this.options.min != null && this.value < this.options.min) { + this.value = this.options.min + } + if (this.options.max != null && this.value > this.options.max) { + this.value = this.options.max + } + } else if (event.type == 'pointerdown') { + const buttonType = button_action(this) + if (isButton == 2) { + if (buttonType == 'Reset') { + this.value = this.options.reset + } else if (buttonType == 'Disable') { + this.value = this.options.disable + } + } else { + this.value += isButton * (this.options.step || 1) + if (this.options.min != null && this.value < this.options.min) { + this.value = this.options.min + } + if (this.options.max != null && this.value > this.options.max) { + this.value = this.options.max + } + } + } //end mousedown + else if (event.type == 'pointerup') { + if (event.click_time < 200 && !isButton) { + const d_callback = (v) => { + this.value = this.parseValue?.(v) ?? Number(v) + inner_value_change(this, this.value, node, [x, y]) + } + const dialog = app.canvas.prompt( + 'Value', + this.value,//TODO: Consider making this displayValue? + d_callback, + event + ) + const input = dialog.querySelector(".value") + input.addEventListener("keydown", (e) => { + if (e.keyCode == 9) { + e.preventDefault(); + e.stopPropagation(); + d_callback(input.value) + dialog.close() + node?.graph?.setDirtyCanvas(true); + let i = node.widgets.findIndex((w) => w == this) + if (e.shiftKey) + i-- + else + i++ + if (node.widgets[i]?.type == "VHS.ANNOTATED") {//restrict to annotatedNUmbers + node.widgets[i]?.mouse(event, [x, y+24], node) + } + } + }) + } + } + + if (old_value != this.value) + setTimeout( + function () { + inner_value_change(this, this.value, node, [x, y]) + }.bind(this), + 20 + ) + return true +} +let latentPreviewNodes = new Set() +app.registerExtension({ + name: "VideoHelperSuite.Core", + settings: [ + { + id: 'VHS.AdvancedPreviews', + category: ['🎥🅥🅗🅢', 'Previews', 'Advanced Previews'], + name: 'Advanced Previews', + tooltip: 'Automatically transcode previews on request. Required for advanced functionality', + type: 'combo', + options: ['Never', 'Always', 'Input Only'], + defaultValue: 'Input Only', + }, + { + id: 'VHS.AdvancedPreviewsMinWidth', + category: ['🎥🅥🅗🅢', 'Previews', 'Min Width'], + name: 'Minimum preview width', + tooltip: 'Advanced previews have their resolution downscaled to the node size for performance. While a node can be resized to increase preview quality, a minimum width can be set that previews won\'t be downscaled beneath. Preveiws will never be upscaled, so this can safely be set large.', + type: 'number', + attrs: { + min: 0, + step: 1, + max: 3840, + }, + defaultValue: 0, + }, + { + id: 'VHS.AdvancedPreviewsDeadline', + category: ['🎥🅥🅗🅢', 'Previews', 'Deadline'], + name: 'Deadline', + tooltip: 'Determines how much time can be spent when encoding advanced previews. Realtime results in reduced quality, but good will likely cause the preview to stutter as initial generation occurs', + type: 'combo', + options: ['realtime', 'good'], + defaultValue: 'realtime', + }, + { + id: 'VHS.AdvancedPreviewsDefaultMute', + category: ['🎥🅥🅗🅢', 'Previews', 'Default Mute'], + name: 'Mute videos by default', + type: 'boolean', + defaultValue: false, + }, + { + id: 'VHS.LatentPreview', + category: ['🎥🅥🅗🅢', 'Sampling', 'Latent Previews'], + name: 'Display animated previews when sampling', + type: 'boolean', + defaultValue: false, + onChange(value) { + if (!value) { + //Remove any previewWidgets + for (let id of latentPreviewNodes) { + let n = app.graph.getNodeById(id) + let i = n?.widgets?.findIndex((w) => w.name == 'vhslatentpreview') + if (i >= 0) { + n.widgets.splice(i,1)[0].onRemove() + } + } + latentPreviewNodes = new Set() + } + }, + }, + { + id: "VHS.LatentPreviewRate", + category: ['🎥🅥🅗🅢', 'Sampling', 'Latent Preview Rate'], + name: "Playback rate override.", + type: 'number', + attrs: { + min: 0, + step: 1, + max: 60 + }, + tooltip: + 'Force a specific frame rate for the playback of latent frames. This should not be confused with the output frame rate and will not match for video models.', + defaultValue: 0, + }, + { + id: 'VHS.MetadataImage', + category: ['🎥🅥🅗🅢', 'Output', 'MetadataImage'], + name: 'Save png of first frame for metadata', + type: 'boolean', + defaultValue: true, + }, + { + id: 'VHS.KeepIntermediate', + category: ['🎥🅥🅗🅢', 'Output', 'Keep Intermediate'], + name: 'Keep required intermediate files after sucessful execution', + type: 'boolean', + defaultValue: true, + }, + ], + + async beforeRegisterNodeDef(nodeType, nodeData, app) { + if(nodeData?.name?.startsWith("VHS_")) { + useKVState(nodeType); + if (nodeData.description) { + let description = nodeData.description + let el = document.createElement("div") + el.innerHTML = description + if (!el.children.length) { + //Is plaintext. Do minor convenience formatting + let chunks = description.split('\n') + nodeData.description = chunks[0] + description = chunks.join('
') + } else { + nodeData.description = el.querySelector('#VHS_shortdesc')?.innerHTML || el.children[1]?.firstChild?.innerHTML + } + chainCallback(nodeType.prototype, "onNodeCreated", function () { + helpDOM.addHelp(this, nodeType, description) + this.setSize(this.computeSize()) + }) + } + //set widgetType to use VHS widgets where possible + for(let inp of Object.values({...nodeData.input?.required, ...nodeData.input?.optional})) { + if (["INT", "FLOAT"].includes(inp[0])) { + if (!inp[1]) { + inp[1] = {} + } + inp[1].widgetType ??= "VHS" + inp[0] + } + } + chainCallback(nodeType.prototype, "onNodeCreated", function () { + let new_widgets = [] + if (this.widgets) { + for (let w of this.widgets) { + let input = this.constructor.nodeData.input + let config = input?.required[w.name] ?? input.optional[w.name] + if (!config) { + continue + } + if (w?.type == "text" && config[1].vhs_path_extensions) { + new_widgets.push(app.widgets.VHSPATH({}, w.name, ["VHSPATH", config[1]])); + } else { + new_widgets.push(w) + } + } + this.widgets = new_widgets; + } + const originalAddInput = this.addInput; + this.addInput = function(name, type, options) { + if (options.widget) { + //Is Converted Widget + const widget = this.widgets.find((w) => w.name == name) + if (widget?.config) { + //Has override for type + type = widget.config[0] + if (type == 'FLOAT') { + type = "FLOAT,INT" + } + setWidgetConfig(options, widget.config) + } + } + return originalAddInput.apply(this, [name, type, options]) + } + }); + } + if (nodeData?.name == "VHS_LoadImages") { + addUploadWidget(nodeType, nodeData, "directory", "folder"); + chainCallback(nodeType.prototype, "onNodeCreated", function() { + const pathWidget = this.widgets.find((w) => w.name === "directory"); + chainCallback(pathWidget, "callback", (value) => { + if (!value) { + return; + } + let params = {filename : value, type : "input", format: "folder"}; + this.updateParameters(params, true); + }); + }); + addLoadCommon(nodeType, nodeData); + } else if (nodeData?.name == "VHS_LoadImagesPath") { + chainCallback(nodeType.prototype, "onNodeCreated", function() { + const pathWidget = this.widgets.find((w) => w.name === "directory"); + chainCallback(pathWidget, "callback", (value) => { + if (!value) { + return; + } + let params = {filename : value, type : "path", format: "folder"}; + this.updateParameters(params, true); + }); + }); + addLoadCommon(nodeType, nodeData); + } else if (nodeData?.name == "VHS_LoadVideo" || nodeData?.name == "VHS_LoadVideoFFmpeg") { + chainCallback(nodeType.prototype, "onNodeCreated", function() { + const pathWidget = this.widgets.find((w) => w.name === "video"); + chainCallback(pathWidget, "callback", (value) => { + if (!value) { + return; + } + let parts = ["input", value]; + let extension_index = parts[1].lastIndexOf("."); + let extension = parts[1].slice(extension_index+1); + let format = "video" + if (["gif", "webp", "avif"].includes(extension)) { + format = "image" + } + format += "/" + extension; + let params = {filename : parts[1], type : parts[0], format: format}; + this.updateParameters(params, true); + }); + }); + addUploadWidget(nodeType, nodeData, "video"); + addLoadCommon(nodeType, nodeData); + addVAEOutputToggle(nodeType, nodeData); + } else if (nodeData?.name == "VHS_LoadAudio") { + addAudioPreview(nodeType) + chainCallback(nodeType.prototype, "onNodeCreated", function() { + const pathWidget = this.widgets.find((w) => w.name === "audio_file"); + chainCallback(pathWidget, "callback", (filename) => { + this.updateParameters({filename, type: 'path'}, true); + }); + }); + } else if (nodeData?.name == "VHS_LoadAudioUpload") { + addUploadWidget(nodeType, nodeData, "audio", "audio"); + addAudioPreview(nodeType) + chainCallback(nodeType.prototype, "onNodeCreated", function() { + const pathWidget = this.widgets.find((w) => w.name === "audio"); + chainCallback(pathWidget, "callback", (filename) => { + if (!filename) return + let params = {filename, type : "input"}; + this.updateParameters(params, true); + }); + }); + } else if (nodeData?.name == "VHS_LoadVideoPath" || nodeData?.name == "VHS_LoadVideoFFmpegPath") { + chainCallback(nodeType.prototype, "onNodeCreated", function() { + const pathWidget = this.widgets.find((w) => w.name === "video"); + chainCallback(pathWidget, "callback", (value) => { + let extension_index = value.lastIndexOf("."); + let extension = value.slice(extension_index+1); + let format = "video" + if (["gif", "webp", "avif"].includes(extension)) { + format = "image" + } + format += "/" + extension; + let params = {filename : value, type: "path", format: format}; + this.updateParameters(params, true); + }); + }); + addLoadCommon(nodeType, nodeData); + addVAEOutputToggle(nodeType, nodeData); + } else if (nodeData?.name == "VHS_LoadImagePath") { + addLoadCommon(nodeType, nodeData); + addVAEOutputToggle(nodeType, nodeData); + chainCallback(nodeType.prototype, "onNodeCreated", function() { + const pathWidget = this.widgets.find((w) => w.name === "image"); + chainCallback(pathWidget, "callback", (value) => { + let extension_index = value.lastIndexOf("."); + let extension = value.slice(extension_index+1); + let format = "video" + "/" + extension; + let params = {filename : value, type: "path", format: format}; + this.updateParameters(params, true); + }); + }); + } else if (nodeData?.name == "VHS_VideoCombine") { + addDateFormatting(nodeType, "filename_prefix"); + chainCallback(nodeType.prototype, "onExecuted", function(message) { + if (message?.gifs) { + this.updateParameters(message.gifs[0], true); + } + }); + addVideoPreview(nodeType, false); + addPreviewOptions(nodeType); + addFormatWidgets(nodeType, nodeData); + addVAEInputToggle(nodeType, nodeData) + } else if (nodeData?.name == "VHS_SaveImageSequence") { + //Disabled for safety as VHS_SaveImageSequence is not currently merged + //addDateFormating(nodeType, "directory_name", timestamp_widget=true); + //addTimestampWidget(nodeType, nodeData, "directory_name") + } else if (nodeData?.name == "VHS_BatchManager") { + chainCallback(nodeType.prototype, "onNodeCreated", function() { + this.widgets.push({name: "count", type: "dummy", value: 0, + computeSize: () => {return [0,-4]}, + afterQueued: function() {this.value++;}}); + }); + } else if (nodeData?.name == "VHS_Unbatch") { + cloneType(nodeType, nodeData) + } else if (nodeData?.name == "VHS_SelectLatest") { + chainCallback(nodeType.prototype, "onNodeCreated", function() { + this.isVirtualNode = true + chainCallback(this, "onConnectionsChange", function (contype, slot, iscon, linfo) { + if (iscon) { + this.update_links() + } + }) + + this.update_links = function(extraLinks = []) { + if (!this.outputs[0].links?.length) return + + function get_links(node) { + let links = [] + for (const l of node.outputs[0].links) { + const linkInfo = node.graph.links[l] + const n = node.graph.getNodeById(linkInfo.target_id) + if (n.type == 'Reroute') { + links = links.concat(get_links(n)) + } else { + links.push(l) + } + } + return links + } + + let links = [ + ...get_links(this).map((l) => this.graph.links[l]), + ...extraLinks + ] + let v = this.latest_file + if (!v) { + return + } + + // For each output link copy our value over the original widget value + for (const linkInfo of links) { + const node = this.graph.getNodeById(linkInfo.target_id) + const input = node.inputs[linkInfo.target_slot] + const widgetName = input.widget.name + const widget = node.widgets.find((w) => w.name === widgetName) + if (widget) { + widget.value = v + if (widget.callback) { + widget.callback( widget.value, app.canvas, + node, app.canvas.graph_mouse, {}) + } + } + } + } + let fetch_files = async () => { + let [path, remainder] = path_stem(this.widgets[0].value) + let params = {path : path} + let optionsURL = api.apiURL('/vhs/getpath?' + new URLSearchParams(params)); + let options = [] + try { + let resp = await fetch(optionsURL); + options = await resp.json(); + } catch(e) {} + options = options.filter((file) => file.startsWith(remainder) && file.endsWith(this.widgets[1].value)) + if (options.length && this.latest_file != options[options.length-1]) { + this.latest_file = path + options[options.length-1] + this.update_links() + } + } + this.widgets[0].callback = fetch_files + this.widgets[1].callback = fetch_files + this.onPromptExecuted = fetch_files + this.applyToGraph = this.update_links + }) + } + }, + async getCustomWidgets() { + return { + VHSPATH(node, inputName, inputData) { + let w = { + name : inputName, + type : "VHS.PATH", + value : "", + draw : function(ctx, node, widget_width, y, H) { + //Adapted from litegraph.core.js:drawNodeWidgets + var show_text = app.canvas.ds.scale >= (app.canvas.low_quality_zoom_threshold ?? 0.5) + var margin = 15; + var text_color = LiteGraph.WIDGET_TEXT_COLOR; + var secondary_text_color = LiteGraph.WIDGET_SECONDARY_TEXT_COLOR; + ctx.textAlign = "left"; + ctx.strokeStyle = LiteGraph.WIDGET_OUTLINE_COLOR; + ctx.fillStyle = LiteGraph.WIDGET_BGCOLOR; + ctx.beginPath(); + if (show_text) + ctx.roundRect(margin, y, widget_width - margin * 2, H, [H * 0.5]); + else + ctx.rect( margin, y, widget_width - margin * 2, H ); + ctx.fill(); + if (show_text) { + if(!this.disabled) + ctx.stroke(); + ctx.save(); + ctx.beginPath(); + ctx.rect(margin, y, widget_width - margin * 2, H); + ctx.clip(); + + //ctx.stroke(); + let freeWidth = widget_width - (margin * 2 + 40) + ctx.fillStyle = secondary_text_color; + const label = this.label || this.name; + if (label != null) { + let [labelDisplay, labelWidth] = fitText(ctx, label, freeWidth) + freeWidth -= labelWidth + ctx.fillText(labelDisplay, margin * 2, y + H * 0.7); + } + ctx.fillStyle = this.value ? text_color : '#777'; + ctx.textAlign = "right"; + let disp_text = fitPath(ctx, String(this.value || this.options.placeholder), freeWidth)[0] + ctx.fillText(disp_text, widget_width - margin * 2, y + H * 0.7); + ctx.restore(); + } + }, + mouse : searchBox, + options : {}, + }; + if (inputData.length > 1) { + w.options = inputData[1] + if (inputData[1].default) { + w.value = inputData[1].default; + } + } + + if (!node.widgets) { + node.widgets = []; + } + node.widgets.push(w); + return w; + }, + VHSFLOAT(node, inputName, inputData) { + let w = { + name: inputName, + type: "VHS.ANNOTATED", + value: inputData[1]?.default ?? 0, + draw: drawAnnotated, + mouse: mouseAnnotated, + computeSize(width) { + return [width, 20] + }, + callback(v) { + if (this.options.round) { + //TODO adopt ComfyUI_frontend#4291? + v = Math.round((v + Number.EPSILON) / + this.options.round) * this.options.round + } + if (this.options.max && v > this.options.max) { + v = this.options.max + } + if (this.options.min && v < this.options.max) { + v = this.options.min + } + this.value = v + }, + config: inputData, + displayValue: function() { + return roundToPrecision(this.value, this.options.precision ?? 3) + }, + options: Object.assign({}, inputData[1]) + } + if (!node.widgets) { + node.widgets = [] + } + node.widgets.push(w) + return w + }, + VHSINT(node, inputName, inputData) { + let w = { + name: inputName, + type: "VHS.ANNOTATED", + value: inputData[1]?.default ?? 0, + draw: drawAnnotated, + mouse: mouseAnnotated, + computeSize(width) { + return [width, 20] + }, + callback(v) { + if (this.options.max && v > this.options.max) { + v = this.options.max + } + if (this.options.min && v < this.options.min) { + v = this.options.min + } + if (v == 0) { + return + } + const s = this.options.step + let sh = this.options.mod ?? 0 + this.value = Math.round((v - sh) / s) * s + sh + }, + config: inputData, + displayValue: function() { + return this.value | 0 + }, + options: Object.assign({}, inputData[1]) + } + if (!node.widgets) { + node.widgets = [] + } + node.widgets.push(w) + return w + }, + VHSTIMESTAMP(node, inputName, inputData) { + let w = { + name: inputName, + type: "VHS.TIMESTAMP", + value: inputData[1]?.default ?? 0, + draw: drawAnnotated, + mouse: mouseAnnotated, + computeSize(width) { + return [width, 20] + }, + parseValue(v) { + if (typeof(v) == "string") { + let val = 0 + for (let chunk of v.split(":")) { + val = val * 60 + parseFloat(chunk) + } + return val + } + }, + callback(v) {}, + config: inputData, + options: Object.assign({}, inputData[1]), + displayValue() { + let seconds = this.value + let hours = seconds / 3600 | 0 + seconds -= 3600 * hours + let minutes = seconds / 60 | 0 + seconds -= 60 * minutes + let display = "" + if (hours > 0) { + display += hours + ":" + } + if (hours > 0 || minutes > 0) { + if (hours > 0) { + minutes = (''+minutes).padStart(2,'0') + } + display += minutes + ":" + } + seconds = roundToPrecision(seconds, 4) + if ((seconds[1] == '.' || seconds.length == 1) && (minutes > 0 || hours > 0)) { + seconds = '0'+seconds + } + display += seconds + return display + } + } + if (!node.widgets) { + node.widgets = [] + } + node.widgets.push(w) + return w + }, + } + }, + async loadedGraphNode(node) { + //Check and migrate inputs named batch_manager from old workflows + if (node.type?.startsWith("VHS_") && node.inputs) { + const batchInput = node.inputs.find((i) => i.name == "batch_manager") + if (batchInput) { + batchInput.name = "meta_batch" + } + } + }, + async beforeConfigureGraph(graphData, missingNodeTypes) { + if(helpDOM?.node) { + helpDOM.node = undefined + } + }, + async setup() { + let originalGraphToPrompt = app.graphToPrompt + let graphToPrompt = async function() { + let res = await originalGraphToPrompt.apply(this, arguments); + res.workflow.extra['VHS_latentpreview'] = app.ui.settings.getSettingValue("VHS.LatentPreview") + res.workflow.extra['VHS_latentpreviewrate'] = app.ui.settings.getSettingValue("VHS.LatentPreviewRate") + res.workflow.extra['VHS_MetadataImage'] = app.ui.settings.getSettingValue("VHS.MetadataImage") + res.workflow.extra['VHS_KeepIntermediate'] = app.ui.settings.getSettingValue("VHS.KeepIntermediate") + return res + } + app.graphToPrompt = graphToPrompt + //Add a handler for pasting video data + document.addEventListener('paste', async (e) => { + if (!e.target.classList.contains('litegraph') && + !e.target.classList.contains('graph-canvas-container')) { + return + } + let data = e.clipboardData || window.clipboardData + let filepath = data.getData('text/plain') + let video + for (const item of data.items) { + if (item.type.startsWith('video/')) { + video = item + break + } + } + if (filepath && copiedPath == filepath) { + //Add a Load Video (Path) and populate filepath + const pastedNode = LiteGraph.createNode('VHS_LoadVideoPath') + app.canvas.graph.add(pastedNode) + pastedNode.pos[0] = app.canvas.graph_mouse[0] + pastedNode.pos[1] = app.canvas.graph_mouse[1] + pastedNode.widgets[0].value = filepath + pastedNode.widgets[0].callback?.(filepath) + } else if (video && false) { + //Disabled due to lack of testing + //Add a Load Video (Upload), then upload the file, then select the file + const pastedNode = LiteGraph.createNode('VHS_LoadVideo') + app.canvas.graph.add(pastedNode) + pastedNode.pos[0] = app.canvas.graph_mouse[0] + pastedNode.pos[1] = app.canvas.graph_mouse[1] + const pathWidget = pastedNode.widgets[0] + //TODO: upload to pasted dir? + const blob = video.getAsFile() + const resp = await uploadFile(blob) + if (resp.status != 200) { + //upload failed and file can not be added to options + return; + } + const filename = (await resp.json()).name; + pathWidget.options.values.push(filename); + pathWidget.value = filename; + pathWidget.callback?.(filename) + } else { + return + } + e.preventDefault() + e.stopImmediatePropagation() + return false + }, true) + }, + async init() { + if (app.ui.settings.getSettingValue("VHS.AdvancedPreviews") == true) { + app.ui.settings.setSettingValue("VHS.AdvancedPreviews", 'Always') + } + if (app.ui.settings.getSettingValue("VHS.AdvancedPreviews") == false) { + app.ui.settings.setSettingValue("VHS.AdvancedPreviews", 'Never') + } + if (app.VHSHelp != helpDOM) { + helpDOM = app.VHSHelp + } else { + initHelpDOM() + } + let e = app.extensions.filter((w) => w.name == 'UVR5.AudioPreviewer') + if (e.length) { + let orig = e[0].beforeRegisterNodeDef + e[0].beforeRegisterNodeDef = function(nodeType, nodeData, app) { + if(!nodeData?.name?.startsWith("VHS_")) { + return orig.apply(this, arguments); + } + } + } + }, +}); +let previewImages = [] +api.addEventListener('executing', ({ detail }) => { + if (detail === null) { + for (let graph of [app.graph, ...app.graph.subgraphs.values()]) { + for (let node of graph._nodes) { + if (node.type.startsWith("VHS_")) { + node.onPromptExecuted?.() + } + } + } + } +}) +function getLatentPreviewCtx(id, width, height) { + const node = getNodeById(id) + if (!node) { + return undefined + } + + let previewWidget = node.widgets.find((w) => w.name == "vhslatentpreview") + if (!previewWidget) { + //check for and remove any native preview + let nativePreview = node.widgets.findIndex((w) => w.name == '$$canvas-image-preview') + if (nativePreview >= 0) { + node.imgs = [] + node.widgets.splice(nativePreview,1) + } + let canvasEl = document.createElement("canvas") + canvasEl.style.width = "100%" + previewWidget = node.addDOMWidget("vhslatentpreview", "vhscanvas", canvasEl, { + serialize: false, + hideOnZoom: false, + }); + previewWidget.serialize = false + allowDragFromWidget(previewWidget) + canvasEl.addEventListener('contextmenu', (e) => { + e.preventDefault() + return app.canvas._mousedown_callback(e) + }, true); + canvasEl.addEventListener('pointerdown', (e) => { + e.preventDefault() + return app.canvas._mousedown_callback(e) + }, true); + canvasEl.addEventListener('mousewheel', (e) => { + e.preventDefault() + return app.canvas._mousewheel_callback(e) + }, true); + canvasEl.addEventListener('pointermove', (e) => { + e.preventDefault() + return app.canvas._mousemove_callback(e) + }, true); + canvasEl.addEventListener('pointerup', (e) => { + e.preventDefault() + return app.canvas._mouseup_callback(e) + }, true); + + previewWidget.computeSize = function(width) { + if (this.aspectRatio) { + let height = (node.size[0]-20)/ this.aspectRatio + 10; + if (!(height > 0)) { + height = 0; + } + this.computedHeight = height + 10; + return [width, height]; + } + return [width, -4];//no loaded src, widget should not display + } + } + let canvasEl = previewWidget.element + if (!previewWidget.ctx || canvasEl.width != width + || canvasEl.height != height) { + previewWidget.aspectRatio = width / height + canvasEl.width = width + canvasEl.height = height + fitHeight(node) + } + return canvasEl.getContext("2d") +} +let animateIntervals = {} +function beginLatentPreview(id, previewImages, rate) { + latentPreviewNodes.add(id) + if (animateIntervals[id]) { + clearTimeout(animateIntervals[id]) + } + let displayIndex = 0 + let node = getNodeById(id) + //While progress is safely cleared on execution completion. + //Initial progress must be started here to avoid a race condition + node.progress = 0 + animateIntervals[id] = setInterval(() => { + if (getNodeById(id)?.progress == undefined + || app.canvas.graph.rootGraph != node.graph.rootGraph) { + clearTimeout(animateIntervals[id]) + delete animateIntervals[id] + return + } + if (!previewImages[displayIndex]) { + return + } + getLatentPreviewCtx(id, previewImages[displayIndex].width, + previewImages[displayIndex].height)?.drawImage?.(previewImages[displayIndex],0,0) + displayIndex = (displayIndex + 1) % previewImages.length + }, 1000/rate); + +} +let previewImagesDict = {} +api.addEventListener('VHS_latentpreview', ({ detail }) => { + if (detail.id == null) { + return + } + let previewImages = previewImagesDict[detail.id] = [] + previewImages.length = detail.length + + let idParts = detail.id.split(':') + for (let i=1; i <= idParts.length; i++) { + let id = idParts.slice(0,i).join(':') + beginLatentPreview(id, previewImages, detail.rate) + } +}); +let td = new TextDecoder() +api.addEventListener('b_preview', async (e) => { + if (Object.keys(animateIntervals).length == 0) { + return + } + e.preventDefault() + e.stopImmediatePropagation() + e.stopPropagation() + const dv = new DataView(await e.detail.slice(0,24).arrayBuffer()) + const index = dv.getUint32(4) + const idlen = dv.getUint8(8) + const id = td.decode(dv.buffer.slice(9,9+idlen)) + previewImagesDict[id][index] = await window.createImageBitmap(e.detail.slice(24)) + return false +}, true); diff --git a/docs/hel-892/双图像或视频合并显示固定参考中文说明.md b/docs/hel-892/双图像或视频合并显示固定参考中文说明.md new file mode 100644 index 00000000..ead3b0b0 --- /dev/null +++ b/docs/hel-892/双图像或视频合并显示固定参考中文说明.md @@ -0,0 +1,1253 @@ +# 双图像或视频合并显示固定参考中文说明 + +42新顶层保存位置(39标量含null与上传状态+3历史对象)+0新注释;旧20图576保存位置+15注释逐对象不变。21图618位置+15注释展示,155定稿0、实跑0、新增转换0。 + +复用SQLite来源库→正常GET详情→现有说明抽屉;仅新增source_reviews说明块和显式受信摘要,不改变转换/执行链。来源索引local_file以docs/hel-892/concat-document-evidence为解析基准。 + +## 双图像或视频合并显示 + +这张图把两路视频画面上下合并;图片支路四节点均为mode4,不能当作已完成双图合成。活动路径为视频6和8→拼接9→合成10:素材6跳过53、上限62,素材8跳过55、上限64,起点和上限不同。播放帧率由素材6的信息覆盖保存8,音频来自素材8,不能保证跨素材同步。三个预览对象仅为历史缓存;未实跑、目标环境未知、转换保持关闭。 + +声明版本固定源码仅作参考;图片支路mode4、跨素材音画同步未知、历史缓存非产物,未实跑、转换保持关闭。 + +源路径:`example_ComfyUI_workflows/0-基础处理:图像合并-音频分离-视频截取合并-图像视频放大/双图像或视频合并显示.json` + +SHA1:b09b3d8dfef5f886d1b2f6e9a4ab5d2bb97aee9a + +原字节SHA256:61a0b1a2aa17a7d8c4f09f4f57e276eaf37227f69b5fc5789193005e593548c9 + +规范全图SHA256:0a5fad1a4d9b69b6633cbd5e3b2aa253a4df5d26234e885e156c63a3d0f6e1c9 + +VHS声明1.7.9,使用官方registry准确发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;完整45成员已复算,Git绑定未知,不套1.7.7。 + +ImageConcatMulti4/9按KJ精确提交50a0837f9aea602b184bbf6dbabf66ed2c7a1d22注册/schema/实现/JS/许可。 + +LoadImage1/2和PreviewImage5按官方core v0.12.3→cb459573c8fa025bbf9ecf312f6af376d659f567固定注册/schema/实现/许可。 + +无frontendVersion;目标安装/UE身份和次序/动态控件恢复未知,固定源码不是运行或目标安装证明。 + +### 具体连线与处理条件 + +这张图把两路视频画面上下合并;图片支路四节点均为mode4,不能当作已完成双图合成。活动路径为视频6和8→拼接9→合成10:素材6跳过53、上限62,素材8跳过55、上限64,起点和上限不同。播放帧率由素材6的信息覆盖保存8,音频来自素材8,不能保证跨素材同步。三个预览对象仅为历史缓存;未实跑、目标环境未知、转换保持关闭。 + +图片物理支路1+2→4→5四节点均mode4;两LoadImage引用与上传占位分列,mask未接。Preview5原[]零位置;Info11原{}零位置,不能混同缺键/null。 + +两个Concat4/9均保存[2,down,true,null]。准确KJ下排拼接匹配第一幅宽,按第二幅比例计算高度;批次不等时短批次末帧重复到长批次,不能称自动时间对齐。null槽仅为按钮候选,前端身份未知。 + +视频6与8的force_rate均0,按各自源帧时间采样,实际帧率未知。各自skip/cap不同,不推断原片同长、同时起始、同帧率或输出帧数。 + +帧率覆盖链:6槽3→11.video_info;11槽0 loaded_fps→10.frame_rate,覆盖保存8。11其余四输出未接;缓存30.000001657458657不是实际FPS或产物保证。 + +音频链:8槽2→10.audio,来自第二素材;帧率来自第一素材6。VHS按本加载器skip×target_frame_time为音频起点、cap×抽帧后frame_time为时长参数,不是跨素材共同配音或同步证明。 + +合成保存h264-mp4/yuv420p/crf19,loop0不加视频循环,pingpong=false不追加往返,save_metadata=true。save_output=true选择output而非temp;实际运行可能写独立首帧PNG、无声视频和混流文件,中间文件按VHS_KeepIntermediate条件处理。 + +trim_to_audio=false不等于关闭音频;有效waveform存在才混流。准确模板将布尔false转字符串False,加入apad=whole_dur(输出帧数/合成帧率+1)并带-shortest;不自动跨素材同步,实际音轨/时长未知。 + +6/8加载与10合成的meta_batch/vae均未接;10的VHS_FILENAMES未接,不新增独立出口。PreviewImage按core继承实现为临时PNG/UI结果且RETURN_TYPES为空;源mode4不证明当前执行过。 + +三videopreview对象含完整hidden/paused/params/旧filename/type/fullpath/缓存FPS;只纯文本回读,不访问E盘、api/view、媒体或文件。没有模型节点,不编模型依赖。目标安装、素材、输出目录权限、ffmpeg/libx264、动态选项和真实效果未知。 + +源无frontendVersion,不借近版证明恢复或旁路;VHS包内恢复回调与KJ按钮代码分别作参考。所有UE空映射不证明无改写,身份/钩子次序未知,不扩展调查。 + +源物理边:[1, 1, 0, 4, 0, "IMAGE"] + +源物理边:[2, 2, 0, 4, 1, "IMAGE"] + +源物理边:[3, 4, 0, 5, 0, "IMAGE"] + +源物理边:[4, 9, 0, 10, 0, "IMAGE"] + +源物理边:[7, 6, 3, 11, 0, "VHS_VIDEOINFO"] + +源物理边:[8, 11, 0, 10, 4, "FLOAT"] + +源物理边:[10, 6, 0, 9, 0, "IMAGE"] + +源物理边:[11, 8, 0, 9, 1, "IMAGE"] + +源物理边:[14, 8, 2, 10, 1, "AUDIO"] + +节点1 LoadImage mode=4;保存位置=2;原properties={"cnr_id": "comfy-core", "ver": "0.12.3", "ue_properties": {"widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "Node name for S&R": "LoadImage"} + +节点2 LoadImage mode=4;保存位置=2;原properties={"cnr_id": "comfy-core", "ver": "0.12.3", "ue_properties": {"widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "Node name for S&R": "LoadImage"} + +节点5 PreviewImage mode=4;保存位置=0;原properties={"cnr_id": "comfy-core", "ver": "0.12.3", "ue_properties": {"widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "Node name for S&R": "PreviewImage"} + +节点4 ImageConcatMulti mode=4;保存位置=4;原properties={"cnr_id": "comfyui-kjnodes", "ver": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", "ue_properties": {"widget_ue_connectable": {}, "input_ue_unconnectable": {}}} + +节点11 VHS_VideoInfoLoaded mode=0;保存位置=0;原properties={"cnr_id": "comfyui-videohelpersuite", "ver": "1.7.9", "ue_properties": {"widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "Node name for S&R": "VHS_VideoInfoLoaded"} + +节点10 VHS_VideoCombine mode=0;保存位置=11;原properties={"cnr_id": "comfyui-videohelpersuite", "ver": "1.7.9", "ue_properties": {"widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "Node name for S&R": "VHS_VideoCombine"} + +节点8 VHS_LoadVideo mode=0;保存位置=9;原properties={"cnr_id": "comfyui-videohelpersuite", "ver": "1.7.9", "ue_properties": {"widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "Node name for S&R": "VHS_LoadVideo"} + +节点6 VHS_LoadVideo mode=0;保存位置=10;原properties={"cnr_id": "comfyui-videohelpersuite", "ver": "1.7.9", "ue_properties": {"widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "Node name for S&R": "VHS_LoadVideo"} + +节点9 ImageConcatMulti mode=0;保存位置=4;原properties={"cnr_id": "comfyui-kjnodes", "ver": "50a0837f9aea602b184bbf6dbabf66ed2c7a1d22", "ue_properties": {"widget_ue_connectable": {}, "input_ue_unconnectable": {}}} + +### 使用与核对 + +这张图把两路视频画面上下合并;图片支路四节点均为mode4,不能当作已完成双图合成。活动路径为视频6和8→拼接9→合成10:素材6跳过53、上限62,素材8跳过55、上限64,起点和上限不同。播放帧率由素材6的信息覆盖保存8,音频来自素材8,不能保证跨素材同步。三个预览对象仅为历史缓存;未实跑、目标环境未知、转换保持关闭。 + +素材要求:两路可读取视频和可选两张图片;此处只显示引用,不读取、上传或验证素材。没有模型节点,不编模型依赖。 + +操作1:先核本图准确插件/core版本与素材,保持停用;图片支路mode4,不自行当作已启用或完成。 + +操作2:分别核两视频起点53/55与帧上限62/64,确认上下画面顺序6在上8在下、尺寸与批次末帧补齐条件。 + +操作3:核6→11→10帧率覆盖与8→10音频来源;不要用保存8或缓存30.000001657458657判断真实输出。 + +常见问题:画面末尾停住可能来自较短批次重复末帧;声音不齐须先核各素材起点和帧率,不能称自动同步。文件名前缀和旧预览不证明已生成;save_metadata与首帧PNG开关独立。 + +目标安装、素材存在性、目录权限、编码器/动态选项和真实效果待后续获准验证;本轮未执行插件、未构造prompt,未定稿、未实跑。 + +### 逐保存位置说明 + +#### 1. 节点1 · 图片文件引用(image) + +原文件引用纯文本;core实现按EXIF转置、转RGB,同尺寸多帧可组成批次,返回IMAGE/MASK但MASK未接。节点1/2均mode4,不能把两图视为已成功合成。 + +```json +"小云雀_1770719334800_0_m.jpg" +``` + +类:LoadImage;JSON类型:str;角色:scalar。 + +源位置:`/nodes/0/widgets_values/0` + +定义默认:动态input目录枚举,无固定默认;单位:文件引用 + +范围/条件:普通图片文件,image_upload=true + +源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [18] LoadImage schema、EXIF、批次、RGB和MASK输出;nodes.py 1698~1775行;commit cb459573c8fa025bbf9ecf312f6af376d659f567;SHA256 427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38;https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py +- [20] core LoadImage与PreviewImage固定注册;nodes.py 2035~2055行;commit cb459573c8fa025bbf9ecf312f6af376d659f567;SHA256 427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38;https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py + +#### 2. 节点1 · 图片上传选择占位(saved_position_1) + +保存image不是第二张图片,也不证明上传完成;该位置前端身份/恢复次序未核,不借其他前端版本具名。 + +```json +"image" +``` + +类:LoadImage;JSON类型:str;角色:frontend_state_unknown。 + +源位置:`/nodes/0/widgets_values/1` + +定义默认:服务端只声明image;此槽无服务端默认;单位:状态字符串 + +范围/条件:原值image;前端版本缺失 + +源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [18] LoadImage schema、EXIF、批次、RGB和MASK输出;nodes.py 1698~1775行;commit cb459573c8fa025bbf9ecf312f6af376d659f567;SHA256 427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38;https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py + +#### 3. 节点2 · 图片文件引用(image) + +原文件引用纯文本;core实现按EXIF转置、转RGB,同尺寸多帧可组成批次,返回IMAGE/MASK但MASK未接。节点1/2均mode4,不能把两图视为已成功合成。 + +```json +"ComfyUI_00038.png" +``` + +类:LoadImage;JSON类型:str;角色:scalar。 + +源位置:`/nodes/1/widgets_values/0` + +定义默认:动态input目录枚举,无固定默认;单位:文件引用 + +范围/条件:普通图片文件,image_upload=true + +源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [18] LoadImage schema、EXIF、批次、RGB和MASK输出;nodes.py 1698~1775行;commit cb459573c8fa025bbf9ecf312f6af376d659f567;SHA256 427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38;https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py +- [20] core LoadImage与PreviewImage固定注册;nodes.py 2035~2055行;commit cb459573c8fa025bbf9ecf312f6af376d659f567;SHA256 427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38;https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py + +#### 4. 节点2 · 图片上传选择占位(saved_position_1) + +保存image不是第二张图片,也不证明上传完成;该位置前端身份/恢复次序未核,不借其他前端版本具名。 + +```json +"image" +``` + +类:LoadImage;JSON类型:str;角色:frontend_state_unknown。 + +源位置:`/nodes/1/widgets_values/1` + +定义默认:服务端只声明image;此槽无服务端默认;单位:状态字符串 + +范围/条件:原值image;前端版本缺失 + +源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [18] LoadImage schema、EXIF、批次、RGB和MASK输出;nodes.py 1698~1775行;commit cb459573c8fa025bbf9ecf312f6af376d659f567;SHA256 427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38;https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py + +#### 5. 节点4 · 拼接输入数量(inputcount) + +保存2,按image_1与image_2次序逐次拼接;缺少后续输入参考实现使用第一图形状零张量,不证明本图缺失。 + +```json +2 +``` + +类:ImageConcatMulti;JSON类型:int;角色:scalar。 + +源位置:`/nodes/3/widgets_values/0` + +定义默认:2;单位:图像输入 + +范围/条件:2~1000,step1 + +源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [14] ImageConcatMulti自身schema与循环拼接实现;nodes/image_nodes.py 2512~2561行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py +- [15] 批次末帧补齐、宽高匹配、通道补齐与方向拼接;nodes/image_nodes.py 329~425行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py +- [17] KJ注册与类引用;__init__.py 1~180行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 0bc84dab300c15d8421161a97a7e03ddf041b40f9b17377b2450a6075a544cc2;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/__init__.py + +#### 6. 节点4 · 拼接方向(direction) + +保存down,把第二幅画面放在第一幅下方;节点9第一输入来自6,第二来自8。是空间上下拼接,不是时间顺接。 + +```json +"down" +``` + +类:ImageConcatMulti;JSON类型:str;角色:scalar。 + +源位置:`/nodes/3/widgets_values/1` + +定义默认:right;单位:方向 + +范围/条件:right/down/left/up + +源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [14] ImageConcatMulti自身schema与循环拼接实现;nodes/image_nodes.py 2512~2561行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py +- [15] 批次末帧补齐、宽高匹配、通道补齐与方向拼接;nodes/image_nodes.py 329~425行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py +- [17] KJ注册与类引用;__init__.py 1~180行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 0bc84dab300c15d8421161a97a7e03ddf041b40f9b17377b2450a6075a544cc2;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/__init__.py + +#### 7. 节点4 · 匹配图像尺寸(match_image_size) + +保存true;down匹配第一输入宽度,第二输入高度按其原比例int计算,用lanczos/disabled缩放。批次数不同时,较短批次重复末帧补到较长;这不是时间或音频同步。通道不同时以值1补齐缺少通道。 + +```json +true +``` + +类:ImageConcatMulti;JSON类型:bool;角色:scalar。 + +源位置:`/nodes/3/widgets_values/2` + +定义默认:false;单位:布尔 + +范围/条件:true/false + +源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [14] ImageConcatMulti自身schema与循环拼接实现;nodes/image_nodes.py 2512~2561行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py +- [15] 批次末帧补齐、宽高匹配、通道补齐与方向拼接;nodes/image_nodes.py 329~425行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py +- [17] KJ注册与类引用;__init__.py 1~180行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 0bc84dab300c15d8421161a97a7e03ddf041b40f9b17377b2450a6075a544cc2;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/__init__.py + +#### 8. 节点4 · 额外null保存槽(按钮候选)(saved_position_3) + +准确KJ JS会创建值null的Update inputs按钮并按inputcount增删IMAGE输入;缺本图前端版本/UE恢复证据,不能确定第4保存槽最终身份或恢复效果,不作为执行参数。 + +```json +null +``` + +类:ImageConcatMulti;JSON类型:NoneType;角色:frontend_state_unknown。 + +源位置:`/nodes/3/widgets_values/3` + +定义默认:本提交JS创建Update inputs按钮,服务端无此参数;单位:无可确认单位 + +范围/条件:原值null;无frontendVersion,不等同缺键或空对象 + +源mode=4;图片支路旁路,物理连线不证明当前生效。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [16] 本提交创建Update inputs按钮,null槽身份仍缺前端恢复证明;web/js/jsnodes.js 36~66行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 0de818b79c5adf96f0d3a62d11cadfb8e4b8f56ed47ef0b2434935b3ee95af23;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/web/js/jsnodes.js +- [14] ImageConcatMulti自身schema与循环拼接实现;nodes/image_nodes.py 2512~2561行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py + +#### 9. 节点10 · 合成播放帧率(已连线覆盖)(frame_rate) + +保存8不是最终执行值:6槽3→11.video_info,11槽0→10.frame_rate覆盖8。VideoInfoLoaded输出素材6的loaded_fps;实际FPS未知,缓存30.000001657458657不是输出保证。 + +```json +8 +``` + +类:VHS_VideoCombine;JSON类型:int;角色:linked_saved。 + +源位置:`/nodes/5/widgets_values/frame_rate` + +定义默认:8;单位:帧/秒 + +范围/条件:min1,step1;schema未声明max + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [4] 合成schema、目录和独立首帧PNG条件;videohelpersuite/nodes.py 235~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [5] 视频编码、补边、循环、音频波形混流和中间文件条件;videohelpersuite/nodes.py 420~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [7] H264格式、像素格式、CRF和音频裁切模板;video_formats/h264-mp4.json 1~15行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [11] 格式改变时额外控件重建;web/js/VHS.core.js 1222~1282行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [8] VHS包内保存恢复代码;不证明未知前端或UE恢复次序;web/js/VHS.core.js 41~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [3] 模板参数str展开、布尔False转字符串False、元数据临时文件条件;videohelpersuite/nodes.py 48~165行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [6] VideoInfoLoaded按loaded键输出五槽,槽0为loaded_fps;videohelpersuite/nodes.py 941~971行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 10. 节点10 · 视频额外循环(loop_count) + +保存0不追加视频loop滤镜,不把GIF循环0规则套视频。 + +```json +0 +``` + +类:VHS_VideoCombine;JSON类型:int;角色:scalar。 + +源位置:`/nodes/5/widgets_values/loop_count` + +定义默认:0;单位:循环 + +范围/条件:0~100,step1 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [4] 合成schema、目录和独立首帧PNG条件;videohelpersuite/nodes.py 235~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [5] 视频编码、补边、循环、音频波形混流和中间文件条件;videohelpersuite/nodes.py 420~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [7] H264格式、像素格式、CRF和音频裁切模板;video_formats/h264-mp4.json 1~15行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [11] 格式改变时额外控件重建;web/js/VHS.core.js 1222~1282行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [8] VHS包内保存恢复代码;不证明未知前端或UE恢复次序;web/js/VHS.core.js 41~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [3] 模板参数str展开、布尔False转字符串False、元数据临时文件条件;videohelpersuite/nodes.py 48~165行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [6] VideoInfoLoaded按loaded键输出五槽,槽0为loaded_fps;videohelpersuite/nodes.py 941~971行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 11. 节点10 · 输出文件名前缀(filename_prefix) + +保存AnimateDiff参与路径和计数命名;不是已有产物。 + +```json +"AnimateDiff" +``` + +类:VHS_VideoCombine;JSON类型:str;角色:scalar。 + +源位置:`/nodes/5/widgets_values/filename_prefix` + +定义默认:AnimateDiff;单位:路径前缀 + +范围/条件:无schema长度范围;权限与目标目录未知 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [4] 合成schema、目录和独立首帧PNG条件;videohelpersuite/nodes.py 235~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [5] 视频编码、补边、循环、音频波形混流和中间文件条件;videohelpersuite/nodes.py 420~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [7] H264格式、像素格式、CRF和音频裁切模板;video_formats/h264-mp4.json 1~15行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [11] 格式改变时额外控件重建;web/js/VHS.core.js 1222~1282行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [8] VHS包内保存恢复代码;不证明未知前端或UE恢复次序;web/js/VHS.core.js 41~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [3] 模板参数str展开、布尔False转字符串False、元数据临时文件条件;videohelpersuite/nodes.py 48~165行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [6] VideoInfoLoaded按loaded键输出五槽,槽0为loaded_fps;videohelpersuite/nodes.py 941~971行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 12. 节点10 · 合成输出格式(format) + +保存video/h264-mp4走FFmpeg/libx264模板;编码器与目标动态选项未知。 + +```json +"video/h264-mp4" +``` + +类:VHS_VideoCombine;JSON类型:str;角色:scalar。 + +源位置:`/nodes/5/widgets_values/format` + +定义默认:首项image/gif;动态视频格式无唯一目标默认;单位:格式名 + +范围/条件:image/gif、image/webp和动态FFmpeg模板 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [4] 合成schema、目录和独立首帧PNG条件;videohelpersuite/nodes.py 235~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [5] 视频编码、补边、循环、音频波形混流和中间文件条件;videohelpersuite/nodes.py 420~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [7] H264格式、像素格式、CRF和音频裁切模板;video_formats/h264-mp4.json 1~15行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [11] 格式改变时额外控件重建;web/js/VHS.core.js 1222~1282行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [8] VHS包内保存恢复代码;不证明未知前端或UE恢复次序;web/js/VHS.core.js 41~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [3] 模板参数str展开、布尔False转字符串False、元数据临时文件条件;videohelpersuite/nodes.py 48~165行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [6] VideoInfoLoaded按loaded键输出五槽,槽0为loaded_fps;videohelpersuite/nodes.py 941~971行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 13. 节点10 · 视频像素格式(pix_fmt) + +保存yuv420p;视频分支还可能按dim_alignment默认2补边,实际尺寸未知。 + +```json +"yuv420p" +``` + +类:VHS_VideoCombine;JSON类型:str;角色:scalar。 + +源位置:`/nodes/5/widgets_values/pix_fmt` + +定义默认:首项yuv420p;单位:像素格式 + +范围/条件:yuv420p / yuv420p10le + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [4] 合成schema、目录和独立首帧PNG条件;videohelpersuite/nodes.py 235~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [5] 视频编码、补边、循环、音频波形混流和中间文件条件;videohelpersuite/nodes.py 420~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [7] H264格式、像素格式、CRF和音频裁切模板;video_formats/h264-mp4.json 1~15行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [11] 格式改变时额外控件重建;web/js/VHS.core.js 1222~1282行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [8] VHS包内保存恢复代码;不证明未知前端或UE恢复次序;web/js/VHS.core.js 41~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [3] 模板参数str展开、布尔False转字符串False、元数据临时文件条件;videohelpersuite/nodes.py 48~165行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [6] VideoInfoLoaded按loaded键输出五槽,槽0为loaded_fps;videohelpersuite/nodes.py 941~971行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 14. 节点10 · H264质量参数(crf) + +保存19交给libx264的-crf;一般减小会提高质量并可能增大体积,实际效果未测。模板100不保证编码器接受100。 + +```json +19 +``` + +类:VHS_VideoCombine;JSON类型:int;角色:scalar。 + +源位置:`/nodes/5/widgets_values/crf` + +定义默认:19;单位:CRF + +范围/条件:模板0~100,step1;编码器可接受范围另待核 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [4] 合成schema、目录和独立首帧PNG条件;videohelpersuite/nodes.py 235~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [5] 视频编码、补边、循环、音频波形混流和中间文件条件;videohelpersuite/nodes.py 420~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [7] H264格式、像素格式、CRF和音频裁切模板;video_formats/h264-mp4.json 1~15行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [11] 格式改变时额外控件重建;web/js/VHS.core.js 1222~1282行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [8] VHS包内保存恢复代码;不证明未知前端或UE恢复次序;web/js/VHS.core.js 41~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [3] 模板参数str展开、布尔False转字符串False、元数据临时文件条件;videohelpersuite/nodes.py 48~165行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [6] VideoInfoLoaded按loaded键输出五槽,槽0为loaded_fps;videohelpersuite/nodes.py 941~971行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 15. 节点10 · 视频元数据开关(save_metadata) + +保存true在视频元数据条件分支写入信息;独立首帧workflow PNG由VHS_MetadataImage默认true控制。两者不是同一开关。 + +```json +true +``` + +类:VHS_VideoCombine;JSON类型:bool;角色:scalar。 + +源位置:`/nodes/5/widgets_values/save_metadata` + +定义默认:true;单位:布尔 + +范围/条件:true/false;视频元数据分支 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [4] 合成schema、目录和独立首帧PNG条件;videohelpersuite/nodes.py 235~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [5] 视频编码、补边、循环、音频波形混流和中间文件条件;videohelpersuite/nodes.py 420~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [7] H264格式、像素格式、CRF和音频裁切模板;video_formats/h264-mp4.json 1~15行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [11] 格式改变时额外控件重建;web/js/VHS.core.js 1222~1282行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [8] VHS包内保存恢复代码;不证明未知前端或UE恢复次序;web/js/VHS.core.js 41~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [3] 模板参数str展开、布尔False转字符串False、元数据临时文件条件;videohelpersuite/nodes.py 48~165行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [6] VideoInfoLoaded按loaded键输出五槽,槽0为loaded_fps;videohelpersuite/nodes.py 941~971行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 16. 节点10 · 按音频条件裁切(trim_to_audio) + +源false不是关闭音频。准确模板实现把布尔false转成字符串False,混流添加apad=whole_dur(输出帧数/合成帧率+1)并带-shortest;仍不保证跨素材同步或实际完整时长。 + +```json +false +``` + +类:VHS_VideoCombine;JSON类型:bool;角色:scalar。 + +源位置:`/nodes/5/widgets_values/trim_to_audio` + +定义默认:false;单位:布尔 + +范围/条件:仅有效音频波形存在时进入混流 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [4] 合成schema、目录和独立首帧PNG条件;videohelpersuite/nodes.py 235~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [5] 视频编码、补边、循环、音频波形混流和中间文件条件;videohelpersuite/nodes.py 420~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [7] H264格式、像素格式、CRF和音频裁切模板;video_formats/h264-mp4.json 1~15行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [11] 格式改变时额外控件重建;web/js/VHS.core.js 1222~1282行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [8] VHS包内保存恢复代码;不证明未知前端或UE恢复次序;web/js/VHS.core.js 41~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [3] 模板参数str展开、布尔False转字符串False、元数据临时文件条件;videohelpersuite/nodes.py 48~165行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [6] VideoInfoLoaded按loaded键输出五槽,槽0为loaded_fps;videohelpersuite/nodes.py 941~971行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 17. 节点10 · 追加往返帧(pingpong) + +保存false不追加往返帧;不代表素材原先没有倒序。 + +```json +false +``` + +类:VHS_VideoCombine;JSON类型:bool;角色:scalar。 + +源位置:`/nodes/5/widgets_values/pingpong` + +定义默认:false;单位:布尔 + +范围/条件:true/false;meta_batch限制见实现 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [4] 合成schema、目录和独立首帧PNG条件;videohelpersuite/nodes.py 235~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [5] 视频编码、补边、循环、音频波形混流和中间文件条件;videohelpersuite/nodes.py 420~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [7] H264格式、像素格式、CRF和音频裁切模板;video_formats/h264-mp4.json 1~15行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [11] 格式改变时额外控件重建;web/js/VHS.core.js 1222~1282行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [8] VHS包内保存恢复代码;不证明未知前端或UE恢复次序;web/js/VHS.core.js 41~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [3] 模板参数str展开、布尔False转字符串False、元数据临时文件条件;videohelpersuite/nodes.py 48~165行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [6] VideoInfoLoaded按loaded键输出五槽,槽0为loaded_fps;videohelpersuite/nodes.py 941~971行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 18. 节点10 · 保存目录选择(save_output) + +保存true选择正式输出目录;运行可能写首帧PNG、无声视频和-audio混流文件。VHS_KeepIntermediate=false才按条件移除中间文件;本轮GET不执行文件生成。 + +```json +true +``` + +类:VHS_VideoCombine;JSON类型:bool;角色:scalar。 + +源位置:`/nodes/5/widgets_values/save_output` + +定义默认:true;单位:布尔 + +范围/条件:true为output;false为temp;均可能写文件 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [4] 合成schema、目录和独立首帧PNG条件;videohelpersuite/nodes.py 235~420行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [5] 视频编码、补边、循环、音频波形混流和中间文件条件;videohelpersuite/nodes.py 420~625行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [7] H264格式、像素格式、CRF和音频裁切模板;video_formats/h264-mp4.json 1~15行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [11] 格式改变时额外控件重建;web/js/VHS.core.js 1222~1282行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [8] VHS包内保存恢复代码;不证明未知前端或UE恢复次序;web/js/VHS.core.js 41~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [3] 模板参数str展开、布尔False转字符串False、元数据临时文件条件;videohelpersuite/nodes.py 48~165行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [6] VideoInfoLoaded按loaded键输出五槽,槽0为loaded_fps;videohelpersuite/nodes.py 941~971行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 19. 节点10 · 历史预览完整对象(videopreview) + +只代表历史缓存;filename/type/E盘fullpath/workflow PNG/缓存FPS都不是当前产物或可达证明。纯文本显示,不请求api/view或媒体。 + +```json +{ + "hidden": false, + "paused": false, + "params": { + "filename": "AnimateDiff_00011-audio.mp4", + "subfolder": "", + "type": "output", + "format": "video/h264-mp4", + "frame_rate": 30.000001657458657, + "workflow": "AnimateDiff_00011.png", + "fullpath": "E:\\ComfyUI-Data\\output\\AnimateDiff_00011-audio.mp4" + } +} +``` + +类:VHS_VideoCombine;JSON类型:dict;角色:frontend_history。 + +源位置:`/nodes/5/widgets_values/videopreview` + +定义默认:无服务端默认;单位:完整对象 + +范围/条件:hidden/paused/params原样保存;嵌套不重复计数 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [10] 预览控件保存历史状态;web/js/VHS.core.js 915~970行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [8] VHS包内保存恢复代码;不证明未知前端或UE恢复次序;web/js/VHS.core.js 41~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 20. 节点8 · 视频文件引用(video) + +保存引用,不证明素材存在、音轨存在或实际已上传。 + +```json +"2月10日.mp4" +``` + +类:VHS_LoadVideo;JSON类型:str;角色:scalar。 + +源位置:`/nodes/6/widgets_values/video` + +定义默认:动态input目录枚举,无固定默认;单位:文件引用 + +范围/条件:只枚举普通文件webm/mp4/mkv/gif/mov + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [0] 加载格式、尺寸对齐、采样、跳过和上限;videohelpersuite/load_video_nodes.py 22~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [1] 内存条件、音频起点和时长参数、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 +- [2] 上传加载schema、输出槽和文件引用验证;videohelpersuite/load_video_nodes.py 423~477行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [12] BIGMAX、DIMMAX、floatOrInt;videohelpersuite/utils.py 20~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [9] 格式回调和上传选择控件;web/js/VHS.core.js 648~824行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 21. 节点8 · 加载采样帧率(force_rate) + +两加载器保存0表示按源帧时间采样,不代表实际FPS为0,也不保证两素材同帧率。 + +```json +0 +``` + +类:VHS_LoadVideo;JSON类型:int;角色:scalar。 + +源位置:`/nodes/6/widgets_values/force_rate` + +定义默认:0;单位:帧/秒 + +范围/条件:0~60,step1;0禁用强制重采样 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [0] 加载格式、尺寸对齐、采样、跳过和上限;videohelpersuite/load_video_nodes.py 22~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [1] 内存条件、音频起点和时长参数、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 +- [2] 上传加载schema、输出槽和文件引用验证;videohelpersuite/load_video_nodes.py 423~477行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [12] BIGMAX、DIMMAX、floatOrInt;videohelpersuite/utils.py 20~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [9] 格式回调和上传选择控件;web/js/VHS.core.js 648~824行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 22. 节点8 · 自定义加载宽度(custom_width) + +宽高均0从媒体尺寸出发,仍受AnimateDiff的dim8对齐;不是保证原尺寸。 + +```json +0 +``` + +类:VHS_LoadVideo;JSON类型:int;角色:scalar。 + +源位置:`/nodes/6/widgets_values/custom_width` + +定义默认:0;单位:像素 + +范围/条件:0~8192;0不指定 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [0] 加载格式、尺寸对齐、采样、跳过和上限;videohelpersuite/load_video_nodes.py 22~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [1] 内存条件、音频起点和时长参数、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 +- [2] 上传加载schema、输出槽和文件引用验证;videohelpersuite/load_video_nodes.py 423~477行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [12] BIGMAX、DIMMAX、floatOrInt;videohelpersuite/utils.py 20~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [9] 格式回调和上传选择控件;web/js/VHS.core.js 648~824行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 23. 节点8 · 自定义加载高度(custom_height) + +单边指定时按比例计算另一边;两边0仍受格式对齐,不读取真实尺寸。 + +```json +0 +``` + +类:VHS_LoadVideo;JSON类型:int;角色:scalar。 + +源位置:`/nodes/6/widgets_values/custom_height` + +定义默认:0;单位:像素 + +范围/条件:0~8192;0不指定 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [0] 加载格式、尺寸对齐、采样、跳过和上限;videohelpersuite/load_video_nodes.py 22~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [1] 内存条件、音频起点和时长参数、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 +- [2] 上传加载schema、输出槽和文件引用验证;videohelpersuite/load_video_nodes.py 423~477行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [12] BIGMAX、DIMMAX、floatOrInt;videohelpersuite/utils.py 20~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [9] 格式回调和上传选择控件;web/js/VHS.core.js 648~824行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 24. 节点8 · 加载帧数上限(frame_load_cap) + +素材6保存62、素材8保存64,分别限制加载数量;不是保证实际帧数、同长或对齐。仍受素材、内存和格式条件限制。 + +```json +64 +``` + +类:VHS_LoadVideo;JSON类型:int;角色:scalar。 + +源位置:`/nodes/6/widgets_values/frame_load_cap` + +定义默认:0;单位:采样帧 + +范围/条件:0~2**53-1,step1;0不设此上限 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [0] 加载格式、尺寸对齐、采样、跳过和上限;videohelpersuite/load_video_nodes.py 22~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [1] 内存条件、音频起点和时长参数、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 +- [2] 上传加载schema、输出槽和文件引用验证;videohelpersuite/load_video_nodes.py 423~477行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [12] BIGMAX、DIMMAX、floatOrInt;videohelpersuite/utils.py 20~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [9] 格式回调和上传选择控件;web/js/VHS.core.js 648~824行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 25. 节点8 · 跳过起始采样帧(skip_first_frames) + +素材6保存53、素材8保存55;采样后计数,各自起点不同,不是跨素材时间同步。音频参考起点为本加载器skip乘target_frame_time。 + +```json +55 +``` + +类:VHS_LoadVideo;JSON类型:int;角色:scalar。 + +源位置:`/nodes/6/widgets_values/skip_first_frames` + +定义默认:0;单位:采样帧 + +范围/条件:0~2**53-1,step1 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [0] 加载格式、尺寸对齐、采样、跳过和上限;videohelpersuite/load_video_nodes.py 22~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [1] 内存条件、音频起点和时长参数、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 +- [2] 上传加载schema、输出槽和文件引用验证;videohelpersuite/load_video_nodes.py 423~477行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [12] BIGMAX、DIMMAX、floatOrInt;videohelpersuite/utils.py 20~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [9] 格式回调和上传选择控件;web/js/VHS.core.js 648~824行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 26. 节点8 · 间隔抽取采样帧(select_every_nth) + +保存1不再间隔删帧;增大值改变loaded_fps和音频时长参数,不能自动对齐另一素材。 + +```json +1 +``` + +类:VHS_LoadVideo;JSON类型:int;角色:scalar。 + +源位置:`/nodes/6/widgets_values/select_every_nth` + +定义默认:1;单位:间隔 + +范围/条件:1~2**53-1,step1 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [0] 加载格式、尺寸对齐、采样、跳过和上限;videohelpersuite/load_video_nodes.py 22~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [1] 内存条件、音频起点和时长参数、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 +- [2] 上传加载schema、输出槽和文件引用验证;videohelpersuite/load_video_nodes.py 423~477行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [12] BIGMAX、DIMMAX、floatOrInt;videohelpersuite/utils.py 20~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [9] 格式回调和上传选择控件;web/js/VHS.core.js 648~824行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 27. 节点8 · 加载格式约束(format) + +保存AnimateDiff有内置target_rate8和dim8;Python尺寸约束不等于强制把保存force0重写8。未知前端回调/恢复顺序不作保证。 + +```json +"AnimateDiff" +``` + +类:VHS_LoadVideo;JSON类型:str;角色:scalar。 + +源位置:`/nodes/6/widgets_values/format` + +定义默认:AnimateDiff;单位:格式名 + +范围/条件:内置格式与核心动态扩展,目标选项未知 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [0] 加载格式、尺寸对齐、采样、跳过和上限;videohelpersuite/load_video_nodes.py 22~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [1] 内存条件、音频起点和时长参数、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 +- [2] 上传加载schema、输出槽和文件引用验证;videohelpersuite/load_video_nodes.py 423~477行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [12] BIGMAX、DIMMAX、floatOrInt;videohelpersuite/utils.py 20~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [9] 格式回调和上传选择控件;web/js/VHS.core.js 648~824行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 28. 节点8 · 历史预览完整对象(videopreview) + +只代表历史缓存;filename/type/E盘fullpath/workflow PNG/缓存FPS都不是当前产物或可达证明。纯文本显示,不请求api/view或媒体。 + +```json +{ + "hidden": false, + "paused": false, + "params": { + "filename": "2月10日.mp4", + "type": "input", + "format": "video/mp4", + "force_rate": 0, + "custom_width": 0, + "custom_height": 0, + "frame_load_cap": 64, + "skip_first_frames": 55, + "select_every_nth": 1 + } +} +``` + +类:VHS_LoadVideo;JSON类型:dict;角色:frontend_history。 + +源位置:`/nodes/6/widgets_values/videopreview` + +定义默认:无服务端默认;单位:完整对象 + +范围/条件:hidden/paused/params原样保存;嵌套不重复计数 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [10] 预览控件保存历史状态;web/js/VHS.core.js 915~970行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [8] VHS包内保存恢复代码;不证明未知前端或UE恢复次序;web/js/VHS.core.js 41~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 29. 节点6 · 视频文件引用(video) + +保存引用,不证明素材存在、音轨存在或实际已上传。 + +```json +"小云雀_1770719334800_0_m.mp4" +``` + +类:VHS_LoadVideo;JSON类型:str;角色:scalar。 + +源位置:`/nodes/7/widgets_values/video` + +定义默认:动态input目录枚举,无固定默认;单位:文件引用 + +范围/条件:只枚举普通文件webm/mp4/mkv/gif/mov + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [0] 加载格式、尺寸对齐、采样、跳过和上限;videohelpersuite/load_video_nodes.py 22~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [1] 内存条件、音频起点和时长参数、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 +- [2] 上传加载schema、输出槽和文件引用验证;videohelpersuite/load_video_nodes.py 423~477行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [12] BIGMAX、DIMMAX、floatOrInt;videohelpersuite/utils.py 20~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [9] 格式回调和上传选择控件;web/js/VHS.core.js 648~824行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 30. 节点6 · 加载采样帧率(force_rate) + +两加载器保存0表示按源帧时间采样,不代表实际FPS为0,也不保证两素材同帧率。 + +```json +0 +``` + +类:VHS_LoadVideo;JSON类型:int;角色:scalar。 + +源位置:`/nodes/7/widgets_values/force_rate` + +定义默认:0;单位:帧/秒 + +范围/条件:0~60,step1;0禁用强制重采样 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [0] 加载格式、尺寸对齐、采样、跳过和上限;videohelpersuite/load_video_nodes.py 22~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [1] 内存条件、音频起点和时长参数、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 +- [2] 上传加载schema、输出槽和文件引用验证;videohelpersuite/load_video_nodes.py 423~477行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [12] BIGMAX、DIMMAX、floatOrInt;videohelpersuite/utils.py 20~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [9] 格式回调和上传选择控件;web/js/VHS.core.js 648~824行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 31. 节点6 · 自定义加载宽度(custom_width) + +宽高均0从媒体尺寸出发,仍受AnimateDiff的dim8对齐;不是保证原尺寸。 + +```json +0 +``` + +类:VHS_LoadVideo;JSON类型:int;角色:scalar。 + +源位置:`/nodes/7/widgets_values/custom_width` + +定义默认:0;单位:像素 + +范围/条件:0~8192;0不指定 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [0] 加载格式、尺寸对齐、采样、跳过和上限;videohelpersuite/load_video_nodes.py 22~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [1] 内存条件、音频起点和时长参数、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 +- [2] 上传加载schema、输出槽和文件引用验证;videohelpersuite/load_video_nodes.py 423~477行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [12] BIGMAX、DIMMAX、floatOrInt;videohelpersuite/utils.py 20~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [9] 格式回调和上传选择控件;web/js/VHS.core.js 648~824行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 32. 节点6 · 自定义加载高度(custom_height) + +单边指定时按比例计算另一边;两边0仍受格式对齐,不读取真实尺寸。 + +```json +0 +``` + +类:VHS_LoadVideo;JSON类型:int;角色:scalar。 + +源位置:`/nodes/7/widgets_values/custom_height` + +定义默认:0;单位:像素 + +范围/条件:0~8192;0不指定 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [0] 加载格式、尺寸对齐、采样、跳过和上限;videohelpersuite/load_video_nodes.py 22~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [1] 内存条件、音频起点和时长参数、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 +- [2] 上传加载schema、输出槽和文件引用验证;videohelpersuite/load_video_nodes.py 423~477行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [12] BIGMAX、DIMMAX、floatOrInt;videohelpersuite/utils.py 20~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [9] 格式回调和上传选择控件;web/js/VHS.core.js 648~824行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 33. 节点6 · 加载帧数上限(frame_load_cap) + +素材6保存62、素材8保存64,分别限制加载数量;不是保证实际帧数、同长或对齐。仍受素材、内存和格式条件限制。 + +```json +62 +``` + +类:VHS_LoadVideo;JSON类型:int;角色:scalar。 + +源位置:`/nodes/7/widgets_values/frame_load_cap` + +定义默认:0;单位:采样帧 + +范围/条件:0~2**53-1,step1;0不设此上限 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [0] 加载格式、尺寸对齐、采样、跳过和上限;videohelpersuite/load_video_nodes.py 22~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [1] 内存条件、音频起点和时长参数、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 +- [2] 上传加载schema、输出槽和文件引用验证;videohelpersuite/load_video_nodes.py 423~477行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [12] BIGMAX、DIMMAX、floatOrInt;videohelpersuite/utils.py 20~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [9] 格式回调和上传选择控件;web/js/VHS.core.js 648~824行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 34. 节点6 · 跳过起始采样帧(skip_first_frames) + +素材6保存53、素材8保存55;采样后计数,各自起点不同,不是跨素材时间同步。音频参考起点为本加载器skip乘target_frame_time。 + +```json +53 +``` + +类:VHS_LoadVideo;JSON类型:int;角色:scalar。 + +源位置:`/nodes/7/widgets_values/skip_first_frames` + +定义默认:0;单位:采样帧 + +范围/条件:0~2**53-1,step1 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [0] 加载格式、尺寸对齐、采样、跳过和上限;videohelpersuite/load_video_nodes.py 22~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [1] 内存条件、音频起点和时长参数、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 +- [2] 上传加载schema、输出槽和文件引用验证;videohelpersuite/load_video_nodes.py 423~477行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [12] BIGMAX、DIMMAX、floatOrInt;videohelpersuite/utils.py 20~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [9] 格式回调和上传选择控件;web/js/VHS.core.js 648~824行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 35. 节点6 · 间隔抽取采样帧(select_every_nth) + +保存1不再间隔删帧;增大值改变loaded_fps和音频时长参数,不能自动对齐另一素材。 + +```json +1 +``` + +类:VHS_LoadVideo;JSON类型:int;角色:scalar。 + +源位置:`/nodes/7/widgets_values/select_every_nth` + +定义默认:1;单位:间隔 + +范围/条件:1~2**53-1,step1 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [0] 加载格式、尺寸对齐、采样、跳过和上限;videohelpersuite/load_video_nodes.py 22~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [1] 内存条件、音频起点和时长参数、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 +- [2] 上传加载schema、输出槽和文件引用验证;videohelpersuite/load_video_nodes.py 423~477行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [12] BIGMAX、DIMMAX、floatOrInt;videohelpersuite/utils.py 20~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [9] 格式回调和上传选择控件;web/js/VHS.core.js 648~824行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 36. 节点6 · 加载格式约束(format) + +保存AnimateDiff有内置target_rate8和dim8;Python尺寸约束不等于强制把保存force0重写8。未知前端回调/恢复顺序不作保证。 + +```json +"AnimateDiff" +``` + +类:VHS_LoadVideo;JSON类型:str;角色:scalar。 + +源位置:`/nodes/7/widgets_values/format` + +定义默认:AnimateDiff;单位:格式名 + +范围/条件:内置格式与核心动态扩展,目标选项未知 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [0] 加载格式、尺寸对齐、采样、跳过和上限;videohelpersuite/load_video_nodes.py 22~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [1] 内存条件、音频起点和时长参数、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 +- [2] 上传加载schema、输出槽和文件引用验证;videohelpersuite/load_video_nodes.py 423~477行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [12] BIGMAX、DIMMAX、floatOrInt;videohelpersuite/utils.py 20~56行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [9] 格式回调和上传选择控件;web/js/VHS.core.js 648~824行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [13] VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 1023~1050行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 37. 节点6 · 上传选择保存状态(choose video to upload) + +节点6保存image仅是选择控件状态,不证明上传成功,不替换video文件引用。 + +```json +"image" +``` + +类:VHS_LoadVideo;JSON类型:str;角色:frontend_state。 + +源位置:`/nodes/7/widgets_values/choose video to upload` + +定义默认:无服务端默认;单位:状态字符串 + +范围/条件:不是服务端video参数 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [9] 格式回调和上传选择控件;web/js/VHS.core.js 648~824行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [8] VHS包内保存恢复代码;不证明未知前端或UE恢复次序;web/js/VHS.core.js 41~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 38. 节点6 · 历史预览完整对象(videopreview) + +只代表历史缓存;filename/type/E盘fullpath/workflow PNG/缓存FPS都不是当前产物或可达证明。纯文本显示,不请求api/view或媒体。 + +```json +{ + "hidden": false, + "paused": false, + "params": { + "filename": "小云雀_1770719334800_0_m.mp4", + "type": "input", + "format": "video/mp4", + "force_rate": 0, + "custom_width": 0, + "custom_height": 0, + "frame_load_cap": 62, + "skip_first_frames": 53, + "select_every_nth": 1 + } +} +``` + +类:VHS_LoadVideo;JSON类型:dict;角色:frontend_history。 + +源位置:`/nodes/7/widgets_values/videopreview` + +定义默认:无服务端默认;单位:完整对象 + +范围/条件:hidden/paused/params原样保存;嵌套不重复计数 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [10] 预览控件保存历史状态;web/js/VHS.core.js 915~970行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip +- [8] VHS包内保存恢复代码;不证明未知前端或UE恢复次序;web/js/VHS.core.js 41~168行;commit 发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +#### 39. 节点9 · 拼接输入数量(inputcount) + +保存2,按image_1与image_2次序逐次拼接;缺少后续输入参考实现使用第一图形状零张量,不证明本图缺失。 + +```json +2 +``` + +类:ImageConcatMulti;JSON类型:int;角色:scalar。 + +源位置:`/nodes/8/widgets_values/0` + +定义默认:2;单位:图像输入 + +范围/条件:2~1000,step1 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [14] ImageConcatMulti自身schema与循环拼接实现;nodes/image_nodes.py 2512~2561行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py +- [15] 批次末帧补齐、宽高匹配、通道补齐与方向拼接;nodes/image_nodes.py 329~425行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py +- [17] KJ注册与类引用;__init__.py 1~180行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 0bc84dab300c15d8421161a97a7e03ddf041b40f9b17377b2450a6075a544cc2;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/__init__.py + +#### 40. 节点9 · 拼接方向(direction) + +保存down,把第二幅画面放在第一幅下方;节点9第一输入来自6,第二来自8。是空间上下拼接,不是时间顺接。 + +```json +"down" +``` + +类:ImageConcatMulti;JSON类型:str;角色:scalar。 + +源位置:`/nodes/8/widgets_values/1` + +定义默认:right;单位:方向 + +范围/条件:right/down/left/up + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [14] ImageConcatMulti自身schema与循环拼接实现;nodes/image_nodes.py 2512~2561行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py +- [15] 批次末帧补齐、宽高匹配、通道补齐与方向拼接;nodes/image_nodes.py 329~425行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py +- [17] KJ注册与类引用;__init__.py 1~180行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 0bc84dab300c15d8421161a97a7e03ddf041b40f9b17377b2450a6075a544cc2;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/__init__.py + +#### 41. 节点9 · 匹配图像尺寸(match_image_size) + +保存true;down匹配第一输入宽度,第二输入高度按其原比例int计算,用lanczos/disabled缩放。批次数不同时,较短批次重复末帧补到较长;这不是时间或音频同步。通道不同时以值1补齐缺少通道。 + +```json +true +``` + +类:ImageConcatMulti;JSON类型:bool;角色:scalar。 + +源位置:`/nodes/8/widgets_values/2` + +定义默认:false;单位:布尔 + +范围/条件:true/false + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [14] ImageConcatMulti自身schema与循环拼接实现;nodes/image_nodes.py 2512~2561行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py +- [15] 批次末帧补齐、宽高匹配、通道补齐与方向拼接;nodes/image_nodes.py 329~425行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py +- [17] KJ注册与类引用;__init__.py 1~180行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 0bc84dab300c15d8421161a97a7e03ddf041b40f9b17377b2450a6075a544cc2;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/__init__.py + +#### 42. 节点9 · 额外null保存槽(按钮候选)(saved_position_3) + +准确KJ JS会创建值null的Update inputs按钮并按inputcount增删IMAGE输入;缺本图前端版本/UE恢复证据,不能确定第4保存槽最终身份或恢复效果,不作为执行参数。 + +```json +null +``` + +类:ImageConcatMulti;JSON类型:NoneType;角色:frontend_state_unknown。 + +源位置:`/nodes/8/widgets_values/3` + +定义默认:本提交JS创建Update inputs按钮,服务端无此参数;单位:无可确认单位 + +范围/条件:原值null;无frontendVersion,不等同缺键或空对象 + +源mode=0;视频支路活动保存态;未执行。无frontendVersion;UE空映射不等于无影响,身份/次序/动态选项未知。位置数组只按本版schema解释,不是最终prompt证明。 + +依据: +- [16] 本提交创建Update inputs按钮,null槽身份仍缺前端恢复证明;web/js/jsnodes.js 36~66行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 0de818b79c5adf96f0d3a62d11cadfb8e4b8f56ed47ef0b2434935b3ee95af23;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/web/js/jsnodes.js +- [14] ImageConcatMulti自身schema与循环拼接实现;nodes/image_nodes.py 2512~2561行;commit 50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py + +### 零保存节点与源注释 + +5 PreviewImage:原widgets_values=[];mode4,继承SaveImage临时PNG/UI输出,无返回类型,未实跑。 + +11 VHS_VideoInfoLoaded:原widgets_values={};视频信息槽0 loaded_fps覆盖合成10保存8,其余四槽未接。 + +### 固定原件索引 + +0. 加载格式、尺寸对齐、采样、跳过和上限;videohelpersuite/load_video_nodes.py 第22~168行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +1. 内存条件、音频起点和时长参数、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 + +2. 上传加载schema、输出槽和文件引用验证;videohelpersuite/load_video_nodes.py 第423~477行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 8991b715a999408c3821045e2a781609a156476d771325679e9ad9ca16db0aee;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +3. 模板参数str展开、布尔False转字符串False、元数据临时文件条件;videohelpersuite/nodes.py 第48~165行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +4. 合成schema、目录和独立首帧PNG条件;videohelpersuite/nodes.py 第235~420行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +5. 视频编码、补边、循环、音频波形混流和中间文件条件;videohelpersuite/nodes.py 第420~625行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +6. VideoInfoLoaded按loaded键输出五槽,槽0为loaded_fps;videohelpersuite/nodes.py 第941~971行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +7. H264格式、像素格式、CRF和音频裁切模板;video_formats/h264-mp4.json 第1~15行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 736ca4a7057d26ae25cc57c5d686afbc95980c439199c17c8be02b3136cb57b8;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +8. VHS包内保存恢复代码;不证明未知前端或UE恢复次序;web/js/VHS.core.js 第41~168行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +9. 格式回调和上传选择控件;web/js/VHS.core.js 第648~824行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +10. 预览控件保存历史状态;web/js/VHS.core.js 第915~970行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +11. 格式改变时额外控件重建;web/js/VHS.core.js 第1222~1282行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 437b2b9745df24372a0ec686483e7ac1aa9b08b0f32db4eda9a8b0d66ca9023f;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +12. BIGMAX、DIMMAX、floatOrInt;videohelpersuite/utils.py 第20~56行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 ea3d02e0f41dc6b59685fcf6de9217d4b7729766e05e44200433c74e75466a6a;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +13. VHS加载、合成和视频信息注册;videohelpersuite/nodes.py 第1023~1050行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 6d975d8fd8906784a4d9233ccc1238150ed33c6311d06c53fd08b5ee96e30442;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +14. ImageConcatMulti自身schema与循环拼接实现;nodes/image_nodes.py 第2512~2561行;提交50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py + +15. 批次末帧补齐、宽高匹配、通道补齐与方向拼接;nodes/image_nodes.py 第329~425行;提交50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 a5982610011e3d813c57fdbeedecfd59012ab601ceb050784e0072e0c1a75feb;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/nodes/image_nodes.py + +16. 本提交创建Update inputs按钮,null槽身份仍缺前端恢复证明;web/js/jsnodes.js 第36~66行;提交50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 0de818b79c5adf96f0d3a62d11cadfb8e4b8f56ed47ef0b2434935b3ee95af23;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/web/js/jsnodes.js + +17. KJ注册与类引用;__init__.py 第1~180行;提交50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 0bc84dab300c15d8421161a97a7e03ddf041b40f9b17377b2450a6075a544cc2;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/__init__.py + +18. LoadImage schema、EXIF、批次、RGB和MASK输出;nodes.py 第1698~1775行;提交cb459573c8fa025bbf9ecf312f6af376d659f567;SHA256 427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38;https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py + +19. PreviewImage继承保存实现,临时PNG/UI结果,无返回类型;nodes.py 第1625~1697行;提交cb459573c8fa025bbf9ecf312f6af376d659f567;SHA256 427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38;https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py + +20. core LoadImage与PreviewImage固定注册;nodes.py 第2035~2055行;提交cb459573c8fa025bbf9ecf312f6af376d659f567;SHA256 427178d863c34f4255bcf549ee5bfbec8e73141beaed4c1b237810b8cf459a38;https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/nodes.py + +21. 准确版本许可原文;LICENSE 第1~674行;提交发布包SHA256:ac63991d8b237afe5b2cd2b287a14b4a4d40ff203c0f2ee9d5fe61059f57cdf8;SHA256 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986;https://cdn.comfy.org/kosinkadink/comfyui-videohelpersuite/1.7.9/node.zip + +22. 准确版本许可原文;LICENSE 第1~674行;提交50a0837f9aea602b184bbf6dbabf66ed2c7a1d22;SHA256 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986;https://raw.githubusercontent.com/kijai/ComfyUI-KJNodes/50a0837f9aea602b184bbf6dbabf66ed2c7a1d22/LICENSE + +23. 准确版本许可原文;LICENSE 第1~674行;提交cb459573c8fa025bbf9ecf312f6af376d659f567;SHA256 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986;https://raw.githubusercontent.com/Comfy-Org/ComfyUI/cb459573c8fa025bbf9ecf312f6af376d659f567/LICENSE diff --git a/e2e/concat-document.mjs b/e2e/concat-document.mjs new file mode 100644 index 00000000..a1ab0c37 --- /dev/null +++ b/e2e/concat-document.mjs @@ -0,0 +1,101 @@ +// Local GET-only: new concat 42 positions and twenty frozen summaries. +import fs from 'node:fs'; +import assert from 'node:assert/strict'; +const { chromium } = await import(process.env.PLAYWRIGHT_MODULE || 'playwright'); +const out='.local-evidence/concat-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(route.request().method()!=='GET'||u.hostname!=='127.0.0.1'||u.pathname==='/api/view'||(/\.(mp4|png|wav|mp3|webm)$/i.test(u.pathname)&&u.pathname!=='/favicon.png')){errors.push('Forbidden request '+u);return route.abort();} + return route.continue(); + }); + page.on('request',r=>{if(r.url().includes('/api/'))requests.push({method:r.method(),url:r.url()});}); + page.on('pageerror',e=>errors.push(e.message)); + requests.push({method:'GET',url:'http://127.0.0.1:8247/api/workflows'}); + const records=await(await fetch('http://127.0.0.1:8247/api/workflows')).json(); + const names=['双图像或视频合并显示','视频转gif动图图片','加载图片合成视频','视频倒放','NLF_视频人物动作骨架获取','openpose-video-姿态检测','sdpose_视频人物姿势骨架提取','gemma4_提示词反推(图像视频音频)','图像合并成四宫格','图像分割-多宫格分割','Qwen_image2.1_图像编辑_背景移除','Qwen_image2.1_图像编辑_提示词增强','Qwen_image2.1_文生图_提示词增强','ControlNet_aux_常用样例','Qwen3-ASR-语音转文字','Qwen3-ASR-Subtitle语音转字幕','Minimax-H3提示词增强','音频转MP3格式','音频人声分离','视频-音频分离','图像嵌入文字描述']; + const details=[]; + for(const name of names){const r=records.find(r=>r.name===name);assert.ok(r);const url=`http://127.0.0.1:8247/api/workflows/${r.id}`;requests.push({method:'GET',url});details.push(await(await fetch(url)).json());} + check(details.length===21&&details.reduce((n,d)=>n+d.doc_json.fixed_version.fields.length,0)===618,'21图618保存位置'); + check(details.reduce((n,d)=>n+(d.doc_json.source_notes?.length||0),0)===15,'21图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=details.indexOf(d)<1?'new_concat':'old_twenty';const b=d.doc_json.fixed_version,button=await begin(d.name);await loaded(); + const overview=dialog.locator('.card').filter({has:page.getByText('用途与来源',{exact:true})}); + check((await overview.innerText()).includes(b.user_overview),`${width} ${d.name}默认中文用途`); + check(!(await dialog.getByText('源图与审校记录',{exact:true}).locator('..').evaluate(el=>el.open)),`${width} ${d.name}源审校默认折叠`); + check(!(await dialog.getByText('核对范围与来源依据',{exact:true}).locator('..').evaluate(el=>el.open)),`${width} ${d.name}技术范围默认折叠`); + const visible=await fixedCard.innerText(); + check(!visible.includes('执行标量')&&!visible.includes('widgetId')&&!visible.includes(b.source_sha256)&&!visible.includes('UUID'),`${width} ${d.name}默认无执行计数/实现标识`); + check(visible.includes('依据固定版本整理,目标环境与实际效果未核对。'),`${width} ${d.name}默认依据限制可见`); + for(const t of ['说明未定稿','未验证实跑','未检查'])check((await dialog.innerText()).includes(t),`${width} ${d.name} ${t}`); + check(!d.is_enabled&&!d.doc_completed_at&&!d.exec_verified_at,`${width} ${d.name}停用/时间戳空`); + check(await fixedCard.locator('summary').filter({hasText:/^节点 [\d:]+ · /}).count()===b.fields.length,`${width} ${d.name}参数全保留`); + check(await dialog.locator('.drawer-body').evaluate(el=>el.scrollWidth<=el.clientWidth),`${width} ${d.name}默认无溢出`); + await dialog.locator('.drawer-body').evaluate(el=>el.scrollTop=0); + if(details.indexOf(d)<1)await page.screenshot({path:`${out}/${width}-${d.id}-default.png`}); + if(details.indexOf(d)>0){await page.keyboard.press('Escape');await dialog.waitFor({state:'hidden'});check(await button.evaluate(el=>el===document.activeElement),`${width} ${d.name}旧图归还焦点`);continue;} + await dialog.getByText('源图与审校记录',{exact:true}).click(); + check((await overview.innerText()).includes(d.doc_json.purpose)&&(await overview.innerText()).includes(d.source_repo_path),`${width} ${d.name}原用途/源路径展开保留`); + await dialog.getByText('核对范围与来源依据',{exact:true}).click(); + const flowText=await fixedCard.innerText(); + for(const line of b.flow)check(flowText.includes(line),`${width} ${d.name}展开流程 ${b.flow.indexOf(line)}`); + 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','trim_to_audio','match_image_size','saved_position_3','videopreview'].includes(f.field))await page.screenshot({path:`${out}/${width}-${d.id}-${f.node_id}-${f.field}.png`}); + await summary.click(); + } + for(const n of b.comments){const summary=dialog.getByText(`节点 ${n.node_id}`,{exact:true});await summary.click();const expected=d.doc_json.source_notes.find(x=>String(x.node_id)===n.node_id);check(await summary.locator('..').locator('pre').textContent()===JSON.stringify(expected.content,null,2),`${width}注释${n.node_id}全文`);check(await dialog.locator('.drawer-body').evaluate(el=>el.scrollWidth<=el.clientWidth),`${width}注释${n.node_id}无溢出`);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='仅纯文本'; + 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()===details[1].doc_json.fixed_version.fields.length,'迟到合并图响应不覆盖旧GIF摘要/26字段');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无写/生成/目标/历史预览请求'); + const polling=requests.filter(r=>['/api/jobs','/api/events'].includes(new URL(r.url).pathname)); + const fixed=requests.filter(r=>!polling.includes(r)); + const frequencies=rs=>Object.fromEntries([...new Set(rs.map(r=>new URL(r.url).pathname))].sort().map(p=>[p,rs.filter(r=>new URL(r.url).pathname===p).length])); + fs.writeFileSync(`${out}/browser-results.json`,JSON.stringify({request_accounting:{fixed_count:fixed.length,fixed_paths:frequencies(fixed),polling_count:polling.length,polling_paths:frequencies(polling),polling_tolerance:1,reason:'定时轮询可因浏览耗时与计时器边界相差±1;固定请求逐条保存,不忽略真实新请求,禁止请求零容忍。'},assertion_count:checks.length,assertionGroups,checks,requests,errors,blockedFonts,viewports:[1440,390]},null,2)); +} finally {await browser.close();} diff --git a/e2e/run-concat-document.py b/e2e/run-concat-document.py new file mode 100644 index 00000000..fc6c7a2d --- /dev/null +++ b/e2e/run-concat-document.py @@ -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/concat-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 = ["concat"] + 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()