added requirements memory speed xformers
Browse files- handler.py +3 -2
handler.py
CHANGED
|
@@ -119,8 +119,9 @@ class EndpointHandler:
|
|
| 119 |
)
|
| 120 |
|
| 121 |
# boosts performance by another 20%
|
| 122 |
-
|
| 123 |
-
|
|
|
|
| 124 |
|
| 125 |
def load_lora(self, pipeline, lora_path, lora_weight=0.5):
|
| 126 |
state_dict = load_file(lora_path)
|
|
|
|
| 119 |
)
|
| 120 |
|
| 121 |
# boosts performance by another 20%
|
| 122 |
+
self.pipe.enable_xformers_memory_efficient_attention()
|
| 123 |
+
self.pipe.enable_attention_slicing()
|
| 124 |
+
# may need a requirement in the root with xformer
|
| 125 |
|
| 126 |
def load_lora(self, pipeline, lora_path, lora_weight=0.5):
|
| 127 |
state_dict = load_file(lora_path)
|