Toggle Theme

ComfyUI Video Generation: Wan Text-to-Video, Image-to-Video, and AnimateDiff

Easton editorial illustration: one large rounded charcoal node-canvas console, one orange video filmstrip emerging from the workflow

"The official ComfyUI Wan 2.2 tutorial provides text-to-video and image-to-video workflows, model locations, and precision options."

You can already produce a still character image you like in ComfyUI. The next step is making it move, but the imported video workflow lights up with Missing Nodes or VRAM immediately reaches 99%. Which route fits better, Wan or AnimateDiff? Where do the model files go? How should you balance frame count and VRAM, and how do you turn a folder of frames into an mp4? Start with route selection, a preparation checklist, and a conservative parameter budget, then work through the most common failures.

1. Choose a Route: Wan vs AnimateDiff

Choose the route before building the workflow. Wan and AnimateDiff are different types of systems with different prerequisites, use cases, and workflow complexity.

1.1 Wan: A Dedicated Video-Model Route

Wan 2.2 is an open video model family supporting text-to-video (T2V), image-to-video (I2V), and text-image-to-video (TI2V). It uses a mixture-of-experts architecture and has its own model weights, VAE, and text encoder. For some FP8 workflows, the official ComfyUI tutorial suggests starting with more than 16 GB of VRAM; original-precision variants generally need more. Wan fits projects that generate video from scratch and place a higher priority on temporal consistency.

Wan has a model ecosystem separate from a normal SD checkpoint. You therefore need the full set of files required by the workflow, such as the diffusion model, VAE, and text encoder. Short clips in the two-to-four-second range are a practical place to begin.

1.2 AnimateDiff: Adding Motion to the SD Ecosystem

AnimateDiff adds motion to compatible Stable Diffusion models such as SD 1.5 or SDXL. Its core component is a motion module that works alongside a base checkpoint. The exact model directory can change with AnimateDiff-Evolved releases, so follow the current README and the model selector shown by the node. A typical workflow loads an SD checkpoint and a compatible motion module to generate a short animation.

AnimateDiff works well when you already have style checkpoints and want short or stylized animation. You can reuse the SD checkpoint and VAE you already know, but duration and consistency depend on the base model, motion module, context settings, frame count, and resolution.

1.3 Wan vs AnimateDiff Decision Table

DimensionWan 2.2AnimateDiff
Task typeText-to-video, image-to-video, text-image-to-videoShort animation based on an SD model
Model ecosystemDedicated video-model ecosystemSD 1.5/SDXL ecosystem
VRAM starting pointSome FP8 workflows start around the 16 GB class; original precision needs moreDepends on the base model, motion module, and settings; test at low resolution with few frames
PrerequisitesWan diffusion model + VAE + text encoderSD checkpoint + motion module
Best fitNew video generation and higher consistency requirementsExisting style models, short animation, and stylized clips
Workflow complexityHigher: multiple model files and nodesMedium: motion module plus base checkpoint

Choose Wan when you want to generate a new clip and can accept a larger model stack and more nodes. Choose AnimateDiff when you already have a compatible stylized SD checkpoint, need a short animation, or want to avoid downloading a large dedicated video model.

2. Prepare the Wan Workflow

Preparation is where many Wan runs fail: a model is in the wrong folder, a node is missing, or the imported workflow targets a different task. A short checklist is faster than chasing each error after the queue starts.

2.1 Prepare the Model Files

Wan files must be in the locations expected by the workflow. Folder and filename mismatches are a common cause of an empty model selector.

Common Wan model folders:

FolderFile typeNotes
models/diffusion_models/T2V/I2V diffusion modelVariants may differ by 480P/720P and fp16/fp8 precision
models/vae/Video VAEUse the VAE required by the Wan workflow
models/clip_vision/Vision encoderRequired by some I2V workflows
models/text_encoders/Text encoderUse the encoder specified by the workflow

Precision choices:

  • fp16: original precision and the highest VRAM requirement
  • fp8: lower precision that can reduce VRAM pressure; use the current official workflow and your own logs to determine the real requirement
  • bf16: use only when the hardware and workflow support it

Wan releases move quickly. Check the current official tutorial for the exact filenames, download links, and precision variants.

2.2 Install Custom Nodes

A video workflow may depend on several third-party node packs. VideoHelperSuite is commonly used for video import and export, while AnimateDiff workflows usually require ComfyUI-AnimateDiff-Evolved.

