Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,7 +50,8 @@ print("📥 Loading Florence-2 model...")
|
|
| 50 |
florence_model = AutoModelForCausalLM.from_pretrained(
|
| 51 |
"microsoft/Florence-2-large",
|
| 52 |
torch_dtype=torch.float16,
|
| 53 |
-
trust_remote_code=True
|
|
|
|
| 54 |
).to(device)
|
| 55 |
florence_processor = AutoProcessor.from_pretrained(
|
| 56 |
"microsoft/Florence-2-large",
|
|
|
|
| 50 |
florence_model = AutoModelForCausalLM.from_pretrained(
|
| 51 |
"microsoft/Florence-2-large",
|
| 52 |
torch_dtype=torch.float16,
|
| 53 |
+
trust_remote_code=True,
|
| 54 |
+
attn_implementation="eager" # Fix for SDPA compatibility issue
|
| 55 |
).to(device)
|
| 56 |
florence_processor = AutoProcessor.from_pretrained(
|
| 57 |
"microsoft/Florence-2-large",
|