Add VACE Mode Select node for integer-based mode selection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-22 19:15:42 +01:00
parent 85acb6d326
commit 508f2ec404
3 changed files with 70 additions and 0 deletions

View File

@@ -260,6 +260,39 @@ Merge: result = original[0:121] + vace[0:81] + original[153:274]
--- ---
## Node: VACE Mode Select
Utility node that selects a VACE mode by integer index. Useful when driving the mode choice from another node's integer output (e.g. a selector or counter) instead of a dropdown.
### Inputs
| Input | Type | Default | Description |
|---|---|---|---|
| `index` | INT | `0` | Mode index (09). Clamped to valid range. |
### Index Mapping
| Index | Mode |
|---|---|
| 0 | End Extend |
| 1 | Pre Extend |
| 2 | Middle Extend |
| 3 | Edge Extend |
| 4 | Join Extend |
| 5 | Bidirectional Extend |
| 6 | Frame Interpolation |
| 7 | Replace/Inpaint |
| 8 | Video Inpaint |
| 9 | Keyframe |
### Outputs
| Output | Type | Description |
|---|---|---|
| `mode` | COMBO | Selected mode string — wire to VACE Source Prep or VACE Mask Generator's `mode` input. |
---
## Node: WanVideo Save Merged Model ## Node: WanVideo Save Merged Model
Saves a WanVideo diffusion model (with merged LoRAs) as a `.safetensors` file. Found under the **WanVideoWrapper** category. Saves a WanVideo diffusion model (with merged LoRAs) as a `.safetensors` file. Found under the **WanVideoWrapper** category.

View File

@@ -11,6 +11,10 @@ from .merge_node import (
NODE_CLASS_MAPPINGS as MERGE_CLASS_MAPPINGS, NODE_CLASS_MAPPINGS as MERGE_CLASS_MAPPINGS,
NODE_DISPLAY_NAME_MAPPINGS as MERGE_DISPLAY_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS as MERGE_DISPLAY_MAPPINGS,
) )
from .mode_select_node import (
NODE_CLASS_MAPPINGS as MODE_SELECT_CLASS_MAPPINGS,
NODE_DISPLAY_NAME_MAPPINGS as MODE_SELECT_DISPLAY_MAPPINGS,
)
NODE_CLASS_MAPPINGS.update(SAVE_CLASS_MAPPINGS) NODE_CLASS_MAPPINGS.update(SAVE_CLASS_MAPPINGS)
NODE_CLASS_MAPPINGS.update(LATENT_CLASS_MAPPINGS) NODE_CLASS_MAPPINGS.update(LATENT_CLASS_MAPPINGS)
@@ -18,6 +22,8 @@ NODE_CLASS_MAPPINGS.update(MERGE_CLASS_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(SAVE_DISPLAY_MAPPINGS) NODE_DISPLAY_NAME_MAPPINGS.update(SAVE_DISPLAY_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(LATENT_DISPLAY_MAPPINGS) NODE_DISPLAY_NAME_MAPPINGS.update(LATENT_DISPLAY_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(MERGE_DISPLAY_MAPPINGS) NODE_DISPLAY_NAME_MAPPINGS.update(MERGE_DISPLAY_MAPPINGS)
NODE_CLASS_MAPPINGS.update(MODE_SELECT_CLASS_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(MODE_SELECT_DISPLAY_MAPPINGS)
WEB_DIRECTORY = "./web/js" WEB_DIRECTORY = "./web/js"

31
mode_select_node.py Normal file
View File

@@ -0,0 +1,31 @@
from .nodes import VACE_MODES
class VACEModeSelect:
"""Select a VACE mode by integer index (0-9)."""
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"index": ("INT", {"default": 0, "min": 0, "max": len(VACE_MODES) - 1, "step": 1}),
},
}
RETURN_TYPES = (VACE_MODES,)
RETURN_NAMES = ("mode",)
FUNCTION = "select"
CATEGORY = "VACE Tools"
def select(self, index):
index = max(0, min(index, len(VACE_MODES) - 1))
return (VACE_MODES[index],)
NODE_CLASS_MAPPINGS = {
"VACEModeSelect": VACEModeSelect,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"VACEModeSelect": "VACE Mode Select",
}