Installation steps:

  1. Open ComfyUI Manager and install the nodes listed by the workflow; install ComfyUI-VideoHelperSuite when VHS is required
  2. Install ComfyUI-AnimateDiff-Evolved if you choose the AnimateDiff route
  3. Check ffmpeg and related dependencies against the current VideoHelperSuite README
  4. Restart ComfyUI

Check ffmpeg:

ffmpeg -version

If the command returns version information, ffmpeg is available. If it returns command not found, install it with winget install ffmpeg on Windows, sudo apt install ffmpeg on Linux, or brew install ffmpeg on macOS.

2.3 Import a Workflow Template

For the first Wan run, use a T2V or I2V workflow from the official tutorial instead of assembling every node manually.

Import steps:

  1. Download the Wan T2V or I2V workflow JSON from the official tutorial
  2. Drag the JSON file, or an example image containing workflow metadata, into ComfyUI
  3. If Missing Nodes appears, search for each node in Manager or install the referenced repository manually

Missing Nodes troubleshooting order:

  1. Check whether ComfyUI Manager lists the required node pack as installed
  2. Search by the exact missing-node name
  3. If Manager cannot find it, clone the correct repository into custom_nodes/
  4. Restart ComfyUI

See the ComfyUI workflow reuse guide for a more detailed import and missing-node checklist.

3. Run Wan Text-to-Video

Once the models and nodes are ready, run a minimal text-to-video workflow.

3.1 Key Workflow Nodes

A Wan T2V workflow usually includes nodes with these responsibilities; exact names depend on the current official template:

  1. Model loaders: load the Wan T2V diffusion model, VAE, and text encoder
  2. Video latent node: set width, height, and frames
  3. Text encoding: provide positive and negative prompts
  4. Sampling: configure steps, CFG, seed, and related options
  5. VAE Decode: decode the video frames
  6. VideoHelperSuite or an equivalent saver: combine the frames into a video file

The main differences from a still-image workflow are:

  • You set frames rather than generating a single image
  • You use the matching video VAE instead of an unrelated still-image VAE
  • The output chain commonly includes both a frame sequence and a video-combining step

3.2 Write a Video Prompt

A video prompt needs temporal continuity that a still-image prompt does not.

Key points:

  • Describe motion precisely: camera motion such as camera following or slow pan, and subject motion such as walking or turning head
  • Avoid scene changes: keep one continuous scene rather than writing “first in a park, then inside a cafe”
  • Separate camera and subject motion: camera movement changes the viewpoint, while subject motion changes the content inside the frame

Example prompts:

A woman walking in a park, camera following from behind, soft sunlight, 4K
A cat playing with a ball, slow motion, bokeh background

See the Stable Diffusion prompt template guide for the underlying prompt structure.

3.3 Tune Frames, FPS, and Resolution

Frames, FPS, and duration are related by a simple formula:

ParameterMeaningCommon test values
framesTotal generated frames16/24/48/72
FPSPlayback frames per second12/16/24/30
durationSeconds = frames / FPSCalculate from the formula

Examples:

  • 48 frames @ 16 FPS = 3 seconds
  • 72 frames @ 12 FPS = 6 seconds

Match the resolution to the model and workflow. Common templates distinguish between 480P and 720P routes.

More frames and a higher resolution generally increase pressure during sampling and VAE processing. Section 6 provides a conservative starting matrix.

3.4 Export the Video

Many Wan workflows generate a frame sequence first, then use Video Combine from VideoHelperSuite or a similar node to create a video.

Common save-node settings:

  • frame_rate: playback FPS
  • format: a format supported by the workflow, such as mp4, gif, or webp
  • output_path: output location; the exact field depends on the current node version

Common export failures:

  • Missing ffmpeg or node dependencies: follow the extension README and check ffmpeg -version
  • Output-folder permissions: make sure ComfyUI can write to the destination
  • Unsupported encoder: save the image frames first to verify generation, then select a format supported by the node

4. Run Wan Image-to-Video

Image-to-video uses a still image as the starting frame and generates motion from that state.

4.1 Connect the I2V Workflow

The main differences between Wan I2V and T2V are:

  1. Load Image: load a starting image at a size compatible with the workflow
  2. I2V model loader: load the corresponding Wan I2V diffusion model rather than a T2V variant
  3. CLIP Vision and text encoding: process the starting frame and prompt according to the workflow
  4. Sampling, VAE Decode, and Video Combine: generate and save the result

