Spaces:
Sleeping
Sleeping
Update pixelization.py
Browse files- 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)
|