lycoris-lora 2.3.0.dev7__tar.gz → 2.3.0.dev9__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.3.0.dev7/lycoris_lora.egg-info → lycoris_lora-2.3.0.dev9}/PKG-INFO +1 -1
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/README.md +1 -1
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/__init__.py +6 -2
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/base.py +6 -1
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/boft.py +16 -4
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/diag_oft.py +18 -4
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/locon.py +13 -7
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/loha.py +12 -5
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/lokr.py +6 -4
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9/lycoris_lora.egg-info}/PKG-INFO +1 -1
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris_lora.egg-info/SOURCES.txt +0 -1
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/setup.py +1 -1
- lycoris_lora-2.3.0.dev7/lycoris/utils/tensor_norm.py +0 -7
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/LICENSE.md +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/__init__.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/config.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/hcp/__init__.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/hcp/base.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/hcp/diag_oft.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/hcp/loha.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/hcp/lokr.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/kohya/__init__.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/kohya/model_utils.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/kohya/original_unet.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/kohya/sdxl_model_util.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/kohya/sdxl_original_unet.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/kohya/test_hyperdream.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/kohya/utils.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/logging.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/attention.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/dylora.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/full.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/glokr.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/glora.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/hypernet/__init__.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/hypernet/generater.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/hypernet/text_encoder.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/ia3.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/lilora.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/modules/norms.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/utils/__init__.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/utils/bnb.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/utils/logger.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/utils/preset.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/utils/xformers_utils.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris/wrapper.py +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris_lora.egg-info/dependency_links.txt +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris_lora.egg-info/not-zip-safe +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris_lora.egg-info/requires.txt +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris_lora.egg-info/top_level.txt +0 -0
- {lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lycoris_lora
|
|
3
|
-
Version: 2.3.0.
|
|
3
|
+
Version: 2.3.0.dev9
|
|
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
|
|
@@ -81,7 +81,7 @@ In any case, please install this package in the corresponding virtual environmen
|
|
|
81
81
|
pip install .
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
A
|
|
84
|
+
A detailed description of the network arguments is provided in [docs/Network-Args.md](docs/Network-Args.md).
|
|
85
85
|
|
|
86
86
|
#### kohya script
|
|
87
87
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import torch
|
|
2
|
+
import torch.nn as nn
|
|
2
3
|
|
|
3
4
|
from .full import FullModule
|
|
4
5
|
from .norms import NormModule
|
|
@@ -122,9 +123,12 @@ def make_module(lyco_type, params, lora_name, orig_module):
|
|
|
122
123
|
orig_module,
|
|
123
124
|
1,
|
|
124
125
|
)
|
|
125
|
-
module.
|
|
126
|
+
module.weight.copy_(diff + orig_module[0].weight.data)
|
|
126
127
|
if diff_b is not None:
|
|
127
|
-
|
|
128
|
+
if orig_module[0].bias is not None:
|
|
129
|
+
module.bias.copy_(diff_b + orig_module[0].bias.data)
|
|
130
|
+
else:
|
|
131
|
+
module.bias = nn.Parameter(diff_b)
|
|
128
132
|
elif lyco_type == "ia3":
|
|
129
133
|
pass
|
|
130
134
|
else:
|
|
@@ -164,7 +164,6 @@ class LycorisBaseModule(ModuleCustomSD):
|
|
|
164
164
|
|
|
165
165
|
self.multiplier = multiplier
|
|
166
166
|
self.org_module = [org_module]
|
|
167
|
-
self.org_forward = self.org_module[0].forward
|
|
168
167
|
|
|
169
168
|
@property
|
|
170
169
|
def org_weight(self):
|
|
@@ -192,6 +191,9 @@ class LycorisBaseModule(ModuleCustomSD):
|
|
|
192
191
|
else:
|
|
193
192
|
self.org_module[0].bias = nn.Parameter(bias)
|
|
194
193
|
|
|
194
|
+
def get_diff_weight(self, multiplier=1.0, shape=None, device=None):
|
|
195
|
+
raise NotImplementedError
|
|
196
|
+
|
|
195
197
|
def get_merged_weight(self, multiplier=1.0, shape=None, device=None):
|
|
196
198
|
raise NotImplementedError
|
|
197
199
|
|
|
@@ -199,6 +201,9 @@ class LycorisBaseModule(ModuleCustomSD):
|
|
|
199
201
|
def apply_max_norm(self, max_norm, device=None):
|
|
200
202
|
raise NotImplementedError
|
|
201
203
|
|
|
204
|
+
def bypass_forward_diff(self, x, scale=1):
|
|
205
|
+
raise NotImplementedError
|
|
206
|
+
|
|
202
207
|
def bypass_forward(self, x, scale=1):
|
|
203
208
|
raise NotImplementedError
|
|
204
209
|
|
|
@@ -124,7 +124,7 @@ class ButterflyOFTModule(LycorisBaseModule):
|
|
|
124
124
|
r = (I + normed_q) @ (I - normed_q).float().inverse()
|
|
125
125
|
return r
|
|
126
126
|
|
|
127
|
-
def make_weight(self, scale=1, device=None):
|
|
127
|
+
def make_weight(self, scale=1, device=None, diff=False):
|
|
128
128
|
m = self.boft_m
|
|
129
129
|
b = self.boft_b
|
|
130
130
|
r_b = b // 2
|
|
@@ -135,9 +135,9 @@ class ButterflyOFTModule(LycorisBaseModule):
|
|
|
135
135
|
bi = r[i] # b_num, b_size, b_size
|
|
136
136
|
if i == 0:
|
|
137
137
|
# Apply multiplier/scale and rescale into first weight
|
|
138
|
-
bi = bi * scale + (1 - scale) * self.I
|
|
139
138
|
if self.rescaled:
|
|
140
139
|
bi = bi * self.rescale
|
|
140
|
+
bi = bi * scale - scale * self.I + (self.I if diff else 0)
|
|
141
141
|
inp = rearrange(inp, "(c g k) ... -> (c k g) ...", g=2, k=2**i * r_b)
|
|
142
142
|
inp = rearrange(inp, "(d b) ... -> d b ...", b=b)
|
|
143
143
|
inp = torch.einsum("b i j, b j ... -> b i ...", bi, inp)
|
|
@@ -146,6 +146,12 @@ class ButterflyOFTModule(LycorisBaseModule):
|
|
|
146
146
|
|
|
147
147
|
return inp
|
|
148
148
|
|
|
149
|
+
def get_diff_weight(self, multiplier=1, shape=None, device=None):
|
|
150
|
+
diff = self.make_weight(scale=multiplier, device=device, diff=True)
|
|
151
|
+
if shape is not None:
|
|
152
|
+
diff = diff.view(shape)
|
|
153
|
+
return diff
|
|
154
|
+
|
|
149
155
|
def get_merged_weight(self, multiplier=1, shape=None, device=None):
|
|
150
156
|
diff = self.make_weight(scale=multiplier, device=device)
|
|
151
157
|
if shape is not None:
|
|
@@ -165,7 +171,7 @@ class ButterflyOFTModule(LycorisBaseModule):
|
|
|
165
171
|
|
|
166
172
|
return scaled, orig_norm * ratio
|
|
167
173
|
|
|
168
|
-
def
|
|
174
|
+
def _bypass_forward(self, x, scale=1, diff=False):
|
|
169
175
|
m = self.boft_m
|
|
170
176
|
b = self.boft_b
|
|
171
177
|
r_b = b // 2
|
|
@@ -176,9 +182,9 @@ class ButterflyOFTModule(LycorisBaseModule):
|
|
|
176
182
|
bi = r[i] # b_num, b_size, b_size
|
|
177
183
|
if i == 0:
|
|
178
184
|
# Apply multiplier/scale and rescale into first weight
|
|
179
|
-
bi = bi * scale + (1 - scale) * self.I
|
|
180
185
|
if self.rescaled:
|
|
181
186
|
bi = bi * self.rescale
|
|
187
|
+
bi = bi * scale - scale * self.I + (self.I if diff else 0)
|
|
182
188
|
inp = rearrange(inp, "... (c g k) ->... (c k g)", g=2, k=2**i * r_b)
|
|
183
189
|
inp = rearrange(inp, "... (d b) -> ... d b", b=b)
|
|
184
190
|
inp = torch.einsum("b i j, ... b j -> ... b i", bi, inp)
|
|
@@ -187,6 +193,12 @@ class ButterflyOFTModule(LycorisBaseModule):
|
|
|
187
193
|
|
|
188
194
|
return inp
|
|
189
195
|
|
|
196
|
+
def bypass_forward_diff(self, x, scale=1):
|
|
197
|
+
return self._bypass_forward(x, scale, diff=True)
|
|
198
|
+
|
|
199
|
+
def bypass_forward(self, x, scale=1):
|
|
200
|
+
return self._bypass_forward(x, scale, diff=False)
|
|
201
|
+
|
|
190
202
|
def forward(self, x, *args, **kwargs):
|
|
191
203
|
if self.module_dropout and self.training:
|
|
192
204
|
if torch.rand(1) < self.module_dropout:
|
|
@@ -98,7 +98,7 @@ class DiagOFTModule(LycorisBaseModule):
|
|
|
98
98
|
r = (I + normed_q) @ (I - normed_q).float().inverse()
|
|
99
99
|
return r
|
|
100
100
|
|
|
101
|
-
def make_weight(self, scale=1, device=None):
|
|
101
|
+
def make_weight(self, scale=1, device=None, diff=False):
|
|
102
102
|
r = self.get_r()
|
|
103
103
|
org_weight = self.org_weight.to(device, dtype=r.dtype)
|
|
104
104
|
org_weight = rearrange(
|
|
@@ -110,7 +110,7 @@ class DiagOFTModule(LycorisBaseModule):
|
|
|
110
110
|
# Init R=0, so add I on it to ensure the output of step0 is original model output
|
|
111
111
|
weight = torch.einsum(
|
|
112
112
|
"k n m, k n ... -> k m ...",
|
|
113
|
-
r * scale
|
|
113
|
+
r * scale - scale * self.I + (self.I if diff else 0),
|
|
114
114
|
org_weight,
|
|
115
115
|
)
|
|
116
116
|
weight = rearrange(weight, "k m ... -> (k m) ...")
|
|
@@ -118,6 +118,12 @@ class DiagOFTModule(LycorisBaseModule):
|
|
|
118
118
|
weight = self.rescale * weight
|
|
119
119
|
return weight
|
|
120
120
|
|
|
121
|
+
def get_diff_weight(self, multiplier=1, shape=None, device=None):
|
|
122
|
+
diff = self.make_weight(scale=multiplier, device=device, diff=True)
|
|
123
|
+
if shape is not None:
|
|
124
|
+
diff = diff.view(shape)
|
|
125
|
+
return diff
|
|
126
|
+
|
|
121
127
|
def get_merged_weight(self, multiplier=1, shape=None, device=None):
|
|
122
128
|
diff = self.make_weight(scale=multiplier, device=device)
|
|
123
129
|
if shape is not None:
|
|
@@ -137,7 +143,7 @@ class DiagOFTModule(LycorisBaseModule):
|
|
|
137
143
|
|
|
138
144
|
return scaled, orig_norm * ratio
|
|
139
145
|
|
|
140
|
-
def
|
|
146
|
+
def _bypass_forward(self, x, scale=1, diff=False):
|
|
141
147
|
r = self.get_r()
|
|
142
148
|
org_out = self.org_forward(x)
|
|
143
149
|
if self.op == F.conv2d:
|
|
@@ -149,13 +155,21 @@ class DiagOFTModule(LycorisBaseModule):
|
|
|
149
155
|
n=self.block_size,
|
|
150
156
|
)
|
|
151
157
|
oft_out = torch.einsum(
|
|
152
|
-
"k n m, ... k n -> ... k m",
|
|
158
|
+
"k n m, ... k n -> ... k m",
|
|
159
|
+
r * scale - scale * self.I + (self.I if diff else 0),
|
|
160
|
+
org_out,
|
|
153
161
|
)
|
|
154
162
|
out = rearrange(oft_out, "... k m -> ... (k m)")
|
|
155
163
|
if self.op == F.conv2d:
|
|
156
164
|
out = out.transpose(1, -1)
|
|
157
165
|
return out
|
|
158
166
|
|
|
167
|
+
def bypass_forward_diff(self, x, scale=1):
|
|
168
|
+
return self._bypass_forward(x, scale, diff=True)
|
|
169
|
+
|
|
170
|
+
def bypass_forward(self, x, scale=1):
|
|
171
|
+
return self._bypass_forward(x, scale, diff=False)
|
|
172
|
+
|
|
159
173
|
def forward(self, x: torch.Tensor, *args, **kwargs):
|
|
160
174
|
if self.module_dropout and self.training:
|
|
161
175
|
if torch.rand(1) < self.module_dropout:
|
|
@@ -174,17 +174,22 @@ class LoConModule(LycorisBaseModule):
|
|
|
174
174
|
|
|
175
175
|
return weight * self.scalar.to(device)
|
|
176
176
|
|
|
177
|
-
def
|
|
177
|
+
def get_diff_weight(self, multiplier=1, shape=None, device=None):
|
|
178
178
|
scale = self.scale * multiplier
|
|
179
179
|
diff = self.make_weight(device=device) * scale
|
|
180
180
|
if shape is not None:
|
|
181
181
|
diff = diff.view(shape)
|
|
182
182
|
if device is not None:
|
|
183
183
|
diff = diff.to(device)
|
|
184
|
-
|
|
184
|
+
return diff
|
|
185
|
+
|
|
186
|
+
def get_merged_weight(self, multiplier=1, shape=None, device=None):
|
|
187
|
+
merged = self.org_module[0].weight.data + self.get_diff_weight(
|
|
188
|
+
multiplier=multiplier, shape=shape, device=device
|
|
189
|
+
)
|
|
185
190
|
if self.wd:
|
|
186
191
|
merged = self.apply_weight_decompose(merged)
|
|
187
|
-
return merged
|
|
192
|
+
return merged, None
|
|
188
193
|
|
|
189
194
|
def apply_weight_decompose(self, weight):
|
|
190
195
|
weight = weight.to(self.dora_scale.dtype)
|
|
@@ -222,7 +227,7 @@ class LoConModule(LycorisBaseModule):
|
|
|
222
227
|
|
|
223
228
|
return scaled, orig_norm * ratio
|
|
224
229
|
|
|
225
|
-
def
|
|
230
|
+
def bypass_forward_diff(self, x, scale=1):
|
|
226
231
|
if self.tucker:
|
|
227
232
|
mid = self.lora_mid(self.lora_down(x))
|
|
228
233
|
else:
|
|
@@ -240,9 +245,10 @@ class LoConModule(LycorisBaseModule):
|
|
|
240
245
|
drop = drop.view(*[1] * (dims - 1), -1)
|
|
241
246
|
mid = mid * drop
|
|
242
247
|
|
|
243
|
-
return self.
|
|
244
|
-
|
|
245
|
-
|
|
248
|
+
return self.dropout(self.lora_up(mid) * self.scalar * self.scale * scale)
|
|
249
|
+
|
|
250
|
+
def bypass_forward(self, x, scale=1):
|
|
251
|
+
return self.org_forward(x) + self.bypass_forward_diff(x, scale=scale)
|
|
246
252
|
|
|
247
253
|
def forward(self, x):
|
|
248
254
|
if self.module_dropout and self.training:
|
|
@@ -247,12 +247,17 @@ class LohaModule(LycorisBaseModule):
|
|
|
247
247
|
weight *= drop
|
|
248
248
|
return weight
|
|
249
249
|
|
|
250
|
-
def
|
|
250
|
+
def get_diff_weight(self, multiplier=1, shape=None, device=None):
|
|
251
251
|
scale = self.scale * multiplier
|
|
252
252
|
diff = self.get_weight(shape) * scale
|
|
253
253
|
if device is not None:
|
|
254
254
|
diff = diff.to(device)
|
|
255
|
-
|
|
255
|
+
return diff
|
|
256
|
+
|
|
257
|
+
def get_merged_weight(self, multiplier=1, shape=None, device=None):
|
|
258
|
+
merged = self.org_module[0].weight.data + self.get_diff_weight(
|
|
259
|
+
multiplier=multiplier, shape=shape, device=device
|
|
260
|
+
)
|
|
256
261
|
if self.wd:
|
|
257
262
|
merged = self.apply_weight_decompose(merged)
|
|
258
263
|
return merged
|
|
@@ -296,10 +301,12 @@ class LohaModule(LycorisBaseModule):
|
|
|
296
301
|
|
|
297
302
|
return scaled, orig_norm * ratio
|
|
298
303
|
|
|
299
|
-
def
|
|
304
|
+
def bypass_forward_diff(self, x, scale=1):
|
|
300
305
|
diff_weight = self.get_weight(self.shape) * self.scalar * scale
|
|
301
|
-
|
|
302
|
-
|
|
306
|
+
return self.op(x, diff_weight, **self.kw_dict)
|
|
307
|
+
|
|
308
|
+
def bypass_forward(self, x, scale=1):
|
|
309
|
+
return self.org_forward(x) + self.bypass_forward_diff(x, scale=scale)
|
|
303
310
|
|
|
304
311
|
def forward(self, x: torch.Tensor, *args, **kwargs):
|
|
305
312
|
if self.module_dropout and self.training:
|
|
@@ -376,11 +376,10 @@ class LokrModule(LycorisBaseModule):
|
|
|
376
376
|
|
|
377
377
|
return scaled, orig_norm * ratio
|
|
378
378
|
|
|
379
|
-
def
|
|
379
|
+
def bypass_forward_diff(self, h):
|
|
380
380
|
if len(self.shape) > 2 and self.shape[2] > 1:
|
|
381
381
|
return (
|
|
382
|
-
self.
|
|
383
|
-
+ self.op(h, self.get_weight(self.shape), **self.kw_dict)
|
|
382
|
+
self.op(h, self.get_weight(self.shape), **self.kw_dict)
|
|
384
383
|
* self.multiplier
|
|
385
384
|
)
|
|
386
385
|
if self.module_type.startswith("conv"):
|
|
@@ -413,7 +412,10 @@ class LokrModule(LycorisBaseModule):
|
|
|
413
412
|
if self.module_type.startswith("conv"):
|
|
414
413
|
h = h.transpose(1, -1)
|
|
415
414
|
|
|
416
|
-
return h * self.multiplier
|
|
415
|
+
return h * self.multiplier
|
|
416
|
+
|
|
417
|
+
def bypass_forward(self, x, scale=1):
|
|
418
|
+
return self.org_forward(x) + self.bypass_forward_diff(x, scale=scale)
|
|
417
419
|
|
|
418
420
|
def forward(self, x: torch.Tensor, *args, **kwargs):
|
|
419
421
|
if self.module_dropout and self.training:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lycoris_lora
|
|
3
|
-
Version: 2.3.0.
|
|
3
|
+
Version: 2.3.0.dev9
|
|
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.3.0.
|
|
7
|
+
version="2.3.0.dev9",
|
|
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
|
{lycoris_lora-2.3.0.dev7 → lycoris_lora-2.3.0.dev9}/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.3.0.dev7 → lycoris_lora-2.3.0.dev9}/lycoris_lora.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|