multimodalart HF staff commited on
Commit
b6d1fbd
β€’
1 Parent(s): 4519383

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -60,7 +60,7 @@ def generate(prompt,
60
  recalc_directions=True,
61
  iterations=200,
62
  steps=3,
63
- interm_steps=21,
64
  guidance_scale=3.5,
65
  x_concept_1="", x_concept_2="",
66
  avg_diff_x=None,
@@ -137,7 +137,7 @@ css='''
137
  #strip, #gif{max-height: 170px; min-height: 65px}
138
  #strip img{object-fit: cover}
139
  '''
140
- examples = [["a dog in the park", "winter", "summer", 1.25], ["a house", "USA suburb", "Europe", 2], ["a tomato", "rotten", "super fresh", 2]]
141
 
142
  with gr.Blocks(css=css) as demo:
143
 
@@ -157,7 +157,7 @@ with gr.Blocks(css=css) as demo:
157
  concept_1 = gr.Textbox(label="1st direction to steer", placeholder="winter")
158
  concept_2 = gr.Textbox(label="2nd direction to steer", placeholder="summer")
159
  prompt = gr.Textbox(label="Prompt", info="Describe what you to be steered by the directions", placeholder="A dog in the park")
160
- x = gr.Slider(minimum=0, value=1.5, step=0.1, maximum=4.0, label="Strength", info="maximum strength on each direction (unstable beyond 2.5)")
161
  submit = gr.Button("Generate directions")
162
 
163
  with gr.Column():
@@ -172,7 +172,7 @@ with gr.Blocks(css=css) as demo:
172
  output_image = gr.Image(label="Gif", elem_id="gif")
173
 
174
  with gr.Accordion(label="Advanced options", open=False):
175
- interm_steps = gr.Slider(label = "Num of intermediate images", minimum=3, value=21, maximum=65, step=2)
176
  with gr.Row():
177
  iterations = gr.Slider(label = "Num iterations for clip directions", minimum=0, value=200, maximum=500, step=1)
178
  steps = gr.Slider(label = "Num inference steps", minimum=1, value=3, maximum=8, step=1)
 
60
  recalc_directions=True,
61
  iterations=200,
62
  steps=3,
63
+ interm_steps=33,
64
  guidance_scale=3.5,
65
  x_concept_1="", x_concept_2="",
66
  avg_diff_x=None,
 
137
  #strip, #gif{max-height: 170px; min-height: 65px}
138
  #strip img{object-fit: cover}
139
  '''
140
+ examples = [["a dog in the park", "winter", "summer", 1.5], ["a house", "USA suburb", "Europe", 2.5], ["a tomato", "rotten", "super fresh", 2.5]]
141
 
142
  with gr.Blocks(css=css) as demo:
143
 
 
157
  concept_1 = gr.Textbox(label="1st direction to steer", placeholder="winter")
158
  concept_2 = gr.Textbox(label="2nd direction to steer", placeholder="summer")
159
  prompt = gr.Textbox(label="Prompt", info="Describe what you to be steered by the directions", placeholder="A dog in the park")
160
+ x = gr.Slider(minimum=0, value=1.75, step=0.1, maximum=4.0, label="Strength", info="maximum strength on each direction (unstable beyond 2.5)")
161
  submit = gr.Button("Generate directions")
162
 
163
  with gr.Column():
 
172
  output_image = gr.Image(label="Gif", elem_id="gif")
173
 
174
  with gr.Accordion(label="Advanced options", open=False):
175
+ interm_steps = gr.Slider(label = "Num of intermediate images", minimum=3, value=7, maximum=65, step=2)
176
  with gr.Row():
177
  iterations = gr.Slider(label = "Num iterations for clip directions", minimum=0, value=200, maximum=500, step=1)
178
  steps = gr.Slider(label = "Num inference steps", minimum=1, value=3, maximum=8, step=1)