Melissa Roemmele commited on
Commit ·
7d19a12
1
Parent(s): b827f74
Updated handler.py
Browse files- handler.py +1 -0
handler.py
CHANGED
|
@@ -21,4 +21,5 @@ class EndpointHandler:
|
|
| 21 |
parameters = data.pop("parameters", {})
|
| 22 |
with torch.autocast(self.pipeline.device.type, dtype=torch.bfloat16):
|
| 23 |
outputs = self.pipeline(inputs, **parameters, use_cache=True)
|
|
|
|
| 24 |
return outputs
|
|
|
|
| 21 |
parameters = data.pop("parameters", {})
|
| 22 |
with torch.autocast(self.pipeline.device.type, dtype=torch.bfloat16):
|
| 23 |
outputs = self.pipeline(inputs, **parameters, use_cache=True)
|
| 24 |
+
torch.cuda.empty_cache()
|
| 25 |
return outputs
|