Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ from optimization import optimize_pipeline_
|
|
| 23 |
MODEL_ID = "Wan-AI/Wan2.2-I2V-A14B-Diffusers"
|
| 24 |
|
| 25 |
# --- NEW: Flexible Dimension Constants ---
|
| 26 |
-
MAX_DIMENSION =
|
| 27 |
MIN_DIMENSION = 480
|
| 28 |
DIMENSION_MULTIPLE = 16
|
| 29 |
SQUARE_SIZE = 480
|
|
@@ -137,7 +137,7 @@ def resize_and_crop_to_match(target_image, reference_image):
|
|
| 137 |
left, top = (new_width - ref_width) // 2, (new_height - ref_height) // 2
|
| 138 |
return resized.crop((left, top, left + ref_width, top + ref_height))
|
| 139 |
|
| 140 |
-
@spaces.GPU(duration=
|
| 141 |
def generate_video(
|
| 142 |
start_image_pil,
|
| 143 |
end_image_pil,
|
|
|
|
| 23 |
MODEL_ID = "Wan-AI/Wan2.2-I2V-A14B-Diffusers"
|
| 24 |
|
| 25 |
# --- NEW: Flexible Dimension Constants ---
|
| 26 |
+
MAX_DIMENSION = 720
|
| 27 |
MIN_DIMENSION = 480
|
| 28 |
DIMENSION_MULTIPLE = 16
|
| 29 |
SQUARE_SIZE = 480
|
|
|
|
| 137 |
left, top = (new_width - ref_width) // 2, (new_height - ref_height) // 2
|
| 138 |
return resized.crop((left, top, left + ref_width, top + ref_height))
|
| 139 |
|
| 140 |
+
@spaces.GPU(duration=70)
|
| 141 |
def generate_video(
|
| 142 |
start_image_pil,
|
| 143 |
end_image_pil,
|