huggingface / huggingface/diffusers
process_encoder_hidden_states function is applied on each denoising step
- 主要言語
- Python
- スター
- 34.5k
- フォーク
- 7.3k
- 平均マージ
- 3日 3時間
- マージ済み PR(30日)
- 91
説明
https://github.com/huggingface/diffusers/blob/31058cdaef63ca660a1a045281d156239fba8192/src/diffusers/models/unets/unet_2d_condition.py#L1004
Hey! I noticed that `process_encoder_hidden_states` is applied on each denoising step that influences on an inference performance. This function can be executed only once before running UNet2DConditionModel.forward. The output of `process_encoder_hidden_states` should be combined with `encoder_hidden_states` and be provided to UNet2DConditionModel.forward
コントリビューションガイド
調査の方向性
src/diffusers/models/unets/unet_2d_condition.py の参照されている process_encoder_hidden_states 呼び出し付近から始め、その結果が UNet2DConditionModel.forward にどのように渡されるかを確認します。denoising ステップの呼び出し元をたどり、処理済みの encoder states を一度だけ準備できる場所を特定します。forward がその処理を毎ステップ繰り返さずに結合された states を受け取るようになれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python, pytorch
- 領域
- machine-learning, performance
- issue の種類
- リファクタリング
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100