Skip to content

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
nana0304 pushed a commit to nana0304/sd-scripts that referenced this pull request Jun 4, 2025
Fix dylora create_modules error when training sdxl
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