Ferdian commited on
Commit
d679e85
·
verified ·
1 Parent(s): d049c57

Update pixelization.py

Browse files
Files changed (1) hide show
  1. pixelization.py +3 -3
pixelization.py CHANGED
@@ -99,11 +99,11 @@ class Model():
99
  in_img = in_img.convert('RGB')
100
 
101
  # limit in_img size to 1024x1024 to maintain performance
102
- if in_img.size[0] > 1024 or in_img.size[1] > 1024:
103
- in_img.thumbnail((1024, 1024), Image.NEAREST)
104
 
105
  # Killing inspect element users, I know what you're doing lol.
106
- pixel_size = pixel_size if pixel_size >= 4 else 4
107
 
108
  in_img = in_img.resize((in_img.size[0] * 4 // pixel_size, in_img.size[1] * 4 // pixel_size))
109
  in_t = process(in_img).to(self.device)
 
99
  in_img = in_img.convert('RGB')
100
 
101
  # limit in_img size to 1024x1024 to maintain performance
102
+ # if in_img.size[0] > 1024 or in_img.size[1] > 1024:
103
+ # in_img.thumbnail((1024, 1024), Image.NEAREST)
104
 
105
  # Killing inspect element users, I know what you're doing lol.
106
+ # pixel_size = pixel_size if pixel_size >= 4 else 4
107
 
108
  in_img = in_img.resize((in_img.size[0] * 4 // pixel_size, in_img.size[1] * 4 // pixel_size))
109
  in_t = process(in_img).to(self.device)