thu-ml / thu-ml/TurboDiffusion

[Benchmark] Inference Performance on RTX 5090 with Wan2.1-1.3B (PyTorch 2.8.0)

Open
#102 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.7k
Forks
277
Avg merge
2h 57m
Merged PRs (30d)
2

Description

Hi authors,

Thanks for your great work! I reproduce this on RTX 5090, this is my script:

python turbodiffusion/inference/wan2.1_t2v_infer.py     --model Wan2.1-1.3B     --dit_path checkpoints/TurboWan2.1-T2V-1.3B-480P-quant.pth     --resolution 480p     --prompt "A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. She wears a black leather jacket, a long red dress, and black boots, and carries a black purse. She wears sunglasses and red lipstick. She walks confidently and casually. The street is damp and reflective, creating a mirror effect of the colorful lights. Many pedestrians walk about."     --num_samples 1     --num_steps 3     --quant_linear     --attention_type sagesla     --sla_topk 0.1

and the output:

[01-19 08:01:52|INFO|turbodiffusion/inference/wan2.1_t2v_infer.py:88:<module>] Generating with prompt: A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. She wears a black leather jacket, a long red dress, and black boots, and carries a black purse. She wears sunglasses and red lipstick. She walks confidently and casually. The street is damp and reflective, creating a mirror effect of the colorful lights. Many pedestrians walk about.
Sampling: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:02<00:00,  1.25it/s]
[01-19 08:01:54|INFO|turbodiffusion/inference/wan2.1_t2v_infer.py:142:<module>] Sampling completed in 2.40 seconds.

And here is how I implemented the timing measurement:

    t1 = time.time()
    for i, (t_cur, t_next) in enumerate(tqdm(list(zip(t_steps[:-1], t_steps[1:])), desc="Sampling", total=total_steps)):
        with torch.no_grad():
            v_pred = net(x_B_C_T_H_W=x.to(**tensor_kwargs), timesteps_B_T=(t_cur.float() * ones * 1000).to(**tensor_kwargs), **condition).to(
                torch.float64
            )
            x = (1 - t_next) * (x - t_cur * v_pred) + t_next * torch.randn(
                *x.shape,
                dtype=torch.float32,
                device=tensor_kwargs["device"],
                generator=generator,
            )
    t2 = time.time()
    log.info(f"Sampling completed in {t2 - t1:.2f} seconds.")

Did I perform the test correctly? I only measured the time for the DiT part. My PyTorch version is 2.8.0+cu129. The 2.4s is not the same as 1.9s as reported.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with turbodiffusion/inference/wan2.1_t2v_infer.py and reproduce the supplied command on an RTX 5090 with PyTorch 2.8.0+cu129. Inspect the timing block around the sampling loop and compare its 2.40-second result with the reported 1.9-second benchmark; done means determining whether the measurement procedure or environment explains the difference.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.