Files
scraed-LanPaint/example_workflows/wan2_2_T2I_ImageEncode_Inpaint.json
T
scraed 59aa08dff0 Store masks inside exported videos and convert the example set to ImageEncode/ImageDecode
Mask-in-video (the masks now travel with the video file):
- New videometa module: write/read a JSON payload under the lanpaint-mask
  mp4 metadata tag via PyAV (stream copy, movflags=use_metadata_tags), so
  exporting produces a NEW file and the source is never modified.
- Two server routes: GET /lanpaint/video_mask_meta (read the payload back)
  and POST /lanpaint/export_mask_video (remux into input/<base>_masked.mp4).
- The mask editor exports the painted keyframes (base64 PNGs) + audio
  intervals into the video; loading a video with the tag auto-restores the
  masks (editor and node preview). A video without the tag clears the
  workflow's masks - the video is the source of truth. The export also
  offers a native save dialog (showSaveFilePicker) when available.
- The video widget upload now uses video_upload so MP4s are selectable in
  the file chooser (was image_upload).
- LanPaint_ImageEncode accepts 5D latents from video VAEs encoding a single
  image (e.g. the Hunyuan video VAE) - fixes the Hunyuan example.

Example set conversion (one example per supported model, new files, old
pairs removed after being superseded):
- New *ImageEncode/*EncodeDecode example workflows for SDXL, Flux.1,
  Flux.2 Dev, Flux2 Klein, SD3.5, Hunyuan, Ideogram4, Krea2, Qwen Edit,
  Qwen Image, Z-Image, Wan 2.2 and MiniMax H3 (AV), all using
  LanPaint_ImageEncode/ImageDecode instead of VAEEncode +
  SetLatentNoiseMask + VAEDecode + MaskBlend; every example references its
  own example folder's masked input (hash-verified); preview jpgs generated
  from the test runs; the H3 example ships its output mp4 as a preview.
- HiDream example removed on request; Example_29 added with the H3 masked
  input video.

Fixes along the way: normalize node input.link/output.links fields against
the links arrays in all converted workflows (the frontend renders
null-link nodes as disconnected); stale Inpainting_mode widget removed from
the Flux.2 sampler; Lambda defaults 5.0 (first-order scheme); torchaudio
resample test assertion relaxed (edge ringing); the videometa tests updated
to the final export signature.
2026-08-09 20:41:45 +08:00

1319 lines
21 KiB
JSON

{
"id": "26bf2769-956f-4cee-b5f6-a57a366c9101",
"revision": 0,
"last_node_id": 85,
"last_link_id": 189,
"nodes": [
{
"id": 56,
"type": "UNETLoader",
"pos": [
34.70310592651367,
57.175601959228516
],
"size": [
346.7470703125,
82
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"slot_index": 0,
"links": [
112
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.45",
"Node name for S&R": "UNETLoader",
"models": [
{
"name": "wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors",
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors",
"directory": "diffusion_models"
}
],
"widget_ue_connectable": {}
},
"widgets_values": [
"wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors",
"default"
]
},
{
"id": 54,
"type": "ModelSamplingSD3",
"pos": [
640,
-70
],
"size": [
210,
60
],
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 110
}
],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"slot_index": 0,
"links": [
150
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.45",
"Node name for S&R": "ModelSamplingSD3",
"widget_ue_connectable": {}
},
"widgets_values": [
1
]
},
{
"id": 55,
"type": "ModelSamplingSD3",
"pos": [
640,
60
],
"size": [
210,
58
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 112
}
],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"slot_index": 0,
"links": [
159
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.45",
"Node name for S&R": "ModelSamplingSD3",
"widget_ue_connectable": {}
},
"widgets_values": [
1
]
},
{
"id": 62,
"type": "MarkdownNote",
"pos": [
-480,
-120
],
"size": [
480,
350
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [],
"title": "Model Links",
"properties": {
"widget_ue_connectable": {}
},
"widgets_values": [
"[Tutorial](https://docs.comfy.org/tutorials/video/wan/wan2_2\n) | [教程](https://docs.comfy.org/zh-CN/tutorials/video/wan/wan2_2\n)\n\n**Diffusion Model**\n- [wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors)\n- [wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors)\n\n**VAE**\n- [wan_2.1_vae.safetensors](https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors)\n\n**Text Encoder** \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)\n\n\nFile save location\n\n```\nComfyUI/\n├───📂 models/\n│ ├───📂 diffusion_models/\n│ │ ├─── wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors\n│ │ └─── wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors\n│ ├───📂 text_encoders/\n│ │ └─── umt5_xxl_fp8_e4m3fn_scaled.safetensors \n│ └───📂 vae/\n│ └── wan_2.1_vae.safetensors\n```\n"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 7,
"type": "CLIPTextEncode",
"pos": [
415.27801513671875,
562.8309936523438
],
"size": [
425.27801513671875,
180.6060791015625
],
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 75
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
152,
161
]
}
],
"title": "CLIP Text Encode (Negative Prompt)",
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.45",
"Node name for S&R": "CLIPTextEncode",
"widget_ue_connectable": {}
},
"widgets_values": [
"色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走"
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 59,
"type": "EmptyHunyuanLatentVideo",
"pos": [
50,
530
],
"size": [
315,
130
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"slot_index": 0,
"links": []
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.45",
"Node name for S&R": "EmptyHunyuanLatentVideo",
"widget_ue_connectable": {}
},
"widgets_values": [
768,
1344,
1,
1
]
},
{
"id": 37,
"type": "UNETLoader",
"pos": [
34.225364685058594,
-71.77911376953125
],
"size": [
346.7470703125,
82
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"slot_index": 0,
"links": [
110
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.45",
"Node name for S&R": "UNETLoader",
"models": [
{
"name": "wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors",
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors",
"directory": "diffusion_models"
}
],
"widget_ue_connectable": {}
},
"widgets_values": [
"wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors",
"default"
]
},
{
"id": 38,
"type": "CLIPLoader",
"pos": [
38.86457061767578,
189.26513671875
],
"size": [
346.391845703125,
106
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CLIP",
"type": "CLIP",
"slot_index": 0,
"links": [
74,
75
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.45",
"Node name for S&R": "CLIPLoader",
"models": [
{
"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",
"directory": "text_encoders"
}
],
"widget_ue_connectable": {}
},
"widgets_values": [
"umt5_xxl_fp8_e4m3fn_scaled.safetensors",
"wan",
"default"
]
},
{
"id": 67,
"type": "PrimitiveNode",
"pos": [
874.0289916992188,
28.25248908996582
],
"size": [
312.7867736816406,
88.04627990722656
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"widget": {
"name": "steps"
},
"links": [
154,
163
]
}
],
"title": "Steps",
"properties": {
"Run widget replace on values": false,
"widget_ue_connectable": {}
},
"widgets_values": [
20,
"fixed"
]
},
{
"id": 68,
"type": "PrimitiveNode",
"pos": [
881.3255615234375,
167.12957763671875
],
"size": [
299.6272277832031,
82
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"widget": {
"name": "end_at_step"
},
"links": [
157,
166
]
}
],
"title": "Switch_step",
"properties": {
"Run widget replace on values": false,
"widget_ue_connectable": {}
},
"widgets_values": [
3,
"fixed"
]
},
{
"id": 66,
"type": "PrimitiveNode",
"pos": [
869.0523071289062,
458.133544921875
],
"size": [
302.1168212890625,
106
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "COMBO",
"type": "COMBO",
"widget": {
"name": "scheduler"
},
"links": [
156,
165
]
}
],
"title": "Scheduler",
"properties": {
"Run widget replace on values": false,
"widget_ue_connectable": {}
},
"widgets_values": [
"sgm_uniform",
"fixed",
""
]
},
{
"id": 65,
"type": "PrimitiveNode",
"pos": [
871.877197265625,
301.2847595214844
],
"size": [
304.6064453125,
106
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "COMBO",
"type": "COMBO",
"widget": {
"name": "sampler_name"
},
"links": [
155,
164
]
}
],
"title": "Sampler",
"properties": {
"Run widget replace on values": false,
"widget_ue_connectable": {}
},
"widgets_values": [
"euler",
"fixed",
""
]
},
{
"id": 39,
"type": "VAELoader",
"pos": [
40,
350
],
"size": [
344.731689453125,
59.98149108886719
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"slot_index": 0,
"links": [
182,
186
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.45",
"Node name for S&R": "VAELoader",
"models": [
{
"name": "wan_2.1_vae.safetensors",
"url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors",
"directory": "vae"
}
],
"widget_ue_connectable": {}
},
"widgets_values": [
"wan_2.1_vae.safetensors"
]
},
{
"id": 70,
"type": "SaveImage",
"pos": [
1818.5047607421875,
-71.57525634765625
],
"size": [
270,
270
],
"flags": {},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 189
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59"
},
"widgets_values": [
"ComfyUI"
]
},
{
"id": 75,
"type": "LanPaint_KSamplerAdvanced",
"pos": [
1271.481201171875,
-503.987548828125
],
"size": [
400,
764
],
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 150
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 151
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 152
},
{
"name": "latent_image",
"type": "LATENT",
"link": 184
},
{
"name": "steps",
"type": "INT",
"widget": {
"name": "steps"
},
"link": 154
},
{
"name": "sampler_name",
"type": "COMBO",
"widget": {
"name": "sampler_name"
},
"link": 155
},
{
"name": "scheduler",
"type": "COMBO",
"widget": {
"name": "scheduler"
},
"link": 156
},
{
"name": "end_at_step",
"type": "INT",
"widget": {
"name": "end_at_step"
},
"link": 157
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
172
]
}
],
"properties": {
"cnr_id": "LanPaint",
"ver": "1b50a90424318a457ff32a1fd5ee8a441b768b45",
"Node name for S&R": "LanPaint_KSamplerAdvanced"
},
"widgets_values": [
"enable",
310185466124726,
"randomize",
20,
2,
"euler",
"sgm_uniform",
0,
3,
"disable",
5,
5.0,
0.15,
1,
15,
"Image First",
1,
"LanPaint KSampler Adv. For more info, visit https://github.com/scraed/LanPaint. If you find it useful, please give a star ⭐️!"
]
},
{
"id": 63,
"type": "Note",
"pos": [
20,
720
],
"size": [
370,
120
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [],
"outputs": [],
"title": "Video Size",
"properties": {
"widget_ue_connectable": {}
},
"widgets_values": [
"By default, we set the video to a smaller size for users with low VRAM. If you have enough VRAM, you can change the size"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 76,
"type": "LanPaint_KSamplerAdvanced",
"pos": [
1276.2220458984375,
325.4043884277344
],
"size": [
400,
764
],
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 159
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 160
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 161
},
{
"name": "latent_image",
"type": "LATENT",
"link": 172
},
{
"name": "steps",
"type": "INT",
"widget": {
"name": "steps"
},
"link": 163
},
{
"name": "sampler_name",
"type": "COMBO",
"widget": {
"name": "sampler_name"
},
"link": 164
},
{
"name": "scheduler",
"type": "COMBO",
"widget": {
"name": "scheduler"
},
"link": 165
},
{
"name": "start_at_step",
"type": "INT",
"widget": {
"name": "start_at_step"
},
"link": 166
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
185
]
}
],
"properties": {
"cnr_id": "LanPaint",
"ver": "1b50a90424318a457ff32a1fd5ee8a441b768b45",
"Node name for S&R": "LanPaint_KSamplerAdvanced"
},
"widgets_values": [
"enable",
542259685031634,
"randomize",
20,
2,
"euler",
"sgm_uniform",
3,
10000,
"disable",
5,
5.0,
0.15,
1,
15,
"Image First",
1,
"LanPaint KSampler Adv. For more info, visit https://github.com/scraed/LanPaint. If you find it useful, please give a star ⭐️!"
]
},
{
"id": 82,
"type": "Note",
"pos": [
1722.8084716796875,
-428.4427185058594
],
"size": [
370,
120
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [],
"outputs": [],
"title": "Acceleration tip",
"properties": {
"widget_ue_connectable": {}
},
"widgets_values": [
"Reduce LanPaint NumSteps for faster generation!"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 83,
"type": "Note",
"pos": [
1736.30029296875,
592.1900024414062
],
"size": [
370,
120
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [],
"outputs": [],
"title": "Acceleration tip",
"properties": {
"widget_ue_connectable": {}
},
"widgets_values": [
"Increase LanPaint Early Stop for faster generation!"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 6,
"type": "CLIPTextEncode",
"pos": [
420,
280
],
"size": [
425.4649963378906,
225.1785888671875
],
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 74
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
151,
160
]
}
],
"title": "CLIP Text Encode (Positive Prompt)",
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.45",
"Node name for S&R": "CLIPTextEncode",
"widget_ue_connectable": {}
},
"widgets_values": [
"Close up Portrait of a futuristic cowgirl wearing jeans rides a mechanical horse across a vast cyberpunk desert. The dunes shimmer with holographic projections, glowing in blues and purples. cacti and two massive moons hang low on the horizon, illuminating the dusty air. Cyberpunk western fusion, cinematic, 8K, highly detailed, atmospheric perspective, Blade Runner style."
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 69,
"type": "LoadImage",
"pos": [
38.325469970703125,
964.1947021484375
],
"size": [
274.080078125,
314
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
181,
187
]
},
{
"name": "MASK",
"type": "MASK",
"links": [
181,
187
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"Masked_Load_Me_in_Loader (8).png",
"image"
]
},
{
"id": 84,
"type": "LanPaint_ImageEncode",
"pos": [
386,
924
],
"size": [
300,
150
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 181
},
{
"name": "vae",
"type": "VAE",
"link": 182
},
{
"name": "mask",
"type": "MASK",
"link": 183
}
],
"outputs": [
{
"name": "latent",
"type": "LATENT",
"links": [
184
]
}
],
"widgets_values": [],
"properties": {
"Node name for S&R": "LanPaint_ImageEncode",
"cnr_id": "LanPaint"
}
},
{
"id": 85,
"type": "LanPaint_ImageDecode",
"pos": [
1818,
-75
],
"size": [
300,
200
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 185
},
{
"name": "vae",
"type": "VAE",
"link": 186
},
{
"name": "image",
"type": "IMAGE",
"link": 187
},
{
"name": "mask",
"type": "MASK",
"link": 188
},
{
"name": "blend_overlap",
"type": "INT",
"widget": {
"name": "blend_overlap"
}
}
],
"outputs": [
{
"name": "image",
"type": "IMAGE",
"links": [
189
]
}
],
"widgets_values": [
9
],
"properties": {
"Node name for S&R": "LanPaint_ImageDecode",
"cnr_id": "LanPaint"
}
}
],
"links": [
[
74,
38,
0,
6,
0,
"CLIP"
],
[
75,
38,
0,
7,
0,
"CLIP"
],
[
110,
37,
0,
54,
0,
"MODEL"
],
[
112,
56,
0,
55,
0,
"MODEL"
],
[
150,
54,
0,
75,
0,
"MODEL"
],
[
151,
6,
0,
75,
1,
"CONDITIONING"
],
[
152,
7,
0,
75,
2,
"CONDITIONING"
],
[
154,
67,
0,
75,
4,
"INT"
],
[
155,
65,
0,
75,
5,
"COMBO"
],
[
156,
66,
0,
75,
6,
"COMBO"
],
[
157,
68,
0,
75,
7,
"INT"
],
[
159,
55,
0,
76,
0,
"MODEL"
],
[
160,
6,
0,
76,
1,
"CONDITIONING"
],
[
161,
7,
0,
76,
2,
"CONDITIONING"
],
[
163,
67,
0,
76,
4,
"INT"
],
[
164,
65,
0,
76,
5,
"COMBO"
],
[
165,
66,
0,
76,
6,
"COMBO"
],
[
166,
68,
0,
76,
7,
"INT"
],
[
172,
75,
0,
76,
3,
"LATENT"
],
[
181,
69,
0,
84,
0,
"IMAGE"
],
[
182,
39,
0,
84,
1,
"VAE"
],
[
183,
69,
1,
84,
2,
"MASK"
],
[
184,
84,
0,
75,
3,
"LATENT"
],
[
185,
76,
0,
85,
0,
"LATENT"
],
[
186,
39,
0,
85,
1,
"VAE"
],
[
187,
69,
0,
85,
2,
"IMAGE"
],
[
188,
69,
1,
85,
3,
"MASK"
],
[
189,
85,
0,
70,
0,
"IMAGE"
]
],
"groups": [
{
"id": 1,
"title": "Step1 - Load models",
"bounding": [
20,
-150,
371.0310363769531,
571.3974609375
],
"color": "#3f789e",
"font_size": 24,
"flags": {}
},
{
"id": 2,
"title": "Step 1: Image size",
"bounding": [
20,
450,
367.5572814941406,
222.82713317871094
],
"color": "#3f789e",
"font_size": 24,
"flags": {}
},
{
"id": 3,
"title": "Step3 Prompt",
"bounding": [
410,
210,
445.27801513671875,
464.2060852050781
],
"color": "#3f789e",
"font_size": 24,
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 0.4241196229884343,
"offset": [
228.44262760495175,
461.85293161095177
]
},
"frontendVersion": "1.25.11",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true,
"ue_links": [],
"links_added_by_ue": []
},
"version": 0.4
}