I2V and T2V may use different model files and workflow templates. Verify each download against the official template.

4.2 Prepare the Starting Image

The source image strongly affects later frames.

Requirements:

  • Match the image size to the workflow
  • Use a clear subject with clean object or character edges
  • Avoid excessive detail: a crowded background or dense texture can make later frames drift

The starting image can come from ComfyUI or from an external source you have the right to use.

4.3 Troubleshoot I2V Settings

A common I2V failure starts with a recognizable first frame, followed by drifting faces and hands, deformation, or flicker.

Causes and fixes:

  • Prompt and frame do not match: describe motion that makes sense for the source image
  • The starting frame is too detailed: simplify the background or generate a cleaner source
  • VRAM is exhausted: reduce frames, resolution, or precision
  • Motion is too large: lower the relevant motion or strength setting when the workflow exposes one

Try another I2V model variant or seed when a particular model does not handle the source style well.

5. Prepare an AnimateDiff Workflow

AnimateDiff requires a different model stack from Wan.

5.1 Prepare the Motion Module

The motion module is the core AnimateDiff component. Its folder and compatible formats can change across AnimateDiff-Evolved releases, so use the extension’s current README, example workflow, and model selector as the source of truth.

At minimum, verify whether the module targets SD 1.5, SDXL, or another architecture and whether it matches the base checkpoint and workflow. Restart ComfyUI after downloading it and confirm that it appears in the AnimateDiff-Evolved loader.

5.2 Choose a Base Checkpoint

AnimateDiff does not replace the base model. It adds motion capabilities to a compatible image diffusion model.

Selection rules:

  • Use an SD 1.5 or SDXL checkpoint compatible with the motion module and workflow
  • Existing style checkpoints can work, but verify compatibility with a short-frame test
  • Do not treat an ordinary checkpoint as a complete video model

See the Stable Diffusion model selection guide for checkpoint fundamentals.

5.3 Connect the Workflow

An AnimateDiff workflow usually includes these responsibilities:

  1. Checkpoint Loader: load a compatible base checkpoint
  2. Motion Model Loader: load a motion module or motion model
  3. Context Options: configure the context window
  4. Video latent node: set resolution and frame count
  5. Text encoding, sampling, VAE Decode, and video-combining nodes

The relationship between total frames and context length depends on the node release and workflow. Begin with compatible values from the example workflow, then change one setting at a time.

6. Set a Parameter and Performance Budget

VRAM and clip length are the main constraints in local video workflows. Treat these values as conservative starting points, not GPU guarantees.

6.1 VRAM, Frames, and Resolution Starting Matrix

VRAMSafer starting pointWorth testingAvoid at first
8 GBAnimateDiff at low resolution, about 16 frames, batch 1Community low-VRAM workflowsHigh-resolution Wan, long clips, and multiple control branches
12 GBAnimateDiff with few frames and a small resolutionLow-precision Wan at a small size with few framesLong 720P clips and complex post-processing
16 GBFollow official guidance for a short Wan FP8 testMatching 480P or 720P templatesMultiple branches running together and long clips
24 GB+More headroom for most short-video experimentsHigher resolution or more framesBatch, VAE, and post-processing still need limits

Actual requirements vary with model version, GPU architecture, VAE, custom nodes, and workflow implementation. Use the table only to choose a first test, not as a promise that a particular GPU will complete the run.

6.2 Reduce Load in This Order

When VRAM is insufficient, step settings down in this order:

  1. Reduce frames, for example from 48 to 24 or 16
  2. Lower resolution from 720P to 480P or another size supported by the workflow
  3. Keep batch at 1 and disable unnecessary control and post-processing branches
  4. When supported, move from fp16 to fp8 or another lower-precision model
  5. Try spatial tiles and video temporal settings in VAEDecodeTiled or VAEEncodeTiled
  6. Use startup options such as --lowvram when they are supported by the current release
  7. Disable previews and close other GPU-heavy applications

Low-VRAM startup flags, caching, and tiled VAE settings need to be tested against the current ComfyUI release and workflow.

6.3 Balance Duration and Quality

Longer does not automatically mean better. Short clips are easier to control, while longer clips usually require smaller motion and a segmented workflow.

