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
55688c48
Commit
55688c48
authored
Nov 02, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename the seed option from #4146
parent
1a058ca5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
prompts_from_file.py
scripts/prompts_from_file.py
+3
-3
No files found.
scripts/prompts_from_file.py
View file @
55688c48
...
@@ -96,7 +96,7 @@ class Script(scripts.Script):
...
@@ -96,7 +96,7 @@ class Script(scripts.Script):
def
ui
(
self
,
is_img2img
):
def
ui
(
self
,
is_img2img
):
checkbox_iterate
=
gr
.
Checkbox
(
label
=
"Iterate seed every line"
,
value
=
False
)
checkbox_iterate
=
gr
.
Checkbox
(
label
=
"Iterate seed every line"
,
value
=
False
)
checkbox_iterate_batch
=
gr
.
Checkbox
(
label
=
"
Preserve random seed across lines (for use with
\"
Generate Forever
\"
)
"
,
value
=
False
)
checkbox_iterate_batch
=
gr
.
Checkbox
(
label
=
"
Use same random seed for all lines
"
,
value
=
False
)
prompt_txt
=
gr
.
Textbox
(
label
=
"List of prompt inputs"
,
lines
=
1
)
prompt_txt
=
gr
.
Textbox
(
label
=
"List of prompt inputs"
,
lines
=
1
)
file
=
gr
.
File
(
label
=
"Upload prompt inputs"
,
type
=
'bytes'
)
file
=
gr
.
File
(
label
=
"Upload prompt inputs"
,
type
=
'bytes'
)
...
@@ -138,7 +138,7 @@ class Script(scripts.Script):
...
@@ -138,7 +138,7 @@ class Script(scripts.Script):
jobs
.
append
(
args
)
jobs
.
append
(
args
)
print
(
f
"Will process {len(lines)} lines in {job_count} jobs."
)
print
(
f
"Will process {len(lines)} lines in {job_count} jobs."
)
if
(
(
checkbox_iterate
or
checkbox_iterate_batch
)
and
p
.
seed
==
-
1
)
:
if
(
checkbox_iterate
or
checkbox_iterate_batch
)
and
p
.
seed
==
-
1
:
p
.
seed
=
int
(
random
.
randrange
(
4294967294
))
p
.
seed
=
int
(
random
.
randrange
(
4294967294
))
state
.
job_count
=
job_count
state
.
job_count
=
job_count
...
@@ -154,7 +154,7 @@ class Script(scripts.Script):
...
@@ -154,7 +154,7 @@ class Script(scripts.Script):
proc
=
process_images
(
copy_p
)
proc
=
process_images
(
copy_p
)
images
+=
proc
.
images
images
+=
proc
.
images
if
(
checkbox_iterate
)
:
if
checkbox_iterate
:
p
.
seed
=
p
.
seed
+
(
p
.
batch_size
*
p
.
n_iter
)
p
.
seed
=
p
.
seed
+
(
p
.
batch_size
*
p
.
n_iter
)
...
...
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