Update handler.py
Browse files- handler.py +2 -2
handler.py
CHANGED
|
@@ -16,8 +16,8 @@ class EndpointHandler():
|
|
| 16 |
def __init__(self, path=""):
|
| 17 |
self.pipeline = DiffusionPipeline.from_pretrained("CompVis/ldm-super-resolution-4x-openimages", torch_dtype=dtype).to(device)
|
| 18 |
|
| 19 |
-
# this command loads the individual model components on GPU on-demand.
|
| 20 |
-
self.pipeline.enable_model_cpu_offload()
|
| 21 |
|
| 22 |
def __call__(self, data: Any) -> List[List[Dict[str, float]]]:
|
| 23 |
image = data.pop("image", None)
|
|
|
|
| 16 |
def __init__(self, path=""):
|
| 17 |
self.pipeline = DiffusionPipeline.from_pretrained("CompVis/ldm-super-resolution-4x-openimages", torch_dtype=dtype).to(device)
|
| 18 |
|
| 19 |
+
# # this command loads the individual model components on GPU on-demand.
|
| 20 |
+
# self.pipeline.enable_model_cpu_offload()
|
| 21 |
|
| 22 |
def __call__(self, data: Any) -> List[List[Dict[str, float]]]:
|
| 23 |
image = data.pop("image", None)
|