Risks include:

  • Flicker: color or brightness changes between frames
  • Deformation: faces, hands, or object outlines drift
  • Weak motion: the prompt or motion settings do not specify enough movement

For a longer video, validate a short segment first and then use continuation, I2V, or post-production methods supported by the model and workflow. Doubling frames does not guarantee consistent motion.

7. Understand Video Output and Saving

Many ComfyUI video workflows produce a frame sequence first and use a node such as VideoHelperSuite to combine and save it.

7.1 VideoHelperSuite Node Responsibilities

Node responsibilityFunctionCommon settings
Load VideoImport video or an image sequenceframe_count, frame_rate, width/height
Video CombineCombine frames into videoframe_rate, format, output settings
Save Video-type nodeSave the video fileformat, quality, save_output

Node names, parameters, and supported formats can change with the extension. Load Video imports an existing video, while Video Combine or an equivalent node turns generated frames into a video file.

7.2 Convert FPS, Frames, and Duration

Duration is calculated as:

duration (seconds) = frames / FPS

Examples:

  • 48 frames @ 16 FPS = 3 seconds
  • 72 frames @ 12 FPS = 6 seconds

Common FPS choices:

FPSEffect
12The same frames play for longer, but motion may look choppier
16A compromise between duration and smoothness
24The same frame sequence plays faster and ends sooner
30More frames are required to preserve the same duration

FPS controls playback speed; it does not generate missing in-between frames. A longer clip needs more frames or segmentation, while smoother motion may require interpolation or post-processing.

7.3 Troubleshoot Saving Failures

FailureFix
ffmpeg or node dependency is missingFollow the extension README and check ffmpeg -version
Output path is not writableGive ComfyUI write access or use the default output folder
Encoder or format is unsupportedSave image frames first, then choose a format supported by the current node
No frames reach the saverCheck the latent, VAE Decode, and saver connections

8. Troubleshoot Common Failures

Video workflows have several failure points. Work through them in order instead of changing unrelated settings at random.

8.1 Troubleshoot Missing Nodes

The imported workflow opens with red Missing Nodes blocks.

Fix them in this order:

  1. Check whether ComfyUI Manager shows the required custom node packs as installed
  2. Search by the exact missing-node name
  3. If Manager cannot find it, clone the correct repository into custom_nodes/
  4. Restart ComfyUI

See the ComfyUI workflow reuse guide for more detail.

8.2 Fix Model-Path Errors

An incorrect model folder is a common cause of an empty selector.

Model typeCommon folder
Wan diffusion modelmodels/diffusion_models/
Wan VAEmodels/vae/
CLIP Visionmodels/clip_vision/
text encodermodels/text_encoders/
AnimateDiff motion moduleFollow the current AnimateDiff-Evolved README and node model list

Match the filenames to the workflow and distinguish task, resolution, and precision variants.

8.3 Troubleshoot OOM

VRAM exhaustion is the most common resource failure in video generation.

Use this order:

  1. Reduce frames, resolution, and model precision
  2. Keep batch at 1 and disable extra control or post-processing branches
  3. Try VAEDecodeTiled or a temporal chunk
  4. Use startup options such as --lowvram when supported
  5. Disable previews and close other GPU applications

8.4 Fix Flicker, Deformation, or Weak Motion

ProblemLikely causeAdjustment
FlickerWeak temporal consistency or mismatched context/motion settingsFix the seed, shorten the test, and adjust context or motion settings
DeformationComplex starting frame, excessive motion, or model limitationSimplify the frame, reduce motion, or choose a better-matched model or workflow
Weak motionPrompt lacks explicit movement or motion strength is lowAdd a concrete action and adjust supported motion settings carefully
Quality dropsCheckpoint, motion module, or VAE mismatchVerify the model combination and return to an official or extension example workflow

See the Stable Diffusion prompt template guide for prompt structure.

8.5 Fix a Stalled VAE Decode

VAE Decode stalls, runs extremely slowly, or runs out of memory.

Try these fixes:

  • Reduce frames and resolution
  • Try VAEDecodeTiled and adjust spatial tiles or temporal chunks when the node supports them
  • Verify that the VAE matches the workflow
  • If a model file is damaged, download it again from a trusted source and verify it

8.6 Fix I2V Drift After the First Frame

This is a common I2V failure pattern.

