adamelliotfields commited on
Commit
fe9c9ec
·
verified ·
1 Parent(s): 602cfda
Files changed (3) hide show
  1. app.py +1 -1
  2. cli.py +1 -1
  3. lib/upscaler.py +1 -1
app.py CHANGED
@@ -135,7 +135,7 @@ with gr.Blocks(
135
  label="Images",
136
  )
137
  scale = gr.Dropdown(
138
- choices=[("1x", 1), ("2x", 2), ("4x", 4), ("8x", 8)],
139
  filterable=False,
140
  label="Scale",
141
  min_width=200,
 
135
  label="Images",
136
  )
137
  scale = gr.Dropdown(
138
+ choices=[("1x", 1), ("2x", 2), ("4x", 4)],
139
  filterable=False,
140
  label="Scale",
141
  min_width=200,
cli.py CHANGED
@@ -24,7 +24,7 @@ def main():
24
  parser.add_argument("-h", "--height", type=int, metavar="INT", default=cfg.HEIGHT)
25
  parser.add_argument("-m", "--model", type=str, metavar="STR", default=cfg.MODEL)
26
  parser.add_argument("-d", "--deepcache", type=int, metavar="INT", default=cfg.DEEPCACHE_INTERVAL)
27
- parser.add_argument("--scale", type=int, metavar="INT", default=1)
28
  parser.add_argument("--style", type=str, metavar="STR", default=cfg.STYLE)
29
  parser.add_argument("--scheduler", type=str, metavar="STR", default=cfg.SCHEDULER)
30
  parser.add_argument("--guidance", type=float, metavar="FLOAT", default=cfg.GUIDANCE_SCALE)
 
24
  parser.add_argument("-h", "--height", type=int, metavar="INT", default=cfg.HEIGHT)
25
  parser.add_argument("-m", "--model", type=str, metavar="STR", default=cfg.MODEL)
26
  parser.add_argument("-d", "--deepcache", type=int, metavar="INT", default=cfg.DEEPCACHE_INTERVAL)
27
+ parser.add_argument("--scale", type=int, metavar="INT", choices=[1, 2, 4], default=1)
28
  parser.add_argument("--style", type=str, metavar="STR", default=cfg.STYLE)
29
  parser.add_argument("--scheduler", type=str, metavar="STR", default=cfg.SCHEDULER)
30
  parser.add_argument("--guidance", type=float, metavar="FLOAT", default=cfg.GUIDANCE_SCALE)
lib/upscaler.py CHANGED
@@ -267,7 +267,7 @@ class RealESRGAN:
267
  )
268
 
269
  def load_weights(self):
270
- assert self.scale in [2, 4, 8], "You can download models only with scales: 2, 4, 8"
271
  config = HF_MODELS[self.scale]
272
  cache_path = hf_hub_download(config["repo_id"], filename=config["filename"])
273
  loadnet = torch.load(cache_path)
 
267
  )
268
 
269
  def load_weights(self):
270
+ assert self.scale in [2, 4], "You can download models only with scales: 2, 4"
271
  config = HF_MODELS[self.scale]
272
  cache_path = hf_hub_download(config["repo_id"], filename=config["filename"])
273
  loadnet = torch.load(cache_path)