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
208ccfbe
Commit
208ccfbe
authored
Jan 14, 2024
by
w-e-w
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
seed info from infotexts
parent
ee9d4870
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
modules/txt2img.py
modules/txt2img.py
+6
-8
No files found.
modules/txt2img.py
View file @
208ccfbe
...
...
@@ -3,7 +3,7 @@ from contextlib import closing
import
modules.scripts
from
modules
import
processing
,
infotext_utils
from
modules.infotext_utils
import
create_override_settings_dict
from
modules.infotext_utils
import
create_override_settings_dict
,
parse_generation_parameters
from
modules.shared
import
opts
import
modules.shared
as
shared
from
modules.ui
import
plaintext_to_html
...
...
@@ -66,18 +66,16 @@ def txt2img_upscale(id_task: str, request: gr.Request, gallery, gallery_index, g
p
.
n_iter
=
1
geninfo
=
json
.
loads
(
generation_info
)
all_seeds
=
geninfo
[
"all_seeds"
]
all_subseeds
=
geninfo
[
"all_subseeds"
]
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
)
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
]
subseed
=
all_subseeds
[
-
gallery_index_from_end
if
gallery_index_from_end
<
len
(
all_seeds
)
+
1
else
0
]
p
.
seed
=
seed
p
.
subseed
=
subseed
parameters
=
parse_generation_parameters
(
geninfo
.
get
(
'infotexts'
)[
gallery_index
])
p
.
seed
=
parameters
.
get
(
'Seed'
,
-
1
)
p
.
subseed
=
parameters
.
get
(
'Variation seed'
,
-
1
)
p
.
override_settings
[
'save_images_before_highres_fix'
]
=
False
with
closing
(
p
):
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