I’m trying to use Cache-DiT to accelerate inference for the Wan2.2 model. However, when I run the example script,
python run_wan_2.2_i2v.py --steps 28 --cache
I get the following error.
Namespace(cache=True, compile=False, fuse_lora=False, quantize=False, quantize_type='fp8_w8a8_dq', steps=28, Fn=8, Bn=0, rdt=0.08, max_warmup_steps=8, max_cached_steps=-1, max_continuous_cached_steps=-1, taylorseer=False, taylorseer_order=1, height=None, width=None, parallel_type=None)
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████| 5/5 [00:05<00:00, 1.05s/it]
Loading pipeline components...: 60%|█████████████████████████████████▌ | 3/5 [00:05<00:03, 1.55s/it]The config attributes {'clip_output': False} were passed to AutoencoderKLWan, but are not expected and will be ignored. Please verify your config.json configuration file.
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 10.46it/s]
Loading pipeline components...: 100%|████████████████████████████████████████████████████████| 5/5 [00:07<00:00, 1.46s/it]
Enable model cpu offload for low memory device.
Traceback (most recent call last):
File "/home/ella/1141/cache-dit/examples/pipeline/run_wan_2.2_i2v.py", line 61, in <module>
pipe.transformer_2.blocks,
AttributeError: 'NoneType' object has no attribute 'blocks'
I set the model via environment variable:
export WAN_MODEL_NAME="Wan-AI/Wan2.2-TI2V-5B-Diffusers"
Then I ran the example script directly from: examples/pipeline/run_wan_2.2_i2v.py
What I’ve Tried
Running without --cache → works fine
Switching to Wan2.2-T2V-14B → works fine
What does this error mean? Does it indicate that my model isn’t compatible with Cache-DiT, or is there something wrong with the example script?