Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
26b1c0a7
Commit
26b1c0a7
authored
Dec 04, 2023
by
comfyanonymous
Browse files
Fix control lora on fp8.
parent
be3468dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
comfy/controlnet.py
comfy/controlnet.py
+2
-2
No files found.
comfy/controlnet.py
View file @
26b1c0a7
...
...
@@ -208,7 +208,7 @@ class ControlLoraOps:
def
forward
(
self
,
input
):
if
self
.
up
is
not
None
:
return
torch
.
nn
.
functional
.
linear
(
input
,
self
.
weight
.
to
(
input
.
device
)
+
(
torch
.
mm
(
self
.
up
.
flatten
(
start_dim
=
1
),
self
.
down
.
flatten
(
start_dim
=
1
))).
reshape
(
self
.
weight
.
shape
).
type
(
input
.
dtype
),
self
.
bias
)
return
torch
.
nn
.
functional
.
linear
(
input
,
self
.
weight
.
to
(
input
.
dtype
).
to
(
input
.
device
)
+
(
torch
.
mm
(
self
.
up
.
flatten
(
start_dim
=
1
),
self
.
down
.
flatten
(
start_dim
=
1
))).
reshape
(
self
.
weight
.
shape
).
type
(
input
.
dtype
),
self
.
bias
)
else
:
return
torch
.
nn
.
functional
.
linear
(
input
,
self
.
weight
.
to
(
input
.
device
),
self
.
bias
)
...
...
@@ -247,7 +247,7 @@ class ControlLoraOps:
def
forward
(
self
,
input
):
if
self
.
up
is
not
None
:
return
torch
.
nn
.
functional
.
conv2d
(
input
,
self
.
weight
.
to
(
input
.
device
)
+
(
torch
.
mm
(
self
.
up
.
flatten
(
start_dim
=
1
),
self
.
down
.
flatten
(
start_dim
=
1
))).
reshape
(
self
.
weight
.
shape
).
type
(
input
.
dtype
),
self
.
bias
,
self
.
stride
,
self
.
padding
,
self
.
dilation
,
self
.
groups
)
return
torch
.
nn
.
functional
.
conv2d
(
input
,
self
.
weight
.
to
(
input
.
dtype
).
to
(
input
.
device
)
+
(
torch
.
mm
(
self
.
up
.
flatten
(
start_dim
=
1
),
self
.
down
.
flatten
(
start_dim
=
1
))).
reshape
(
self
.
weight
.
shape
).
type
(
input
.
dtype
),
self
.
bias
,
self
.
stride
,
self
.
padding
,
self
.
dilation
,
self
.
groups
)
else
:
return
torch
.
nn
.
functional
.
conv2d
(
input
,
self
.
weight
.
to
(
input
.
device
),
self
.
bias
,
self
.
stride
,
self
.
padding
,
self
.
dilation
,
self
.
groups
)
...
...
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