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
Jiahui Ming
sd-webui-controlnet
Commits
6c09441b
Commit
6c09441b
authored
1 year ago
by
Qirui Sun
Browse files
Options
Download
Email Patches
Plain Diff
Update controlnet_ui_group.py
parent
c0d17801
ip-layer-wise
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/controlnet_ui/controlnet_ui_group.py
+4
-2
scripts/controlnet_ui/controlnet_ui_group.py
with
4 additions
and
2 deletions
+4
-2
scripts/controlnet_ui/controlnet_ui_group.py
+
4
-
2
View file @
6c09441b
...
...
@@ -445,9 +445,11 @@ class ControlNetUiGroup(object):
# JIAHUI'S MODIFY
with
gr
.
Row
():
import
os
def
input_change
(
image_dir
):
def
input_change
(
cache_path
):
try
:
img_ids
=
[
name
for
name
in
os
.
listdir
(
image_dir
)]
assert
os
.
path
.
splitext
(
cache_path
)[
1
]
==
'.pt'
image_dir
=
os
.
path
.
dirname
(
cache_path
)
img_ids
=
[
name
for
name
in
os
.
listdir
(
image_dir
)
if
name
.
split
(
'.'
)[
1
]
!=
'pt'
]
info
=
f
"total num:
{
len
(
img_ids
)
}
\n
"
+
'
\n
'
.
join
(
img_ids
)
except
FileNotFoundError
as
e
:
info
=
f
"Error: This path is not valid ==>
{
e
}
"
...
...
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