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
c321680b
Commit
c321680b
authored
Mar 26, 2024
by
Andray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interrupt upscale
parent
dfbdb5a1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
modules/upscaler.py
modules/upscaler.py
+3
-0
modules/upscaler_utils.py
modules/upscaler_utils.py
+2
-0
No files found.
modules/upscaler.py
View file @
c321680b
...
@@ -60,6 +60,9 @@ class Upscaler:
...
@@ -60,6 +60,9 @@ class Upscaler:
if
img
.
width
>=
dest_w
and
img
.
height
>=
dest_h
:
if
img
.
width
>=
dest_w
and
img
.
height
>=
dest_h
:
break
break
if
shared
.
state
.
interrupted
:
break
shape
=
(
img
.
width
,
img
.
height
)
shape
=
(
img
.
width
,
img
.
height
)
img
=
self
.
do_upscale
(
img
,
selected_model
)
img
=
self
.
do_upscale
(
img
,
selected_model
)
...
...
modules/upscaler_utils.py
View file @
c321680b
...
@@ -69,6 +69,8 @@ def upscale_with_model(
...
@@ -69,6 +69,8 @@ def upscale_with_model(
for
y
,
h
,
row
in
grid
.
tiles
:
for
y
,
h
,
row
in
grid
.
tiles
:
newrow
=
[]
newrow
=
[]
for
x
,
w
,
tile
in
row
:
for
x
,
w
,
tile
in
row
:
if
shared
.
state
.
interrupted
:
return
img
output
=
upscale_pil_patch
(
model
,
tile
)
output
=
upscale_pil_patch
(
model
,
tile
)
scale_factor
=
output
.
width
//
tile
.
width
scale_factor
=
output
.
width
//
tile
.
width
newrow
.
append
([
x
*
scale_factor
,
w
*
scale_factor
,
output
])
newrow
.
append
([
x
*
scale_factor
,
w
*
scale_factor
,
output
])
...
...
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