Update handler.py
Browse files- handler.py +2 -2
handler.py
CHANGED
@@ -10,8 +10,8 @@ class EndpointHandler():
|
|
10 |
|
11 |
def __call__(self, data):
|
12 |
img = data.pop("inputs", data)
|
13 |
-
img = Image.open(BytesIO(img))
|
14 |
-
output = upscaler(img, tiling=True, tile_width=768, tile_height=768, overlap=8)
|
15 |
|
16 |
output = outputs.reconstruction.data.squeeze().float().cpu().clamp_(0, 1).numpy()
|
17 |
output = np.moveaxis(output, source=0, destination=-1)
|
|
|
10 |
|
11 |
def __call__(self, data):
|
12 |
img = data.pop("inputs", data)
|
13 |
+
# img = Image.open(BytesIO(img))
|
14 |
+
output = self.upscaler(img, tiling=True, tile_width=768, tile_height=768, overlap=8)
|
15 |
|
16 |
output = outputs.reconstruction.data.squeeze().float().cpu().clamp_(0, 1).numpy()
|
17 |
output = np.moveaxis(output, source=0, destination=-1)
|