Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
a2b83050
Commit
a2b83050
authored
Aug 13, 2023
by
Kohaku-Blueleaf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
return None if no ex_bias
parent
bd4da447
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
extensions-builtin/Lora/network.py
extensions-builtin/Lora/network.py
+3
-3
extensions-builtin/Lora/networks.py
extensions-builtin/Lora/networks.py
+1
-1
No files found.
extensions-builtin/Lora/network.py
View file @
a2b83050
...
@@ -145,10 +145,10 @@ class NetworkModule:
...
@@ -145,10 +145,10 @@ class NetworkModule:
if
orig_weight
.
size
()
.
numel
()
==
updown
.
size
()
.
numel
():
if
orig_weight
.
size
()
.
numel
()
==
updown
.
size
()
.
numel
():
updown
=
updown
.
reshape
(
orig_weight
.
shape
)
updown
=
updown
.
reshape
(
orig_weight
.
shape
)
if
ex_bias
is
None
:
if
ex_bias
is
not
None
:
ex_bias
=
0
ex_bias
=
ex_bias
*
self
.
multiplier
()
return
updown
*
self
.
calc_scale
()
*
self
.
multiplier
(),
ex_bias
*
self
.
multiplier
()
return
updown
*
self
.
calc_scale
()
*
self
.
multiplier
(),
ex_bias
def
calc_updown
(
self
,
target
):
def
calc_updown
(
self
,
target
):
raise
NotImplementedError
()
raise
NotImplementedError
()
...
...
extensions-builtin/Lora/networks.py
View file @
a2b83050
...
@@ -322,7 +322,7 @@ def network_apply_weights(self: Union[torch.nn.Conv2d, torch.nn.Linear, torch.nn
...
@@ -322,7 +322,7 @@ def network_apply_weights(self: Union[torch.nn.Conv2d, torch.nn.Linear, torch.nn
updown
=
torch
.
nn
.
functional
.
pad
(
updown
,
(
0
,
0
,
0
,
0
,
0
,
5
))
updown
=
torch
.
nn
.
functional
.
pad
(
updown
,
(
0
,
0
,
0
,
0
,
0
,
5
))
self
.
weight
+=
updown
self
.
weight
+=
updown
if
getattr
(
self
,
'bias'
,
None
)
is
not
None
:
if
ex_bias
is
not
None
and
getattr
(
self
,
'bias'
,
None
)
is
not
None
:
self
.
bias
+=
ex_bias
self
.
bias
+=
ex_bias
continue
continue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment