Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
afbb3504
Commit
afbb3504
authored
Sep 13, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prompts from file not working #379
parent
9ea44c7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
prompts_from_file.py
scripts/prompts_from_file.py
+3
-4
No files found.
scripts/prompts_from_file.py
View file @
afbb3504
...
...
@@ -25,17 +25,16 @@ class Script(scripts.Script):
lines
=
[
x
for
x
in
lines
if
len
(
x
)
>
0
]
batch_count
=
math
.
ceil
(
len
(
lines
)
/
p
.
batch_size
)
print
(
f
"Will process {len(lines)
} images in {batch_count
} batches."
)
print
(
f
"Will process {len(lines)
* p.n_iter} images in {batch_count * p.n_iter
} batches."
)
p
.
batch_count
=
1
p
.
do_not_save_grid
=
True
state
.
job_count
=
batch_count
images
=
[]
for
batch_no
in
range
(
batch_count
):
state
.
job
=
f
"{batch_no} out of {batch_count}"
p
.
prompt
=
lines
[
batch_no
*
p
.
batch_size
:(
batch_no
+
1
)
*
p
.
batch_size
]
state
.
job
=
f
"{batch_no} out of {batch_count
* p.n_iter
}"
p
.
prompt
=
lines
[
batch_no
*
p
.
batch_size
:(
batch_no
+
1
)
*
p
.
batch_size
]
*
p
.
n_iter
proc
=
process_images
(
p
)
images
+=
proc
.
images
...
...
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