Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
w-e-w committed Dec 25, 2024
1 parent 6577e06 commit f113474
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
4 changes: 0 additions & 4 deletions scripts/postprocessing_codeformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,10 @@ def process(self, pp: scripts_postprocessing.PostprocessedImage, enable, codefor
res = Image.fromarray(restored_img)

if codeformer_visibility < 1.0:
# Ensure consistent size
if pp.image.size != res.size:
res = res.resize(pp.image.size)

# Ensure consistent mode
if pp.image.mode != res.mode:
res = res.convert(pp.image.mode)

res = Image.blend(pp.image, res, codeformer_visibility)

pp.image = res
Expand Down
5 changes: 0 additions & 5 deletions scripts/postprocessing_gfpgan.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,10 @@ def process(self, pp: scripts_postprocessing.PostprocessedImage, enable, gfpgan_
res = Image.fromarray(restored_img)

if gfpgan_visibility < 1.0:

# Ensure consistent size
if pp.image.size != res.size:
res = res.resize(pp.image.size)

# Ensure consistent mode
if pp.image.mode != res.mode:
res = res.convert(pp.image.mode)

res = Image.blend(pp.image, res, gfpgan_visibility)

pp.image = res
Expand Down

0 comments on commit f113474

Please sign in to comment.