lycoris-lora 2.2.0.dev5__tar.gz → 2.2.0.dev7__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-2.2.0.dev5/lycoris_lora.egg-info → lycoris_lora-2.2.0.dev7}/PKG-INFO +1 -1
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/kohya/__init__.py +3 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/locon.py +8 -4
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/lokr.py +1 -1
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7/lycoris_lora.egg-info}/PKG-INFO +1 -1
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/setup.py +1 -1
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/LICENSE.md +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/README.md +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/__init__.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/config.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/hcp/__init__.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/hcp/base.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/hcp/diag_oft.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/hcp/loha.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/hcp/lokr.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/kohya/model_utils.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/kohya/original_unet.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/kohya/sdxl_model_util.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/kohya/sdxl_original_unet.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/kohya/test_hyperdream.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/kohya/utils.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/logging.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/__init__.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/attention.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/base.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/boft.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/diag_oft.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/dylora.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/full.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/glokr.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/glora.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/hypernet/__init__.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/hypernet/generater.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/hypernet/text_encoder.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/ia3.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/loha.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/norms.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/utils/__init__.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/utils/logger.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/utils/preset.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/utils/xformers_utils.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/wrapper.py +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris_lora.egg-info/SOURCES.txt +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris_lora.egg-info/dependency_links.txt +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris_lora.egg-info/not-zip-safe +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris_lora.egg-info/requires.txt +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris_lora.egg-info/top_level.txt +0 -0
- {lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lycoris_lora
|
|
3
|
-
Version: 2.2.0.
|
|
3
|
+
Version: 2.2.0.dev7
|
|
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
|
|
@@ -74,6 +74,9 @@ def create_network(
|
|
|
74
74
|
weight_decompose = str_bool(kwargs.get("dora_wd", False))
|
|
75
75
|
full_matrix = str_bool(kwargs.get("full_matrix", False))
|
|
76
76
|
|
|
77
|
+
if weight_decompose:
|
|
78
|
+
logger.info("Weight decomposition is enabled")
|
|
79
|
+
|
|
77
80
|
if full_matrix:
|
|
78
81
|
logger.info("Full matrix mode for LoKr is enabled")
|
|
79
82
|
|
|
@@ -122,7 +122,8 @@ class LoConModule(ModuleCustomSD):
|
|
|
122
122
|
if use_scalar:
|
|
123
123
|
self.scalar = nn.Parameter(torch.tensor(0.0))
|
|
124
124
|
else:
|
|
125
|
-
self.scalar
|
|
125
|
+
self.scalar: torch.FloatTensor
|
|
126
|
+
self.register_buffer("scalar", torch.tensor(1.0), persistent=False)
|
|
126
127
|
# same as microsoft's
|
|
127
128
|
torch.nn.init.kaiming_uniform_(self.lora_down.weight, a=math.sqrt(5))
|
|
128
129
|
if use_scalar:
|
|
@@ -176,7 +177,7 @@ class LoConModule(ModuleCustomSD):
|
|
|
176
177
|
drop /= drop.mean()
|
|
177
178
|
weight *= drop
|
|
178
179
|
|
|
179
|
-
return weight * self.scalar
|
|
180
|
+
return weight * self.scalar.to(device)
|
|
180
181
|
|
|
181
182
|
def apply_weight_decompose(self, weight):
|
|
182
183
|
return (
|
|
@@ -185,6 +186,8 @@ class LoConModule(ModuleCustomSD):
|
|
|
185
186
|
|
|
186
187
|
def custom_state_dict(self):
|
|
187
188
|
destination = {}
|
|
189
|
+
if self.wd:
|
|
190
|
+
destination["dora_scale"] = self.dora_scale
|
|
188
191
|
destination["alpha"] = self.alpha
|
|
189
192
|
destination["lora_up.weight"] = self.lora_up.weight * self.scalar
|
|
190
193
|
destination["lora_down.weight"] = self.lora_down.weight
|
|
@@ -324,10 +327,11 @@ class LoConModule(ModuleCustomSD):
|
|
|
324
327
|
return self.org_forward(x)
|
|
325
328
|
scale = self.scale * self.multiplier
|
|
326
329
|
|
|
330
|
+
dtype_device = next(self.parameters())
|
|
327
331
|
if self.wd:
|
|
328
332
|
weight = (
|
|
329
|
-
self.org_module[0].weight.data.to(
|
|
330
|
-
+ self.make_weight(x.device).to(
|
|
333
|
+
self.org_module[0].weight.data.to(dtype_device)
|
|
334
|
+
+ self.make_weight(x.device).to(dtype_device) * scale
|
|
331
335
|
)
|
|
332
336
|
if self.wd:
|
|
333
337
|
weight = self.apply_weight_decompose(weight)
|
|
@@ -111,7 +111,7 @@ class LokrModule(ModuleCustomSD):
|
|
|
111
111
|
self.tucker = False
|
|
112
112
|
self.use_w1 = False
|
|
113
113
|
self.use_w2 = False
|
|
114
|
-
self.full_matrix =
|
|
114
|
+
self.full_matrix = full_matrix
|
|
115
115
|
|
|
116
116
|
self.shape = org_module.weight.shape
|
|
117
117
|
if org_module.__class__.__name__ == "Conv2d":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lycoris_lora
|
|
3
|
-
Version: 2.2.0.
|
|
3
|
+
Version: 2.2.0.dev7
|
|
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
|
|
@@ -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="2.2.0.
|
|
7
|
+
version="2.2.0.dev7",
|
|
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",
|
|
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
|
|
File without changes
|
|
File without changes
|
{lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris/modules/hypernet/text_encoder.py
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
|
{lycoris_lora-2.2.0.dev5 → lycoris_lora-2.2.0.dev7}/lycoris_lora.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|