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
e162b6f7
Commit
e162b6f7
authored
1 year ago
by
Qirui Sun
Browse files
Options
Download
Email Patches
Plain Diff
controlnet update
parent
66937c56
xiaoyu_test
ip-branch
1 merge request
!1
now merge Ip branch to master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/controlnet.py
+4
-4
scripts/controlnet.py
with
4 additions
and
4 deletions
+4
-4
scripts/controlnet.py
+
4
-
4
View file @
e162b6f7
...
...
@@ -800,13 +800,13 @@ class Script(scripts.Script, metaclass=(
print
(
f
'**test:
{
unit
.
multi_references_dir
}
'
)
assert
os
.
path
.
splitext
(
unit
.
multi_references_dir
)[
1
]
==
'.pt'
image_dir
=
os
.
path
.
dirname
(
unit
.
multi_references_dir
)
input_images
=
[
Image
.
open
(
os
.
path
.
join
(
image_dir
,
name
)).
convert
(
"RGB"
)
for
name
in
os
.
listdir
(
image_dir
)
\
if
os
.
path
.
splitext
(
name
)[
1
]
in
[
'.jpg'
,
'.png'
]]
input_images
=
[
Image
.
open
(
os
.
path
.
join
(
image_dir
,
name
)).
convert
(
"RGB"
)
for
name
in
os
.
listdir
(
image_dir
)
if
os
.
path
.
splitext
(
name
)[
1
]
in
[
'.jpg'
,
'.png'
]]
unit
.
multi_references_dir
=
None
if
unit
.
multi_references_dir
==
''
else
unit
.
multi_references_dir
except
FileNotFoundError
as
e
:
print
(
f
'Error is happened:
{
e
}
'
)
elif
unit
.
image
is
not
None
:
input_images
=
[
input_image
]
input_images
=
[
input_image
]
# [cv2.resize(input_image, (224, 224))] if control_model_type == ControlModelType.IPAdapter else [input_image]
else
:
print
(
"Enter at least one for 'input image' and 'input image dir'"
)
...
...
@@ -1212,4 +1212,4 @@ def on_ui_settings():
batch_hijack
.
instance
.
do_hijack
()
script_callbacks
.
on_ui_settings
(
on_ui_settings
)
script_callbacks
.
on_infotext_pasted
(
Infotext
.
on_infotext_pasted
)
script_callbacks
.
on_after_component
(
ControlNetUiGroup
.
on_after_component
)
script_callbacks
.
on_after_component
(
ControlNetUiGroup
.
on_after_component
)
\ No newline at end of file
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