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
a1e5e0d7
Commit
a1e5e0d7
authored
Oct 29, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skip filenames starting with . for img2img and extras batch modes
parent
cf8da8e1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
modules/extras.py
modules/extras.py
+1
-1
modules/img2img.py
modules/img2img.py
+1
-1
modules/shared.py
modules/shared.py
+5
-0
No files found.
modules/extras.py
View file @
a1e5e0d7
...
...
@@ -72,7 +72,7 @@ def run_extras(extras_mode, resize_mode, image, image_folder, input_dir, output_
if
input_dir
==
''
:
return
outputs
,
"Please select an input directory."
,
''
image_list
=
[
file
for
file
in
[
os
.
path
.
join
(
input_dir
,
x
)
for
x
in
sorted
(
os
.
listdir
(
input_dir
))]
if
os
.
path
.
isfile
(
file
)]
image_list
=
shared
.
listfiles
(
input_dir
)
for
img
in
image_list
:
try
:
image
=
Image
.
open
(
img
)
...
...
modules/img2img.py
View file @
a1e5e0d7
...
...
@@ -19,7 +19,7 @@ import modules.scripts
def
process_batch
(
p
,
input_dir
,
output_dir
,
args
):
processing
.
fix_seed
(
p
)
images
=
[
file
for
file
in
[
os
.
path
.
join
(
input_dir
,
x
)
for
x
in
os
.
listdir
(
input_dir
)]
if
os
.
path
.
isfile
(
file
)]
images
=
shared
.
listfiles
(
input_dir
)
print
(
f
"Will process {len(images)} images, creating {p.n_iter * p.batch_size} new images for each."
)
...
...
modules/shared.py
View file @
a1e5e0d7
...
...
@@ -450,3 +450,8 @@ total_tqdm = TotalTQDM()
mem_mon
=
modules
.
memmon
.
MemUsageMonitor
(
"MemMon"
,
device
,
opts
)
mem_mon
.
start
()
def
listfiles
(
dirname
):
filenames
=
[
os
.
path
.
join
(
dirname
,
x
)
for
x
in
sorted
(
os
.
listdir
(
dirname
))
if
not
x
.
startswith
(
"."
)]
return
[
file
for
file
in
filenames
if
os
.
path
.
isfile
(
file
)]
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