Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Qirui Sun
sd-webui-controlnet
Commits
21e9024b
Commit
21e9024b
authored
1 year ago
by
Qirui Sun
Browse files
Options
Download
Email Patches
Plain Diff
'control mode'- Save before debug
parent
e162b6f7
xiaoyu_test
ip-branch
1 merge request
!1
now merge Ip branch to master
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/controlmodel_ipadapter.py
+1
-1
scripts/controlmodel_ipadapter.py
scripts/hook.py
+2
-0
scripts/hook.py
with
3 additions
and
1 deletion
+3
-1
scripts/controlmodel_ipadapter.py
+
1
-
1
View file @
21e9024b
...
...
@@ -402,7 +402,7 @@ class PlugableIPAdapter(torch.nn.Module):
set_model_patch_replace
(
model
,
self
.
patch_forward
(
number
),
"output"
,
id
,
index
)
number
+=
1
for
index
in
range
(
10
):
if
IP_weights
[
number
]:
if
IP_weights
[
number
]:
set_model_patch_replace
(
model
,
self
.
patch_forward
(
number
),
"middle"
,
0
,
index
)
number
+=
1
...
...
This diff is collapsed.
Click to expand it.
scripts/hook.py
+
2
-
0
View file @
21e9024b
...
...
@@ -621,6 +621,8 @@ class UnetHook(nn.Module):
if
param
.
soft_injection
or
high_res_fix_forced_soft_injection
:
# important! use the soft weights with high-res fix can significantly reduce artifacts.
import
pdb
pdb
.
set_trace
()
if
param
.
control_model_type
==
ControlModelType
.
T2I_Adapter
:
control_scales
=
[
param
.
weight
*
x
for
x
in
(
0.25
,
0.62
,
0.825
,
1.0
)]
elif
param
.
control_model_type
==
ControlModelType
.
ControlNet
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets