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
d5ce044b
Unverified
Commit
d5ce044b
authored
Jan 25, 2023
by
AUTOMATIC1111
Committed by
GitHub
Jan 25, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7146 from EllangoK/master
Adds X/Y/Z Grid Script
parents
1bfec873
ec877472
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
134 additions
and
45 deletions
+134
-45
images.py
modules/images.py
+1
-1
xyz_grid.py
scripts/xyz_grid.py
+133
-44
No files found.
modules/images.py
View file @
d5ce044b
...
@@ -195,7 +195,7 @@ def draw_grid_annotations(im, width, height, hor_texts, ver_texts):
...
@@ -195,7 +195,7 @@ def draw_grid_annotations(im, width, height, hor_texts, ver_texts):
ver_text_heights
=
[
sum
([
line
.
size
[
1
]
+
line_spacing
for
line
in
lines
])
-
line_spacing
*
len
(
lines
)
for
lines
in
ver_text_heights
=
[
sum
([
line
.
size
[
1
]
+
line_spacing
for
line
in
lines
])
-
line_spacing
*
len
(
lines
)
for
lines
in
ver_texts
]
ver_texts
]
pad_top
=
max
(
hor_text_heights
)
+
line_spacing
*
2
pad_top
=
0
if
sum
(
hor_text_heights
)
==
0
else
max
(
hor_text_heights
)
+
line_spacing
*
2
result
=
Image
.
new
(
"RGB"
,
(
im
.
width
+
pad_left
,
im
.
height
+
pad_top
),
"white"
)
result
=
Image
.
new
(
"RGB"
,
(
im
.
width
+
pad_left
,
im
.
height
+
pad_top
),
"white"
)
result
.
paste
(
im
,
(
pad_left
,
pad_top
))
result
.
paste
(
im
,
(
pad_left
,
pad_top
))
...
...
scripts/xy_grid.py
→
scripts/xy
z
_grid.py
View file @
d5ce044b
This diff is collapsed.
Click to expand it.
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