Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ import spaces
|
|
14 |
import gradio as gr
|
15 |
|
16 |
import torch
|
17 |
-
torch.backends.cuda.
|
18 |
import matplotlib.pyplot as plt
|
19 |
from PIL import Image, ImageDraw, ImageFont
|
20 |
import requests
|
@@ -27,7 +27,7 @@ from retinaface import RetinaFace
|
|
27 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
28 |
|
29 |
# load Gaze-LLE model
|
30 |
-
model, transform = torch.hub.load("fkryan/gazelle", "gazelle_dinov2_vitl14_inout")
|
31 |
model.eval()
|
32 |
model.to(device)
|
33 |
|
|
|
14 |
import gradio as gr
|
15 |
|
16 |
import torch
|
17 |
+
torch.backends.cuda.can_use_efficient_attention(False)
|
18 |
import matplotlib.pyplot as plt
|
19 |
from PIL import Image, ImageDraw, ImageFont
|
20 |
import requests
|
|
|
27 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
28 |
|
29 |
# load Gaze-LLE model
|
30 |
+
model, transform = torch.hub.load("fkryan/gazelle", "gazelle_dinov2_vitl14_inout", use_memory_efficient_attention=False)
|
31 |
model.eval()
|
32 |
model.to(device)
|
33 |
|