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 dylora create_modules error when training sdxl #1126

Merged
merged 2 commits into from
Feb 24, 2024

Conversation

tamlog06
Copy link
Contributor

Fix networks/dyrola.py so that it works with sdxl_train_network.py.

In the latest implementation, when defining self.text_encoder_loras inside the __init__ function of DyLoRANetwork in network/dylora.py, the create_modules function expects an input of type CLIPTextModel. However, the actual input is either a List[CLIPTextModel] or CLIPTextModel, leading to a bug when the input is a List[CLIPTextModel]. This has been corrected to align with the definition of self.text_encoder_loras in network/lora.py, allowing the text_encoder to accept inputs of type List[CLIPTextModel].

@tamlog06 tamlog06 changed the title fix dylora create_modules error Fix dylora create_modules error when training sdxl Feb 18, 2024
@kohya-ss kohya-ss changed the base branch from main to dev February 24, 2024 10:15
@kohya-ss
Copy link
Owner

I didn't test DyLoRA with SDXL. Thank you for this!

@kohya-ss kohya-ss merged commit 488d187 into kohya-ss:dev Feb 24, 2024
1 check passed
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.

2 participants