Spaces:
Runtime error
Runtime error
update
Browse files- sam2edit.py +1 -2
sam2edit.py
CHANGED
@@ -79,8 +79,7 @@ def create_demo():
|
|
79 |
|
80 |
processor = AutoProcessor.from_pretrained("Salesforce/blip2-opt-2.7b")
|
81 |
blip_model = Blip2ForConditionalGeneration.from_pretrained(
|
82 |
-
"Salesforce/blip2-opt-2.7b", torch_dtype=torch.float16)
|
83 |
-
blip_model.to(device)
|
84 |
|
85 |
|
86 |
def get_blip2_text(image):
|
|
|
79 |
|
80 |
processor = AutoProcessor.from_pretrained("Salesforce/blip2-opt-2.7b")
|
81 |
blip_model = Blip2ForConditionalGeneration.from_pretrained(
|
82 |
+
"Salesforce/blip2-opt-2.7b", torch_dtype=torch.float16, device_map="auto")
|
|
|
83 |
|
84 |
|
85 |
def get_blip2_text(image):
|