OSError: CompVis/stable-diffusion-v1-4 does not appear to have a file named flax_model.msgpack or pytorch_model.bin.

#203
by vedalken - opened

Hi, i'm trying to finetune stable-diffusion-v1-4 on a custom dataset (vedalken/mtg-pauper-blip-captions), and i'm following this guide. I'm using the FLAX/JAX finetuning method (train_text_to_image_flax.py) but i'm receiving the following error:

OSError: CompVis/stable-diffusion-v1-4 does not appear to have a file named flax_model.msgpack or pytorch_model.bin.

Does anyone has any clue to resolve this? It would be much appreciated!

Code for reference:

!pip install git+https://github.com/huggingface/diffusers.git
!pip install dataset
!pip install git+https://github.com/huggingface/transformers
!git clone https://github.com/huggingface/diffusers

!python diffusers/examples/text_to_image/train_text_to_image_flax.py
--pretrained_model_name_or_path="CompVis/stable-diffusion-v1-4"
--dataset_name="vedalken/mtg-pauper-blip-captions"
--resolution=512 --center_crop --random_flip
--train_batch_size=1
--max_train_steps=15000
--learning_rate=1e-05
--max_grad_norm=1
--caption_column="caption"
--output_dir="sd-pauper-model"

I did find out that specific model doesn't have compatible file for JAX, so i changed the code to:

!python diffusers/examples/text_to_image/train_text_to_image.py
--pretrained_model_name_or_path="CompVis/stable-diffusion-v1-4"
--dataset_name="vedalken/mtg-pauper-blip-captions"
--resolution=512 --center_crop --random_flip
--train_batch_size=1
--max_train_steps=15000
--learning_rate=1e-05
--max_grad_norm=1
--caption_column="caption"
--output_dir="sd-pauper-model"
--gpus=0

Posting in case someone will stumble across this :)

Happy coding!

vedalken changed discussion status to closed

Sign up or log in to comment