LTX-2 Canny to Video - After
LTX-2 Canny to Video - Before

The 'LTX-2 Canny to Video' workflow is designed to transform edge-detected images into high-quality videos with synchronized audio. Utilizing the LTX-2 model, this workflow leverages the Canny edge detection technique to ensure precise edge control and structural consistency throughout the video. The process begins with the 'LoadVideo' node to import your source video, which is then decomposed into its components using the 'GetVideoComponents' node. The 'Canny' node plays a crucial role by detecting edges in the images, providing a guide for the video generation process.

This workflow is particularly useful for creators who need to maintain the structural integrity of the original footage while enhancing it with AI-generated elements. The LTX-2 model, developed by Lightricks, ensures that the generated video maintains high quality and coherence. The workflow also includes nodes like 'ImageScaleBy' and 'ResizeImageMaskNode' for adjusting image dimensions, and 'SaveVideo' to compile and save the final video. By following the recommended settings and parameters, users can achieve optimal results with minimal manual intervention.

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.

video_ltx2_canny_to_video.json
Fetching workflow JSON…

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 "LTX-2 Canny to Video" (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("video_ltx2_canny_to_video_api.json");

const asset = client.assets.fromFile("input.png");
wf.setInput("160", "image", asset); // LoadImage

const job = await client.run(wf);
await job.getOutputs("175")[0].toFile("output.png"); // SaveVideo

The 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

Frequently Asked Questions

View all workflows
Showing 30 of 30 templates