frankleeeee commited on
Commit
3d409ec
1 Parent(s): ca7fd1e

updated inference config

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -21,6 +21,7 @@ import datetime
21
 
22
 
23
  MODEL_TYPES = ["v1.2-stage3"]
 
24
  CONFIG_MAP = {
25
  "v1.2-stage3": "configs/opensora-v1-2/inference/sample.py",
26
  }
@@ -370,9 +371,9 @@ def run_inference(mode, prompt_text, resolution, aspect_ratio, length, motion_st
370
 
371
  # add watermark
372
  # all watermarked videos should have a _watermarked suffix
373
- if mode != "Text2Image":
374
  watermarked_path = saved_path.replace(".mp4", "_watermarked.mp4")
375
- success = add_watermark(saved_path, "./assets/images/watermark/watermark.png", watermarked_path)
376
  if success:
377
  return watermarked_path
378
  else:
 
21
 
22
 
23
  MODEL_TYPES = ["v1.2-stage3"]
24
+ WATERMARK_PATH = "./assets/images/watermark/watermark.png"
25
  CONFIG_MAP = {
26
  "v1.2-stage3": "configs/opensora-v1-2/inference/sample.py",
27
  }
 
371
 
372
  # add watermark
373
  # all watermarked videos should have a _watermarked suffix
374
+ if mode != "Text2Image" and os.path.exists(WATERMARK_PATH):
375
  watermarked_path = saved_path.replace(".mp4", "_watermarked.mp4")
376
+ success = add_watermark(saved_path, WATERMARK_PATH, watermarked_path)
377
  if success:
378
  return watermarked_path
379
  else: