SMD-Wan2.1-1.3B-Causal

4-step SMD for chunkwise causal video generation. The student adapters, standalone inference code and reproducible examples are included. Upstream base components are downloaded separately.

Training code · SMD collection

Example

Download the video

Prompt: Water flows gently from a small ceramic tabletop fountain. Large dark green letters "SMD" decorate its cream base. Locked camera, peaceful sunlit room.

Seed: 42. Size: 832 × 480. Frames: 81. FPS: 16.

Case settings · Generation receipt

Models

Variant Weights Steps Size
default LoRA 4 0.70 GB

Run

Base: Wan-AI/Wan2.1-T2V-1.3B-Diffusers.

Use Linux, Python 3.12 and an NVIDIA GPU with CUDA support. The included inference code does not import the SMD training repository.

python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install huggingface-hub
# Sign in to Hugging Face.
hf auth login
hf download zjwfufu/SMD-Wan2.1-1.3B-Causal --local-dir SMD-Wan2.1-1.3B-Causal --exclude 'lora/lora.safetensors'
cd SMD-Wan2.1-1.3B-Causal
python -m pip install -r requirements.txt
python -m pip install ninja
python -m pip install --no-build-isolation flash-attn==2.7.4.post1
python infer.py --output outputs

The example was run on an A100 80 GB. The causal runner keeps the transformer on the GPU and moves the text encoder off the GPU after encoding. Use --prompt, --seed and --output to generate another case. --base accepts a local upstream snapshot.

The runner downloads the pinned Causal-Forcing initialization and verifies its checksum before applying the adapter. Ordinary bidirectional Wan weights alone are insufficient. --causal-base can point to the matching chunkwise/causal_ode.pt.

The quickstart installs FlashAttention 2.7.4.post1, the backend used for the example. Building it requires a compatible CUDA development toolkit and C++ compiler. The runtime also has a PyTorch attention fallback.

The first run downloads the upstream base components to the Hugging Face cache. Plan disk space for those components as well as the released weights; subsequent runs reuse the cache.

Weight layout

Student weights are also published at the repository root (smd_lora.safetensors). The legacy weight paths remain available for existing integrations. The download command above excludes the duplicate legacy weights; the supplied loader prefers root weights and falls back to legacy paths. Adapter configurations, merge precision and sampling schedules are preserved.

Sampling

The released sampler uses raw final-segment scale 1.0. The raw grid is built before the model-specific time shift. The included runner follows sampling.json; changing only an upstream pipeline's step count does not reproduce the student.

Four evaluations are performed for each three-frame latent chunk, with fresh stochastic re-noising and clean-context KV caching. Additional cache-update evaluations are part of the causal protocol.

The supplied loader validates and applies all LoRA matrices and saved replacement tensors, with the recorded merge precision. Omitting replacement tensors or using a different base can change the result.

License and attribution

Base components retain the terms described in the Wan-AI/Wan2.1-T2V-1.3B-Diffusers model card. Original code notices and bundled licenses are retained. Adapter use remains subject to the applicable base-model terms.

Downloads last month
144
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for zjwfufu/SMD-Wan2.1-1.3B-Causal

Adapter
(14)
this model

Collection including zjwfufu/SMD-Wan2.1-1.3B-Causal