CauseAdjustment
Prompt does not match the starting frameDescribe motion that is consistent with the image
Starting frame is too detailedSimplify the background or generate a cleaner frame
Motion is too largeBegin with subtle motion or slow camera push-in
I2V model does not fit the styleTry another model variant, workflow, or seed

9. Continue with Control, Post-Processing, and Automation

After the first workflow runs end to end, choose the next direction based on the limitation you actually hit.

This is the video-generation chapter of the ComfyUI and Stable Diffusion practical series. Review these prerequisites when needed:

Other entries in the series cover low-VRAM optimization, frame-by-frame repair, API automation, and complex version conflicts. Stabilize one short-video workflow before adding more controls or engineering layers.

9.2 Official Documentation and Project Resources

Start with official documentation and project repositories:

9.3 Licensing and Commercial Use

Check the current license terms for every video model you use:

Before commercial use, verify:

  • Whether the model license permits commercial use
  • Whether you have the rights to the source material, especially an I2V starting image
  • How generated-content rights apply to your project and distribution platform

This is not legal advice. The current repository license is the source of truth.

Conclusion

Wan and AnimateDiff serve different ComfyUI video workflows. Wan generates video from text or a starting frame; AnimateDiff reuses compatible style checkpoints for short animation. Match model folders, node versions, and template versions to the actual workflow. The parameter matrix is a conservative starting point, not a GPU guarantee. When resources are tight, reduce frames, resolution, branches, precision, and VAE load in that order.

For Missing Nodes, model-path errors, OOM, flicker, deformation, a stalled VAE Decode, or export failures, troubleshoot one layer at a time. Begin with few frames, a small resolution, and batch 1, confirm that the complete chain works, and then increase one variable per test.

Run Your First Short-Video Workflow in ComfyUI

Validate the complete path from route selection and model setup to a minimal test and video export.

  1. 1

    Step 1: Verify the basic workflow

    Confirm that ComfyUI can generate a still image reliably and that you can import a workflow, identify missing nodes, and inspect model paths.
  2. 2

    Step 2: Choose a video route

    Use Wan T2V for text-to-video, Wan I2V for a starting frame, or evaluate AnimateDiff when you need to reuse an SD checkpoint.
  3. 3

    Step 3: Prepare the model files

    Follow the actual workflow and official instructions to obtain the diffusion model, VAE, text encoder, CLIP Vision model, or motion module it requires.
  4. 4

    Step 4: Install the required nodes

    Install the workflow's custom nodes through ComfyUI Manager and prepare a video-export extension such as VideoHelperSuite.
  5. 5

    Step 5: Run a minimal test

    Start with few frames, a small resolution, and batch 1, without ControlNet, upscaling, or complex post-processing.
  6. 6

    Step 6: Combine and save the video

    After frames are generated, set the frame rate and format and export through Video Combine, Save Video, or an equivalent node.
  7. 7

    Step 7: Increase one variable at a time

    Keep the seed fixed and change one setting per test; if you hit OOM, flicker, or drift, step back through frames, resolution, precision, and VAE settings.

FAQ

Should I start with Wan or AnimateDiff for ComfyUI video?
Start with Wan when you want to generate a new video from text or an image. Start with AnimateDiff when you already have SD checkpoints, LoRAs, and style assets and want a short animation.
What is the difference between frames and FPS in ComfyUI?
Frames is the total number of generated images, while FPS is the number displayed each second during playback. Duration equals frames divided by FPS.
Why does ComfyUI output image frames instead of an mp4 file?
Many workflows generate images first, then use VideoHelperSuite, Video Combine, or a similar saving node to create an mp4, gif, or webp file.
Can ComfyUI video run on 8 GB of VRAM?
You can test low-resolution, short AnimateDiff workflows or community low-VRAM workflows. Results depend on model precision, VAE, custom nodes, GPU backend, and workflow design, so high-resolution long Wan videos are not a reliable expectation.
Why does image-to-video drift away from the source image?
A starting frame does not guarantee stability across the clip. Larger motion, a more complex input, and longer frame sequences increase the risk of changes to faces, hands, clothing, and backgrounds.
What should I do when video generation stalls at VAE Decode?
Reduce frames and resolution first, then try spatial tiling or temporal chunks in VAEDecodeTiled. If it still fails, verify the VAE and apply low-VRAM settings.

17 min read · Published on: Jul 23, 2026 · Modified on: Jul 24, 2026

Comments

Sign in with GitHub to leave a comment

Easton BlogEaston Blog