Loop Anything with Wan2.1 VACE
5.0
0 reviewsDescription
What's this?
This workflow turns any video into a seamless loop using Wan2.1 VACE.
It creates a smooth transition by feeding the last 15 frames, a 51-frame blank segment, and the first 15 frames into the VACE model.
After generating the transition, it removes the overlapping 30 frames (15 from the end and 15 from the start) and merges the result with the original video to produce a perfectly looped output.
CausVid LoRA Ver.
Workflow
⚠️ Note: Please make sure to update your KJ Nodes to the latest version.
😎 Update (2025/5/31)
- In the previous version, there was a bug where the first frame of the generated video appeared unnaturally white.
- I found that the issue was caused by the Skip Layer Guidance node, so I’ve removed it.
- Additionally, the first frame of the input video is now also used as the reference image for VACE.
🟩 control_video
- Extract the last 15 frames by reversing the input video, taking the first 15 frames, then reversing them again.
- Fill a 51-frame gap with solid gray frames (RGB 127,127,127).
- Append the first 15 frames of the input video to complete the 81-frame input for VACE.
🟦 reference_image
- The first frame of the video input into VACE is used as the Reference Image.
🟨 control_masks
- A mask is generated where the 51 middle frames are white, and the rest are black, guiding the model on where to apply the transition.
🟥 Prompt Generated by Qwen2.5VL (Optional)
- Optionally, one frame from the start and one from the end of the video can be used by Qwen2.5VL to generate a prompt that adds narrative or thematic consistency to the transition.
🔄 Output
- The VACE-generated transition is merged back into the original video.
- Overlapping frames (15 at the start and 15 at the end) are trimmed to maintain the original video duration while ensuring a seamless loop.
Notes
- The default setup uses 15-frame overlaps and an 81-frame transition segment, but these values are configurable.
- Experiment with different settings to achieve the most natural-looking loop for your specific video.
Discussion
(No comments yet)
Loading...
Resources (1)
Reviews
No reviews yet
Versions (4)
- latest (3 months ago)
- v20250531-131208
- v20250531-124937
- v20250523-143025
Node Details
Primitive Nodes (9)
CFGZeroStar (1)
MarkdownNote (1)
MaskPreview (1)
ModelSamplingSD3 (1)
OllamaConnectivityV2 (1)
OllamaGenerateV2 (1)
TrimVideoLatent (1)
UnetLoaderGGUF (1)
WanVaceToVideo (1)
Custom Nodes (25)
ComfyUI
- CLIPTextEncode (2)
- CLIPLoader (1)
- ImageBatch (2)
- ImageFromBatch (6)
- PreviewImage (1)
- UNetTemporalAttentionMultiply (1)
- VAELoader (1)
- KSampler (1)
- VAEDecode (1)
- EmptyImage (1)
- ImageResize+ (1)
- ImpactMakeImageBatch (1)
- VHS_VideoCombine (1)
- VHS_LoadVideo (1)
- ReverseImageBatch (2)
- CreateFadeMaskAdvanced (1)
- ShowText|pysssss (1)
Model Details
Checkpoints (0)
LoRAs (0)