hlky
commited on
Update handler.py
Browse files- handler.py +3 -1
handler.py
CHANGED
|
@@ -28,6 +28,8 @@ class EndpointHandler:
|
|
| 28 |
parameters = cast(dict, data.get("parameters", {}))
|
| 29 |
do_scaling = cast(bool, parameters.get("do_scaling", True))
|
| 30 |
scaling_factor = cast(float, parameters.get("scaling_factor", None))
|
|
|
|
|
|
|
| 31 |
if do_scaling and scaling_factor is None:
|
| 32 |
scaling_factor = self.vae.config.scaling_factor
|
| 33 |
output_type = cast(str, parameters.get("output_type", "pil"))
|
|
@@ -58,4 +60,4 @@ class EndpointHandler:
|
|
| 58 |
elif output_type == "pt":
|
| 59 |
frames = frames
|
| 60 |
|
| 61 |
-
return frames
|
|
|
|
| 28 |
parameters = cast(dict, data.get("parameters", {}))
|
| 29 |
do_scaling = cast(bool, parameters.get("do_scaling", True))
|
| 30 |
scaling_factor = cast(float, parameters.get("scaling_factor", None))
|
| 31 |
+
if scaling_factor is not None:
|
| 32 |
+
scaling_factor = float(scaling_factor)
|
| 33 |
if do_scaling and scaling_factor is None:
|
| 34 |
scaling_factor = self.vae.config.scaling_factor
|
| 35 |
output_type = cast(str, parameters.get("output_type", "pil"))
|
|
|
|
| 60 |
elif output_type == "pt":
|
| 61 |
frames = frames
|
| 62 |
|
| 63 |
+
return frames
|