lycoris-lora 3.2.0.dev2__tar.gz → 3.2.0.post1__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 (48) hide show
  1. {lycoris_lora-3.2.0.dev2/lycoris_lora.egg-info → lycoris_lora-3.2.0.post1}/PKG-INFO +3 -2
  2. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/README.md +6 -6
  3. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/config.py +5 -0
  4. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/functional/lokr.py +2 -2
  5. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/kohya.py +3 -2
  6. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/modules/locon.py +1 -1
  7. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/modules/loha.py +1 -1
  8. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/modules/lokr.py +1 -1
  9. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/wrapper.py +2 -2
  10. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1/lycoris_lora.egg-info}/PKG-INFO +3 -2
  11. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/setup.py +1 -1
  12. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/LICENSE.md +0 -0
  13. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/__init__.py +0 -0
  14. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/functional/__init__.py +0 -0
  15. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/functional/boft.py +0 -0
  16. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/functional/diag_oft.py +0 -0
  17. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/functional/general.py +0 -0
  18. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/functional/locon.py +0 -0
  19. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/functional/loha.py +0 -0
  20. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/logging.py +0 -0
  21. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/modules/__init__.py +0 -0
  22. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/modules/base.py +0 -0
  23. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/modules/boft.py +0 -0
  24. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/modules/diag_oft.py +0 -0
  25. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/modules/dylora.py +0 -0
  26. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/modules/full.py +0 -0
  27. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/modules/glora.py +0 -0
  28. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/modules/ia3.py +0 -0
  29. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/modules/norms.py +0 -0
  30. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/utils/__init__.py +0 -0
  31. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/utils/general.py +0 -0
  32. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/utils/logger.py +0 -0
  33. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/utils/preset.py +0 -0
  34. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/utils/quant.py +0 -0
  35. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris/utils/xformers_utils.py +0 -0
  36. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris_lora.egg-info/SOURCES.txt +0 -0
  37. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris_lora.egg-info/dependency_links.txt +0 -0
  38. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris_lora.egg-info/not-zip-safe +0 -0
  39. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris_lora.egg-info/requires.txt +0 -0
  40. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/lycoris_lora.egg-info/top_level.txt +0 -0
  41. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/setup.cfg +0 -0
  42. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/test/__init__.py +0 -0
  43. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/test/compile.py +0 -0
  44. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/test/functional.py +0 -0
  45. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/test/kohya.py +0 -0
  46. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/test/module.py +0 -0
  47. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/test/restore.py +0 -0
  48. {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post1}/test/wrapper.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: lycoris_lora
3
- Version: 3.2.0.dev2
3
+ Version: 3.2.0.post1
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
@@ -27,6 +27,7 @@ Dynamic: author
27
27
  Dynamic: author-email
28
28
  Dynamic: classifier
29
29
  Dynamic: home-page
30
+ Dynamic: license-file
30
31
  Dynamic: requires-dist
31
32
  Dynamic: requires-python
32
33
  Dynamic: summary
@@ -259,21 +259,21 @@ See [docs/Conversion-scripts.md](docs/Conversion-scripts.md) for more informatio
259
259
 
260
260
  For full log, please see [Change.md](Change.md)
261
261
 
262
-
263
- ### 2024/12/09 update to 3.1.1
262
+ ### 2025/04/23 update to 3.2.0
264
263
 
265
264
  #### New Features
266
265
 
267
- * use `wd_on_output=True` can enable "correct" weight-decomposition implementation which use the output dimension of weight to calc the norm. The original implementation in LyCORIS calculate things on input dimension due to ambiguos annotation in paper.
266
+ * Support lora-plus learning rate scaling
267
+ * Support HunYuanVideo model and Wan2.1 model
268
+ * LyCORIS now have `onfly_merge` and `onfly_restore` method. Which can be used in inference time to merge the weights of LyCORIS into the original model. This will save the memory and speed up the inference time.
268
269
 
269
270
  #### Improvements
