ZichengDuan / TheChosenOne

Unofficial implementation of the paper "The Chosen One: Consistent Characters in Text-to-Image Diffusion Models"
https://arxiv.org/abs/2311.10093
237 stars 22 forks source link

Error related to models when I try running main.py #17

Open paratechnical opened 8 months ago

paratechnical commented 8 months ago

when I try to run python3 main.py I get the following error

ImportError: cannot import name 'text_encoder_lora_state_dict' from 'diffusers.models.lora' (/usr/local/lib/python3.11/site-packages/diffusers/models/lora.py)

I had to change a couple of things to get to this point I changed to requirements file to this in order to make it work

accelerate==0.24.1 bitsandbytes==0.41.2.post2 datasets==2.15.0 diffusers==0.25.0.dev0

and deleted diffusers.egg==info

moteloumka commented 7 months ago

Had the same issue, never managed to make it work, even installing older versions of diffusers. Were you able to find a workaround?

katarzynasornat commented 7 months ago

Had the same issue, never managed to make it work, even installing older versions of diffusers. Were you able to find a workaround?

I managed to solve it by downoading zipped (or clone) commit just before the change happened.

Here is the link https://github.com/huggingface/diffusers/commit/b786fe17588dae93315a69620ccaf8ffd4106823

And the commit hash is b786fe17588dae93315a69620ccaf8ffd4106823

After cloning/downloading and unzipping and installing it by using:

1) cd /content/name_of_your_unzipped_folder 2) pip install .

it worked :)

sitzikbs commented 5 months ago

For me it worked with:

git clone https://github.com/huggingface/diffusers
cd diffusers
git fetch origin 3517fb9
git checkout 3517fb9
pip install .