Files
FranckyB-ComfyUI-Prompt-Man…/workflows/api/wan_video_i2v_api.json
T
FranckyB 866ca71053 feat: template-driven execution engine + WAN split + collapsible UI
- workflow_executor.py: new in-process template execution engine
  - load_template() / patch_template() / execute_template()
  - WAN Video i2v latent via WanImageToVideo node
  - Dual-step math: total=high+low, high=[0..H], low=[H..100]
  - loras_to_text() for PromptApplyLora JSON serialisation

- workflow_families.py: split wan → wan_image / wan_video_i2v / wan_video_t2v
  - Added FAMILY_WORKFLOW_STEMS mapping family keys to api/ file stems
  - Sampler strategy: wan_image → single KSampler, wan_video → dual KSamplerAdvanced

- tools/convert_to_api.py: UI JSON → API JSON conversion script (8 workflows)

- workflows/api/: 16 new files (api.json + map.json) for:
  flux_1, flux_2, qwen_image, sdxl, wan_image, wan_video_i2v, wan_video_t2v, z_image

- workflow_generator.py:
  - execute() now uses template-driven path first (load_template → patch → execute_template)
  - Falls back to hardcoded samplers when no template exists (sd15, ltxv)
  - Added source_image optional param for WAN i2v
  - Added steps_high / steps_low override parsing from JS
  - Strategy check updated: wan → wan_video for both i2v and t2v

- workflow_generator.js:
  - makeSection(): collapsible with chevron toggle, all start collapsed
  - updateWanVisibility(): handles wan_image / wan_video_i2v / wan_video_t2v
  - Steps (High) / Steps (Low) rows added to SAMPLER section (WAN Video only)
  - Standard Steps row hidden when WAN Video family selected
  - LoRA Stack A title: 'LoRA Stack (High)' for WAN Video, 'LoRA Stack' otherwise
  - LoRA Stack B: visible only for wan_video_i2v / wan_video_t2v
  - Model B row: visible only for WAN Video families
  - syncHidden(), applyOverrides(), updateUI() updated for steps_high/steps_low
  - Section _setNode() wired up after _weRecalc is defined
2026-04-11 19:02:59 +00:00

218 lines
3.6 KiB
JSON

{
"132": {
"class_type": "WanImageToVideo",
"inputs": {
"positive": [
"143",
0
],
"negative": [
"140",
0
],
"vae": [
"145",
0
],
"start_image": [
"97",
0
],
"width": [
"161",
1
],
"height": [
"161",
2
],
"length": 640,
"batch_size": 640
}
},
"145": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "wan_2.1_vae.safetensors"
}
},
"146": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
"type": "wan",
"device": "default"
}
},
"143": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"146",
0
],
"text": ""
}
},
"140": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"146",
0
],
"text": ""
}
},
"97": {
"class_type": "LoadImage",
"inputs": {
"image": "video_wan2_2_14B_i2v_input_image.jpg",
"upload": "image"
}
},
"161": {
"class_type": "ImageResizeKJv2",
"inputs": {
"image": [
"97",
0
],
"width": 512,
"height": 512,
"upscale_method": "nearest-exact",
"keep_proportion": "resize",
"pad_color": "0, 0, 0",
"crop_position": "center",
"divisible_by": 16,
"device": "cpu"
}
},
"148": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors",
"weight_dtype": "default"
}
},
"147": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors",
"weight_dtype": "default"
}
},
"162": {
"class_type": "PromptApplyLora",
"inputs": {
"model": [
"148",
0
],
"lora_stack_text": ""
}
},
"163": {
"class_type": "PromptApplyLora",
"inputs": {
"model": [
"147",
0
],
"lora_stack_text": ""
}
},
"134": {
"class_type": "ModelSamplingSD3",
"inputs": {
"model": [
"162",
0
],
"shift": 5.000000000000001
}
},
"149": {
"class_type": "ModelSamplingSD3",
"inputs": {
"model": [
"163",
0
],
"shift": 5.000000000000001
}
},
"139": {
"class_type": "KSamplerAdvanced",
"inputs": {
"model": [
"134",
0
],
"positive": [
"132",
0
],
"negative": [
"132",
1
],
"latent_image": [
"132",
2
],
"add_noise": "enable",
"noise_seed": 0,
"steps": 4,
"cfg": 1,
"sampler_name": "euler",
"scheduler": "simple",
"start_at_step": 0,
"end_at_step": 2,
"return_with_leftover_noise": "enable"
}
},
"137": {
"class_type": "KSamplerAdvanced",
"inputs": {
"model": [
"149",
0
],
"positive": [
"132",
0
],
"negative": [
"132",
1
],
"latent_image": [
"139",
0
],
"add_noise": "disable",
"noise_seed": 0,
"steps": 4,
"cfg": 1,
"sampler_name": "euler",
"scheduler": "simple",
"start_at_step": 2,
"end_at_step": 100,
"return_with_leftover_noise": "disable"
}
},
"142": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"137",
0
],
"vae": [
"145",
0
]
}
}
}