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
e7ac09b2
Commit
e7ac09b2
authored
Mar 22, 2023
by
EllangoK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes xyz extra_generation_params not being saved
parent
a9fed7c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
scripts/xyz_grid.py
scripts/xyz_grid.py
+16
-5
No files found.
scripts/xyz_grid.py
View file @
e7ac09b2
...
@@ -247,7 +247,7 @@ def draw_xyz_grid(p, xs, ys, zs, x_labels, y_labels, z_labels, cell, draw_legend
...
@@ -247,7 +247,7 @@ def draw_xyz_grid(p, xs, ys, zs, x_labels, y_labels, z_labels, cell, draw_legend
state
.
job
=
f
"{index(ix, iy, iz) + 1} out of {list_size}"
state
.
job
=
f
"{index(ix, iy, iz) + 1} out of {list_size}"
processed
:
Processed
=
cell
(
x
,
y
,
z
)
processed
:
Processed
=
cell
(
x
,
y
,
z
,
ix
,
iy
,
iz
)
if
processed_result
is
None
:
if
processed_result
is
None
:
# Use our first processed result object as a template container to hold our full results
# Use our first processed result object as a template container to hold our full results
...
@@ -558,8 +558,6 @@ class Script(scripts.Script):
...
@@ -558,8 +558,6 @@ class Script(scripts.Script):
print
(
f
"X/Y/Z plot will create {len(xs) * len(ys) * len(zs) * image_cell_count} images on {len(zs)} {len(xs)}x{len(ys)} grid{plural_s}{cell_console_text}. (Total steps to process: {total_steps})"
)
print
(
f
"X/Y/Z plot will create {len(xs) * len(ys) * len(zs) * image_cell_count} images on {len(zs)} {len(xs)}x{len(ys)} grid{plural_s}{cell_console_text}. (Total steps to process: {total_steps})"
)
shared
.
total_tqdm
.
updateTotal
(
total_steps
)
shared
.
total_tqdm
.
updateTotal
(
total_steps
)
grid_infotext
=
[
None
]
state
.
xyz_plot_x
=
AxisInfo
(
x_opt
,
xs
)
state
.
xyz_plot_x
=
AxisInfo
(
x_opt
,
xs
)
state
.
xyz_plot_y
=
AxisInfo
(
y_opt
,
ys
)
state
.
xyz_plot_y
=
AxisInfo
(
y_opt
,
ys
)
state
.
xyz_plot_z
=
AxisInfo
(
z_opt
,
zs
)
state
.
xyz_plot_z
=
AxisInfo
(
z_opt
,
zs
)
...
@@ -588,7 +586,9 @@ class Script(scripts.Script):
...
@@ -588,7 +586,9 @@ class Script(scripts.Script):
else
:
else
:
second_axes_processed
=
'y'
second_axes_processed
=
'y'
def
cell
(
x
,
y
,
z
):
grid_infotext
=
[
None
]
*
(
1
+
len
(
zs
))
def
cell
(
x
,
y
,
z
,
ix
,
iy
,
iz
):
if
shared
.
state
.
interrupted
:
if
shared
.
state
.
interrupted
:
return
Processed
(
p
,
[],
p
.
seed
,
""
)
return
Processed
(
p
,
[],
p
.
seed
,
""
)
...
@@ -600,7 +600,9 @@ class Script(scripts.Script):
...
@@ -600,7 +600,9 @@ class Script(scripts.Script):
res
=
process_images
(
pc
)
res
=
process_images
(
pc
)
if
grid_infotext
[
0
]
is
None
:
# Sets subgrid infotexts
subgrid_index
=
1
+
iz
if
grid_infotext
[
subgrid_index
]
is
None
and
ix
==
0
and
iy
==
0
:
pc
.
extra_generation_params
=
copy
(
pc
.
extra_generation_params
)
pc
.
extra_generation_params
=
copy
(
pc
.
extra_generation_params
)
pc
.
extra_generation_params
[
'Script'
]
=
self
.
title
()
pc
.
extra_generation_params
[
'Script'
]
=
self
.
title
()
...
@@ -616,6 +618,12 @@ class Script(scripts.Script):
...
@@ -616,6 +618,12 @@ class Script(scripts.Script):
if
y_opt
.
label
in
[
"Seed"
,
"Var. seed"
]
and
not
no_fixed_seeds
:
if
y_opt
.
label
in
[
"Seed"
,
"Var. seed"
]
and
not
no_fixed_seeds
:
pc
.
extra_generation_params
[
"Fixed Y Values"
]
=
", "
.
join
([
str
(
y
)
for
y
in
ys
])
pc
.
extra_generation_params
[
"Fixed Y Values"
]
=
", "
.
join
([
str
(
y
)
for
y
in
ys
])
grid_infotext
[
subgrid_index
]
=
processing
.
create_infotext
(
pc
,
pc
.
all_prompts
,
pc
.
all_seeds
,
pc
.
all_subseeds
)
# Sets main grid infotext
if
grid_infotext
[
0
]
is
None
and
ix
==
0
and
iy
==
0
and
iz
==
0
:
pc
.
extra_generation_params
=
copy
(
pc
.
extra_generation_params
)
if
z_opt
.
label
!=
'Nothing'
:
if
z_opt
.
label
!=
'Nothing'
:
pc
.
extra_generation_params
[
"Z Type"
]
=
z_opt
.
label
pc
.
extra_generation_params
[
"Z Type"
]
=
z_opt
.
label
pc
.
extra_generation_params
[
"Z Values"
]
=
z_values
pc
.
extra_generation_params
[
"Z Values"
]
=
z_values
...
@@ -650,6 +658,9 @@ class Script(scripts.Script):
...
@@ -650,6 +658,9 @@ class Script(scripts.Script):
z_count
=
len
(
zs
)
z_count
=
len
(
zs
)
# Set the grid infotexts to the real ones with extra_generation_params (1 main grid + z_count sub-grids)
processed
.
infotexts
[:
1
+
z_count
]
=
grid_infotext
[:
1
+
z_count
]
if
not
include_lone_images
:
if
not
include_lone_images
:
# Don't need sub-images anymore, drop from list:
# Don't need sub-images anymore, drop from list:
processed
.
images
=
processed
.
images
[:
z_count
+
1
]
processed
.
images
=
processed
.
images
[:
z_count
+
1
]
...
...
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