fffiloni commited on
Commit
72801fb
1 Parent(s): 3ef15f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -175,6 +175,7 @@ class AnimateController:
175
  base_model_dropdown,
176
  motion_module_dropdown,
177
  prompt_textbox,
 
178
  negative_prompt_textbox,
179
  width_slider,
180
  height_slider,
@@ -202,6 +203,7 @@ class AnimateController:
202
 
203
  sample = pipeline(
204
  prompt_textbox,
 
205
  negative_prompt = negative_prompt_textbox,
206
  num_inference_steps = 25,
207
  guidance_scale = 8.,
@@ -260,6 +262,8 @@ def ui():
260
  base_model_dropdown.change(fn=controller.update_base_model, inputs=[base_model_dropdown], outputs=[base_model_dropdown])
261
  motion_module_dropdown.change(fn=controller.update_motion_module, inputs=[motion_module_dropdown], outputs=[motion_module_dropdown])
262
 
 
 
263
  prompt_textbox = gr.Textbox( label="Prompt", lines=3 )
264
  negative_prompt_textbox = gr.Textbox( label="Negative Prompt", lines=3, value="worst quality, low quality, nsfw, logo")
265
 
@@ -278,12 +282,12 @@ def ui():
278
  result_video = gr.Video( label="Generated Animation", interactive=False )
279
  json_config = gr.Json( label="Config", value=None )
280
 
281
- inputs = [base_model_dropdown, motion_module_dropdown, prompt_textbox, negative_prompt_textbox, width_slider, height_slider, seed_textbox]
282
  outputs = [result_video, json_config]
283
 
284
  generate_button.click( fn=controller.animate, inputs=inputs, outputs=outputs )
285
 
286
- gr.Examples( fn=controller.animate, examples=examples, inputs=inputs, outputs=outputs, cache_examples=True )
287
 
288
  return demo
289
 
 
175
  base_model_dropdown,
176
  motion_module_dropdown,
177
  prompt_textbox,
178
+ init_image,
179
  negative_prompt_textbox,
180
  width_slider,
181
  height_slider,
 
203
 
204
  sample = pipeline(
205
  prompt_textbox,
206
+ init_image = init_image,
207
  negative_prompt = negative_prompt_textbox,
208
  num_inference_steps = 25,
209
  guidance_scale = 8.,
 
262
  base_model_dropdown.change(fn=controller.update_base_model, inputs=[base_model_dropdown], outputs=[base_model_dropdown])
263
  motion_module_dropdown.change(fn=controller.update_motion_module, inputs=[motion_module_dropdown], outputs=[motion_module_dropdown])
264
 
265
+ init_image = gr.Image(label="Init Image", source="upload", type="filepath")
266
+
267
  prompt_textbox = gr.Textbox( label="Prompt", lines=3 )
268
  negative_prompt_textbox = gr.Textbox( label="Negative Prompt", lines=3, value="worst quality, low quality, nsfw, logo")
269
 
 
282
  result_video = gr.Video( label="Generated Animation", interactive=False )
283
  json_config = gr.Json( label="Config", value=None )
284
 
285
+ inputs = [base_model_dropdown, motion_module_dropdown, prompt_textbox, init_image, negative_prompt_textbox, width_slider, height_slider, seed_textbox]
286
  outputs = [result_video, json_config]
287
 
288
  generate_button.click( fn=controller.animate, inputs=inputs, outputs=outputs )
289
 
290
+ #gr.Examples( fn=controller.animate, examples=examples, inputs=inputs, outputs=outputs, cache_examples=True )
291
 
292
  return demo
293