Nodes/ComfyUI-WanVideoWrapper_QQ/Wan Video VACE Frame Replace (QQ)
ComfyUI Node

Wan Video VACE Frame Replace (QQ)

Enhanced frame processing with multiple input formats: - Single numbers (e.g., "5"): Replace frame with gray_level color - Single numbers with + (e.g., "5+"): Replace frame with next replacement_image - Single numbers with * (e.g., "41*"): Replace frame with next replacement_image - Ranges (e.g., "22-26"): Replace range of frames with gray_level color (applies -1 logic) - Ranges with * (e.g., "*1-5" or "1-5*"): Replace start or end frame with next replacement_image and remove the rest of the frames in the range - a-b-c patterns: Use replacement_images if provided for middle frames - +a-b-c: Duplicate middle frame image to frame before (b-1) - a-b-c+: Duplicate middle frame image to frame after (b+1) - +a-b-c+: Duplicate middle frame image to both before and after (b-1 and b+1) - Multiple +: Use multiple + signs for gradual blending (e.g., "++a-b-c" creates 2 left duplicates) - Custom opacity: Add space and float value (0.0-1.0) after patterns (e.g., "a-b-c+ 0.6", "++a-b-c+ 0.8") to specify mask opacity for duplicated frames with gradual blending (closest=strongest, farthest=weakest) Base masks (optional): - Provide starting masks that will be used as the base for all frame operations - Automatically scaled to match image dimensions - Applied to corresponding frames - these masks are preserved unless overridden by replacement operations - Frames not explicitly replaced will keep their original masks from this input - If no masks provided, defaults to black masks (all frames kept) Replacement masks (optional): - Provide custom mask patterns instead of generated opacity values - Automatically scaled to match image dimensions - Used for middle frames and + suffix frames when available - Falls back to generated masks when replacement_masks run out - For + patterns with opacity: blends replacement mask with specified opacity All image/mask replacements share the same counter. Creates a mask showing which frames were kept (black) and which were replaced (varying patterns/opacity).

By siraxe·Created 10 months ago·Updated 4 months ago· 71
Wan Video VACE Frame Replace (QQ)
  • images
  • masks
  • replacement_images
  • replacement_masks
  • video
  • mask
  • middle_frames
indexes2-5-3
gray_level0.50
max_frames-1
mask_opacity0.00
CategoryWanVideoWrapper_QQ

Inputs (8)

NameTypeDefaultDescription
imagesIMAGE
indexesSTRING2-5-3
gray_levelFLOAT0.500–1
max_framesINT-1-1–1000
mask_opacityFLOAT0.000–1
masksoptMASK
replacement_imagesoptIMAGE
replacement_masksoptMASK

Outputs (3)

NameTypeDescription
videoIMAGE
maskMASK
middle_framesSTRING