huggingface / huggingface/diffusers

Attention masks are missing in SD3 to mask out text padding tokens

オープン
#8,673 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る
contributions-welcome wip
主要言語
Python
スター
34.5k
フォーク
7.3k
平均マージ
3日 3時間
マージ済み PR(30日)
91

説明

### Describe the bug

In the attention implementation of SD3, attention masks currently are not used. This will result in inconsistent outputs for the different values `max_seq_length` where padding exists in text tokens as the attention scores of padding tokens are non-zero. This issue has been discussed in https://github.com/huggingface/diffusers/discussions/8628, and is created to track the progress of fixing this problem.

Thanks @sayakpaul for the discussion.

### Reproduction

n/a

### Logs

_No response_

### System Info

n/a

### Who can help?

_No response_

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

SD3 の attention 実装から始め、padding token に関する既存のコンテキストを確認するために、リンク先のディスカッションを読んでください。テキストの padding が存在する場合に attention スコアがどのように計算されるかを追跡し、その後、padding だけが原因で出力が max_seq_length によって変化しなくなっていることを確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python, pytorch
領域
machine-learning
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。