Staticaliza commited on
Commit
4ab383e
·
verified ·
1 Parent(s): 8283c09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -77,20 +77,20 @@ def generate(input=DEFAULT_INPUT, filter_input="", negative_input=DEFAULT_NEGATI
77
 
78
  if model == "Realistic":
79
  steps_set = 35
80
- guidance_set = 6
81
  elif model == "Anime":
82
  steps_set = 35
83
- guidance_set = 6
84
  elif model == "Pixel":
85
  steps_set = 15
86
  guidance_set = 1.5
87
  else:
88
  steps_set = 20
89
- guidance_set = 6
90
 
91
- if not steps or steps < 0:
92
  steps = steps_set
93
- if not guidance or guidance < 0:
94
  guidance = guidance_set
95
 
96
  print(steps, guidance)
@@ -137,8 +137,8 @@ with gr.Blocks(css=css) as main:
137
  model = gr.Dropdown(label="Models", choices=repo_customs.keys(), value="Default")
138
  height = gr.Slider(minimum=8, maximum=2160, step=1, value=DEFAULT_HEIGHT, label="Height")
139
  width = gr.Slider(minimum=8, maximum=2160, step=1, value=DEFAULT_WIDTH, label="Width")
140
- steps = gr.Slider(minimum=-1, maximum=100, step=1, value=-1, label="Steps")
141
- guidance = gr.Slider(minimum=-1, maximum=100, step=0.001, value=-1, label = "Guidance")
142
  number = gr.Slider(minimum=1, maximum=4, step=1, value=1, label="Number")
143
  seed = gr.Textbox(lines=1, value="", label="Seed (Blank for random)")
144
  submit = gr.Button("▶")
 
77
 
78
  if model == "Realistic":
79
  steps_set = 35
80
+ guidance_set = 7
81
  elif model == "Anime":
82
  steps_set = 35
83
+ guidance_set = 7
84
  elif model == "Pixel":
85
  steps_set = 15
86
  guidance_set = 1.5
87
  else:
88
  steps_set = 20
89
+ guidance_set = 7
90
 
91
+ if not steps:
92
  steps = steps_set
93
+ if not guidance:
94
  guidance = guidance_set
95
 
96
  print(steps, guidance)
 
137
  model = gr.Dropdown(label="Models", choices=repo_customs.keys(), value="Default")
138
  height = gr.Slider(minimum=8, maximum=2160, step=1, value=DEFAULT_HEIGHT, label="Height")
139
  width = gr.Slider(minimum=8, maximum=2160, step=1, value=DEFAULT_WIDTH, label="Width")
140
+ steps = gr.Slider(minimum=1, maximum=100, step=1, value=20, label="Steps")
141
+ guidance = gr.Slider(minimum=0, maximum=100, step=0.001, value=7, label = "Guidance")
142
  number = gr.Slider(minimum=1, maximum=4, step=1, value=1, label="Number")
143
  seed = gr.Textbox(lines=1, value="", label="Seed (Blank for random)")
144
  submit = gr.Button("▶")