Wan2.2 5B: Run Text-to-Video and Image-to-Video with 8GB VRAM
That wraps up image models—starting from this lesson, we move on to generating video. Wan2.2 is Alibaba Cloud Tongyi Wanxiang's video generation model, open-sourced under Apache 2.0 and available for commercial use. It has released three sets of core weights: 14B text-to-video, 14B image-to-video, and a 5B hybrid model TI2V—a single file that supports both text-to-video and image-to-video, at 720P and 24fps. The team calls it "one of the fastest 720P@24fps models available today".
This page walks you through the entire Wan2.2 5B workflow: downloading the three-model set, generating video from text, switching to image-to-video with Ctrl+B, and adjusting resolution and duration on your own. The whole process needs only 8GB of VRAM—in the words of the official tip: with ComfyUI's native offloading, the Wan2.2 5B version should fit 8GB VRAM well.
What You'll Be Able to Do After This Lesson
- Load the official template and run Wan2.2 5B text-to-video: 20 sampling steps, outputting a 1280×704, roughly 5-second 720P video
- Use the same workflow for Wan2.2 image-to-video: enable Load Image with Ctrl+B and bring your photos to life
- Change parameters by the rules: resolution step of 32, frame count of 4n+1—adjust aspect ratio and duration yourself without errors
- Explain why 8GB of VRAM is enough: 16×16×4 high-compression VAE + ComfyUI native offloading
- Tell apart the 5B hybrid model from the 14B dual-expert model, and know when it's time to upgrade
Where You Are Now
- You want to generate video locally, but the entry requirements seem steep: VRAM often starts at 24GB, and your 8GB card looks like it's out of the running for video generation
- Almost all Wan2.2 tutorials online cover the 14B: two diffusion files for high-noise and low-noise, with text-to-video and image-to-video as two separate sets of weights, and you're not sure whether 5B is enough for your needs
- Running a Wan2.1 workflow directly on 2.2: the VAE file doesn't match, the latent node has been renamed, and the canvas is full of red errors
When to Use This Approach
When you need:
- To generate video locally on an 8GB-class GPU: 720P, 24fps, about 5 seconds per clip
- Two uses from one model: text-to-video + image-to-video, without downloading two sets of weights
- To quickly validate ideas: 5B generates fast, then switch to 14B for refinement once you're satisfied
And you don't want to:
- Download double diffusion weights like the 14B all at once (that's for the next lesson)
- Run inference with Wan-AI's official Python scripts: the command line has a steep learning curve, and the official guidance requires at least 24GB of VRAM (e.g., RTX 4090)
🎒 Prerequisites
- Completed your first image generation: able to load a workflow and run it with
Ctrl+Enter - Familiar with the model directory rules: files go into the corresponding subdirectory under
models/(see where models go) - ComfyUI 0.3.46 or above (the minimum version the official template library marks for this template; for template library usage see the template library tutorial, and for version changes see the changelog)
- Leave about 17GB of free disk space: the three-piece set adds up to 9.31 + 6.27 + 1.31 GB
- 8GB of VRAM or more (the official figure; no official promise for smaller cards, see the pitfall reminders)
Core idea
First remember the four key design points of Wan2.2 5B — every step that follows is about verifying them:
- **TI2V = one model handles two tasks. ** TI2V stands for Text-Image-to-Video. 14B implements text-to-video (T2V) and image-to-video (I2V) as two sets of dual-expert weights; 5B supports both with a single model, so you only need to download one copy of the weights.
- A high-compression VAE is the key to low VRAM usage. The Wan2.2-VAE used by 5B has a compression ratio of 16×16×4 (16× spatially, 4× temporally), so the latent compressed from a 720P video is very small — this is the underlying reason it can run 720P@24fps on consumer GPUs.
- One latent node, two modes. The
start_imageinput ofWan22ImageToVideoLatentis optional: without an image connected, it outputs an empty latent for text-to-video; with an image connected, the image is VAE-encoded into the first frame for image-to-video. The Load Image node in the template is bypassed by default; press Ctrl+B to enable it for image-to-video. - Native offloading as a VRAM safety net. ComfyUI automatically moves models between VRAM and system memory without you adding any launch arguments — this is how the official Tip's 8GB of VRAM works.
How to choose between 5B and 14B:
| Wan2.2 TI2V 5B (this lesson) | Wan2.2 14B (from the next lesson) | |
|---|---|---|
| diffusion weights | 1 file (9.31 GB) | two files, high-noise + low-noise, one set each for T2V / I2V |
| Tasks | text-to-video + image-to-video | text-to-video, image-to-video, and first/last-frame learned separately |
| Resolution | 720P (1280×704) @ 24fps | 480P / 720P |
| VRAM | official figure of 8GB (with native offloading) | higher, see later lessons |
| VAE | wan2.2_vae.safetensors | wan_2.1_vae.safetensors (officially noted as compatible with 2.2) |
| latent node | Wan22ImageToVideoLatent | EmptyHunyuanLatentVideo (T2V) etc. |
| Best for | quick prototyping, low VRAM, everyday creativity | quality-first final output |
Both sets are under the Apache 2.0 license, so commercial use requires no separate agreement.
Follow along
Step 1: Load the Wan2.2 5B workflow template
Why: the official template comes with 13 nodes, default parameters, and model download links all preconfigured — starting from the template means no missing nodes and no wrong parameters.
- Open the template library (Browse Templates), search for "Wan 2.2 5B", and find the template Wan 2.2 5B Video Generation (in the English interface it's called Wan 2.2 5B Video Generation)
- Click to load
You should see: 13 nodes on the canvas arranged in four groups — Step1 - Load models (three loaders: Load Diffusion Model / Load CLIP / Load VAE), Step3 - Prompt (two CLIP Text Encode nodes, positive and negative), For i2v, use Ctrl + B to enable (Load Image, bypassed by default), Video Size & length (Wan22ImageToVideoLatent), plus ModelSamplingSD3, KSampler, VAEDecode, CreateVideo, SaveVideo, and a note node labeled Model Links, with no red nodes anywhere.
- Template loaded, no red nodes on the canvas
Step 2: Download the three-piece model set and put them in place
Why: the template carries only the structure, not the weights; each of the three files must go to its own place so it appears in the loaders' dropdown lists.
| File | goes into | Size |
|---|---|---|
wan2.2_ti2v_5B_fp16.safetensors | models/diffusion_models/ | 9.31 GB |
umt5_xxl_fp8_e4m3fn_scaled.safetensors | models/text_encoders/ | 6.27 GB |
wan2.2_vae.safetensors | models/vae/ | 1.31 GB |
Note: the text encoder** reuses the file from the Wan2.1 repo** (the fp8 build of umt5_xxl), but the VAE is the new version from Wan2.2 — don't mix up the rows.
📂 ComfyUI/
└── 📂 models/
├── 📂 diffusion_models/
│ └── wan2.2_ti2v_5B_fp16.safetensors
├── 📂 text_encoders/
│ └── umt5_xxl_fp8_e4m3fn_scaled.safetensors
└── 📂 vae/
└── wan2.2_vae.safetensorsDownload links (the Model Links note in the template also carries these two sets):
- Hugging Face: Comfy-Org/Wan_2.2_ComfyUI_Repackaged (diffusion model + VAE), Comfy-Org/Wan_2.1_ComfyUI_repackaged (text encoders); the files are in the corresponding subdirectories under
split_files/in the repositories - Direct connection in mainland China: ModelScope has same-name mirrors Comfy-Org/Wan_2.2_ComfyUI_Repackaged, Comfy-Org/Wan_2.1_ComfyUI_repackaged
You should see: the corresponding files are selectable in the dropdown lists of all three loaders (Load Diffusion Model / Load CLIP / Load VAE).
- The three-piece set appears in the correct directories and is selectable in the loaders
💡 Users in mainland China should go with ModelScope first
Both repositories have official mirrors on ModelScope with fast direct-connection speeds. The file names are identical to those on HF, so just place them according to the table above.
Step 3: Write prompts and get text-to-video working (video output in 20 steps)
Why: first validate the whole pipeline with the template's default parameters—20 steps, cfg 5, and uni_pc as the defaults are the balanced settings officially tuned; don't rush to change them before it runs through.
- Write the positive prompt in the CLIP Text Encode (Positive Prompt) node. The template example is a complete scene description:
Low contrast. In a retro 1970s-style subway station, a street musician
plays in dim colors and rough textures. He wears an old jacket, playing
guitar with focus. Commuters hurry by, and a small crowd gathers to
listen. The camera slowly moves right, capturing the blend of music and
city noise, with old subway signs and mottled walls in the background.A single sentence covers location, character, action, camera movement (The camera slowly moves right), and atmosphere—write your own scene following this structure.
- The CLIP Text Encode (Negative Prompt) node contains the Chinese negative prompt that comes with the template; keep it as is for now:
Vivid colors, overexposed, static, blurred details, subtitles, style, works, paintings, picture, still,
overall grayish, worst quality, low quality, JPEG compression artifacts, ugly, incomplete, extra fingers,
poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers,
motionless picture, cluttered background, three legs, many people in the background, walking backwards- Confirm KSampler is at the template defaults: steps 20, cfg 5, sampler
uni_pc, schedulersimple; the shift of ModelSamplingSD3 next to it is 8 - Press
Ctrl+Enterto run
You should see: the progress bar runs through all 20 steps, and the video is saved by the SaveVideo node into the video/ subdirectory of the output directory (the file name starts with ComfyUI, format defaults to auto, usually outputting MP4), with a resolution of 1280×704, 121 frames at 24fps, about 5 seconds long.
- Your first Wan2.2 video appears in the output directory
💡 Prompts can be written in Chinese
There is an official Wan2.2 usage guide (a DingTalk document). Prompts work in both Chinese and English—the negative prompt bundled with this template is in Chinese in the first place; write the positive prompt following the structure of the template example: cover scene, subject, action, camera, and atmosphere in one sentence.
Step 4: Switch to image-to-video (Ctrl+B to enable Load Image)
Why: this is exactly what makes the TI2V hybrid model convenient—the same set of nodes and the same set of weights; connect the first frame and it becomes image-to-video.
- Find the Load Image node in the For i2v, use Ctrl + B to enable group; it is in the bypass state by default
- Select it and press
Ctrl+Bto enable it (press again to restore bypass) - Click the upload button and choose your photo
- Change the positive prompt to describe "what happens in this video"
- Run
You should see: the first frame of the video is the photo you uploaded, and the picture animates according to the prompt.
- The first frame of the output video matches the uploaded image
The image-to-video example prompt from the official README (paired with an image of a white cat wearing sunglasses sitting on a surfboard):
Summer beach vacation style, a white cat wearing sunglasses sits on a
surfboard. The fluffy-furred feline gazes directly at the camera with a
relaxed expression. Blurred beach scenery forms the background featuring
crystal-clear waters, distant green hills, and a blue sky dotted with
white clouds. The cat assumes a naturally relaxed posture, as if
savoring the sea breeze and warm sunlight. A close-up shot highlights
the feline's intricate details and the refreshing atmosphere of the
seaside.Note how it's written: it describes "what this video looks like and how the camera shoots it" (A close-up shot…), with content aligned to the input image—an image-to-video prompt describes the whole picture, not just the action.
⚠️ Uploaded images are scaled to the node dimensions
Wan22ImageToVideoLatent bilinearly scales the uploaded image to the node's width/height and centers it before encoding it as the first frame. To preserve the original aspect ratio, first change the node's width and height to a ratio matching the image before running.
Step 5: Change resolution, duration, and frame count
Why: the defaults of 1280×704 and 121 frames are not set in stone; but width, height, and frame count all follow step-size rules, and filling in values carelessly will cause problems.
The four parameters of Wan22ImageToVideoLatent:
| Parameter | Template default | Rule | Notes |
|---|---|---|---|
| width | 1280 | step size 32 | 720P landscape is 1280×704 |
| height | 704 | step size 32 | portrait 704×1280 (officially supported) |
| length | 121 | step size 4, taking 4n+1 | 121 frames ÷ 24fps ≈ 5 seconds |
| batch_size | 1 | — | how many videos to generate at once |
- For a portrait video: set width to 704 and height to 1280
- To shorten duration and save VRAM: change length to 81 (about 3.4 seconds) or 49 (about 2 seconds)
- The frame rate is changed in the CreateVideo node (the template sets it to 24): 121 frames @ 24fps ≈ 5.04 seconds
You should see: after changing the parameters and running again, the output video's dimensions and duration change accordingly.
- Can change length, and can explain why it must be 4n+1
Why must the frame count be 4n+1?
Wan2.2-VAE compresses the temporal dimension by a factor of 4: length frames are compressed into ((length−1)÷4)+1 temporal slices. So length can only take values of the form 49, 81, 121 — i.e., 4n+1 — and the node fixes the step size at 4 precisely to guarantee this.
Checkpoints ✅
- Text-to-video works: a video of 20 steps, 1280×704, about 5 seconds long appears in the output directory
- Image-to-video works: after enabling Load Image with Ctrl+B, the first frame matches the uploaded image
- Can name the three files of the trio and their directories (diffusion_models / text_encoders / vae)
- Knows that length takes 4n+1 and width/height use a step of 32, and can change duration and frame size independently
- Can give the two reasons why 8GB is enough to run: 16×16×4 high-compression VAE + native offloading
Pitfall warnings
❌ Uploaded an image, but the output isn't it
The Load Image node is bypassed by default; just swapping the image into the node without enabling it means start_image never gets sent to the latent node, and you're still running pure text-to-video.
Correct approach: select Load Image and press Ctrl+B to enable it, confirm the node no longer shows the bypass style, then run.
❌ Downloaded the wrong VAE file: wan2.2_vae and wan_2.1_vae differ by only one digit
5B uses Wan2.2's new VAE (wan2.2_vae.safetensors, compression ratio 16×16×4); the VAE used in the 14B lessons was wan_2.1_vae.safetensors (officially noted as compatible with 2.2). The 5B video latent has 48 channels (hardcoded in the node source), and latents compressed by the old and new VAEs are not interchangeable.
Correct approach: download according to the table in step 2, and don't casually click the VAE link in the 14B tutorial.
❌ Running 720P×121 frames with less than 8GB of VRAM anyway
The official statement is "8GB with native offloading." With less VRAM, or when pushing resolution and frame count up, the latent gets larger and you may hit OOM directly.
Correct approach: first reduce length (121 → 81 → 49), then lower the resolution (in multiples of 32). VRAM usage is directly tied to latent size: frames × width × height.
❌ length set to 120, width set to 1281
Valid values for length are 4n+1 (49, 81, 121...), and width/height must be multiples of 32 — these are step sizes fixed by the node schema. Follow the steps when entering values in the UI; when passing values in from other nodes, you have to enforce this rule yourself.
Correct approach: pick frame counts from 49 / 81 / 121, and pick width/height from multiples of 32. 1280×704 and 704×1280 are both officially validated 720P combinations.
Advanced tips (optional)
Expanding short phrases into full prompts
The official Wan-AI repository has a prompt extension trick: use the dashscope API or a local Qwen model to expand a short phrase into a full scene description; the official notes say this effectively enriches video detail. The ComfyUI template doesn't include this node, but the idea ports over directly: take a short phrase like "two anthropomorphic cats boxing on a spotlighted ring" and throw it at any LLM first, expand it into a long sentence like the template examples, then paste it into the positive prompt.
Want to try it before downloading the weights
Wan-AI has opened an online Space for Wan-2.2-5B on Hugging Face; if you don't want to download the 17GB weights first, you can try a few runs there and come back to local deployment once you think it's worth it.
Practical directions for image-to-video
Once you're fluent with 5B image-to-video, you can head straight into e-commerce scenarios: Product video: bringing product images to life covers exactly how the image-to-video route applies to product hero-image videos. For stronger image-to-video quality, the next stop, Wan2.2 14B image-to-video, uses dedicated I2V weights.
Lesson summary
✅ In this lesson we got both modes of the Wan2.2 5B workflow working:
- ✅ Text-to-video: official template + the trio of weights, 20 steps, cfg 5, uni_pc, 1280×704 produces a clip in about 5 seconds
- ✅ Image-to-video: Ctrl+B enables Load Image, the photo serves as the first frame, same set of weights with no swap needed
- ✅ Parameter rules: width/height step 32, length takes 4n+1, and you can change frame size and duration yourself
- ✅ Low-VRAM principle: 16×16×4 high-compression VAE + ComfyUI native offloading, runs on 8GB of VRAM
Recap of the key configuration fields:
| Field | Recommended value | Notes |
|---|---|---|
| Load Diffusion Model | wan2.2_ti2v_5B_fp16.safetensors | 5B hybrid model, keep weight_dtype at default |
| Load CLIP | umt5_xxl_fp8_e4m3fn_scaled.safetensors | set type to wan |
| Load VAE | wan2.2_vae.safetensors | 5B's dedicated new VAE, don't use the one from 2.1 |
| KSampler | 20 steps / cfg 5 / uni_pc + simple | template defaults |
| ModelSamplingSD3 | shift 8 | template default |
| Wan22ImageToVideoLatent | 1280×704 / length 121 | width and height step 32, length takes 4n+1 |
| CreateVideo | fps 24 | 121 frames ≈ 5 seconds |
| Load Image | is bypassed by default; Ctrl+B enable | enabled = image-to-video mode |
Next Lesson Preview
5B addresses "being able to run it"; the next lesson addresses "running it well":Wan2.2 14B Text-to-Video: Cinematic Output with the Dual-Expert Model. You will learn:
- What it means for the MoE high-noise/low-noise dual-expert model to divide work by denoising timestep
- 14B model download, and the difference between
EmptyHunyuanLatentVideoand this lesson's latent node - When it is worth upgrading from 5B to 14B
Appendix: Source Code Reference
Click to expand and view source code locations
Updated: 2026-11-05 (template library template video_wan2_2_5B_ti2v, officially marked minimum ComfyUI version 0.3.46)
| Content | Location |
|---|---|
| Official tutorial (Wan2.2, including the 5B section) | https://docs.comfy.org/tutorials/video/wan/wan2_2 |
| Workflow template JSON | https://github.com/Comfy-Org/workflow_templates/blob/main/templates/video_wan2_2_5B_ti2v.json |
| Weights repository (Hugging Face) | https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged |
| Weights repository (ModelScope mirror) | https://modelscope.cn/models/Comfy-Org/Wan_2.2_ComfyUI_Repackaged |
| Wan-AI official repository README (5B 720P, 16×16×4, sample prompts) | https://github.com/Wan-Video/Wan2.2 |
Wan22ImageToVideoLatent node source code | comfy_extras/nodes_wan.py (L1418–L1459) |
SaveVideo / CreateVideo node source code | comfy_extras/nodes_video.py (L137–L166 / from L209) |
The parameters on this page (KSampler 20 steps / cfg 5 / uni_pc + simple, shift 8, 1280×704 / length 121 / fps 24, the three-file set's filenames and sizes, and Load Image bypassed by default) were all verified against the actual node values in the template JSON video_wan2_2_5B_ti2v.json; the VRAM and resolution figures come from the official tutorial and the Wan-AI README.