vilarin commited on
Commit
a629162
·
verified ·
1 Parent(s): 0c92d47

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -141,21 +141,21 @@ def generate(
141
  contrast_enhance_scale=1.2
142
  )
143
  model_manager.to("cpu")
144
- else:
145
  up_video = VideoData(
146
  video_file=media,
147
- height=1024, width=1024)
148
  input_video = [up_video[i] for i in range(40*60, 41*60)]
149
 
150
- video = pipe(
151
  prompt=prompt,
152
  negative_prompt="verybadimagenegative_v1.3",
153
  cfg_scale=3,
154
  clip_skip=2,
155
  controlnet_frames=input_video, num_frames=len(input_video),
156
  num_inference_steps=num_inference_steps,
157
- height=1024,
158
- width=1024,
159
  animatediff_batch_size=animatediff_batch_size,
160
  animatediff_stride=animatediff_stride,
161
  vram_limit_level=0,
@@ -189,7 +189,7 @@ with gr.Blocks(css=CSS, js=JS, theme="soft") as demo:
189
  video = gr.Video(label="Generated Video", height=600, scale=2)
190
  with gr.Column(scale=1):
191
  selected = gr.Radio(
192
- label="Selected App",
193
  choices=["ExVideo", "Diffutoon"],
194
  value="Diffutoon"
195
  )
 
141
  contrast_enhance_scale=1.2
142
  )
143
  model_manager.to("cpu")
144
+ elif selected == "Diffutoon":
145
  up_video = VideoData(
146
  video_file=media,
147
+ height=512, width=512)
148
  input_video = [up_video[i] for i in range(40*60, 41*60)]
149
 
150
+ video = pipe2(
151
  prompt=prompt,
152
  negative_prompt="verybadimagenegative_v1.3",
153
  cfg_scale=3,
154
  clip_skip=2,
155
  controlnet_frames=input_video, num_frames=len(input_video),
156
  num_inference_steps=num_inference_steps,
157
+ height=512,
158
+ width=512,
159
  animatediff_batch_size=animatediff_batch_size,
160
  animatediff_stride=animatediff_stride,
161
  vram_limit_level=0,
 
189
  video = gr.Video(label="Generated Video", height=600, scale=2)
190
  with gr.Column(scale=1):
191
  selected = gr.Radio(
192
+ label="Select App",
193
  choices=["ExVideo", "Diffutoon"],
194
  value="Diffutoon"
195
  )