lycoris-lora 3.2.0.dev2__tar.gz → 3.2.0.post2__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.
- {lycoris_lora-3.2.0.dev2/lycoris_lora.egg-info → lycoris_lora-3.2.0.post2}/PKG-INFO +5 -3
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/README.md +6 -6
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/config.py +15 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/functional/lokr.py +2 -2
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/kohya.py +9 -6
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/modules/locon.py +1 -1
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/modules/loha.py +1 -1
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/modules/lokr.py +1 -1
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/wrapper.py +2 -2
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2/lycoris_lora.egg-info}/PKG-INFO +5 -3
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/setup.py +2 -2
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/LICENSE.md +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/__init__.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/functional/__init__.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/functional/boft.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/functional/diag_oft.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/functional/general.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/functional/locon.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/functional/loha.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/logging.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/modules/__init__.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/modules/base.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/modules/boft.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/modules/diag_oft.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/modules/dylora.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/modules/full.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/modules/glora.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/modules/ia3.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/modules/norms.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/utils/__init__.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/utils/general.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/utils/logger.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/utils/preset.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/utils/quant.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris/utils/xformers_utils.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris_lora.egg-info/SOURCES.txt +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris_lora.egg-info/dependency_links.txt +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris_lora.egg-info/not-zip-safe +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris_lora.egg-info/requires.txt +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris_lora.egg-info/top_level.txt +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/setup.cfg +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/test/__init__.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/test/compile.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/test/functional.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/test/kohya.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/test/module.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/test/restore.py +0 -0
- {lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/test/wrapper.py +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: lycoris_lora
|
|
3
|
-
Version: 3.2.0.
|
|
3
|
+
Version: 3.2.0.post2
|
|
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
|
|
7
7
|
Author-email: kohaku@kblueleaf.net
|
|
8
|
+
License: Apache-2.0
|
|
8
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
9
10
|
Classifier: Environment :: GPU :: NVIDIA CUDA :: 11.8
|
|
10
11
|
Classifier: Environment :: GPU :: NVIDIA CUDA :: 12
|
|
11
12
|
Classifier: Environment :: GPU :: NVIDIA CUDA :: 12 :: 12.1
|
|
12
13
|
Classifier: Intended Audience :: Developers
|
|
13
14
|
Classifier: Intended Audience :: End Users/Desktop
|
|
14
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
15
|
Classifier: Programming Language :: Python
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -27,6 +27,8 @@ Dynamic: author
|
|
|
27
27
|
Dynamic: author-email
|
|
28
28
|
Dynamic: classifier
|
|
29
29
|
Dynamic: home-page
|
|
30
|
+
Dynamic: license
|
|
31
|
+
Dynamic: license-file
|
|
30
32
|
Dynamic: requires-dist
|
|
31
33
|
Dynamic: requires-python
|
|
32
34
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
* `
|
|
276
|
+
* `bypass_mode=False` will turn off the bypass mode correctly now.
|
|
277
277
|
|
|
278
278
|
## Todo list
|
|
279
279
|
|
|
@@ -12,6 +12,9 @@ PRESET = {
|
|
|
12
12
|
"SingleDiTBlock", # SD3.5
|
|
13
13
|
"MMDoubleStreamBlock", # HunYuanVideo
|
|
14
14
|
"MMSingleStreamBlock", # HunYuanVideo
|
|
15
|
+
"WanAttentionBlock", # Wan
|
|
16
|
+
"HunyuanVideoTransformerBlock", # FramePack
|
|
17
|
+
"HunyuanVideoSingleTransformerBlock", # FramePack
|
|
15
18
|
],
|
|
16
19
|
"unet_target_name": [
|
|
17
20
|
"conv_in",
|
|
@@ -39,6 +42,9 @@ PRESET = {
|
|
|
39
42
|
"SingleDiTBlock",
|
|
40
43
|
"MMDoubleStreamBlock", # HunYuanVideo
|
|
41
44
|
"MMSingleStreamBlock", # HunYuanVideo
|
|
45
|
+
"WanAttentionBlock", # Wan
|
|
46
|
+
"HunyuanVideoTransformerBlock", # FramePack
|
|
47
|
+
"HunyuanVideoSingleTransformerBlock", # FramePack
|
|
42
48
|
],
|
|
43
49
|
"unet_target_name": [
|
|
44
50
|
"time_embedding.linear_1",
|
|
@@ -63,6 +69,9 @@ PRESET = {
|
|
|
63
69
|
"SingleDiTBlock",
|
|
64
70
|
"MMDoubleStreamBlock", # HunYuanVideo
|
|
65
71
|
"MMSingleStreamBlock", # HunYuanVideo
|
|
72
|
+
"WanAttentionBlock", # Wan
|
|
73
|
+
"HunyuanVideoTransformerBlock", # FramePack
|
|
74
|
+
"HunyuanVideoSingleTransformerBlock", # FramePack
|
|
66
75
|
],
|
|
67
76
|
"unet_target_name": [],
|
|
68
77
|
"text_encoder_target_module": [
|
|
@@ -102,6 +111,9 @@ PRESET = {
|
|
|
102
111
|
"SingleDiTBlock",
|
|
103
112
|
"MMDoubleStreamBlock", # HunYuanVideo
|
|
104
113
|
"MMSingleStreamBlock", # HunYuanVideo
|
|
114
|
+
"WanAttentionBlock", # Wan
|
|
115
|
+
"HunyuanVideoTransformerBlock", # FramePack
|
|
116
|
+
"HunyuanVideoSingleTransformerBlock", # FramePack
|
|
105
117
|
],
|
|
106
118
|
"unet_target_name": [
|
|
107
119
|
"conv_in",
|
|
@@ -122,6 +134,9 @@ PRESET = {
|
|
|
122
134
|
"SingleDiTBlock",
|
|
123
135
|
"MMDoubleStreamBlock", # HunYuanVideo
|
|
124
136
|
"MMSingleStreamBlock", # HunYuanVideo
|
|
137
|
+
"WanAttentionBlock", # Wan
|
|
138
|
+
"HunyuanVideoTransformerBlock", # FramePack
|
|
139
|
+
"HunyuanVideoSingleTransformerBlock", # FramePack
|
|
125
140
|
],
|
|
126
141
|
"unet_target_name": [],
|
|
127
142
|
"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,
|
|
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,
|
|
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",
|
|
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",
|
|
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,9 @@ class LycorisNetworkKohya(LycorisNetwork):
|
|
|
252
252
|
"SingleDiTBlock",
|
|
253
253
|
"MMDoubleStreamBlock", # HunYuanVideo
|
|
254
254
|
"MMSingleStreamBlock", # HunYuanVideo
|
|
255
|
+
"WanAttentionBlock", # Wan
|
|
256
|
+
"HunyuanVideoTransformerBlock", # FramePack
|
|
257
|
+
"HunyuanVideoSingleTransformerBlock", # FramePack
|
|
255
258
|
]
|
|
256
259
|
UNET_TARGET_REPLACE_NAME = [
|
|
257
260
|
"conv_in",
|
|
@@ -699,7 +702,7 @@ class LycorisNetworkKohya(LycorisNetwork):
|
|
|
699
702
|
if self.text_encoder_loras:
|
|
700
703
|
params, descriptions = assemble_params(
|
|
701
704
|
self.text_encoder_loras,
|
|
702
|
-
text_encoder_lr if text_encoder_lr is not None else
|
|
705
|
+
text_encoder_lr if text_encoder_lr is not None else learning_rate,
|
|
703
706
|
self.loraplus_text_encoder_lr_ratio or self.loraplus_lr_ratio,
|
|
704
707
|
)
|
|
705
708
|
all_params.extend(params)
|
|
@@ -710,7 +713,7 @@ class LycorisNetworkKohya(LycorisNetwork):
|
|
|
710
713
|
if self.unet_loras:
|
|
711
714
|
params, descriptions = assemble_params(
|
|
712
715
|
self.unet_loras,
|
|
713
|
-
unet_lr if unet_lr is not None else
|
|
716
|
+
unet_lr if unet_lr is not None else learning_rate,
|
|
714
717
|
self.loraplus_unet_lr_ratio or self.loraplus_lr_ratio,
|
|
715
718
|
)
|
|
716
719
|
all_params.extend(params)
|
|
@@ -727,10 +730,10 @@ class LycorisNetworkKohya(LycorisNetwork):
|
|
|
727
730
|
def prepare_grad_etc(self, *args):
|
|
728
731
|
self.requires_grad_(True)
|
|
729
732
|
|
|
730
|
-
def on_epoch_start(self,
|
|
733
|
+
def on_epoch_start(self, *args):
|
|
731
734
|
self.train()
|
|
732
735
|
|
|
733
|
-
def on_step_start(self):
|
|
736
|
+
def on_step_start(self, *args):
|
|
734
737
|
pass
|
|
735
738
|
|
|
736
739
|
def get_trainable_params(self):
|
|
@@ -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",
|
|
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",
|
|
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,17 +1,17 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: lycoris_lora
|
|
3
|
-
Version: 3.2.0.
|
|
3
|
+
Version: 3.2.0.post2
|
|
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
|
|
7
7
|
Author-email: kohaku@kblueleaf.net
|
|
8
|
+
License: Apache-2.0
|
|
8
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
9
10
|
Classifier: Environment :: GPU :: NVIDIA CUDA :: 11.8
|
|
10
11
|
Classifier: Environment :: GPU :: NVIDIA CUDA :: 12
|
|
11
12
|
Classifier: Environment :: GPU :: NVIDIA CUDA :: 12 :: 12.1
|
|
12
13
|
Classifier: Intended Audience :: Developers
|
|
13
14
|
Classifier: Intended Audience :: End Users/Desktop
|
|
14
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
15
|
Classifier: Programming Language :: Python
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -27,6 +27,8 @@ Dynamic: author
|
|
|
27
27
|
Dynamic: author-email
|
|
28
28
|
Dynamic: classifier
|
|
29
29
|
Dynamic: home-page
|
|
30
|
+
Dynamic: license
|
|
31
|
+
Dynamic: license-file
|
|
30
32
|
Dynamic: requires-dist
|
|
31
33
|
Dynamic: requires-python
|
|
32
34
|
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.
|
|
7
|
+
version="3.2.0.post2",
|
|
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",
|
|
@@ -12,6 +12,7 @@ setup(
|
|
|
12
12
|
zip_safe=False,
|
|
13
13
|
install_requires=["torch", "einops", "toml", "tqdm"],
|
|
14
14
|
python_requires=">=3.10",
|
|
15
|
+
license="Apache-2.0",
|
|
15
16
|
classifiers=[
|
|
16
17
|
"Development Status :: 5 - Production/Stable",
|
|
17
18
|
"Environment :: GPU :: NVIDIA CUDA :: 11.8",
|
|
@@ -19,7 +20,6 @@ setup(
|
|
|
19
20
|
"Environment :: GPU :: NVIDIA CUDA :: 12 :: 12.1",
|
|
20
21
|
"Intended Audience :: Developers",
|
|
21
22
|
"Intended Audience :: End Users/Desktop",
|
|
22
|
-
"License :: OSI Approved :: Apache Software License",
|
|
23
23
|
"Programming Language :: Python",
|
|
24
24
|
"Programming Language :: Python :: 3.10",
|
|
25
25
|
"Programming Language :: Python :: 3.11",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lycoris_lora-3.2.0.dev2 → lycoris_lora-3.2.0.post2}/lycoris_lora.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|