Repository navigation
Closed
Labels
bugSomething isn't working
Description
Describe the bug
When I follow every step described here, I got the following error:
OSError: CompVis/stable-diffusion-v1-4 does not appear to have a file named config.json.
I can use inference Pipeline with no issue. It should be related to token issue, as I can use the colab with notebook_login
Reproduction
python textual_inversion.py --pretrained_model_name_or_path=$MODEL_NAME --use_auth_token --train_data_dir=$DATA_DIR --learnable_property="object" --placeholder_token="<cat-toy>" --initializer_token="toy" --resolution=512 --train_batch_size=1 --gradient_accumulation_steps=4 --max_train_steps=3000 --learning_rate=5.0e-04 --scale_lr --lr_scheduler="constant" --lr_warmup_steps=0 --output_dir="textual_inversion_cat"
Logs
Traceback (most recent call last):
File "textual_inversion.py", line 587, in <module>
main()
File "textual_inversion.py", line 390, in main
text_encoder = CLIPTextModel.from_pretrained(
File "/home/yanq/.conda/envs/ldm/lib/python3.8/site-packages/transformers/modeling_utils.py", line 1764, in from_pretrained
config, model_kwargs = cls.config_class.from_pretrained(
File "/home/yanq/.conda/envs/ldm/lib/python3.8/site-packages/transformers/models/clip/configuration_clip.py", line 126, in from_pretrained
config_dict, kwargs = cls.get_config_dict(pretrained_model_name_or_path, **kwargs)
File "/home/yanq/.conda/envs/ldm/lib/python3.8/site-packages/transformers/configuration_utils.py", line 553, in get_config_dict
config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
File "/home/yanq/.conda/envs/ldm/lib/python3.8/site-packages/transformers/configuration_utils.py", line 626, in _get_config_dict
raise EnvironmentError(
OSError: CompVis/stable-diffusion-v1-4 does not appear to have a file named config.json.
System Info
diffusersversion: 0.3.0- Platform: Linux-5.4.0-1054-aws-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyTorch version (GPU?): 1.11.0 (True)
- Huggingface_hub version: 0.9.1
- Transformers version: 4.19.2
- Using GPU in script?:
- Using distributed or parallel set-up in script?:
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
[-]Textual Inversion got 404 Client Error[/-][+]Textual Inversion got error of cannot find config.json file[/+]Oragi commentedon Sep 20, 2022
I had to git clone the CompVis/stable-diffusion-v1-4 repo and make this change to get mine to work (using a local path as --pretrained_model_name_or_path) :
to
Seems like the subfolder="" parameter isn't working?
It loads fine on the Colab when using a hosted runtime, but if you try to run the exact same steps with a local windows jupyter runtime it gives the same issue
patrickvonplaten commentedon Sep 22, 2022
Gently pinging @patil-suraj
crackedbeefcake commentedon Sep 24, 2022
might be related, I get something similar.
leads to:
2132660698 commentedon Sep 27, 2022
try this:
pip install transformers==4.22.1
patil-suraj commentedon Sep 28, 2022
Hey @XavierXiao , @Oragi ! IAs pointed out by @2132660698 if you upgrade transformers version. to
>=4.22.0this should work. Because thesubfolderargument isn't available in previous versions. I will update the minimum version in example requirements.@FinnFrotscher It looks like you are using the compvis checkpoint, you should clone the diffusers checkpoint to use it with this library. https://huggingface.co/CompVis/stable-diffusion-v1-4
s3rgeym commentedon Mar 26, 2023
Блять, че я должен сделать чтобы эта хуета работала?
pip install transformers==4.22.0
pip install -U transformers
Мудацкое говно
s3rgeym commentedon Mar 26, 2023