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
c352008c
Commit
c352008c
authored
Jan 01, 2024
by
AUTOMATIC1111
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'rubberbaron/xyz-grid-vary-seeds' into dev
parents
d8126be5
c4ee6d9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
scripts/xyz_grid.py
scripts/xyz_grid.py
+15
-1
No files found.
scripts/xyz_grid.py
View file @
c352008c
...
...
@@ -441,6 +441,10 @@ class Script(scripts.Script):
with
gr
.
Column
():
include_lone_images
=
gr
.
Checkbox
(
label
=
'Include Sub Images'
,
value
=
False
,
elem_id
=
self
.
elem_id
(
"include_lone_images"
))
include_sub_grids
=
gr
.
Checkbox
(
label
=
'Include Sub Grids'
,
value
=
False
,
elem_id
=
self
.
elem_id
(
"include_sub_grids"
))
with
gr
.
Column
():
vary_seeds_x
=
gr
.
Checkbox
(
label
=
'Vary seed on X axis'
,
value
=
False
,
elem_id
=
self
.
elem_id
(
"vary_seeds_x"
))
vary_seeds_y
=
gr
.
Checkbox
(
label
=
'Vary seed on Y axis'
,
value
=
False
,
elem_id
=
self
.
elem_id
(
"vary_seeds_y"
))
vary_seeds_z
=
gr
.
Checkbox
(
label
=
'Vary seed on Z axis'
,
value
=
False
,
elem_id
=
self
.
elem_id
(
"vary_seeds_z"
))
with
gr
.
Column
():
margin_size
=
gr
.
Slider
(
label
=
"Grid margins (px)"
,
minimum
=
0
,
maximum
=
500
,
value
=
0
,
step
=
2
,
elem_id
=
self
.
elem_id
(
"margin_size"
))
with
gr
.
Column
():
...
...
@@ -525,7 +529,7 @@ class Script(scripts.Script):
(
z_values_dropdown
,
lambda
params
:
get_dropdown_update_from_params
(
"Z"
,
params
)),
)
return
[
x_type
,
x_values
,
x_values_dropdown
,
y_type
,
y_values
,
y_values_dropdown
,
z_type
,
z_values
,
z_values_dropdown
,
draw_legend
,
include_lone_images
,
include_sub_grids
,
no_fixed_seeds
,
margin_size
,
csv_mode
]
return
[
x_type
,
x_values
,
x_values_dropdown
,
y_type
,
y_values
,
y_values_dropdown
,
z_type
,
z_values
,
z_values_dropdown
,
draw_legend
,
include_lone_images
,
include_sub_grids
,
no_fixed_seeds
,
vary_seeds_x
,
vary_seeds_y
,
vary_seeds_z
,
margin_size
,
csv_mode
]
def
run
(
self
,
p
,
x_type
,
x_values
,
x_values_dropdown
,
y_type
,
y_values
,
y_values_dropdown
,
z_type
,
z_values
,
z_values_dropdown
,
draw_legend
,
include_lone_images
,
include_sub_grids
,
no_fixed_seeds
,
margin_size
,
csv_mode
):
x_type
,
y_type
,
z_type
=
x_type
or
0
,
y_type
or
0
,
z_type
or
0
# if axle type is None set to 0
...
...
@@ -702,6 +706,16 @@ class Script(scripts.Script):
y_opt
.
apply
(
pc
,
y
,
ys
)
z_opt
.
apply
(
pc
,
z
,
zs
)
xdim
=
len
(
xs
)
if
vary_seeds_x
else
1
ydim
=
len
(
ys
)
if
vary_seeds_y
else
1
if
vary_seeds_x
:
pc
.
seed
+=
ix
if
vary_seeds_y
:
pc
.
seed
+=
iy
*
xdim
if
vary_seeds_z
:
pc
.
seed
+=
iz
*
xdim
*
ydim
try
:
res
=
process_images
(
pc
)
except
Exception
as
e
:
...
...
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