lycoris-lora 0.1.5.dev3__tar.gz → 0.1.5.dev4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/Algo.md +1 -1
  2. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/PKG-INFO +1 -1
  3. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/README.md +15 -6
  4. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/lycoris/kohya.py +1 -0
  5. lycoris_lora-0.1.5.dev4/lycoris/kohya_model_utils.py +1165 -0
  6. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/lycoris/utils.py +82 -52
  7. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/lycoris_lora.egg-info/PKG-INFO +1 -1
  8. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/setup.py +1 -1
  9. lycoris_lora-0.1.5.dev3/lycoris/kohya_model_utils.py +0 -1184
  10. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/.gitignore +0 -0
  11. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/Change.md +0 -0
  12. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/Demo.md +0 -0
  13. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/LICENSE.md +0 -0
  14. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/experiments/better_conv.py +0 -0
  15. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/experiments/better_conv_extract.py +0 -0
  16. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/experiments/concept_neuron.py +0 -0
  17. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/experiments/locon_extract_test.py +0 -0
  18. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/experiments/locon_merge_test.py +0 -0
  19. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/experiments/singular_value_test.py +0 -0
  20. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/experiments/sparse_bias_test.py +0 -0
  21. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/experiments/time_test.py +0 -0
  22. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/lycoris/__init__.py +0 -0
  23. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/lycoris/ia3.py +0 -0
  24. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/lycoris/kohya_utils.py +0 -0
  25. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/lycoris/locon.py +0 -0
  26. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/lycoris/loha.py +0 -0
  27. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/lycoris/lokr.py +0 -0
  28. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/lycoris_lora.egg-info/SOURCES.txt +0 -0
  29. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/lycoris_lora.egg-info/dependency_links.txt +0 -0
  30. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/lycoris_lora.egg-info/not-zip-safe +0 -0
  31. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/lycoris_lora.egg-info/requires.txt +0 -0
  32. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/lycoris_lora.egg-info/top_level.txt +0 -0
  33. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/requirements.txt +0 -0
  34. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/setup.cfg +0 -0
  35. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/tools/extract_locon.py +0 -0
  36. {lycoris_lora-0.1.5.dev3 → lycoris_lora-0.1.5.dev4}/tools/merge.py +0 -0
@@ -104,7 +104,7 @@ $W' = W_1 \otimes W_2$ and an ac x bd matrix.
104
104
 
105
105
  In meaning of matrix, $W_2$ becomes weight and $W_1$ becomes weight scale of $W_2$
106
106
 
107
- ## About rank
107
+ ### About rank
108
108
 
109
109
  And we can decompose $W_2$ using LoRA with rank, r.
110
110
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lycoris_lora
3
- Version: 0.1.5.dev3
3
+ Version: 0.1.5.dev4
4
4
  Summary: Lora beYond Conventional methods, Other Rank adaptation Implementations for Stable diffusion
5
5
  Home-page: https://github.com/KohakuBlueleaf/LyCORIS
6
6
  Author: Shih-Ying Yeh(KohakuBlueLeaf), Yu-Guan Hsieh, Zhidong Gao
@@ -39,6 +39,13 @@ See [Algo.md](https://github.com/KohakuBlueleaf/LyCORIS/blob/main/Algo.md) or [D
39
39
  * This algo produce very tiny file(about 200~300KB)
40
40
  * **Experimental**
41
41
 
42
+ ### LoKR
43
+ * Basically same idea of LoHA, but use kronecker product
44
+ * This algo is quite sensitive and you may need to tune the lr
45
+ * This algo can learn both character and style, but since it is small (auto factor, full rank, 2.5MB), it is also hard to transfer.
46
+ * This algo produce relatively small file(auto factor: 900~2500KB)
47
+ * Use smaller factor will produce bigger file, you can tune it if you think 2.5MB full rank is not good enough.
48
+
42
49
  ---
43
50
 
44
51
  ## usage
@@ -78,22 +85,23 @@ python3 sd-scripts/train_network.py \
78
85
  --network_module lycoris.kohya \
79
86
  --network_dim "DIM_FOR_LINEAR" --network_alpha "ALPHA_FOR_LINEAR"\
80
87
  --network_args "conv_dim=DIM_FOR_CONV" "conv_alpha=ALPHA_FOR_CONV" \
81
- "dropout=DROPOUT_RATE" "algo=lora" \
88
+ "dropout=DROPOUT_RATE" "algo=locon" \
82
89
  ```
83
90
  to train lycoris module for SD model
84
91
 
85
92
  * algo list:
86
- * lora: Conventional Methods
93
+ * locon: Conventional Methods
87
94
  * loha: Hadamard product representation introduced by FedPara
95
+ * lokr: Kronecker product representation
96
+ * ia3 : (IA)^3
88
97
 
89
98
  * Tips:
90
99
  * Use network_dim=0 or conv_dim=0 to disable linear/conv layer
91
- * LoHa doesn't support dropout yet.
100
+ * LoHa/LoKr/(IA)^3 doesn't support dropout yet.
92
101
 
93
102
 
94
103
  ### For a1111's sd-webui
95
- download [Extension](https://github.com/KohakuBlueleaf/a1111-sd-webui-locon) into sd-webui, and then use built-in lora system to run your model.
96
- **LoHa Model supported**
104
+ download [Extension](https://github.com/KohakuBlueleaf/a1111-sd-webui-lycoris) into sd-webui, and then use LyCORIS model in the extra netowrks tabs.
97
105
 
98
106
  **Not For Kohya-ss' Additional Network**
99
107
 
@@ -120,8 +128,9 @@ see [Demo.md](https://github.com/KohakuBlueleaf/LyCORIS/blob/main/Demo.md) and [
120
128
  ## Change Log
121
129
  For full log, please see [Change.md](https://github.com/KohakuBlueleaf/LyCORIS/blob/main/Change.md)
122
130
 
123
- ### 2023/04/05 Update to 0.1.5.dev1
131
+ ### 2023/04/08 Update for 0.1.5
124
132
  * Add (IA)^3 algorithm
133
+ * Add lokr algorithm
125
134
 
126
135
  ## Todo list
127
136
  - [ ] Module and Document for using LyCORIS in any other model, Not only SD.
@@ -28,6 +28,7 @@ def create_network(multiplier, network_dim, network_alpha, vae, text_encoder, un
28
28
  or kwargs.get('use_conv_cp', False))
29
29
  network_module = {
30
30
  'lora': LoConModule,
31
+ 'locon': LoConModule,
31
32
  'loha': LohaModule,
32
33
  'ia3': IA3Module,
33
34
  'lokr': LokrModule,