modelscope / modelscope/DiffSynth-Studio

T5 fp8 inference problem

Open
#855 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13.1k
Forks
1.3k
Avg merge
13h 12m
Merged PRs (30d)
45

Description

I set t5 for fp8 dtype, but got this error:

DiffSynth-Studio/diffsynth/models/wan_video_text_encoder.py", line 31, in forward
    x = x * torch.rsqrt(x.float().pow(2).mean(dim=-1, keepdim=True) +
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Promotion for Float8 Types is not supported, attempted to promote Float8_e4m3fn and Float
Image

Due to the .float(), which made dtype error, is that normal?

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 in diffsynth/models/wan_video_text_encoder.py at line 31 and reproduce the T5 fp8 inference error shown in the report. Determine whether the dtype promotion failure is expected there; done means the reported inference path no longer produces this error or the behavior is clearly documented.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.