Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
paratechnical opened this issue Jan 3, 2024 · 3 comments
Open

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

paratechnical opened this issue Jan 3, 2024 · 3 comments

Comments

@paratechnical
Copy link

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
Copy link

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

@katarzynasornat
Copy link

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 huggingface/diffusers@b786fe1

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
Copy link

sitzikbs commented Mar 30, 2024

For me it worked with:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants