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
4d9f2c3e
Commit
4d9f2c3e
authored
Jan 06, 2024
by
w-e-w
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update p.seed and p.subseed
parent
b00b4294
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
modules/txt2img.py
modules/txt2img.py
+4
-1
No files found.
modules/txt2img.py
View file @
4d9f2c3e
...
@@ -67,13 +67,16 @@ def txt2img_upscale(id_task: str, request: gr.Request, gallery, gallery_index, g
...
@@ -67,13 +67,16 @@ def txt2img_upscale(id_task: str, request: gr.Request, gallery, gallery_index, g
geninfo
=
json
.
loads
(
generation_info
)
geninfo
=
json
.
loads
(
generation_info
)
all_seeds
=
geninfo
[
"all_seeds"
]
all_seeds
=
geninfo
[
"all_seeds"
]
all_subseeds
=
geninfo
[
"all_subseeds"
]
image_info
=
gallery
[
gallery_index
]
if
0
<=
gallery_index
<
len
(
gallery
)
else
gallery
[
0
]
image_info
=
gallery
[
gallery_index
]
if
0
<=
gallery_index
<
len
(
gallery
)
else
gallery
[
0
]
p
.
firstpass_image
=
infotext_utils
.
image_from_url_text
(
image_info
)
p
.
firstpass_image
=
infotext_utils
.
image_from_url_text
(
image_info
)
gallery_index_from_end
=
len
(
gallery
)
-
gallery_index
gallery_index_from_end
=
len
(
gallery
)
-
gallery_index
seed
=
all_seeds
[
-
gallery_index_from_end
if
gallery_index_from_end
<
len
(
all_seeds
)
+
1
else
0
]
seed
=
all_seeds
[
-
gallery_index_from_end
if
gallery_index_from_end
<
len
(
all_seeds
)
+
1
else
0
]
p
.
script_args
=
modules
.
scripts
.
scripts_txt2img
.
set_named_arg
(
p
.
script_args
,
'ScriptSeed'
,
'seed'
,
seed
)
subseed
=
all_subseeds
[
-
gallery_index_from_end
if
gallery_index_from_end
<
len
(
all_seeds
)
+
1
else
0
]
p
.
seed
=
seed
p
.
subseed
=
subseed
with
closing
(
p
):
with
closing
(
p
):
processed
=
modules
.
scripts
.
scripts_txt2img
.
run
(
p
,
*
p
.
script_args
)
processed
=
modules
.
scripts
.
scripts_txt2img
.
run
(
p
,
*
p
.
script_args
)
...
...
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