diff --git a/example_workflows/hyvideo_dashtoon_keyframe_example_01.json b/example_workflows/hyvideo_dashtoon_keyframe_example_01.json new file mode 100644 index 0000000..ff029f6 --- /dev/null +++ b/example_workflows/hyvideo_dashtoon_keyframe_example_01.json @@ -0,0 +1,2143 @@ +{ + "last_node_id": 154, + "last_link_id": 319, + "nodes": [ + { + "id": 61, + "type": "Note", + "pos": [ + -1434.390625, + -1056.519775390625 + ], + "size": [ + 258.9027099609375, + 88 + ], + "flags": {}, + "order": 0, + "mode": 2, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "If you have working Triton install, torch compile will reduce VRAM use and increase speed about 30%" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 94, + "type": "Reroute", + "pos": [ + -325.2616271972656, + -281.5520935058594 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 22, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 174 + } + ], + "outputs": [ + { + "name": "", + "type": "VAE", + "links": [ + 175, + 243 + ], + "slot_index": 0 + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 57, + "type": "HyVideoTorchCompileSettings", + "pos": [ + -1440, + -920 + ], + "size": [ + 441, + 274 + ], + "flags": {}, + "order": 1, + "mode": 2, + "inputs": [], + "outputs": [ + { + "name": "torch_compile_args", + "type": "COMPILEARGS", + "links": [], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoTorchCompileSettings" + }, + "widgets_values": [ + "inductor", + false, + "default", + false, + 64, + true, + true, + false, + false, + false + ], + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 90, + "type": "HyVideoSampler", + "pos": [ + 259.2420349121094, + -197.0081024169922 + ], + "size": [ + 339.4956970214844, + 1123.81591796875 + ], + "flags": {}, + "order": 34, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "HYVIDEOMODEL", + "link": 162 + }, + { + "name": "hyvid_embeds", + "type": "HYVIDEMBEDS", + "link": 229 + }, + { + "name": "samples", + "type": "LATENT", + "shape": 7, + "link": null + }, + { + "name": "image_cond_latents", + "type": "LATENT", + "shape": 7, + "link": 245 + }, + { + "name": "stg_args", + "type": "STGARGS", + "shape": 7, + "link": null + }, + { + "name": "context_options", + "type": "HYVIDCONTEXT", + "shape": 7, + "link": null + }, + { + "name": "feta_args", + "type": "FETAARGS", + "shape": 7, + "link": null + }, + { + "name": "teacache_args", + "type": "TEACACHEARGS", + "shape": 7, + "link": 301 + }, + { + "name": "width", + "type": "INT", + "widget": { + "name": "width" + }, + "link": 169 + }, + { + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": 170 + }, + { + "name": "num_frames", + "type": "INT", + "widget": { + "name": "num_frames" + }, + "link": 306 + } + ], + "outputs": [ + { + "name": "samples", + "type": "LATENT", + "links": [ + 206 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoSampler" + }, + "widgets_values": [ + 512, + 512, + 65, + 30, + 6.000000000000001, + 7.000000000000002, + 135, + "fixed", + true, + 1, + "FlowMatchDiscreteScheduler", + 0, + "dynamic", + "" + ] + }, + { + "id": 16, + "type": "DownloadAndLoadHyVideoTextEncoder", + "pos": [ + -953.5609130859375, + -81.91740417480469 + ], + "size": [ + 441, + 202 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "hyvid_text_encoder", + "type": "HYVIDTEXTENCODER", + "links": [ + 228 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "DownloadAndLoadHyVideoTextEncoder" + }, + "widgets_values": [ + "Kijai/llava-llama-3-8b-text-encoder-tokenizer", + "openai/clip-vit-large-patch14", + "fp16", + false, + 2, + "disabled", + "offload_device" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 7, + "type": "HyVideoVAELoader", + "pos": [ + -904.6119384765625, + -612.5421752929688 + ], + "size": [ + 379.166748046875, + 82 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "compile_args", + "type": "COMPILEARGS", + "shape": 7, + "link": null + } + ], + "outputs": [ + { + "name": "vae", + "type": "VAE", + "links": [ + 174 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoVAELoader" + }, + "widgets_values": [ + "hyvid\\hunyuan_video_vae_bf16.safetensors", + "bf16" + ], + "color": "#322", + "bgcolor": "#533" + }, + { + "id": 91, + "type": "HyVideoEnhanceAVideo", + "pos": [ + 239.98062133789062, + -711.213623046875 + ], + "size": [ + 352.79998779296875, + 154 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "feta_args", + "type": "FETAARGS", + "links": [], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoEnhanceAVideo" + }, + "widgets_values": [ + 2, + true, + true, + 0, + 1 + ], + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 101, + "type": "HyVideoLoraSelect", + "pos": [ + -1481.2822265625, + -260.6600036621094 + ], + "size": [ + 483.9582214355469, + 102 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "prev_lora", + "type": "HYVIDLORA", + "shape": 7, + "link": null + }, + { + "name": "blocks", + "type": "SELECTEDBLOCKS", + "shape": 7, + "link": null + } + ], + "outputs": [ + { + "name": "lora", + "type": "HYVIDLORA", + "links": [ + 252 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoLoraSelect" + }, + "widgets_values": [ + "hyvid\\musubi-tuner\\HunyuanVideo_dashtoon_keyframe_lora_converted_bf16.safetensors", + 1.0000000000000002 + ], + "color": "#223", + "bgcolor": "#335" + }, + { + "id": 117, + "type": "HyVideoTextEncode", + "pos": [ + -316.61962890625, + 265.56634521484375 + ], + "size": [ + 443.4000244140625, + 200 + ], + "flags": {}, + "order": 21, + "mode": 0, + "inputs": [ + { + "name": "text_encoders", + "type": "HYVIDTEXTENCODER", + "link": 228 + }, + { + "name": "custom_prompt_template", + "type": "PROMPT_TEMPLATE", + "shape": 7, + "link": null + }, + { + "name": "clip_l", + "type": "CLIP", + "shape": 7, + "link": null + }, + { + "name": "hyvid_cfg", + "type": "HYVID_CFG", + "shape": 7, + "link": null + } + ], + "outputs": [ + { + "name": "hyvid_embeds", + "type": "HYVIDEMBEDS", + "links": [ + 229 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoTextEncode" + }, + "widgets_values": [ + "woman turns her head", + true, + "video" + ], + "color": "#332922", + "bgcolor": "#593930" + }, + { + "id": 113, + "type": "LoadImage", + "pos": [ + -2144.3154296875, + -620.223388671875 + ], + "size": [ + 385.889404296875, + 682.5731811523438 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 291 + ], + "slot_index": 0 + }, + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "title": "Load start_image", + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "pasted/image (691).png", + "image" + ], + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 141, + "type": "MarkdownNote", + "pos": [ + -1640.0889892578125, + 554.9741821289062 + ], + "size": [ + 272.62066650390625, + 251.96292114257812 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Official bucket sizes", + "properties": {}, + "widgets_values": [ + "# Landscape\n\n| 1280x720x33 | 1280x720x65 | 1280x720x97 |\n|-------------|-------------|-------------|\n| 960x544x33 | 960x544x65 | 960x544x97 |\n\n# Portrait\n\n| 720x1280x33 | 720x1280x65 | 720x1280x97 |\n|-------------|-------------|-------------|\n| 544x960x33 | 544x960x65 | 544x960x97 |" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 144, + "type": "MarkdownNote", + "pos": [ + -1288.2303466796875, + -74.66388702392578 + ], + "size": [ + 313.1983642578125, + 88 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Lora Link", + "properties": {}, + "widgets_values": [ + "[https://huggingface.co/Kijai/HunyuanVideo_comfy/blob/main/HunyuanVideo_dashtoon_keyframe_lora_converted_bf16.safetensors](https://huggingface.co/Kijai/HunyuanVideo_comfy/blob/main/HunyuanVideo_dashtoon_keyframe_lora_converted_bf16.safetensors)" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 95, + "type": "HyVideoTeaCache", + "pos": [ + -128.14454650878906, + -683.0208740234375 + ], + "size": [ + 315, + 82 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "teacache_args", + "type": "TEACACHEARGS", + "links": [ + 301 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoTeaCache" + }, + "widgets_values": [ + 0.15000000000000002, + "offload_device" + ], + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 114, + "type": "LoadImage", + "pos": [ + -2118.108642578125, + 129.1026611328125 + ], + "size": [ + 340.0711975097656, + 705.3291625976562 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 302 + ], + "slot_index": 0 + }, + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "title": "Load end_image", + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "pasted/image (692).png", + "image" + ], + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 59, + "type": "HyVideoBlockSwap", + "pos": [ + -1329.878662109375, + -513.4440307617188 + ], + "size": [ + 315, + 130 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "block_swap_args", + "type": "BLOCKSWAPARGS", + "links": [ + 303 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoBlockSwap" + }, + "widgets_values": [ + 20, + 0, + true, + true + ], + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 145, + "type": "INTConstant", + "pos": [ + -1622.352783203125, + 390.4923400878906 + ], + "size": [ + 210, + 58 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "value", + "type": "INT", + "links": [ + 304 + ], + "slot_index": 0 + } + ], + "title": "Frame count", + "properties": { + "Node name for S&R": "INTConstant" + }, + "widgets_values": [ + 65 + ], + "color": "#1b4669", + "bgcolor": "#29699c" + }, + { + "id": 146, + "type": "SetNode", + "pos": [ + -1588.7738037109375, + 493.682861328125 + ], + "size": [ + 210, + 60 + ], + "flags": { + "collapsed": true + }, + "order": 24, + "mode": 0, + "inputs": [ + { + "name": "INT", + "type": "INT", + "link": 304 + } + ], + "outputs": [ + { + "name": "*", + "type": "*", + "links": null + } + ], + "title": "Set_FrameCount", + "properties": { + "previousName": "FrameCount" + }, + "widgets_values": [ + "FrameCount" + ], + "color": "#1b4669", + "bgcolor": "#29699c" + }, + { + "id": 137, + "type": "ImageScale", + "pos": [ + -1348.5003662109375, + 132.24388122558594 + ], + "size": [ + 303.2886657714844, + 170 + ], + "flags": {}, + "order": 28, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 291 + }, + { + "name": "width", + "type": "INT", + "widget": { + "name": "width" + }, + "link": 288 + }, + { + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": 289 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 292 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ImageScale" + }, + "widgets_values": [ + "lanczos", + 544, + 960, + "center" + ], + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 92, + "type": "SetNode", + "pos": [ + -1305.6072998046875, + 347.5693664550781 + ], + "size": [ + 210, + 60 + ], + "flags": { + "collapsed": true + }, + "order": 32, + "mode": 0, + "inputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "link": 292 + } + ], + "outputs": [ + { + "name": "*", + "type": "*", + "links": [], + "slot_index": 0 + } + ], + "title": "Set_start_image", + "properties": { + "previousName": "start_image" + }, + "widgets_values": [ + "start_image" + ], + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 129, + "type": "SetNode", + "pos": [ + -1312.962646484375, + 602.9349975585938 + ], + "size": [ + 210, + 58 + ], + "flags": { + "collapsed": true + }, + "order": 33, + "mode": 0, + "inputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "link": 295 + } + ], + "outputs": [ + { + "name": "*", + "type": "*", + "links": [] + } + ], + "title": "Set_end_image", + "properties": { + "previousName": "end_image" + }, + "widgets_values": [ + "end_image" + ], + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 147, + "type": "GetNode", + "pos": [ + -436.47906494140625, + -157.40074157714844 + ], + "size": [ + 210, + 60 + ], + "flags": { + "collapsed": true + }, + "order": 13, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "INT", + "type": "INT", + "links": [ + 305, + 306 + ], + "slot_index": 0 + } + ], + "title": "Get_FrameCount", + "properties": {}, + "widgets_values": [ + "FrameCount" + ], + "color": "#1b4669", + "bgcolor": "#29699c" + }, + { + "id": 149, + "type": "GetNode", + "pos": [ + -424.1944274902344, + -42.744483947753906 + ], + "size": [ + 210, + 58 + ], + "flags": { + "collapsed": true + }, + "order": 14, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 308 + ], + "slot_index": 0 + } + ], + "title": "Get_end_image", + "properties": {}, + "widgets_values": [ + "end_image" + ], + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 148, + "type": "GetNode", + "pos": [ + -423.3754577636719, + -91.06391906738281 + ], + "size": [ + 210, + 60 + ], + "flags": { + "collapsed": true + }, + "order": 15, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 307, + 309 + ], + "slot_index": 0 + } + ], + "title": "Get_start_image", + "properties": {}, + "widgets_values": [ + "start_image" + ], + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 87, + "type": "GetImageSizeAndCount", + "pos": [ + -207.1915740966797, + 127.93595886230469 + ], + "size": [ + 277.20001220703125, + 86 + ], + "flags": {}, + "order": 25, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 309 + } + ], + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": [], + "slot_index": 0 + }, + { + "name": "width", + "label": "width", + "type": "INT", + "links": [ + 169 + ], + "slot_index": 1 + }, + { + "name": "height", + "label": "height", + "type": "INT", + "links": [ + 170 + ], + "slot_index": 2 + }, + { + "name": "count", + "label": "count", + "type": "INT", + "links": null + } + ], + "properties": { + "Node name for S&R": "GetImageSizeAndCount" + }, + "widgets_values": [], + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 142, + "type": "ImageScale", + "pos": [ + -1336.4744873046875, + 386.9656982421875 + ], + "size": [ + 303.2886657714844, + 170 + ], + "flags": {}, + "order": 29, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 302 + }, + { + "name": "width", + "type": "INT", + "widget": { + "name": "width" + }, + "link": 299 + }, + { + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": 300 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 295 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ImageScale" + }, + "widgets_values": [ + "lanczos", + 544, + 960, + "center" + ], + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 121, + "type": "HyVideoEncodeKeyframes", + "pos": [ + -213.8164825439453, + -201.73611450195312 + ], + "size": [ + 315, + 286 + ], + "flags": {}, + "order": 30, + "mode": 0, + "inputs": [ + { + "name": "vae", + "type": "VAE", + "link": 243 + }, + { + "name": "start_image", + "type": "IMAGE", + "link": 307 + }, + { + "name": "end_image", + "type": "IMAGE", + "link": 308 + }, + { + "name": "num_frames", + "type": "INT", + "widget": { + "name": "num_frames" + }, + "link": 305 + } + ], + "outputs": [ + { + "name": "samples", + "type": "LATENT", + "links": [ + 245 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoEncodeKeyframes" + }, + "widgets_values": [ + 65, + true, + 64, + 192, + false, + 0, + 1.0000000000000002, + "sample" + ], + "color": "#322", + "bgcolor": "#533" + }, + { + "id": 93, + "type": "GetNode", + "pos": [ + 636.359619140625, + 251.423095703125 + ], + "size": [ + 210, + 60 + ], + "flags": { + "collapsed": true + }, + "order": 16, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 313 + ], + "slot_index": 0 + } + ], + "title": "Get_start_image", + "properties": {}, + "widgets_values": [ + "start_image" + ], + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 130, + "type": "GetNode", + "pos": [ + 637.8307495117188, + 309.37017822265625 + ], + "size": [ + 210, + 58 + ], + "flags": { + "collapsed": true + }, + "order": 17, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 314 + ], + "slot_index": 0 + } + ], + "title": "Get_end_image", + "properties": {}, + "widgets_values": [ + "end_image" + ], + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 85, + "type": "GetImageSizeAndCount", + "pos": [ + 753.4948120117188, + -5.991325378417969 + ], + "size": [ + 277.20001220703125, + 86 + ], + "flags": {}, + "order": 36, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 134 + } + ], + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": [ + 312 + ], + "slot_index": 0 + }, + { + "name": "width", + "label": "544 width", + "type": "INT", + "links": null + }, + { + "name": "height", + "label": "960 height", + "type": "INT", + "links": [ + 317 + ], + "slot_index": 2 + }, + { + "name": "count", + "label": "61 count", + "type": "INT", + "links": null + } + ], + "properties": { + "Node name for S&R": "GetImageSizeAndCount" + }, + "widgets_values": [], + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 131, + "type": "ImageConcatMulti", + "pos": [ + 1240.4647216796875, + -4.348563194274902 + ], + "size": [ + 210, + 170 + ], + "flags": {}, + "order": 38, + "mode": 0, + "inputs": [ + { + "name": "image_1", + "type": "IMAGE", + "link": 312 + }, + { + "name": "image_2", + "type": "IMAGE", + "link": 318 + }, + { + "name": "image_3", + "type": "IMAGE", + "link": 319 + } + ], + "outputs": [ + { + "name": "images", + "type": "IMAGE", + "links": [ + 273 + ], + "slot_index": 0 + } + ], + "properties": {}, + "widgets_values": [ + 3, + "left", + true, + null + ], + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 52, + "type": "ImageConcatMulti", + "pos": [ + 980.3700561523438, + 232.96632385253906 + ], + "size": [ + 210, + 170 + ], + "flags": {}, + "order": 31, + "mode": 0, + "inputs": [ + { + "name": "image_1", + "type": "IMAGE", + "link": 315 + }, + { + "name": "image_2", + "type": "IMAGE", + "link": 316 + } + ], + "outputs": [ + { + "name": "images", + "type": "IMAGE", + "links": [ + 319 + ], + "slot_index": 0 + } + ], + "properties": {}, + "widgets_values": [ + 2, + "down", + true, + null + ], + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 152, + "type": "EmptyImage", + "pos": [ + 1061.1661376953125, + 63.333106994628906 + ], + "size": [ + 315, + 130 + ], + "flags": { + "collapsed": true + }, + "order": 37, + "mode": 0, + "inputs": [ + { + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": 317 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 318 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "EmptyImage" + }, + "widgets_values": [ + 4, + 512, + 1, + 0 + ] + }, + { + "id": 150, + "type": "AddLabel", + "pos": [ + 821.4301147460938, + 249.46365356445312 + ], + "size": [ + 315, + 294 + ], + "flags": { + "collapsed": true + }, + "order": 26, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 313 + }, + { + "name": "caption", + "type": "STRING", + "shape": 7, + "widget": { + "name": "caption" + }, + "link": null + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 315 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "AddLabel" + }, + "widgets_values": [ + 10, + 2, + 48, + 32, + "white", + "black", + "FreeMono.ttf", + "Start frame", + "up", + "" + ] + }, + { + "id": 151, + "type": "AddLabel", + "pos": [ + 821.4297485351562, + 313.492431640625 + ], + "size": [ + 315, + 294 + ], + "flags": { + "collapsed": true + }, + "order": 27, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 314 + }, + { + "name": "caption", + "type": "STRING", + "shape": 7, + "widget": { + "name": "caption" + }, + "link": null + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 316 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "AddLabel" + }, + "widgets_values": [ + 10, + 2, + 48, + 32, + "white", + "black", + "FreeMono.ttf", + "End frame", + "up", + "" + ] + }, + { + "id": 5, + "type": "HyVideoDecode", + "pos": [ + 702.5960693359375, + -288.2947692871094 + ], + "size": [ + 345.4285888671875, + 198 + ], + "flags": {}, + "order": 35, + "mode": 0, + "inputs": [ + { + "name": "vae", + "type": "VAE", + "link": 175 + }, + { + "name": "samples", + "type": "LATENT", + "link": 206 + } + ], + "outputs": [ + { + "name": "images", + "type": "IMAGE", + "links": [ + 134 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoDecode" + }, + "widgets_values": [ + true, + 64, + 192, + false, + 0, + true + ], + "color": "#322", + "bgcolor": "#533" + }, + { + "id": 1, + "type": "HyVideoModelLoader", + "pos": [ + -950, + -420 + ], + "size": [ + 426.1773986816406, + 266 + ], + "flags": {}, + "order": 23, + "mode": 0, + "inputs": [ + { + "name": "compile_args", + "type": "COMPILEARGS", + "shape": 7, + "link": null + }, + { + "name": "block_swap_args", + "type": "BLOCKSWAPARGS", + "shape": 7, + "link": 303 + }, + { + "name": "lora", + "type": "HYVIDLORA", + "shape": 7, + "link": 252 + } + ], + "outputs": [ + { + "name": "model", + "type": "HYVIDEOMODEL", + "links": [ + 162 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoModelLoader" + }, + "widgets_values": [ + "hyvideo\\hunyuan_video_720_cfgdistill_bf16.safetensors", + "bf16", + "fp8_e4m3fn", + "offload_device", + "sageattn_varlen", + false, + true + ], + "color": "#223", + "bgcolor": "#335" + }, + { + "id": 153, + "type": "Note", + "pos": [ + -506.2056884765625, + -403.7411193847656 + ], + "size": [ + 226.8111114501953, + 90.30203247070312 + ], + "flags": {}, + "order": 18, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "Use flash attention if you can't use sageattention, last resort use sdpa" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 111, + "type": "VHS_VideoCombine", + "pos": [ + 1505.2393798828125, + -309.3562316894531 + ], + "size": [ + 660.8335571289062, + 1109.3863525390625 + ], + "flags": {}, + "order": 39, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 273 + }, + { + "name": "audio", + "type": "AUDIO", + "shape": 7, + "link": null + }, + { + "name": "meta_batch", + "type": "VHS_BatchManager", + "shape": 7, + "link": null + }, + { + "name": "vae", + "type": "VAE", + "shape": 7, + "link": null + } + ], + "outputs": [ + { + "name": "Filenames", + "type": "VHS_FILENAMES", + "links": null + } + ], + "properties": { + "Node name for S&R": "VHS_VideoCombine" + }, + "widgets_values": { + "frame_rate": 24, + "loop_count": 0, + "filename_prefix": "HunyuanVideoWrapper_keyframe", + "format": "video/h264-mp4", + "pix_fmt": "yuv420p", + "crf": 19, + "save_metadata": true, + "trim_to_audio": false, + "pingpong": false, + "save_output": false, + "videopreview": { + "hidden": false, + "paused": false, + "params": { + "filename": "HunyuanVideoWrapper_I2V_00013.mp4", + "subfolder": "", + "type": "temp", + "format": "video/h264-mp4", + "frame_rate": 24, + "workflow": "HunyuanVideoWrapper_I2V_00013.png", + "fullpath": "N:\\AI\\ComfyUI\\temp\\HunyuanVideoWrapper_I2V_00013.mp4" + }, + "muted": false + } + } + }, + { + "id": 139, + "type": "PrimitiveNode", + "pos": [ + -1656.880859375, + 259.85504150390625 + ], + "size": [ + 247.83656311035156, + 82 + ], + "flags": {}, + "order": 19, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "INT", + "type": "INT", + "links": [ + 289, + 300 + ], + "slot_index": 0 + } + ], + "title": "Height", + "properties": { + "Run widget replace on values": false + }, + "widgets_values": [ + 960, + "fixed" + ] + }, + { + "id": 138, + "type": "PrimitiveNode", + "pos": [ + -1658.721435546875, + 118.33633422851562 + ], + "size": [ + 247.83656311035156, + 82 + ], + "flags": {}, + "order": 20, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "INT", + "type": "INT", + "links": [ + 288, + 299 + ], + "slot_index": 0 + } + ], + "title": "Width", + "properties": { + "Run widget replace on values": false + }, + "widgets_values": [ + 544, + "fixed" + ] + } + ], + "links": [ + [ + 134, + 5, + 0, + 85, + 0, + "IMAGE" + ], + [ + 162, + 1, + 0, + 90, + 0, + "HYVIDEOMODEL" + ], + [ + 169, + 87, + 1, + 90, + 8, + "INT" + ], + [ + 170, + 87, + 2, + 90, + 9, + "INT" + ], + [ + 174, + 7, + 0, + 94, + 0, + "*" + ], + [ + 175, + 94, + 0, + 5, + 0, + "VAE" + ], + [ + 206, + 90, + 0, + 5, + 1, + "LATENT" + ], + [ + 228, + 16, + 0, + 117, + 0, + "HYVIDTEXTENCODER" + ], + [ + 229, + 117, + 0, + 90, + 1, + "HYVIDEMBEDS" + ], + [ + 243, + 94, + 0, + 121, + 0, + "VAE" + ], + [ + 245, + 121, + 0, + 90, + 3, + "LATENT" + ], + [ + 252, + 101, + 0, + 1, + 2, + "HYVIDLORA" + ], + [ + 273, + 131, + 0, + 111, + 0, + "IMAGE" + ], + [ + 288, + 138, + 0, + 137, + 1, + "INT" + ], + [ + 289, + 139, + 0, + 137, + 2, + "INT" + ], + [ + 291, + 113, + 0, + 137, + 0, + "IMAGE" + ], + [ + 292, + 137, + 0, + 92, + 0, + "IMAGE" + ], + [ + 295, + 142, + 0, + 129, + 0, + "IMAGE" + ], + [ + 299, + 138, + 0, + 142, + 1, + "INT" + ], + [ + 300, + 139, + 0, + 142, + 2, + "INT" + ], + [ + 301, + 95, + 0, + 90, + 7, + "TEACACHEARGS" + ], + [ + 302, + 114, + 0, + 142, + 0, + "IMAGE" + ], + [ + 303, + 59, + 0, + 1, + 1, + "BLOCKSWAPARGS" + ], + [ + 304, + 145, + 0, + 146, + 0, + "*" + ], + [ + 305, + 147, + 0, + 121, + 3, + "INT" + ], + [ + 306, + 147, + 0, + 90, + 10, + "INT" + ], + [ + 307, + 148, + 0, + 121, + 1, + "IMAGE" + ], + [ + 308, + 149, + 0, + 121, + 2, + "IMAGE" + ], + [ + 309, + 148, + 0, + 87, + 0, + "IMAGE" + ], + [ + 312, + 85, + 0, + 131, + 0, + "IMAGE" + ], + [ + 313, + 93, + 0, + 150, + 0, + "IMAGE" + ], + [ + 314, + 130, + 0, + 151, + 0, + "IMAGE" + ], + [ + 315, + 150, + 0, + 52, + 0, + "IMAGE" + ], + [ + 316, + 151, + 0, + 52, + 1, + "IMAGE" + ], + [ + 317, + 85, + 2, + 152, + 0, + "INT" + ], + [ + 318, + 152, + 0, + 131, + 1, + "IMAGE" + ], + [ + 319, + 52, + 0, + 131, + 2, + "IMAGE" + ] + ], + "groups": [], + "config": {}, + "extra": { + "ds": { + "scale": 0.6115909044841993, + "offset": [ + 2071.4614515093963, + 861.9679516368201 + ] + }, + "node_versions": { + "ComfyUI-HunyuanVideoWrapper": "4bc21fdece7bf07e20ea7760801bdc248cc28637", + "comfy-core": "0.3.24", + "ComfyUI-KJNodes": "665f59fae3d855b459c0fb7542c5121adf044833", + "ComfyUI-VideoHelperSuite": "2c25b8b53835aaeb63f831b3137c705cf9f85dce" + }, + "VHS_latentpreview": true, + "VHS_latentpreviewrate": 0, + "VHS_MetadataImage": true, + "VHS_KeepIntermediate": true + }, + "version": 0.4 +} \ No newline at end of file diff --git a/hyvideo/modules/models.py b/hyvideo/modules/models.py index 627152b..364304f 100644 --- a/hyvideo/modules/models.py +++ b/hyvideo/modules/models.py @@ -1090,7 +1090,6 @@ class HYVideoDiffusionTransformer(ModelMixin, ConfigMixin): if self.cnt == 0 or self.cnt == self.num_steps-1: should_calc = True self.accumulated_rel_l1_distance = 0 - self.teacache_skipped_steps = 0 self.previous_modulated_input = modulated_inp.clone() else: coefficients = [7.33226126e+02, -4.01131952e+02, 6.75869174e+01, -3.14987800e+00, 9.61237896e-02] diff --git a/nodes.py b/nodes.py index fde8b61..54fa7b6 100644 --- a/nodes.py +++ b/nodes.py @@ -1338,6 +1338,7 @@ class HyVideoSampler: transformer.last_frame_count != num_frames): # Reset TeaCache state on dimension change transformer.cnt = 0 + transformer.teacache_skipped_steps = 0 transformer.accumulated_rel_l1_distance = 0 transformer.previous_modulated_input = None transformer.previous_residual = None @@ -1405,6 +1406,7 @@ class HyVideoSampler: if teacache_args is not None: log.info(f"TeaCache skipped {transformer.teacache_skipped_steps} steps") + transformer.teacache_skipped_steps = 0 if force_offload: if model["manual_offloading"]: