Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
Real-ESRGAN
Commits
601b568f
Unverified
Commit
601b568f
authored
Dec 22, 2023
by
Maksim Skobeev
Committed by
GitHub
Dec 22, 2023
Browse files
Update model.py
parent
a9a671cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
RealESRGAN/model.py
RealESRGAN/model.py
+2
-1
No files found.
RealESRGAN/model.py
View file @
601b568f
...
@@ -56,9 +56,10 @@ class RealESRGAN:
...
@@ -56,9 +56,10 @@ class RealESRGAN:
self
.
model
.
eval
()
self
.
model
.
eval
()
self
.
model
.
to
(
self
.
device
)
self
.
model
.
to
(
self
.
device
)
@
torch
.
cuda
.
amp
.
autocast
()
#
@torch.cuda.amp.autocast()
def
predict
(
self
,
lr_image
,
batch_size
=
4
,
patches_size
=
192
,
def
predict
(
self
,
lr_image
,
batch_size
=
4
,
patches_size
=
192
,
padding
=
24
,
pad_size
=
15
):
padding
=
24
,
pad_size
=
15
):
torch
.
autocast
(
device_type
=
self
.
device
.
type
)
scale
=
self
.
scale
scale
=
self
.
scale
device
=
self
.
device
device
=
self
.
device
lr_image
=
np
.
array
(
lr_image
)
lr_image
=
np
.
array
(
lr_image
)
...
...
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