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

There is no ControlNet project under the model, and the transformers version (4.36.2) in your environment conflicts with the 4.24.0 version in ControlNet. #4

Open
Reannvin opened this issue Aug 7, 2024 · 2 comments

Comments

@Reannvin
Copy link

Reannvin commented Aug 7, 2024

There is no ControlNet project under the model, and the transformers version (4.36.2) in your environment conflicts with the 4.24.0 version in ControlNet.

After I manually added the ControlNet project under the model, the following error occurred.

Traceback (most recent call last): File "/data/user/code/Ultraman/scripts/generate_texture.py", line 40, in <module> from lib.diffusion_helper import ( File "/data/user/code/Ultraman/./lib/diffusion_helper.py", line 26, in <module> from models.ControlNet.gradio_depth2image import init_model, process File "/data/user/code/Ultraman/./models/ControlNet/gradio_depth2image.py", line 29, in <module> model.load_state_dict(load_state_dict('./models/ControlNet/models/control_sd15_depth.pth', location='cuda')) File "/data/user/.conda/envs/ultraman/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1604, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for ControlLDM: Unexpected key(s) in state_dict: "cond_stage_model.transformer.text_model.embeddings.position_ids".
I found the solution under ControlNet's issue page but does't work for me.

lllyasviel/ControlNet#675

@yc4ny
Copy link

yc4ny commented Aug 29, 2024

@Reannvin I'm also testing the code out and got that error but I've managed to fix it by using
pip install transformers==4.29.2

@tomorrow1238
Copy link
Owner

There is no ControlNet project under the model, and the transformers version (4.36.2) in your environment conflicts with the 4.24.0 version in ControlNet.

After I manually added the ControlNet project under the model, the following error occurred.

Traceback (most recent call last): File "/data/user/code/Ultraman/scripts/generate_texture.py", line 40, in <module> from lib.diffusion_helper import ( File "/data/user/code/Ultraman/./lib/diffusion_helper.py", line 26, in <module> from models.ControlNet.gradio_depth2image import init_model, process File "/data/user/code/Ultraman/./models/ControlNet/gradio_depth2image.py", line 29, in <module> model.load_state_dict(load_state_dict('./models/ControlNet/models/control_sd15_depth.pth', location='cuda')) File "/data/user/.conda/envs/ultraman/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1604, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for ControlLDM: Unexpected key(s) in state_dict: "cond_stage_model.transformer.text_model.embeddings.position_ids". I found the solution under ControlNet's issue page but does't work for me.

lllyasviel/ControlNet#675

Thank you for supporting our work and asking valuable questions. We are recently optimizing our algorithm to achieve better results. We will update a version of the code when it is done. We will pay attention to the issues you raise.

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

3 participants