multimodalart HF Staff commited on
Commit
0cb5326
·
verified ·
1 Parent(s): 8ff4968

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -37,14 +37,14 @@ FIXED_FPS = 24
37
  MIN_FRAMES_MODEL = 8
38
  MAX_FRAMES_MODEL = 121
39
 
40
- # Dimension calculation constants (from Wan 2.1 Fast demo)
41
  MOD_VALUE = 32
42
- DEFAULT_H_SLIDER_VALUE = 512
43
- DEFAULT_W_SLIDER_VALUE = 896
44
- NEW_FORMULA_MAX_AREA = 480.0 * 832.0
45
 
46
- SLIDER_MIN_H, SLIDER_MAX_H = 128, 896
47
- SLIDER_MIN_W, SLIDER_MAX_W = 128, 896
48
 
49
  # Instantiate the pipeline in the global scope
50
  print("Initializing WanTI2V pipeline...")
@@ -234,7 +234,7 @@ with gr.Blocks(css=css, theme=gr.themes.Soft(), delete_cache=(60, 900)) as demo:
234
  example_image_path = os.path.join(os.path.dirname(__file__), "examples/i2v_input.JPG")
235
  gr.Examples(
236
  examples=[
237
- [example_image_path, "The cat removes the glasses from its eyes.", 704, 1280, 1.5],
238
  [None, "A cinematic shot of a boat sailing on a calm sea at sunset.", 704, 1280, 2.0],
239
  [None, "Drone footage flying over a futuristic city with flying cars.", 704, 1280, 2.0],
240
  ],
 
37
  MIN_FRAMES_MODEL = 8
38
  MAX_FRAMES_MODEL = 121
39
 
40
+ # Dimension calculation constants
41
  MOD_VALUE = 32
42
+ DEFAULT_H_SLIDER_VALUE = 704
43
+ DEFAULT_W_SLIDER_VALUE = 1280
44
+ NEW_FORMULA_MAX_AREA = 1280.0 * 704.0
45
 
46
+ SLIDER_MIN_H, SLIDER_MAX_H = 128, 1280
47
+ SLIDER_MIN_W, SLIDER_MAX_W = 128, 1280
48
 
49
  # Instantiate the pipeline in the global scope
50
  print("Initializing WanTI2V pipeline...")
 
234
  example_image_path = os.path.join(os.path.dirname(__file__), "examples/i2v_input.JPG")
235
  gr.Examples(
236
  examples=[
237
+ [example_image_path, "The cat removes the glasses from its eyes.", 800, 1088, 1.5],
238
  [None, "A cinematic shot of a boat sailing on a calm sea at sunset.", 704, 1280, 2.0],
239
  [None, "Drone footage flying over a futuristic city with flying cars.", 704, 1280, 2.0],
240
  ],