Skip to content

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
@miracleyoo
Copy link
Author

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