Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,7 +28,7 @@ try:
|
|
| 28 |
model = AutoModelForImageTextToText.from_pretrained(
|
| 29 |
MODEL_ID,
|
| 30 |
torch_dtype=torch.bfloat16,
|
| 31 |
-
|
| 32 |
trust_remote_code=True
|
| 33 |
).to("cuda")
|
| 34 |
processor = AutoProcessor.from_pretrained(MODEL_ID, trust_remote_code=True)
|
|
@@ -266,6 +266,5 @@ else:
|
|
| 266 |
outputs=[output_coords_component, output_image_component]
|
| 267 |
)
|
| 268 |
|
| 269 |
-
# --- Launch the Gradio app ---
|
| 270 |
if __name__ == "__main__":
|
| 271 |
-
demo.launch(debug=True)
|
|
|
|
| 28 |
model = AutoModelForImageTextToText.from_pretrained(
|
| 29 |
MODEL_ID,
|
| 30 |
torch_dtype=torch.bfloat16,
|
| 31 |
+
attn_implementation="flash_attention_2",
|
| 32 |
trust_remote_code=True
|
| 33 |
).to("cuda")
|
| 34 |
processor = AutoProcessor.from_pretrained(MODEL_ID, trust_remote_code=True)
|
|
|
|
| 266 |
outputs=[output_coords_component, output_image_component]
|
| 267 |
)
|
| 268 |
|
|
|
|
| 269 |
if __name__ == "__main__":
|
| 270 |
+
demo.launch(debug=True)
|