270
271
 
271
- * BOFT now have more efficient implementation which avoid einops.rearrange.
272
- * `.merge_to()` will automatically match the device and dtype now.
272
+ * [BREAKING CHANGES] Now LyCORIS will use `wd_on_output=True` by default. This will make the weight norm more consistent with the original paper.
273
273
 
274
274
  #### Bug fixes
275
275
 
276
- * `scale_weight_norm` working correctly now.
276
+ * `bypass_mode=False` will turn off the bypass mode correctly now.
277
277
 
278
278
  ## Todo list
279
279
 
@@ -12,6 +12,7 @@ PRESET = {
12
12
  "SingleDiTBlock", # SD3.5
13
13
  "MMDoubleStreamBlock", # HunYuanVideo
14
14
  "MMSingleStreamBlock", # HunYuanVideo
15
+ "WanAttentionBlock", # Wan
15
16
  ],
16
17
  "unet_target_name": [
17
18
  "conv_in",
@@ -39,6 +40,7 @@ PRESET = {
39
40
  "SingleDiTBlock",
40
41
  "MMDoubleStreamBlock", # HunYuanVideo
41
42
  "MMSingleStreamBlock", # HunYuanVideo
43
+ "WanAttentionBlock", # Wan
42
44
  ],
43
45
  "unet_target_name": [
44
46
  "time_embedding.linear_1",
@@ -63,6 +65,7 @@ PRESET = {
63
65
  "SingleDiTBlock",
64
66
  "MMDoubleStreamBlock", # HunYuanVideo
65
67
  "MMSingleStreamBlock", # HunYuanVideo
68
+ "WanAttentionBlock", # Wan
66
69
  ],
67
70
  "unet_target_name": [],
68
71
  "text_encoder_target_module": [
@@ -102,6 +105,7 @@ PRESET = {
102
105
  "SingleDiTBlock",
103
106
  "MMDoubleStreamBlock", # HunYuanVideo
104
107
  "MMSingleStreamBlock", # HunYuanVideo
108
+ "WanAttentionBlock", # Wan
105
109
  ],
106
110
  "unet_target_name": [
107
111
  "conv_in",
@@ -122,6 +126,7 @@ PRESET = {
122
126
  "SingleDiTBlock",
123
127
  "MMDoubleStreamBlock", # HunYuanVideo
124
128
  "MMSingleStreamBlock", # HunYuanVideo
129
+ "WanAttentionBlock", # Wan
125
130
  ],
126
131
  "unet_target_name": [],
127
132
  "text_encoder_target_module": [],
@@ -105,12 +105,12 @@ def weight_gen(
105
105
  w2 = torch.empty(shape[0][1], shape[1][1])
106
106
 
107
107
  if use_w2:
108
- torch.nn.init.constant_(w2, 1)
108
+ torch.nn.init.constant_(w2, 0)
109
109
  else:
110
110
  if tucker:
111
111
  torch.nn.init.kaiming_uniform_(t2, a=math.sqrt(5))
112
112
  torch.nn.init.kaiming_uniform_(w2a, a=math.sqrt(5))
113
- torch.nn.init.constant_(w2b, 1)
113
+ torch.nn.init.constant_(w2b, 0)
114
114
 
115
115
  if use_w1:
116
116
  torch.nn.init.kaiming_uniform_(w1, a=math.sqrt(5))
@@ -57,9 +57,9 @@ def create_network(
57
57
  constraint = float(kwargs.get("constraint", None) or 0)
58
58
  rescaled = str_bool(kwargs.get("rescaled", False))
59
59
  weight_decompose = str_bool(kwargs.get("dora_wd", False))
60
- wd_on_output = str_bool(kwargs.get("wd_on_output", False))
60
+ wd_on_output = str_bool(kwargs.get("wd_on_output", True))
61
61
  full_matrix = str_bool(kwargs.get("full_matrix", False))
62
- bypass_mode = str_bool(kwargs.get("bypass_mode", None))
62
+ bypass_mode = str_bool(kwargs.get("bypass_mode", False))
63
63
  rs_lora = str_bool(kwargs.get("rs_lora", False))
64
64
  unbalanced_factorization = str_bool(kwargs.get("unbalanced_factorization", False))
65
65
  train_t5xxl = str_bool(kwargs.get("train_t5xxl", False))
@@ -252,6 +252,7 @@ class LycorisNetworkKohya(LycorisNetwork):
252
252
  "SingleDiTBlock",
253
253
  "MMDoubleStreamBlock", # HunYuanVideo
254
254
  "MMSingleStreamBlock", # HunYuanVideo
255
+ "WanAttentionBlock", # Wan
255
256
  ]
256
257
  UNET_TARGET_REPLACE_NAME = [
257
258
  "conv_in",
@@ -49,7 +49,7 @@ class LoConModule(LycorisBaseModule):
49
49
  use_scalar=False,
50
50
  rank_dropout_scale=False,
51
51
  weight_decompose=False,
52
- wd_on_out=False,
52
+ wd_on_out=True,
53
53
  bypass_mode=None,
54
54
  rs_lora=False,
55
55
  **kwargs,
@@ -41,7 +41,7 @@ class LohaModule(LycorisBaseModule):
41
41
  use_scalar=False,
42
42
  rank_dropout_scale=False,
43
43
  weight_decompose=False,
44
- wd_on_out=False,
44
+ wd_on_out=True,
45
45
  bypass_mode=None,
46
46
  rs_lora=False,
47
47
  **kwargs,
@@ -58,7 +58,7 @@ class LokrModule(LycorisBaseModule):
58
58
  factor: int = -1, # factorization factor
59
59
  rank_dropout_scale=False,
60
60
  weight_decompose=False,
61
- wd_on_out=False,
61
+ wd_on_out=True,
62
62
  full_matrix=False,
63
63
  bypass_mode=None,
64
64
  rs_lora=False,
@@ -89,9 +89,9 @@ def create_lycoris(module, multiplier=1.0, linear_dim=4, linear_alpha=1, **kwarg
89
89
  constraint = float(kwargs.get("constraint", 0) or 0)
90
90
  rescaled = str_bool(kwargs.get("rescaled", False))
91
91
  weight_decompose = str_bool(kwargs.get("dora_wd", False))
92
- wd_on_output = str_bool(kwargs.get("wd_on_output", False))
92
+ wd_on_output = str_bool(kwargs.get("wd_on_output", True))
93
93
  full_matrix = str_bool(kwargs.get("full_matrix", False))
94
- bypass_mode = str_bool(kwargs.get("bypass_mode", None))
94
+ bypass_mode = str_bool(kwargs.get("bypass_mode", False))
95
95
  unbalanced_factorization = str_bool(kwargs.get("unbalanced_factorization", False))
96
96
 
97
97
  if unbalanced_factorization:
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: lycoris_lora
3
- Version: 3.2.0.dev2
3
+ Version: 3.2.0.post1
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
@@ -27,6 +27,7 @@ Dynamic: author
27
27
  Dynamic: author-email
28
28
  Dynamic: classifier
29
29
  Dynamic: home-page
30
+ Dynamic: license-file
30
31
  Dynamic: requires-dist
31
32
  Dynamic: requires-python
32
33
  Dynamic: summary
@@ -4,7 +4,7 @@ from setuptools import setup, find_packages
4
4
  setup(
5
5
  name="lycoris_lora",
6
6
  packages=find_packages(),
7
- version="3.2.0.dev2",
7
+ version="3.2.0.post1",
8
8
  url="https://github.com/KohakuBlueleaf/LyCORIS",
9
9
  description="Lora beYond Conventional methods, Other Rank adaptation Implementations for Stable diffusion",
10
10
  author="Shih-Ying Yeh(KohakuBlueLeaf), Yu-Guan Hsieh, Zhidong Gao",