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
7aa27b00
Commit
7aa27b00
authored
Dec 25, 2023
by
Aarni Koskela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add types to split_grid
parent
31992eff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
modules/images.py
modules/images.py
+2
-3
No files found.
modules/images.py
View file @
7aa27b00
...
@@ -64,9 +64,8 @@ def image_grid(imgs, batch_size=1, rows=None):
...
@@ -64,9 +64,8 @@ def image_grid(imgs, batch_size=1, rows=None):
Grid
=
namedtuple
(
"Grid"
,
[
"tiles"
,
"tile_w"
,
"tile_h"
,
"image_w"
,
"image_h"
,
"overlap"
])
Grid
=
namedtuple
(
"Grid"
,
[
"tiles"
,
"tile_w"
,
"tile_h"
,
"image_w"
,
"image_h"
,
"overlap"
])
def
split_grid
(
image
,
tile_w
=
512
,
tile_h
=
512
,
overlap
=
64
):
def
split_grid
(
image
:
Image
.
Image
,
tile_w
:
int
=
512
,
tile_h
:
int
=
512
,
overlap
:
int
=
64
)
->
Grid
:
w
=
image
.
width
w
,
h
=
image
.
size
h
=
image
.
height
non_overlap_width
=
tile_w
-
overlap
non_overlap_width
=
tile_w
-
overlap
non_overlap_height
=
tile_h
-
overlap
non_overlap_height
=
tile_h
-
overlap
...
...
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