This ComfyUI workflow, titled 'Video Restyle', is designed to transform a base video into a stylized version using a reference image. It leverages the WAN 2.1 VACE model, which excels in video style transfer. The workflow incorporates several custom nodes, such as ComfyUI-WanVideoWrapper and comfyui-depthanythingv2, to preprocess and encode video data efficiently. The process begins with loading a base video and a stylized reference image. The video is then preprocessed using edge detection techniques like CannyEdgePreprocessor or depth estimation via DepthAnything_V2. These preprocessing steps help in extracting essential features from the video frames, which are crucial for the style transfer process.
The workflow is particularly useful due to its flexibility and precision in video restyling. By combining various nodes like WanVideoModelLoader and WanVideoSampler, it allows for detailed control over the video transformation process. Users can experiment with different preprocessing techniques, such as depth versus edge detection, to achieve the desired artistic effect. The integration of the WanVideoVACEEncode node ensures that the final output is a high-quality, stylized video that maintains the original video's dynamics while incorporating the artistic elements from the reference image.
API
Use this workflow from code
Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.
Run it from TypeScript or Python with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.
// Install (beta)
npm i @comfyorg/sdk
// Run "Video Restyle" (TypeScript)
import { Comfy } from "@comfyorg/sdk";
const client = new Comfy({ apiKey: "comfyui-..." });
// This workflow, exported in API format (see note below)
const wf = await client.workflows.fromFile("templates_shane_video_restyle_api.json");
const asset = client.assets.fromFile("input.png");
wf.setInput("134", "image", asset); // LoadImage
const job = await client.run(wf);
await job.getOutputs("164")[0].toFile("output.png"); // VHS_VideoCombineThe SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API).
Comfy Cloud API access requires a plan with an API key.
FAQ














