fffiloni commited on
Commit
b1cb36e
1 Parent(s): ceae560

added default negative prompt

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -54,9 +54,11 @@ def convert_mp4_to_frames(video_path, duration=3):
54
 
55
  def infer(prompt, video_in, denoise_strength):
56
 
 
 
57
  video = convert_mp4_to_frames(video_in, duration=3)
58
  video_resized = [Image.fromarray(frame).resize((1024, 576)) for frame in video]
59
- video_frames = pipe_xl(prompt, video=video_resized, strength=denoise_strength).frames
60
  video_path = export_to_video(video_frames, output_video_path="xl_result.mp4")
61
 
62
  return "xl_result.mp4", gr.Group.update(visible=True)
 
54
 
55
  def infer(prompt, video_in, denoise_strength):
56
 
57
+ negative_prompt = "text, watermark, copyright, blurry, nsfw"
58
+
59
  video = convert_mp4_to_frames(video_in, duration=3)
60
  video_resized = [Image.fromarray(frame).resize((1024, 576)) for frame in video]
61
+ video_frames = pipe_xl(prompt, negative_prompt=negative_prompt, video=video_resized, strength=denoise_strength).frames
62
  video_path = export_to_video(video_frames, output_video_path="xl_result.mp4")
63
 
64
  return "xl_result.mp4", gr.Group.update(visible=True)