Commit ·
98f4fce
1
Parent(s): 56a6bf1
removed model to device
Browse files- handler.py +0 -3
handler.py
CHANGED
|
@@ -24,9 +24,6 @@ class EndpointHandler():
|
|
| 24 |
self.processor = Blip2Processor.from_pretrained("blip2/sharded")
|
| 25 |
self.model = Blip2ForConditionalGeneration.from_pretrained("blip2/sharded", device_map = "auto", load_in_8bit = True)
|
| 26 |
print(" $$$$ model loaded $$$$")
|
| 27 |
-
self.model.eval()
|
| 28 |
-
self.model = self.model.to(device)
|
| 29 |
-
print(" $$$$ model loaded 2222 $$$$")
|
| 30 |
|
| 31 |
|
| 32 |
|
|
|
|
| 24 |
self.processor = Blip2Processor.from_pretrained("blip2/sharded")
|
| 25 |
self.model = Blip2ForConditionalGeneration.from_pretrained("blip2/sharded", device_map = "auto", load_in_8bit = True)
|
| 26 |
print(" $$$$ model loaded $$$$")
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
|
| 29 |
|