Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
KohakuBlueleaf committed Mar 30, 2023
2 parents 01724ae + dca41fa commit 8e0ebd7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,5 @@ https://github.com/KohakuBlueleaf/LyCORIS
Install and use locon model as lora model. <br>
Make sure your sd-webui has built-in lora

### Additional Network
**LoHa and LoCon with cp decomposition is not supported yet**
You can load LoCon model in kohya-ss' additional network extension.<br>
Just install addnet ext and then install this ext.<br>
Finally, use locon model as lora model.<br>
<br>
**This ext support dynamic rank lora/locon, just ignore the dim/alpha info printed out**
![image](https://user-images.githubusercontent.com/59680068/222327303-9ba4f702-5821-48db-a849-337dce9b11bb.png)
![image](https://user-images.githubusercontent.com/59680068/222327306-564ef3e1-5c82-488c-b8f5-2293898bed22.png)
3 changes: 3 additions & 0 deletions scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ def inference(self, x):
).reshape(self.shape)
return self.op(
x, rebuild_weight,
bias=None,
**self.extra_args
)
else:
Expand Down Expand Up @@ -254,13 +255,15 @@ def inference(self, x):
return self.op(
x,
((self.w1a @ self.w1b) * (self.w2a @ self.w2b) + bias).view(self.shape),
bias=None,
**self.extra_args
)
else:
return self.op(
x,
(pro3(self.t1, self.w1a, self.w1b)
* pro3(self.t2, self.w2a, self.w2b) + bias).view(self.shape),
bias=None,
**self.extra_args
)

Expand Down

0 comments on commit 8e0ebd7

Please sign in to comment.