adamelliotfields commited on
Commit
579e8d0
1 Parent(s): 438291c

Default scale 2x

Browse files
Files changed (5) hide show
  1. README.md +4 -0
  2. app.py +2 -2
  3. cli.py +1 -1
  4. config.py +4 -0
  5. usage.md +4 -0
README.md CHANGED
@@ -14,6 +14,7 @@ pinned: true
14
  header: mini
15
  license: apache-2.0
16
  models:
 
17
  - fluently/Fluently-v4
18
  - Linaqruf/anything-v3-1
19
  - Lykon/dreamshaper-8
@@ -21,6 +22,9 @@ models:
21
  - runwayml/stable-diffusion-v1-5
22
  - SG161222/Realistic_Vision_V5.1_noVAE
23
  preload_from_hub:
 
 
 
24
  - >-
25
  fluently/Fluently-v4
26
  text_encoder/model.fp16.safetensors,unet/diffusion_pytorch_model.fp16.safetensors,vae/diffusion_pytorch_model.fp16.safetensors
 
14
  header: mini
15
  license: apache-2.0
16
  models:
17
+ - ai-forever/Real-ESRGAN
18
  - fluently/Fluently-v4
19
  - Linaqruf/anything-v3-1
20
  - Lykon/dreamshaper-8
 
22
  - runwayml/stable-diffusion-v1-5
23
  - SG161222/Realistic_Vision_V5.1_noVAE
24
  preload_from_hub:
25
+ - >-
26
+ ai-forever/Real-ESRGAN
27
+ RealESRGAN_x2.pth,RealESRGAN_x4.pth
28
  - >-
29
  fluently/Fluently-v4
30
  text_encoder/model.fp16.safetensors,unet/diffusion_pytorch_model.fp16.safetensors,vae/diffusion_pytorch_model.fp16.safetensors
app.py CHANGED
@@ -135,11 +135,11 @@ with gr.Blocks(
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,
142
- value=1,
143
  )
144
 
145
  with gr.Row():
 
135
  label="Images",
136
  )
137
  scale = gr.Dropdown(
138
+ choices=[(f"{s}x", s) for s in cfg.SCALES],
139
  filterable=False,
140
+ value=cfg.SCALE,
141
  label="Scale",
142
  min_width=200,
 
143
  )
144
 
145
  with gr.Row():
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", 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)
 
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=cfg.SCALES, default=cfg.SCALE)
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)
config.py CHANGED
@@ -51,3 +51,7 @@ INFERENCE_STEPS = 30
51
  DEEPCACHE_INTERVAL = 2
52
 
53
  TOME_RATIO = 0.0
 
 
 
 
 
51
  DEEPCACHE_INTERVAL = 2
52
 
53
  TOME_RATIO = 0.0
54
+
55
+ SCALE = 2
56
+
57
+ SCALES = [1, 2, 4]
usage.md CHANGED
@@ -32,6 +32,10 @@ Arrays allow you to generate different images from a single prompt. For example,
32
 
33
  Styles are prompt templates from twri's [sdxl_prompt_styler](https://github.com/twri/sdxl_prompt_styler) Comfy node. Start with a subject like "cat", pick a style, and iterate from there.
34
 
 
 
 
 
35
  ### Models
36
 
37
  Each model checkpoint has a different aesthetic:
 
32
 
33
  Styles are prompt templates from twri's [sdxl_prompt_styler](https://github.com/twri/sdxl_prompt_styler) Comfy node. Start with a subject like "cat", pick a style, and iterate from there.
34
 
35
+ ### Scale
36
+
37
+ Rescale up to 4x using [Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN).
38
+
39
  ### Models
40
 
41
  Each model checkpoint has a different aesthetic: