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
5fb98229
"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "a03d13c83d402a6c13866a756ebfaceb43b8e8b6"
Unverified
Commit
5fb98229
authored
Dec 22, 2023
by
Maksim Skobeev
Committed by
GitHub
Dec 22, 2023
Browse files
Update model.py
parent
601b568f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
RealESRGAN/model.py
RealESRGAN/model.py
+1
-1
No files found.
RealESRGAN/model.py
View file @
5fb98229
...
@@ -75,7 +75,7 @@ class RealESRGAN:
...
@@ -75,7 +75,7 @@ class RealESRGAN:
for
i
in
range
(
batch_size
,
img
.
shape
[
0
],
batch_size
):
for
i
in
range
(
batch_size
,
img
.
shape
[
0
],
batch_size
):
res
=
torch
.
cat
((
res
,
self
.
model
(
img
[
i
:
i
+
batch_size
])),
0
)
res
=
torch
.
cat
((
res
,
self
.
model
(
img
[
i
:
i
+
batch_size
])),
0
)
sr_image
=
res
.
permute
((
0
,
2
,
3
,
1
)).
clamp_
(
0
,
1
)
.
cpu
()
sr_image
=
res
.
permute
((
0
,
2
,
3
,
1
)).
cpu
().
clamp_
(
0
,
1
)
np_sr_image
=
sr_image
.
numpy
()
np_sr_image
=
sr_image
.
numpy
()
padded_size_scaled
=
tuple
(
np
.
multiply
(
p_shape
[
0
:
2
],
scale
))
+
(
3
,)
padded_size_scaled
=
tuple
(
np
.
multiply
(
p_shape
[
0
:
2
],
scale
))
+
(
3
,)
...
...
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