huggingface / huggingface/diffusers

pipeline_stable_diffusion.py trys to encode the prompt when there is no prompt and `prompt_embeds` and `negative_prompt_embeds` are given

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

説明

### Describe the bug

`pipeline_stable_diffusion.py` trys to encode the prompt when there is no prompt and `prompt_embeds` and `negative_prompt_embeds` are given.

### Reproduction

Use `--pre_compute_text_embeddings` when train a dreambooth scripts. Use #6135 by @sayakpaul updating the `train_dreambooth_lora.py`. Even if `prompt_embeds` and `negative_prompt_embeds` are proven to pipeline, it still wants to find prompt to encode and return Nonetype. So `--pre_compute_text_embeddings` can be used only in IF.

### Logs

_No response_

### System Info

- `diffusers` version: 0.24.0
- Platform: Linux-5.15.0-56-generic-x86_64-with-glibc2.31
- Python version: 3.9.18
- PyTorch version (GPU?): 1.11.0+cu115 (True)
- Huggingface_hub version: 0.19.4
- Transformers version: 4.36.1
- Accelerate version: 0.25.0
- xFormers version: not installed
- Using GPU in script?: Yes
- Using distributed or parallel set-up in script?: No

### Who can help?

@yiyixuxu @DN6 @sayakpaul @patrickvonplaten

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

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

調査の方向性

Start in pipeline_stable_diffusion.py and trace prompt handling when prompt_embeds and negative_prompt_embeds are supplied without a prompt. Reproduce the failure through the DreamBooth training path with --pre_compute_text_embeddings; done means the pipeline accepts the supplied embeddings without trying to encode a missing prompt, with regression coverage for this case.

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

評価

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

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

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