hanzla commited on
Commit
1f56119
·
1 Parent(s): 868ec28

sliders added

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -19,6 +19,13 @@ adapter_options = {
19
  "tilt-down":"guoyww/animatediff-motion-lora-tilt-down"
20
  }
21
 
 
 
 
 
 
 
 
22
  device = "cuda"
23
  adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-2", torch_dtype=torch.float16)
24
  model_id = "SG161222/Realistic_Vision_V5.1_noVAE"
@@ -72,9 +79,9 @@ iface = gr.Interface(
72
  gr.Slider(minimum=0.5, maximum=10, value=7.5, label="Guidance Scale"),
73
  gr.Slider(minimum=4, maximum=24, step=4, value=4, label="Inference Steps"),
74
  gr.CheckboxGroup(adapter_options.keys(), label="Adapter Choice",type='value'),
75
- # Updated for multiple selections
76
  ],
77
  outputs=gr.Video(label="Generated Video"),
 
78
  )
79
 
80
  iface.launch()
 
19
  "tilt-down":"guoyww/animatediff-motion-lora-tilt-down"
20
  }
21
 
22
+ def load_cached_examples():
23
+ examples = [
24
+ ["a cat playing with a ball of yarn", "blurry", 7.5, 12, ["zoom-in"]],
25
+ ["a dog running in a field", "dark, indoors", 8.0, 8, ["pan-left", "tilt-up"]],
26
+ ]
27
+ return examples
28
+
29
  device = "cuda"
30
  adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-2", torch_dtype=torch.float16)
31
  model_id = "SG161222/Realistic_Vision_V5.1_noVAE"
 
79
  gr.Slider(minimum=0.5, maximum=10, value=7.5, label="Guidance Scale"),
80
  gr.Slider(minimum=4, maximum=24, step=4, value=4, label="Inference Steps"),
81
  gr.CheckboxGroup(adapter_options.keys(), label="Adapter Choice",type='value'),
 
82
  ],
83
  outputs=gr.Video(label="Generated Video"),
84
+ examples = load_cached_examples()
85
  )
86
 
87
  iface.launch()