Update handler.py
Browse files- handler.py +6 -1
handler.py
CHANGED
@@ -5,6 +5,7 @@ from typing import Dict, Any, Optional, Tuple
|
|
5 |
import asyncio
|
6 |
import base64
|
7 |
import io
|
|
|
8 |
import logging
|
9 |
import random
|
10 |
import traceback
|
@@ -258,7 +259,10 @@ class EndpointHandler:
|
|
258 |
"output_type": "pt",
|
259 |
"generator": generator
|
260 |
}
|
261 |
-
|
|
|
|
|
|
|
262 |
# Check if image-to-video generation is requested
|
263 |
image_data = data.get("image")
|
264 |
if image_data:
|
@@ -272,6 +276,7 @@ class EndpointHandler:
|
|
272 |
else:
|
273 |
frames = self.text_to_video(**generation_kwargs).frames
|
274 |
|
|
|
275 |
# Log original shape
|
276 |
logger.info(f"Original frames shape: {frames.shape}")
|
277 |
|
|
|
5 |
import asyncio
|
6 |
import base64
|
7 |
import io
|
8 |
+
import pprint
|
9 |
import logging
|
10 |
import random
|
11 |
import traceback
|
|
|
259 |
"output_type": "pt",
|
260 |
"generator": generator
|
261 |
}
|
262 |
+
|
263 |
+
logger.info(f"Parameters:")
|
264 |
+
pprint.pprint(generation_kwargs)
|
265 |
+
|
266 |
# Check if image-to-video generation is requested
|
267 |
image_data = data.get("image")
|
268 |
if image_data:
|
|
|
276 |
else:
|
277 |
frames = self.text_to_video(**generation_kwargs).frames
|
278 |
|
279 |
+
|
280 |
# Log original shape
|
281 |
logger.info(f"Original frames shape: {frames.shape}")
|
282 |
|