sarang-shrivastava commited on
Commit
6f1c35a
1 Parent(s): 91c82aa

Update handler

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -20,7 +20,7 @@ class EndpointHandler():
20
  def __init__(self, path=""):
21
 
22
  self.processor = Blip2Processor.from_pretrained(path)
23
- self.model = Blip2ForConditionalGeneration.from_pretrained(path, torch_dtype=torch.float16, device_map="auto")
24
 
25
  self.device = "cuda" if torch.cuda.is_available() else "cpu"
26
 
 
20
  def __init__(self, path=""):
21
 
22
  self.processor = Blip2Processor.from_pretrained(path)
23
+ self.model = Blip2ForConditionalGeneration.from_pretrained(path, load_in_8bit=True, device_map="auto")
24
 
25
  self.device = "cuda" if torch.cuda.is_available() else "cpu"
26