hayleybale2 commited on
Commit
cb1bb81
·
verified ·
1 Parent(s): 501716f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -48,7 +48,7 @@ os.makedirs('result')
48
 
49
  ## resize if necessary (not used)
50
  def resize(img):
51
- max_side = 480
52
  w = img.size[0]
53
  h = img.size[1]
54
  if max(h, w) > max_side:
@@ -57,7 +57,7 @@ def resize(img):
57
  hsize=int(h*scale_ratio)
58
  img = img.resize((wsize,hsize), Image.ANTIALIAS)
59
  w = img.size[0]
60
- h = img.size[1]
61
  img = img.crop((0, 0, w-w%8, h-h%8))
62
 
63
  return img
@@ -67,8 +67,8 @@ def resize(img):
67
  ## inference
68
  def inference_8K(LR, Ref):
69
  ## resize for user selected input (not used)
70
- # LR = resize(LR)
71
- # Ref = resize(Ref)
72
 
73
  ## Input setup (creates folders and places inputs corresponding to the original RefVSR code)
74
  LR.save(os.path.join(LR_path, '0000.png'))
 
48
 
49
  ## resize if necessary (not used)
50
  def resize(img):
51
+ """max_side = 480
52
  w = img.size[0]
53
  h = img.size[1]
54
  if max(h, w) > max_side:
 
57
  hsize=int(h*scale_ratio)
58
  img = img.resize((wsize,hsize), Image.ANTIALIAS)
59
  w = img.size[0]
60
+ h = img.size[1]"""
61
  img = img.crop((0, 0, w-w%8, h-h%8))
62
 
63
  return img
 
67
  ## inference
68
  def inference_8K(LR, Ref):
69
  ## resize for user selected input (not used)
70
+ LR = resize(LR)
71
+ Ref = resize(Ref)
72
 
73
  ## Input setup (creates folders and places inputs corresponding to the original RefVSR code)
74
  LR.save(os.path.join(LR_path, '0000.png'))