{
  "config": {},
  "extra": {
    "VHS_KeepIntermediate": true,
    "VHS_MetadataImage": true,
    "VHS_latentpreview": false,
    "VHS_latentpreviewrate": 0,
    "ds": {
      "offset": [
        1021.9699417074105,
        338.40675874633865
      ],
      "scale": 0.41326009540179
    },
    "frontendVersion": "1.37.6",
    "node_versions": {
      "comfy-core": "0.3.34"
    },
    "workflowRendererVersion": "LG"
  },
  "groups": [
    {
      "bounding": [
        1320,
        -20,
        720,
        900
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 4,
      "title": "Save Video(Mp4)"
    },
    {
      "bounding": [
        2060,
        -20,
        700,
        900
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 5,
      "title": "Save Video(WebP)"
    },
    {
      "bounding": [
        -320,
        620,
        340,
        410
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 7,
      "title": "Load reference image"
    },
    {
      "bounding": [
        110,
        -20,
        450,
        620
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 9,
      "title": "Prompt"
    },
    {
      "bounding": [
        580,
        -20,
        720,
        620
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 10,
      "title": "Sampling & Decoding"
    },
    {
      "bounding": [
        -320,
        -20,
        410,
        620
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 13,
      "title": "Load models here"
    },
    {
      "bounding": [
        -300,
        20,
        370,
        340
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 14,
      "title": "14B"
    },
    {
      "bounding": [
        -710,
        -20,
        370,
        330
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 15,
      "title": "1.3B"
    },
    {
      "bounding": [
        40,
        840,
        390,
        310
      ],
      "color": "#A88",
      "flags": {},
      "font_size": 24,
      "id": 17,
      "title": "Video Size"
    },
    {
      "bounding": [
        40,
        630,
        400,
        190
      ],
      "color": "#A88",
      "flags": {},
      "font_size": 24,
      "id": 19,
      "title": "Value= Length(WanVaceToVideo) - 1"
    },
    {
      "bounding": [
        450,
        620,
        850,
        870
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 24,
      "title": "First Frame control - enable it if you need"
    },
    {
      "bounding": [
        1040,
        660,
        250,
        470
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 21,
      "title": "Batch Images"
    },
    {
      "bounding": [
        780,
        660,
        250,
        470
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 22,
      "title": "Batch Masks"
    },
    {
      "bounding": [
        460,
        660,
        310,
        470
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 23,
      "title": "First Frame"
    }
  ],
  "id": "96995b8f-85c5-47af-b3cf-7b6a24675694",
  "last_link_id": 303,
  "last_node_id": 166,
  "links": [
    [
      129,
      68,
      0,
      69,
      0,
      "VIDEO"
    ],
    [
      176,
      115,
      1,
      105,
      0,
      "CLIP"
    ],
    [
      178,
      115,
      1,
      107,
      0,
      "CLIP"
    ],
    [
      179,
      110,
      0,
      108,
      0,
      "MODEL"
    ],
    [
      183,
      105,
      0,
      109,
      0,
      "CONDITIONING"
    ],
    [
      184,
      107,
      0,
      109,
      1,
      "CONDITIONING"
    ],
    [
      185,
      114,
      0,
      109,
      2,
      "VAE"
    ],
    [
      186,
      115,
      0,
      110,
      0,
      "MODEL"
    ],
    [
      187,
      113,
      0,
      115,
      0,
      "MODEL"
    ],
    [
      188,
      127,
      0,
      115,
      1,
      "CLIP"
    ],
    [
      189,
      108,
      0,
      118,
      0,
      "LATENT"
    ],
    [
      191,
      118,
      0,
      119,
      0,
      "LATENT"
    ],
    [
      192,
      114,
      0,
      119,
      1,
      "VAE"
    ],
    [
      195,
      124,
      0,
      125,
      0,
      "MODEL"
    ],
    [
      196,
      127,
      0,
      125,
      1,
      "CLIP"
    ],
    [
      197,
      119,
      0,
      68,
      0,
      "IMAGE"
    ],
    [
      198,
      119,
      0,
      70,
      0,
      "IMAGE"
    ],
    [
      202,
      73,
      0,
      109,
      5,
      "IMAGE"
    ],
    [
      205,
      130,
      0,
      129,
      0,
      "MASK"
    ],
    [
      219,
      142,
      0,
      109,
      4,
      "MASK"
    ],
    [
      230,
      146,
      0,
      145,
      0,
      "MASK"
    ],
    [
      236,
      147,
      0,
      132,
      1,
      "INT"
    ],
    [
      237,
      129,
      0,
      132,
      0,
      "IMAGE"
    ],
    [
      279,
      109,
      0,
      108,
      1,
      "CONDITIONING"
    ],
    [
      280,
      109,
      1,
      108,
      2,
      "CONDITIONING"
    ],
    [
      281,
      109,
      2,
      108,
      3,
      "LATENT"
    ],
    [
      282,
      109,
      3,
      118,
      1,
      "INT"
    ],
    [
      285,
      158,
      0,
      109,
      6,
      "INT"
    ],
    [
      287,
      158,
      0,
      130,
      0,
      "INT"
    ],
    [
      288,
      159,
      0,
      130,
      1,
      "INT"
    ],
    [
      289,
      158,
      0,
      146,
      0,
      "INT"
    ],
    [
      290,
      159,
      0,
      146,
      1,
      "INT"
    ],
    [
      292,
      159,
      0,
      109,
      7,
      "INT"
    ],
    [
      296,
      148,
      0,
      165,
      0,
      "IMAGE"
    ],
    [
      297,
      132,
      0,
      165,
      1,
      "IMAGE"
    ],
    [
      298,
      165,
      0,
      133,
      0,
      "IMAGE"
    ],
    [
      299,
      165,
      0,
      109,
      3,
      "IMAGE"
    ],
    [
      300,
      145,
      0,
      166,
      0,
      "IMAGE"
    ],
    [
      301,
      132,
      0,
      166,
      1,
      "IMAGE"
    ],
    [
      302,
      166,
      0,
      135,
      0,
      "IMAGE"
    ],
    [
      303,
      166,
      0,
      142,
      0,
      "IMAGE"
    ]
  ],
  "nodes": [
    {
      "bgcolor": "#533",
      "color": "#322",
      "flags": {},
      "id": 124,
      "inputs": [],
      "mode": 4,
      "order": 0,
      "outputs": [
        {
          "links": [
            195
          ],
          "name": "MODEL",
          "slot_index": 0,
          "type": "MODEL"
        }
      ],
      "pos": [
        -700,
        50
      ],
      "properties": {
        "Node name for S&R": "UNETLoader",
        "cnr_id": "comfy-core",
        "models": [
          {
            "directory": "diffusion_models",
            "name": "wan2.1_vace_1.3B_fp16.safetensors",
            "url": "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/diffusion_models/wan2.1_vace_1.3B_fp16.safetensors"
          }
        ],
        "ver": "0.3.34"
      },
      "size": [
        350,
        82
      ],
      "type": "UNETLoader",
      "widgets_values": [
        "wan2.1_vace_1.3B_fp16.safetensors",
        "default"
      ]
    },
    {
      "bgcolor": "#533",
      "color": "#322",
      "flags": {},
      "id": 125,
      "inputs": [
        {
          "link": 195,
          "name": "model",
          "type": "MODEL"
        },
        {
          "link": 196,
          "name": "clip",
          "type": "CLIP"
        }
      ],
      "mode": 4,
      "order": 17,
      "outputs": [
        {
          "links": [],
          "name": "MODEL",
          "type": "MODEL"
        },
        {
          "links": [],
          "name": "CLIP",
          "type": "CLIP"
        }
      ],
      "pos": [
        -700,
        170
      ],
      "properties": {
        "Node name for S&R": "LoraLoader",
        "cnr_id": "comfy-core",
        "models": [
          {
            "directory": "loras",
            "name": "Wan21_CausVid_bidirect2_T2V_1_3B_lora_rank32.safetensors",
            "url": "https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Wan21_CausVid_bidirect2_T2V_1_3B_lora_rank32.safetensors"
          }
        ],
        "ver": "0.3.38"
      },
      "size": [
        350,
        126
      ],
      "type": "LoraLoader",
      "widgets_values": [
        "Wan21_CausVid_bidirect2_T2V_1_3B_lora_rank32.safetensors",
        0.7000000000000002,
        1
      ]
    },
    {
      "bgcolor": "#533",
      "color": "#322",
      "flags": {},
      "id": 126,
      "inputs": [],
      "mode": 4,
      "order": 1,
      "outputs": [
        {
          "links": [],
          "name": "CLIP",
          "slot_index": 0,
          "type": "CLIP"
        }
      ],
      "pos": [
        -710,
        360
      ],
      "properties": {
        "Node name for S&R": "CLIPLoader",
        "cnr_id": "comfy-core",
        "models": [
          {
            "directory": "text_encoders",
            "name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
            "url": "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors?download=true"
          }
        ],
        "ver": "0.3.34"
      },
      "size": [
        370,
        106
      ],
      "type": "CLIPLoader",
      "widgets_values": [
        "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
        "wan",
        "default"
      ]
    },
    {
      "flags": {
        "collapsed": true
      },
      "id": 119,
      "inputs": [
        {
          "link": 191,
          "name": "samples",
          "type": "LATENT"
        },
        {
          "link": 192,
          "name": "vae",
          "type": "VAE"
        }
      ],
      "mode": 0,
      "order": 35,
      "outputs": [
        {
          "links": [
            197,
            198
          ],
          "name": "IMAGE",
          "slot_index": 0,
          "type": "IMAGE"
        }
      ],
      "pos": [
        1140,
        580
      ],
      "properties": {
        "Node name for S&R": "VAEDecode",
        "cnr_id": "comfy-core",
        "ver": "0.3.34"
      },
      "size": [
        210,
        46
      ],
      "type": "VAEDecode",
      "widgets_values": []
    },
    {
      "flags": {},
      "id": 127,
      "inputs": [],
      "mode": 0,
      "order": 2,
      "outputs": [
        {
          "links": [
            188,
            196
          ],
          "name": "CLIP",
          "slot_index": 0,
          "type": "CLIP"
        }
      ],
      "pos": [
        -290,
        390
      ],
      "properties": {
        "Node name for S&R": "CLIPLoader",
        "cnr_id": "comfy-core",
        "models": [
          {
            "directory": "text_encoders",
            "name": "umt5_xxl_fp16.safetensors",
            "url": "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp16.safetensors"
          }
        ],
        "ver": "0.3.34"
      },
      "size": [
        350,
        106
      ],
      "type": "CLIPLoader",
      "widgets_values": [
        "umt5_xxl_fp16.safetensors",
        "wan",
        "default"
      ]
    },
    {
      "flags": {},
      "id": 70,
      "inputs": [
        {
          "link": 198,
          "name": "images",
          "type": "IMAGE"
        }
      ],
      "mode": 4,
      "order": 37,
      "outputs": [],
      "pos": [
        2090,
        70
      ],
      "properties": {
        "Node name for S&R": "SaveAnimatedWEBP",
        "cnr_id": "comfy-core",
        "ver": "0.3.34"
      },
      "size": [
        670,
        780
      ],
      "type": "SaveAnimatedWEBP",
      "widgets_values": [
        "ComfyUI",
        6,
        true,
        80,
        "default"
      ]
    },
    {
      "flags": {
        "collapsed": true
      },
      "id": 118,
      "inputs": [
        {
          "link": 189,
          "name": "samples",
          "type": "LATENT"
        },
        {
          "link": 282,
          "name": "trim_amount",
          "type": "INT",
          "widget": {
            "name": "trim_amount"
          }
        }
      ],
      "mode": 0,
      "order": 34,
      "outputs": [
        {
          "links": [
            191
          ],
          "name": "LATENT",
          "type": "LATENT"
        }
      ],
      "pos": [
        960,
        580
      ],
      "properties": {
        "Node name for S&R": "TrimVideoLatent",
        "cnr_id": "comfy-core",
        "ver": "0.3.34"
      },
      "size": [
        276.5860290527344,
        58
      ],
      "type": "TrimVideoLatent",
      "widgets_values": [
        0
      ]
    },
    {
      "flags": {
        "collapsed": true
      },
      "id": 110,
      "inputs": [
        {
          "link": 186,
          "name": "model",
          "type": "MODEL"
        }
      ],
      "mode": 0,
      "order": 23,
      "outputs": [
        {
          "links": [
            179
          ],
          "name": "MODEL",
          "slot_index": 0,
          "type": "MODEL"
        }
      ],
      "pos": [
        610,
        60
      ],
      "properties": {
        "Node name for S&R": "ModelSamplingSD3",
        "cnr_id": "comfy-core",
        "ver": "0.3.34"
      },
      "size": [
        210,
        58
      ],
      "type": "ModelSamplingSD3",
      "widgets_values": [
        8.000000000000002
      ]
    },
    {
      "flags": {},
      "id": 146,
      "inputs": [
        {
          "link": 289,
          "name": "width",
          "type": "INT",
          "widget": {
            "name": "width"
          }
        },
        {
          "link": 290,
          "name": "height",
          "type": "INT",
          "widget": {
            "name": "height"
          }
        }
      ],
      "mode": 4,
      "order": 19,
      "outputs": [
        {
          "links": [
            230
          ],
          "name": "MASK",
          "type": "MASK"
        }
      ],
      "pos": [
        810,
        1020
      ],
      "properties": {
        "Node name for S&R": "SolidMask",
        "cnr_id": "comfy-core",
        "ver": "0.3.38"
      },
      "size": [
        210,
        106
      ],
      "type": "SolidMask",
      "widgets_values": [
        0,
        768,
        768
      ]
    },
    {
      "flags": {},
      "id": 142,
      "inputs": [
        {
          "link": 303,
          "name": "image",
          "type": "IMAGE"
        }
      ],
      "mode": 4,
      "order": 31,
      "outputs": [
        {
          "links": [
            219
          ],
          "name": "MASK",
          "type": "MASK"
        }
      ],
      "pos": [
        800,
        740
      ],
      "properties": {
        "Node name for S&R": "ImageToMask",
        "cnr_id": "comfy-core",
        "ver": "0.3.38"
      },
      "size": [
        210,
        60
      ],
      "type": "ImageToMask",
      "widgets_values": [
        "red"
      ]
    },
    {
      "flags": {
        "collapsed": false
      },
      "id": 129,
      "inputs": [
        {
          "link": 205,
          "name": "mask",
          "type": "MASK"
        }
      ],
      "mode": 4,
      "order": 21,
      "outputs": [
        {
          "links": [
            237
          ],
          "name": "IMAGE",
          "type": "IMAGE"
        }
      ],
      "pos": [
        1060,
        940
      ],
      "properties": {
        "Node name for S&R": "MaskToImage",
        "cnr_id": "comfy-core",
        "ver": "0.3.38"
      },
      "size": [
        210,
        26
      ],
      "type": "MaskToImage",
      "widgets_values": []
    },
    {
      "flags": {},
      "id": 135,
      "inputs": [
        {
          "link": 302,
          "name": "images",
          "type": "IMAGE"
        }
      ],
      "mode": 4,
      "order": 30,
      "outputs": [],
      "pos": [
        710,
        1200
      ],
      "properties": {
        "Node name for S&R": "PreviewImage",
        "cnr_id": "comfy-core",
        "ver": "0.3.38"
      },
      "size": [
        280,
        270
      ],
      "type": "PreviewImage",
      "widgets_values": []
    },
    {
      "flags": {},
      "id": 133,
      "inputs": [
        {
          "link": 298,
          "name": "images",
          "type": "IMAGE"
        }
      ],
      "mode": 4,
      "order": 29,
      "outputs": [],
      "pos": [
        1000,
        1200
      ],
      "properties": {
        "Node name for S&R": "PreviewImage",
        "cnr_id": "comfy-core",
        "ver": "0.3.38"
      },
      "size": [
        290,
        270
      ],
      "type": "PreviewImage",
      "widgets_values": []
    },
    {
      "bgcolor": "#533",
      "color": "#322",
      "flags": {},
      "id": 147,
      "inputs": [],
      "mode": 4,
      "order": 3,
      "outputs": [
        {
          "links": [
            236
          ],
          "name": "INT",
          "type": "INT",
          "widget": {
            "name": "amount"
          }
        }
      ],
      "pos": [
        60,
        720
      ],
      "properties": {
        "Run widget replace on values": false
      },
      "size": [
        340,
        82
      ],
      "type": "PrimitiveNode",
      "widgets_values": [
        80,
        "fixed"
      ]
    },
    {
      "flags": {},
      "id": 73,
      "inputs": [],
      "mode": 0,
      "order": 4,
      "outputs": [
        {
          "links": [
            202
          ],
          "name": "IMAGE",
          "type": "IMAGE"
        },
        {
          "links": null,
          "name": "MASK",
          "type": "MASK"
        }
      ],
      "pos": [
        -290,
        690
      ],
      "properties": {
        "Node name for S&R": "LoadImage",
        "cnr_id": "comfy-core",
        "ver": "0.3.34"
      },
      "size": [
        274.080078125,
        314.00006103515625
      ],
      "type": "LoadImage",
      "widgets_values": [
        "video_wan_vace_14B_ref2v_reference_image.jpg",
        "image"
      ]
    },
    {
      "bgcolor": "#000",
      "color": "#432",
      "flags": {},
      "id": 117,
      "inputs": [],
      "mode": 0,
      "order": 5,
      "outputs": [],
      "pos": [
        950,
        360
      ],
      "properties": {},
      "size": [
        320,
        170
      ],
      "title": "KSampler Setting",
      "type": "MarkdownNote",
      "widgets_values": [
        "## Default\n\n- steps:20\n- cfg:6.0\n\n## For CausVid LoRA\n\n- steps: 2-4\n- cfg: 1.0\n\n"
      ]
    },
    {
      "flags": {},
      "id": 158,
      "inputs": [],
      "mode": 0,
      "order": 6,
      "outputs": [
        {
          "links": [
            285,
            287,
            289
          ],
          "name": "INT",
          "type": "INT",
          "widget": {
            "name": "width"
          }
        }
      ],
      "pos": [
        70,
        920
      ],
      "properties": {
        "Run widget replace on values": false
      },
      "size": [
        280,
        82
      ],
      "title": "Width",
      "type": "PrimitiveNode",
      "widgets_values": [
        768,
        "fixed"
      ]
    },
    {
      "flags": {},
      "id": 159,
      "inputs": [],
      "mode": 0,
      "order": 7,
      "outputs": [
        {
          "links": [
            288,
            290,
            292
          ],
          "name": "INT",
          "type": "INT",
          "widget": {
            "name": "height"
          }
        }
      ],
      "pos": [
        70,
        1050
      ],
      "properties": {
        "Run widget replace on values": false
      },
      "size": [
        280,
        82
      ],
      "title": "Height",
      "type": "PrimitiveNode",
      "widgets_values": [
        768,
        "fixed"
      ]
    },
    {
      "flags": {},
      "id": 114,
      "inputs": [],
      "mode": 0,
      "order": 8,
      "outputs": [
        {
          "links": [
            185,
            192
          ],
          "name": "VAE",
          "slot_index": 0,
          "type": "VAE"
        }
      ],
      "pos": [
        -290,
        540
      ],
      "properties": {
        "Node name for S&R": "VAELoader",
        "cnr_id": "comfy-core",
        "models": [
          {
            "directory": "vae",
            "name": "wan_2.1_vae.safetensors",
            "url": "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors"
          }
        ],
        "ver": "0.3.34"
      },
      "size": [
        350,
        58
      ],
      "type": "VAELoader",
      "widgets_values": [
        "wan_2.1_vae.safetensors"
      ]
    },
    {
      "flags": {},
      "id": 69,
      "inputs": [
        {
          "link": 129,
          "name": "video",
          "type": "VIDEO"
        }
      ],
      "mode": 0,
      "order": 38,
      "outputs": [],
      "pos": [
        1340,
        70
      ],
      "properties": {
        "Node name for S&R": "SaveVideo",
        "cnr_id": "comfy-core",
        "ver": "0.3.34"
      },
      "size": [
        676.23095703125,
        774.23095703125
      ],
      "type": "SaveVideo",
      "widgets_values": [
        "video/ComfyUI",
        "auto",
        "auto"
      ]
    },
    {
      "flags": {},
      "id": 108,
      "inputs": [
        {
          "link": 179,
          "name": "model",
          "type": "MODEL"
        },
        {
          "link": 279,
          "name": "positive",
          "type": "CONDITIONING"
        },
        {
          "link": 280,
          "name": "negative",
          "type": "CONDITIONING"
        },
        {
          "link": 281,
          "name": "latent_image",
          "type": "LATENT"
        }
      ],
      "mode": 0,
      "order": 33,
      "outputs": [
        {
          "links": [
            189
          ],
          "name": "LATENT",
          "slot_index": 0,
          "type": "LATENT"
        }
      ],
      "pos": [
        950,
        60
      ],
      "properties": {
        "Node name for S&R": "KSampler",
        "cnr_id": "comfy-core",
        "ver": "0.3.34"
      },
      "size": [
        315,
        262
      ],
      "type": "KSampler",
      "widgets_values": [
        552837504311715,
        "randomize",
        4,
        1,
        "uni_pc",
        "simple",
        1
      ]
    },
    {
      "flags": {
        "collapsed": false
      },
      "id": 68,
      "inputs": [
        {
          "link": 197,
          "name": "images",
          "type": "IMAGE"
        },
        {
          "link": null,
          "name": "audio",
          "shape": 7,
          "type": "AUDIO"
        }
      ],
      "mode": 0,
      "order": 36,
      "outputs": [
        {
          "links": [
            129
          ],
          "name": "VIDEO",
          "type": "VIDEO"
        }
      ],
      "pos": [
        1330,
        -120
      ],
      "properties": {
        "Node name for S&R": "CreateVideo",
        "cnr_id": "comfy-core",
        "ver": "0.3.34"
      },
      "size": [
        270,
        78
      ],
      "type": "CreateVideo",
      "widgets_values": [
        16
      ]
    },
    {
      "flags": {},
      "id": 109,
      "inputs": [
        {
          "link": 183,
          "name": "positive",
          "type": "CONDITIONING"
        },
        {
          "link": 184,
          "name": "negative",
          "type": "CONDITIONING"
        },
        {
          "link": 185,
          "name": "vae",
          "type": "VAE"
        },
        {
          "link": 299,
          "name": "control_video",
          "shape": 7,
          "type": "IMAGE"
        },
        {
          "link": 219,
          "name": "control_masks",
          "shape": 7,
          "type": "MASK"
        },
        {
          "link": 202,
          "name": "reference_image",
          "shape": 7,
          "type": "IMAGE"
        },
        {
          "link": 285,
          "name": "width",
          "type": "INT",
          "widget": {
            "name": "width"
          }
        },
        {
          "link": 292,
          "name": "height",
          "type": "INT",
          "widget": {
            "name": "height"
          }
        }
      ],
      "mode": 0,
      "order": 32,
      "outputs": [
        {
          "links": [
            279
          ],
          "name": "positive",
          "type": "CONDITIONING"
        },
        {
          "links": [
            280
          ],
          "name": "negative",
          "type": "CONDITIONING"
        },
        {
          "links": [
            281
          ],
          "name": "latent",
          "type": "LATENT"
        },
        {
          "links": [
            282
          ],
          "name": "trim_latent",
          "type": "INT"
        }
      ],
      "pos": [
        620,
        110
      ],
      "properties": {
        "Node name for S&R": "WanVaceToVideo",
        "cnr_id": "comfy-core",
        "ver": "0.3.34"
      },
      "size": [
        315,
        254
      ],
      "type": "WanVaceToVideo",
      "widgets_values": [
        768,
        768,
        81,
        1,
        1.0000000000000002
      ]
    },
    {
      "flags": {},
      "id": 113,
      "inputs": [],
      "mode": 0,
      "order": 9,
      "outputs": [
        {
          "links": [
            187
          ],
          "name": "MODEL",
          "slot_index": 0,
          "type": "MODEL"
        }
      ],
      "pos": [
        -290,
        100
      ],
      "properties": {
        "Node name for S&R": "UNETLoader",
        "cnr_id": "comfy-core",
        "models": [
          {
            "directory": "diffusion_models",
            "name": "wan2.1_vace_14B_fp16.safetensors",
            "url": "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/diffusion_models/wan2.1_vace_14B_fp16.safetensors"
          }
        ],
        "ver": "0.3.34"
      },
      "size": [
        350,
        82
      ],
      "type": "UNETLoader",
      "widgets_values": [
        "wan2.1_vace_14B_fp16.safetensors",
        "default"
      ]
    },
    {
      "flags": {},
      "id": 115,
      "inputs": [
        {
          "link": 187,
          "name": "model",
          "type": "MODEL"
        },
        {
          "link": 188,
          "name": "clip",
          "type": "CLIP"
        }
      ],
      "mode": 0,
      "order": 20,
      "outputs": [
        {
          "links": [
            186
          ],
          "name": "MODEL",
          "type": "MODEL"
        },
        {
          "links": [
            176,
            178
          ],
          "name": "CLIP",
          "type": "CLIP"
        }
      ],
      "pos": [
        -290,
        220
      ],
      "properties": {
        "Node name for S&R": "LoraLoader",
        "cnr_id": "comfy-core",
        "models": [
          {
            "directory": "loras",
            "name": "Wan21_CausVid_14B_T2V_lora_rank32.safetensors",
            "url": "https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Wan21_CausVid_14B_T2V_lora_rank32.safetensors"
          }
        ],
        "ver": "0.3.38"
      },
      "size": [
        350,
        126
      ],
      "type": "LoraLoader",
      "widgets_values": [
        "Wan21_CausVid_14B_T2V_lora_rank32.safetensors",
        0.30000000000000004,
        1
      ]
    },
    {
      "bgcolor": "#533",
      "color": "#322",
      "flags": {},
      "id": 107,
      "inputs": [
        {
          "link": 178,
          "name": "clip",
          "type": "CLIP"
        }
      ],
      "mode": 0,
      "order": 25,
      "outputs": [
        {
          "links": [
            184
          ],
          "name": "CONDITIONING",
          "slot_index": 0,
          "type": "CONDITIONING"
        }
      ],
      "pos": [
        120,
        400
      ],
      "properties": {
        "Node name for S&R": "CLIPTextEncode",
        "cnr_id": "comfy-core",
        "ver": "0.3.34"
      },
      "size": [
        425.27801513671875,
        180.6060791015625
      ],
      "title": "CLIP Text Encode (Negative Prompt)",
      "type": "CLIPTextEncode",
      "widgets_values": [
        "过曝，静态，细节模糊不清，字幕，风格，作品，画作，画面，静止，整体发灰，最差质量，低质量，JPEG压缩残留，丑陋的，残缺的，多余的手指，画得不好的手部，画得不好的脸部，畸形的，毁容的，形态畸形的肢体，手指融合，静止不动的画面，杂乱的背景，三条腿，背景人很多，倒着走,"
      ]
    },
    {
      "bgcolor": "#353",
      "color": "#232",
      "flags": {},
      "id": 105,
      "inputs": [
        {
          "link": 176,
          "name": "clip",
          "type": "CLIP"
        }
      ],
      "mode": 0,
      "order": 24,
      "outputs": [
        {
          "links": [
            183
          ],
          "name": "CONDITIONING",
          "slot_index": 0,
          "type": "CONDITIONING"
        }
      ],
      "pos": [
        120,
        60
      ],
      "properties": {
        "Node name for S&R": "CLIPTextEncode",
        "cnr_id": "comfy-core",
        "ver": "0.3.34"
      },
      "size": [
        420,
        290
      ],
      "title": "CLIP Text Encode (Positive Prompt)",
      "type": "CLIPTextEncode",
      "widgets_values": [
        "An icicle dragon lunges forward, mouth wide open to exhale a stream of icy mist. Ultramarine energy flickers beneath its frost-coated scales as it twists. The camera circles slowly, capturing the swirling ice particles and the backdrop of floating glaciers and frozen nebulae under a cyan-blue filter."
      ]
    },
    {
      "bgcolor": "#000",
      "color": "#432",
      "flags": {},
      "id": 163,
      "inputs": [],
      "mode": 0,
      "order": 10,
      "outputs": [],
      "pos": [
        -320,
        -140
      ],
      "properties": {},
      "size": [
        410,
        100
      ],
      "title": "About CausVid LoRA",
      "type": "MarkdownNote",
      "widgets_values": [
        "We have added CausVid LoRA by default to achieve acceleration. However, in some cases, the video may shake and become blurry. You might need to test different LoRA intensities to get the best results, which should be between 0.3 and 0.7. If you don't need it, you can use the bypass mode to disable it, and then restore the settings of `KSampler` to the default ones."
      ]
    },
    {
      "bgcolor": "#000",
      "color": "#432",
      "flags": {},
      "id": 120,
      "inputs": [],
      "mode": 0,
      "order": 11,
      "outputs": [],
      "pos": [
        -710,
        510
      ],
      "properties": {},
      "size": [
        370,
        130
      ],
      "title": "Note",
      "type": "MarkdownNote",
      "widgets_values": [
        "The generation quality of the 14B model is better, but it takes longer to generate. If you have already downloaded the model, you can choose to directly use the nodes above, or just modify the model loaded by the loader node.\n\nThe corresponding LoRA should match the Diffusion Model. For example, the LoRA corresponding to the 14B diffusion model is the 14B LoRA. \n"
      ]
    },
    {
      "bgcolor": "#000",
      "color": "#432",
      "flags": {},
      "id": 162,
      "inputs": [],
      "mode": 0,
      "order": 12,
      "outputs": [],
      "pos": [
        -320,
        1080
      ],
      "properties": {},
      "size": [
        340,
        120
      ],
      "title": "Note",
      "type": "MarkdownNote",
      "widgets_values": [
        "VACE does not use data with style reference for training. Currently, it only has the functions of object or background reference. Therefore, at \"Load reference image\", you should upload a image with a solid-colored background or a background image. At present, the WanVaceToVideo node only supports the input of a single reference_image image."
      ]
    },
    {
      "bgcolor": "#000",
      "color": "#432",
      "flags": {},
      "id": 161,
      "inputs": [],
      "mode": 4,
      "order": 13,
      "outputs": [],
      "pos": [
        470,
        1200
      ],
      "properties": {},
      "size": [
        230,
        110
      ],
      "title": "Note",
      "type": "MarkdownNote",
      "widgets_values": [
        "Since VACE supports converting any frame into a video, here we have created a sequence of images with the first frame and the corresponding mask. In this way, we can control the starting frame.\n"
      ]
    },
    {
      "bgcolor": "#000",
      "color": "#432",
      "flags": {},
      "id": 164,
      "inputs": [],
      "mode": 0,
      "order": 14,
      "outputs": [],
      "pos": [
        -1200,
        10
      ],
      "properties": {},
      "size": [
        470,
        730
      ],
      "type": "MarkdownNote",
      "widgets_values": [
        "[Tutorial](https://docs.comfy.org/tutorials/video/wan/vace)\n\n\n\n##  14B Support 480P 720P\n\n**Diffusion Model**\n- [wan2.1_vace_14B_fp16.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/diffusion_models/wan2.1_vace_14B_fp16.safetensors)\n\n**LoRA**\n- [Wan21_CausVid_14B_T2V_lora_rank32.safetensors](https://huggingface.co/Kijai/WanVideo_comfy/blob/main/Wan21_CausVid_14B_T2V_lora_rank32.safetensors)\n\nIt takes about 40 minutes to complete at 81 frames 720P resolution with the RTX 4090 .  \nAfter using Wan21_CausVid_14B_T2V_lora_rank32.safetensors, it only takes about 4 minutes.\n\n## 1.3B Support 480P only\n\n**Diffusion Model**\n- [wan2.1_vace_1.3B_fp16.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/diffusion_models/wan2.1_vace_1.3B_fp16.safetensors)\n\n**LoRA**\n- [Wan21_CausVid_bidirect2_T2V_1_3B_lora_rank32.safetensors](https://huggingface.co/Kijai/WanVideo_comfy/blob/main/Wan21_CausVid_bidirect2_T2V_1_3B_lora_rank32.safetensors)\n \n\n## Other Models\n\n* You may already have these models if you use Wan workflow before.\n\n**VAE**\n- [wan_2.1_vae.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors?download=true)\n\n**Text encoders**   Chose one of following model\n- [umt5_xxl_fp16.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp16.safetensors?download=true)\n- [umt5_xxl_fp8_e4m3fn_scaled.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors?download=true)\n\n> You can choose between fp16 of fp8; I used fp16 to match what kijai's wrapper is compatible with.\n\nFile save location\n\n```\nComfyUI/\n├── models/\n│   ├── diffusion_models/\n│   │   ├-── wan2.1_vace_14B_fp16.safetensors\n│   │   └─── wan2.1_vace_1.3B_fp16.safetensors \n│   ├── text_encoders/\n│   │   └─── umt5_xxl_fp8_e4m3fn_scaled.safetensors # or fp16\n│   ├── loras/\n│   │   ├── Wan21_CausVid_14B_T2V_lora_rank32.safetensors\n│   │   └── Wan21_CausVid_bidirect2_T2V_1_3B_lora_rank32.safetensors\n│   └── vae/\n│       └──  wan_2.1_vae.safetensors\n```\n"
      ]
    },
    {
      "bgcolor": "#000",
      "color": "#432",
      "flags": {},
      "id": 116,
      "inputs": [],
      "mode": 0,
      "order": 15,
      "outputs": [],
      "pos": [
        60,
        1200
      ],
      "properties": {},
      "size": [
        210,
        110
      ],
      "title": "About Video Size",
      "type": "MarkdownNote",
      "widgets_values": [
        "| Model                                                         | 480P | 720P |\n| ------------------------------------------------------------ | ---- | ---- |\n| [VACE-1.3B](https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B) | ✅   | ❌   |\n| [VACE-14B](https://huggingface.co/Wan-AI/Wan2.1-VACE-14B)   | ✅   | ✅   |"
      ]
    },
    {
      "flags": {},
      "id": 148,
      "inputs": [],
      "mode": 4,
      "order": 16,
      "outputs": [
        {
          "links": [
            296
          ],
          "name": "IMAGE",
          "type": "IMAGE"
        },
        {
          "links": null,
          "name": "MASK",
          "type": "MASK"
        }
      ],
      "pos": [
        480,
        750
      ],
      "properties": {
        "Node name for S&R": "LoadImage",
        "cnr_id": "comfy-core",
        "ver": "0.3.38"
      },
      "size": [
        274.080078125,
        314
      ],
      "type": "LoadImage",
      "widgets_values": [
        "video_wan_vace_14B_ref2v_reference_image.jpg",
        "image"
      ]
    },
    {
      "flags": {},
      "id": 130,
      "inputs": [
        {
          "link": 287,
          "name": "width",
          "type": "INT",
          "widget": {
            "name": "width"
          }
        },
        {
          "link": 288,
          "name": "height",
          "type": "INT",
          "widget": {
            "name": "height"
          }
        }
      ],
      "mode": 4,
      "order": 18,
      "outputs": [
        {
          "links": [
            205
          ],
          "name": "MASK",
          "type": "MASK"
        }
      ],
      "pos": [
        1060,
        1010
      ],
      "properties": {
        "Node name for S&R": "SolidMask",
        "cnr_id": "comfy-core",
        "ver": "0.3.38"
      },
      "size": [
        210,
        110
      ],
      "type": "SolidMask",
      "widgets_values": [
        1,
        768,
        768
      ]
    },
    {
      "flags": {},
      "id": 132,
      "inputs": [
        {
          "link": 237,
          "name": "image",
          "type": "IMAGE"
        },
        {
          "link": 236,
          "name": "amount",
          "type": "INT",
          "widget": {
            "name": "amount"
          }
        }
      ],
      "mode": 4,
      "order": 26,
      "outputs": [
        {
          "links": [
            297,
            301
          ],
          "name": "IMAGE",
          "type": "IMAGE"
        }
      ],
      "pos": [
        1060,
        840
      ],
      "properties": {
        "Node name for S&R": "RepeatImageBatch",
        "cnr_id": "comfy-core",
        "ver": "0.3.38"
      },
      "size": [
        210,
        60
      ],
      "type": "RepeatImageBatch",
      "widgets_values": [
        80
      ]
    },
    {
      "flags": {},
      "id": 165,
      "inputs": [
        {
          "label": "image0",
          "link": 296,
          "name": "images.image0",
          "type": "IMAGE"
        },
        {
          "label": "image1",
          "link": 297,
          "name": "images.image1",
          "type": "IMAGE"
        },
        {
          "label": "image2",
          "link": null,
          "name": "images.image2",
          "shape": 7,
          "type": "IMAGE"
        }
      ],
      "mode": 4,
      "order": 27,
      "outputs": [
        {
          "links": [
            298,
            299
          ],
          "name": "IMAGE",
          "type": "IMAGE"
        }
      ],
      "pos": [
        1080,
        730
      ],
      "properties": {
        "Node name for S&R": "BatchImagesNode"
      },
      "size": [
        169.23046875,
        66
      ],
      "type": "BatchImagesNode"
    },
    {
      "flags": {},
      "id": 145,
      "inputs": [
        {
          "link": 230,
          "name": "mask",
          "type": "MASK"
        }
      ],
      "mode": 4,
      "order": 22,
      "outputs": [
        {
          "links": [
            300
          ],
          "name": "IMAGE",
          "type": "IMAGE"
        }
      ],
      "pos": [
        810,
        950
      ],
      "properties": {
        "Node name for S&R": "MaskToImage",
        "cnr_id": "comfy-core",
        "ver": "0.3.38"
      },
      "size": [
        210,
        30
      ],
      "type": "MaskToImage",
      "widgets_values": []
    },
    {
      "flags": {},
      "id": 166,
      "inputs": [
        {
          "label": "image0",
          "link": 300,
          "name": "images.image0",
          "type": "IMAGE"
        },
        {
          "label": "image1",
          "link": 301,
          "name": "images.image1",
          "type": "IMAGE"
        },
        {
          "label": "image2",
          "link": null,
          "name": "images.image2",
          "shape": 7,
          "type": "IMAGE"
        }
      ],
      "mode": 4,
      "order": 28,
      "outputs": [
        {
          "links": [
            302,
            303
          ],
          "name": "IMAGE",
          "type": "IMAGE"
        }
      ],
      "pos": [
        820,
        840
      ],
      "properties": {
        "Node name for S&R": "BatchImagesNode"
      },
      "size": [
        169.23046875,
        66
      ],
      "type": "BatchImagesNode"
    }
  ],
  "revision": 0,
  "version": 0.4
}