kotori8823 commited on
Commit
f75b454
1 Parent(s): 0ea4dbe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -9,11 +9,11 @@ import math
9
 
10
 
11
  def greet(input_img, input_model_name, input_tile_mode):
12
- if input_img.size[0] * input_img.size[1] > 256 * 256:
13
- y = int(math.sqrt(256*256/input_img.size[0]*input_img.size[1]))
14
- x = int(input_img.size[0]/input_img.size[1]*y)
15
- input_img = ImageOps.fit(input_img, (x, y))
16
- input_img = np.array(input_img)
17
  if input_model_name not in model_cache:
18
  t1 = time.time()
19
  upscaler = RealWaifuUpScaler(input_model_name[2], ModelPath + input_model_name, half=False, device="cpu")
 
9
 
10
 
11
  def greet(input_img, input_model_name, input_tile_mode):
12
+ # if input_img.size[0] * input_img.size[1] > 256 * 256:
13
+ # y = int(math.sqrt(256*256/input_img.size[0]*input_img.size[1]))
14
+ # x = int(input_img.size[0]/input_img.size[1]*y)
15
+ # input_img = ImageOps.fit(input_img, (x, y))
16
+ # input_img = np.array(input_img)
17
  if input_model_name not in model_cache:
18
  t1 = time.time()
19
  upscaler = RealWaifuUpScaler(input_model_name[2], ModelPath + input_model_name, half=False, device="cpu")