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

fix sd 2.0/2.1 lora fine-tuning text encoder params mismatch issue by updating model_util.py #636

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

miracleyoo
Copy link

Fix sd 2.0/2.1 lora fine-tuning text encoder params mismatch issue. With the original text encoder and its corresponding parser, stable diffusion 2.0/2.1/2.1-unclip all cannot be properly loaded due to the text encoder transformer version difference and checkpoints' state_dict key name difference. After this fix, all these three versions are tested to work well when executing lora fine tuning. Release it here as SD 2.x version has a 1024 text embedding, which is unique and a must for many related projects, like ImageBind-related works.

Fix sd 2.0/2.1 lora fine-tuning text encoder params mismatch issue.
With the original text encoder and its corresponding parser, stable diffusion 2.0/2.1/2.1-unclip all cannot be properly loaded due to the text encoder transformer version difference and checkpoints' state_dict key name difference.
After this fix, all these three versions are tested to work well when executing lora fine tuning. 
Release it here as SD 2.x version has a 1024 text embedding, which is unique and a must for many related projects, like ImageBind-related works.
@miracleyoo miracleyoo changed the title Update model_util.py fix sd 2.0/2.1 lora fine-tuning text encoder params mismatch issue by updating model_util.py Feb 24, 2025
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

Successfully merging this pull request may close these issues.

1 participant