huggingface / huggingface/diffusers

stabilityai/stable-diffusion-2-1 does not appear to have a file named config.json.

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

説明

### Describe the bug

/home/pcl/Minconda/conda3/envs/DIFT/bin/python3.10 /home/pcl/DETR/SDAseg/others/DIFT-main/demo.py
Traceback (most recent call last):
File "/home/pcl/Minconda/conda3/envs/DIFT/lib/python3.10/site-packages/diffusers/configuration_utils.py", line 337, in load_config
config_file = hf_hub_download(
File "/home/pcl/Minconda/conda3/envs/DIFT/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 120, in _inner_fn
return fn(*args, **kwargs)
File "/home/pcl/Minconda/conda3/envs/DIFT/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1291, in hf_hub_download
raise LocalEntryNotFoundError(
huggingface_hub.utils._errors.LocalEntryNotFoundError: Connection error, and we cannot find the requested files in the disk cache. Please try again or make sure your Internet connection is on.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/pcl/DETR/SDAseg/others/DIFT-main/demo.py", line 12, in
dift = SDFeaturizer()
File "/home/pcl/DETR/SDAseg/others/DIFT-main/src/models/dift_sd.py", line 192, in __init__
unet = MyUNet2DConditionModel.from_pretrained(sd_id, subfolder="unet")
File "/home/pcl/Minconda/conda3/envs/DIFT/lib/python3.10/site-packages/diffusers/models/modeling_utils.py", line 472, in from_pretrained
config, unused_kwargs, commit_hash = cls.load_config(
File "/home/pcl/Minconda/conda3/envs/DIFT/lib/python3.10/site-packages/diffusers/configuration_utils.py", line 364, in load_config
raise EnvironmentError(
OSError: stabilityai/stable-diffusion-2-1 does not appear to have a file named config.json.

Process finished with exit code 1

### Reproduction

raise EnvironmentError(
OSError: stabilityai/stable-diffusion-2-1 does not appear to have a file named config.json.
```python
def __init__(self, sd_id='stabilityai/stable-diffusion-2-1', null_prompt=''): # /home/pcl/DETR/SDAseg/SDAseg/dift/config.json
unet = MyUNet2DConditionModel.from_pretrained(sd_id, subfolder="unet")
onestep_pipe = OneStepSDPipeline.from_pretrained(sd_id, unet=unet, safety_checker=None)
onestep_pipe.vae.decoder = None
onestep_pipe.scheduler = DDIMScheduler.from_pretrained(sd_id, subfolder="scheduler")
gc.collect()
onestep_pipe = onestep_pipe.to("cuda")
onestep_pipe.enable_attention_slicing()
onestep_pipe.enable_xformers_memory_efficient_attention()
null_prompt_embeds = onestep_pipe._encode_prompt(
prompt=null_prompt,
device='cuda',
num_images_per_prompt=1,
do_classifier_free_guidance=False) # [1, 77, dim]
```
### Logs

_No response_

### System Info

diffusers[torch]==0.15.0

### Who can help?

_No response_

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

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

調査の方向性

Start with demo.py and src/models/dift_sd.py, especially SDFeaturizer.__init__ and the from_pretrained calls shown in the traceback. Then inspect diffusers/configuration_utils.py and reproduce with diffusers[torch]==0.15.0; done means establishing why config.json cannot be loaded and documenting or correcting the supported loading behavior.

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

評価

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

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

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