vivienfanghua commited on
Commit
3c27b35
·
verified ·
1 Parent(s): 4de1367

Upload folder using huggingface_hub

Browse files
app.py CHANGED
@@ -33,7 +33,7 @@ print(f"Using checkpoints from {ckpt_dir}")
33
  # Load the model configuration
34
  TASK_NAME = 'ti2v-5B'
35
  cfg = WAN_CONFIGS[TASK_NAME]
36
- FIXED_FPS = 24
37
  MIN_FRAMES_MODEL = 8
38
  MAX_FRAMES_MODEL = 121
39
 
@@ -109,8 +109,8 @@ def validate_inputs(image, prompt, duration_seconds):
109
  if img.size[0] * img.size[1] > 4096 * 4096:
110
  errors.append("Image size is too large (maximum 4096x4096).")
111
 
112
- if duration_seconds > 5.0 and image is None:
113
- errors.append("Videos longer than 5 seconds require an input image.")
114
 
115
  return errors
116
 
@@ -227,7 +227,7 @@ css = """
227
  """
228
 
229
  # Default prompt with motion emphasis
230
- DEFAULT_PROMPT = "Generate a video with smooth and natural movement. Objects should have visible motion while maintaining fluid transitions."
231
 
232
  # Prompt templates
233
  templates = {
 
33
  # Load the model configuration
34
  TASK_NAME = 'ti2v-5B'
35
  cfg = WAN_CONFIGS[TASK_NAME]
36
+ FIXED_FPS = 12
37
  MIN_FRAMES_MODEL = 8
38
  MAX_FRAMES_MODEL = 121
39
 
 
109
  if img.size[0] * img.size[1] > 4096 * 4096:
110
  errors.append("Image size is too large (maximum 4096x4096).")
111
 
112
+ if duration_seconds > 10.1 and image is None:
113
+ errors.append("Videos longer than 10.1 seconds require an input image.")
114
 
115
  return errors
116
 
 
227
  """
228
 
229
  # Default prompt with motion emphasis
230
+ DEFAULT_PROMPT = "Two friends are paddling a kayak across a tranquil alpine lake, its surface as still as a mirror. Snow-capped peaks and dense forests are reflected in the crystal-clear water, and gentle ripples spread outward as the kayak moves. The camera slowly pans to the right, capturing the serene beauty of the scene. Distant mountains and trees are clearly visible in the background, adding a sense of natural harmony and peace."
231
 
232
  # Prompt templates
233
  templates = {
wan/configs/__pycache__/wan_ti2v_5B.cpython-310.pyc CHANGED
Binary files a/wan/configs/__pycache__/wan_ti2v_5B.cpython-310.pyc and b/wan/configs/__pycache__/wan_ti2v_5B.cpython-310.pyc differ
 
wan/configs/wan_ti2v_5B.py CHANGED
@@ -29,7 +29,7 @@ ti2v_5B.cross_attn_norm = True
29
  ti2v_5B.eps = 1e-6
30
 
31
  # inference
32
- ti2v_5B.sample_fps = 24
33
  ti2v_5B.sample_shift = 5.0
34
  ti2v_5B.sample_steps = 50
35
  ti2v_5B.sample_guide_scale = 5.0
 
29
  ti2v_5B.eps = 1e-6
30
 
31
  # inference
32
+ ti2v_5B.sample_fps = 12
33
  ti2v_5B.sample_shift = 5.0
34
  ti2v_5B.sample_steps = 50
35
  ti2v_5B.sample_guide_scale = 5.0